cryptospore / rpms / qemu-kvm

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