summaryrefslogtreecommitdiff
path: root/tests/test-bdrv-drain.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2017-12-14 10:12:42 +0100
committerKevin Wolf <kwolf@redhat.com>2017-12-22 15:05:32 +0100
commit8119334918e86f45877cfc139192d54f2449a239 (patch)
treeb1904d3a3dfc722ee772038d211d78d7437dea6c /tests/test-bdrv-drain.c
parent7253220de42e82c59e72f29e69285a9a9e9e96ee (diff)
downloadqemu-8119334918e86f45877cfc139192d54f2449a239.tar.gz
block: Don't block_job_pause_all() in bdrv_drain_all()
Block jobs are already paused using the BdrvChildRole drain callbacks, so we don't need an additional block_job_pause_all() call. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/test-bdrv-drain.c')
-rw-r--r--tests/test-bdrv-drain.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c
index 9783768a20..6da66ae841 100644
--- a/tests/test-bdrv-drain.c
+++ b/tests/test-bdrv-drain.c
@@ -284,9 +284,8 @@ static void test_blockjob_common(enum drain_type drain_type)
do_drain_begin(drain_type, src);
if (drain_type == BDRV_DRAIN_ALL) {
- /* bdrv_drain_all() drains both src and target, and involves an
- * additional block_job_pause_all() */
- g_assert_cmpint(job->pause_count, ==, 3);
+ /* bdrv_drain_all() drains both src and target */
+ g_assert_cmpint(job->pause_count, ==, 2);
} else {
g_assert_cmpint(job->pause_count, ==, 1);
}
@@ -303,9 +302,8 @@ static void test_blockjob_common(enum drain_type drain_type)
do_drain_begin(drain_type, target);
if (drain_type == BDRV_DRAIN_ALL) {
- /* bdrv_drain_all() drains both src and target, and involves an
- * additional block_job_pause_all() */
- g_assert_cmpint(job->pause_count, ==, 3);
+ /* bdrv_drain_all() drains both src and target */
+ g_assert_cmpint(job->pause_count, ==, 2);
} else {
g_assert_cmpint(job->pause_count, ==, 1);
}