qemu-patch-raspberry4/tests
Vladimir Sementsov-Ogievskiy e6af4f0e94 tests/test-bdrv-graph-mod: add test_parallel_perm_update
Add test to show that simple DFS recursion order is not correct for
permission update. Correct order is topological-sort order, which will
be introduced later.

Consider the block driver which has two filter children: one active
with exclusive write access and one inactive with no specific
permissions.

And, these two children has a common base child, like this:

┌─────┐     ┌──────┐
│ fl2 │ ◀── │ top  │
└─────┘     └──────┘
  │           │
  │           │ w
  │           ▼
  │         ┌──────┐
  │         │ fl1  │
  │         └──────┘
  │           │
  │           │ w
  │           ▼
  │         ┌──────┐
  └───────▶ │ base │
            └──────┘

So, exclusive write is propagated.

Assume, we want to make fl2 active instead of fl1.
So, we set some option for top driver and do permission update.

If permission update (remember, it's DFS) goes first through
top->fl1->base branch it will succeed: it firstly drop exclusive write
permissions and than apply them for another BdrvChildren.
But if permission update goes first through top->fl2->base branch it
will fail, as when we try to update fl2->base child, old not yet
updated fl1->base child will be in conflict.

Now test fails, so it runs only with -d flag. To run do

  ./test-bdrv-graph-mod -d -p /bdrv-graph-mod/parallel-perm-update

from <build-directory>/tests.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20210428151804.439460-3-vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2021-04-30 12:27:47 +02:00
..
acceptance Remove many old deprecated features 2021-03-18 19:00:50 +00:00
bench tests: Move benchmarks into a separate folder 2021-03-12 15:46:30 +01:00
data tests: acpi: update expected blobs 2021-03-22 18:58:19 -04:00
decode decodetree: Improve identifier matching 2020-09-14 14:23:19 +01:00
docker gitlab-ci.yml: Test the dtrace backend in one of the jobs 2021-04-06 15:04:50 +01:00
fp tests/fp/fp-test: Replace the word 'blacklist' 2021-03-09 22:17:06 +01:00
guest-debug chardev: do not use short form boolean options in non-QemuOpts character device descriptions 2021-02-25 15:41:53 +01:00
image-fuzzer image-fuzzer: Use OSerror.strerror instead of tuple subscript 2019-11-05 16:36:11 +01:00
include tests: add missing generated sources to testqapi 2020-10-17 10:45:50 -04:00
keys tests/vm: Add Haiku test based on their vagrant images 2020-11-17 09:45:24 +01:00
migration tests/migration: fix parameter of auto-converge migration 2021-04-07 18:37:56 +01:00
multiboot Remove superfluous .gitignore files 2020-10-13 12:48:17 +02:00
perf/block/qcow2 tests/perf: Test lseek influence on qcow2 block-status 2019-06-04 15:20:41 +02:00
plugin plugins: new syscalls plugin 2021-03-17 07:17:46 +00:00
qapi-schema qapi: Enforce union and alternate branch naming rules 2021-03-23 22:31:53 +01:00
qemu-iotests iotests: Test mirror-top filter permissions 2021-04-09 18:00:29 +02:00
qtest tests/qtest: add tests for am53c974 device 2021-04-12 22:37:11 +01:00
rocker tests: Avoid non-portable 'echo -ARG' 2017-07-11 17:45:00 +02:00
tcg accel/tcg: Preserve PAGE_ANON when changing page permissions 2021-04-12 11:06:24 +01:00
tsan tests/docker: Added docker build support for TSan. 2020-06-16 14:49:05 +01:00
uefi-test-tools Remove superfluous .gitignore files 2020-10-13 12:48:17 +02:00
unit tests/test-bdrv-graph-mod: add test_parallel_perm_update 2021-04-30 12:27:47 +02:00
vm FreeBSD: Upgrade to 12.2 release 2021-03-20 06:33:17 +01:00
vmstate-static-checker-data hw: Replace anti-social QOM type names 2021-03-19 15:18:43 +01:00
check-block.sh iotests: rewrite check into python 2021-01-27 20:53:14 +01:00
dbus-vmstate-daemon.sh tests: add dbus-vmstate-test 2020-01-06 18:41:32 +04:00
Makefile.include tests: remove "make check-speed" in favor of "make bench" 2021-03-12 15:46:30 +01:00
meson.build tests: Move benchmarks into a separate folder 2021-03-12 15:46:30 +01:00
requirements.txt Acceptance Tests: bump Avocado version requirement to 85.0 2021-02-15 18:56:57 -05:00
test-qht-par.c
vhost-user-bridge.c libvhost-user: make it a meson subproject 2020-12-08 13:48:58 -05:00