From nobody Tue Apr 15 14:48:19 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1537891449243469.5344865612881; Tue, 25 Sep 2018 09:04:09 -0700 (PDT) Received: from localhost ([::1]:54003 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4pom-0003Bn-2c for importer@patchew.org; Tue, 25 Sep 2018 12:04:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4p5f-0001wn-DP for qemu-devel@nongnu.org; Tue, 25 Sep 2018 11:17:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g4p5e-0006PM-Dz for qemu-devel@nongnu.org; Tue, 25 Sep 2018 11:17:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41398) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g4p5X-0006FG-KD; Tue, 25 Sep 2018 11:17:23 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2714286672; Tue, 25 Sep 2018 15:17:22 +0000 (UTC) Received: from localhost (unknown [10.40.205.127]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A8535308BDB3; Tue, 25 Sep 2018 15:17:21 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Tue, 25 Sep 2018 17:15:39 +0200 Message-Id: <20180925151541.18932-41-mreitz@redhat.com> In-Reply-To: <20180925151541.18932-1-mreitz@redhat.com> References: <20180925151541.18932-1-mreitz@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 25 Sep 2018 15:17:22 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 40/42] test-bdrv-drain: Fix outdated comments X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Kevin Wolf Commit 89bd030533e changed the test case from using job_sleep_ns() to using qemu_co_sleep_ns() instead. Also, block_job_sleep_ns() became job_sleep_ns() in commit 5d43e86e11f. In both cases, some comments in the test case were not updated. Do that now. Reported-by: Max Reitz Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- tests/test-bdrv-drain.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c index bbc56a055f..f367e6cdc1 100644 --- a/tests/test-bdrv-drain.c +++ b/tests/test-bdrv-drain.c @@ -820,9 +820,9 @@ static int coroutine_fn test_job_run(Job *job, Error **= errp) =20 job_transition_to_ready(&s->common.job); while (!s->should_complete) { - /* Avoid block_job_sleep_ns() because it marks the job as !busy. We - * want to emulate some actual activity (probably some I/O) here so - * that drain has to wait for this acitivity to stop. */ + /* Avoid job_sleep_ns() because it marks the job as !busy. We want= to + * emulate some actual activity (probably some I/O) here so that d= rain + * has to wait for this activity to stop. */ qemu_co_sleep_ns(QEMU_CLOCK_REALTIME, 100000); job_pause_point(&s->common.job); } @@ -908,7 +908,7 @@ static void test_blockjob_common(enum drain_type drain_= type, bool use_iothread, =20 g_assert_cmpint(job->job.pause_count, =3D=3D, 0); g_assert_false(job->job.paused); - g_assert_true(job->job.busy); /* We're in job_sleep_ns() */ + g_assert_true(job->job.busy); /* We're in qemu_co_sleep_ns() */ =20 do_drain_begin_unlocked(drain_type, src); =20 @@ -956,7 +956,7 @@ static void test_blockjob_common(enum drain_type drain_= type, bool use_iothread, =20 g_assert_cmpint(job->job.pause_count, =3D=3D, 0); g_assert_false(job->job.paused); - g_assert_true(job->job.busy); /* We're in job_sleep_ns() */ + g_assert_true(job->job.busy); /* We're in qemu_co_sleep_ns() */ =20 aio_context_acquire(ctx); ret =3D job_complete_sync(&job->job, &error_abort); --=20 2.17.1