aboutsummaryrefslogtreecommitdiff
path: root/tests/test-bdrv-drain.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-bdrv-drain.c')
-rw-r--r--tests/test-bdrv-drain.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c
index b3d7960bd0..15393a0140 100644
--- a/tests/test-bdrv-drain.c
+++ b/tests/test-bdrv-drain.c
@@ -96,7 +96,7 @@ static void bdrv_test_child_perm(BlockDriverState *bs, BdrvChild *c,
* bdrv_format_default_perms() accepts only these two, so disguise
* detach_by_driver_cb_parent as one of them.
*/
- if (child_class != &child_file && child_class != &child_backing) {
+ if (child_class != &child_file && child_class != &child_of_bds) {
child_class = &child_file;
}
@@ -1399,8 +1399,8 @@ static void test_detach_indirect(bool by_parent_cb)
bdrv_ref(a);
child_b = bdrv_attach_child(parent_b, b, "PB-B", &child_file, 0,
&error_abort);
- child_a = bdrv_attach_child(parent_b, a, "PB-A", &child_backing, 0,
- &error_abort);
+ child_a = bdrv_attach_child(parent_b, a, "PB-A", &child_of_bds,
+ BDRV_CHILD_COW, &error_abort);
bdrv_ref(a);
bdrv_attach_child(parent_a, a, "PA-A",
@@ -1793,7 +1793,7 @@ static void test_drop_intermediate_poll(void)
int i;
int ret;
- chain_child_class = child_backing;
+ chain_child_class = child_of_bds;
chain_child_class.update_filename = drop_intermediate_poll_update_filename;
for (i = 0; i < 3; i++) {
@@ -1816,7 +1816,7 @@ static void test_drop_intermediate_poll(void)
/* Takes the reference to chain[i - 1] */
chain[i]->backing = bdrv_attach_child(chain[i], chain[i - 1],
"chain", &chain_child_class,
- 0, &error_abort);
+ BDRV_CHILD_COW, &error_abort);
}
}
@@ -2034,7 +2034,8 @@ static void do_test_replace_child_mid_drain(int old_drain_count,
bdrv_ref(old_child_bs);
parent_bs->backing = bdrv_attach_child(parent_bs, old_child_bs, "child",
- &child_backing, 0, &error_abort);
+ &child_of_bds, BDRV_CHILD_COW,
+ &error_abort);
for (i = 0; i < old_drain_count; i++) {
bdrv_drained_begin(old_child_bs);