mirror_qemu/tests
Vladimir Sementsov-Ogievskiy a13de40a05 block: bdrv_inactivate_recurse(): check for permissions and fix crash
We must not inactivate child when parent has write permissions on
it.

Calling .bdrv_inactivate() doesn't help: actually only qcow2 has this
handler and it is used to flush caches, not for permission
manipulations.

So, let's simply check cumulative parent permissions before
inactivating the node.

This commit fixes a crash when we do migration during backup: prior to
the commit nothing prevents all nodes inactivation at migration finish
and following backup write to the target crashes on assertion
"assert(!(bs->open_flags & BDRV_O_INACTIVE));" in
bdrv_co_write_req_prepare().

After the commit, we rely on the fact that copy-before-write filter
keeps write permission on target node to be able to write to it. So
inactivation fails and migration fails as expected.

Corresponding test now passes, so, enable it.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20210911120027.8063-3-vsementsov@virtuozzo.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
2021-09-15 15:54:07 +02:00
..
acceptance tests: Remove uses of deprecated raspi2/raspi3 machine names 2021-09-01 11:08:15 +01:00
bench tests: Move benchmarks into a separate folder 2021-03-12 15:46:30 +01:00
data tests/data/acpi/virt: Update IORT files for ITS 2021-09-13 21:01:08 +01:00
decode decodetree: Extend argument set syntax to allow types 2021-05-01 11:45:35 -07:00
docker ci: add libusb for windows builds 2021-07-29 11:18:24 +02:00
fp tests/fp: Enable more tests 2021-06-03 14:09:03 -07: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
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 unix socket migration 2021-07-14 14:15:52 +01:00
multiboot Remove superfluous .gitignore files 2020-10-13 12:48:17 +02:00
perf/block/qcow2
plugin tests/plugins/syscalls: adhere to new arg-passing scheme 2021-09-02 11:29:34 +01:00
qapi-schema qapi: Fix bogus error for 'if': { 'not': '' } 2021-09-08 15:30:30 +02:00
qemu-iotests block: bdrv_inactivate_recurse(): check for permissions and fix crash 2021-09-15 15:54:07 +02:00
qtest tests/data/acpi/virt: Update IORT files for ITS 2021-09-13 21:01:08 +01:00
rocker
tcg tests/tcg/s390x: Test SIGILL and SIGSEGV handling 2021-09-06 16:23:12 +02:00
tsan
uefi-test-tools Remove superfluous .gitignore files 2020-10-13 12:48:17 +02:00
unit tests: Remove uses of deprecated raspi2/raspi3 machine names 2021-09-01 11:08:15 +01:00
vm tests/vm: update openbsd to release 6.9 2021-07-14 14:33:53 +01:00
vmstate-static-checker-data hw: Replace anti-social QOM type names 2021-03-19 15:18:43 +01:00
Makefile.include Acceptance tests: do not try to reuse packages from the system 2021-07-13 16:19:41 -04:00
check-block.sh iotests: rewrite check into python 2021-01-27 20:53:14 +01:00
dbus-vmstate-daemon.sh
meson.build tests: Move benchmarks into a separate folder 2021-03-12 15:46:30 +01:00
requirements.txt acceptance tests: bump Avocado version to 88.1 2021-06-01 16:21:21 -04:00
test-qht-par.c
vhost-user-bridge.c tests/vhost-user-bridge.c: Fix typo in help message 2021-09-04 17:34:05 -04:00