Blame SOURCES/kvm-test-bdrv-drain-Fix-outdated-comments.patch

383d26
From afdf8a5ba72ac761081edba383699bd45968349e Mon Sep 17 00:00:00 2001
383d26
From: Kevin Wolf <kwolf@redhat.com>
383d26
Date: Fri, 21 Sep 2018 12:46:28 +0200
383d26
Subject: [PATCH 1/3] test-bdrv-drain: Fix outdated comments
383d26
383d26
RH-Author: Kevin Wolf <kwolf@redhat.com>
383d26
Message-id: <20180921124630.29036-2-kwolf@redhat.com>
383d26
Patchwork-id: 82232
383d26
O-Subject: [RHV-7.6 qemu-kvm-rhev PATCH 1/3] test-bdrv-drain: Fix outdated comments
383d26
Bugzilla: 1618584
383d26
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
383d26
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
383d26
RH-Acked-by: Eric Blake <eblake@redhat.com>
383d26
RH-Acked-by: John Snow <jsnow@redhat.com>
383d26
383d26
Commit 89bd030533e changed the test case from using job_sleep_ns() to
383d26
using qemu_co_sleep_ns() instead. Also, block_job_sleep_ns() became
383d26
job_sleep_ns() in commit 5d43e86e11f.
383d26
383d26
In both cases, some comments in the test case were not updated. Do that
383d26
now.
383d26
383d26
Reported-by: Max Reitz <mreitz@redhat.com>
383d26
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
383d26
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
383d26
---
383d26
 tests/test-bdrv-drain.c | 10 +++++-----
383d26
 1 file changed, 5 insertions(+), 5 deletions(-)
383d26
383d26
diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c
383d26
index d6202b2..7e7ba9b 100644
383d26
--- a/tests/test-bdrv-drain.c
383d26
+++ b/tests/test-bdrv-drain.c
383d26
@@ -820,9 +820,9 @@ static int coroutine_fn test_job_run(Job *job, Error **errp)
383d26
 
383d26
     job_transition_to_ready(&s->common.job);
383d26
     while (!s->should_complete) {
383d26
-        /* Avoid block_job_sleep_ns() because it marks the job as !busy. We
383d26
-         * want to emulate some actual activity (probably some I/O) here so
383d26
-         * that drain has to wait for this acitivity to stop. */
383d26
+        /* Avoid job_sleep_ns() because it marks the job as !busy. We want to
383d26
+         * emulate some actual activity (probably some I/O) here so that drain
383d26
+         * has to wait for this activity to stop. */
383d26
         qemu_co_sleep_ns(QEMU_CLOCK_REALTIME, 100000);
383d26
         job_pause_point(&s->common.job);
383d26
     }
383d26
@@ -908,7 +908,7 @@ static void test_blockjob_common(enum drain_type drain_type, bool use_iothread,
383d26
 
383d26
     g_assert_cmpint(job->job.pause_count, ==, 0);
383d26
     g_assert_false(job->job.paused);
383d26
-    g_assert_true(job->job.busy); /* We're in job_sleep_ns() */
383d26
+    g_assert_true(job->job.busy); /* We're in qemu_co_sleep_ns() */
383d26
 
383d26
     do_drain_begin_unlocked(drain_type, src);
383d26
 
383d26
@@ -956,7 +956,7 @@ static void test_blockjob_common(enum drain_type drain_type, bool use_iothread,
383d26
 
383d26
     g_assert_cmpint(job->job.pause_count, ==, 0);
383d26
     g_assert_false(job->job.paused);
383d26
-    g_assert_true(job->job.busy); /* We're in job_sleep_ns() */
383d26
+    g_assert_true(job->job.busy); /* We're in qemu_co_sleep_ns() */
383d26
 
383d26
     aio_context_acquire(ctx);
383d26
     ret = job_complete_sync(&job->job, &error_abort);
383d26
-- 
383d26
1.8.3.1
383d26