diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2021-06-10 15:05:34 +0300 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2021-06-29 16:51:00 +0200 |
commit | 25f78d9e2de528473d52acfcf7acdfb64e3453d4 (patch) | |
tree | 5b18569841ab6c46634f2c9a2411db53bda8c85c /tests/unit | |
parent | cbfdb98ce21532e6705fdbf324583f99602e183a (diff) | |
download | qemu-25f78d9e2de528473d52acfcf7acdfb64e3453d4.zip qemu-25f78d9e2de528473d52acfcf7acdfb64e3453d4.tar.gz qemu-25f78d9e2de528473d52acfcf7acdfb64e3453d4.tar.bz2 |
block: move supports_backing check to bdrv_set_file_or_backing_noperm()
Move supports_backing check of bdrv_reopen_parse_backing to called
(through bdrv_set_backing_noperm()) bdrv_set_file_or_backing_noperm()
function. The check applies to general case, so it's appropriate for
bdrv_set_file_or_backing_noperm().
We have to declare backing support for two test drivers, otherwise new
check fails.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20210610120537.196183-7-vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/test-bdrv-drain.c | 1 | ||||
-rw-r--r-- | tests/unit/test-bdrv-graph-mod.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/tests/unit/test-bdrv-drain.c b/tests/unit/test-bdrv-drain.c index 892f7f4..ce071b5 100644 --- a/tests/unit/test-bdrv-drain.c +++ b/tests/unit/test-bdrv-drain.c @@ -95,6 +95,7 @@ static int bdrv_test_change_backing_file(BlockDriverState *bs, static BlockDriver bdrv_test = { .format_name = "test", .instance_size = sizeof(BDRVTestState), + .supports_backing = true, .bdrv_close = bdrv_test_close, .bdrv_co_preadv = bdrv_test_co_preadv, diff --git a/tests/unit/test-bdrv-graph-mod.c b/tests/unit/test-bdrv-graph-mod.c index 88f25c0..a6e3bb7 100644 --- a/tests/unit/test-bdrv-graph-mod.c +++ b/tests/unit/test-bdrv-graph-mod.c @@ -41,6 +41,7 @@ static void no_perm_default_perms(BlockDriverState *bs, BdrvChild *c, static BlockDriver bdrv_no_perm = { .format_name = "no-perm", + .supports_backing = true, .bdrv_child_perm = no_perm_default_perms, }; |