ae23c9
From f495ce4d9953a5e7634c0891edede7fd75b403de Mon Sep 17 00:00:00 2001
ae23c9
From: Kevin Wolf <kwolf@redhat.com>
ae23c9
Date: Wed, 10 Oct 2018 20:22:11 +0100
ae23c9
Subject: [PATCH 45/49] test-bdrv-drain: Fix outdated comments
ae23c9
ae23c9
RH-Author: Kevin Wolf <kwolf@redhat.com>
ae23c9
Message-id: <20181010202213.7372-33-kwolf@redhat.com>
ae23c9
Patchwork-id: 82621
ae23c9
O-Subject: [RHEL-8 qemu-kvm PATCH 42/44] test-bdrv-drain: Fix outdated comments
ae23c9
Bugzilla: 1637976
ae23c9
RH-Acked-by: Max Reitz <mreitz@redhat.com>
ae23c9
RH-Acked-by: John Snow <jsnow@redhat.com>
ae23c9
RH-Acked-by: Thomas Huth <thuth@redhat.com>
ae23c9
ae23c9
Commit 89bd030533e changed the test case from using job_sleep_ns() to
ae23c9
using qemu_co_sleep_ns() instead. Also, block_job_sleep_ns() became
ae23c9
job_sleep_ns() in commit 5d43e86e11f.
ae23c9
ae23c9
In both cases, some comments in the test case were not updated. Do that
ae23c9
now.
ae23c9
ae23c9
Reported-by: Max Reitz <mreitz@redhat.com>
ae23c9
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ae23c9
Reviewed-by: Eric Blake <eblake@redhat.com>
ae23c9
(cherry picked from commit 5599c162c3bec2bc8f0123e4d5802a70d9984b3b)
ae23c9
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ae23c9
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
ae23c9
---
ae23c9
 tests/test-bdrv-drain.c | 10 +++++-----
ae23c9
 1 file changed, 5 insertions(+), 5 deletions(-)
ae23c9
ae23c9
diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c
ae23c9
index d6202b2..7e7ba9b 100644
ae23c9
--- a/tests/test-bdrv-drain.c
ae23c9
+++ b/tests/test-bdrv-drain.c
ae23c9
@@ -820,9 +820,9 @@ static int coroutine_fn test_job_run(Job *job, Error **errp)
ae23c9
 
ae23c9
     job_transition_to_ready(&s->common.job);
ae23c9
     while (!s->should_complete) {
ae23c9
-        /* Avoid block_job_sleep_ns() because it marks the job as !busy. We
ae23c9
-         * want to emulate some actual activity (probably some I/O) here so
ae23c9
-         * that drain has to wait for this acitivity to stop. */
ae23c9
+        /* Avoid job_sleep_ns() because it marks the job as !busy. We want to
ae23c9
+         * emulate some actual activity (probably some I/O) here so that drain
ae23c9
+         * has to wait for this activity to stop. */
ae23c9
         qemu_co_sleep_ns(QEMU_CLOCK_REALTIME, 100000);
ae23c9
         job_pause_point(&s->common.job);
ae23c9
     }
ae23c9
@@ -908,7 +908,7 @@ static void test_blockjob_common(enum drain_type drain_type, bool use_iothread,
ae23c9
 
ae23c9
     g_assert_cmpint(job->job.pause_count, ==, 0);
ae23c9
     g_assert_false(job->job.paused);
ae23c9
-    g_assert_true(job->job.busy); /* We're in job_sleep_ns() */
ae23c9
+    g_assert_true(job->job.busy); /* We're in qemu_co_sleep_ns() */
ae23c9
 
ae23c9
     do_drain_begin_unlocked(drain_type, src);
ae23c9
 
ae23c9
@@ -956,7 +956,7 @@ static void test_blockjob_common(enum drain_type drain_type, bool use_iothread,
ae23c9
 
ae23c9
     g_assert_cmpint(job->job.pause_count, ==, 0);
ae23c9
     g_assert_false(job->job.paused);
ae23c9
-    g_assert_true(job->job.busy); /* We're in job_sleep_ns() */
ae23c9
+    g_assert_true(job->job.busy); /* We're in qemu_co_sleep_ns() */
ae23c9
 
ae23c9
     aio_context_acquire(ctx);
ae23c9
     ret = job_complete_sync(&job->job, &error_abort);
ae23c9
-- 
ae23c9
1.8.3.1
ae23c9