From nobody Tue May 7 20:29:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1561497827; cv=none; d=zoho.com; s=zohoarc; b=mnKCs8mnLYbfepYark9W2zszoAQxganIgKtmLL3ywS5OSYf+PTR5U6OrfofJXk4d1bTx1FTKNn25mzQQ3/Krb+EG9TzjHSHuJ1HCQXvVJt37XVIS9VEIqndtWh7/MDLSB009+y2FPI+Q0LTdC3VThKQk3UEDOJWKPjLJn33cXbA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561497827; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=FutxKumZVUBgTZ/Op44Kq7BVaRxeilo8b2DP2jtv9PM=; b=YrWZgdMXfA1dcxZcaA/wvESxKtuh+tixn+nBcI9ZZ/9i4y/kuWw87pbS5/9EsdcFo3J/jIYYGvD6vfXaDYblLH9R620+Yrvf3MH+geabuYyA7zfeieWks1WKZBwSH6AID4sIug4w9Fcum0hrtpB8Yp/kUkRIi0B6TBdOFpFW8Ss= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1561497827062125.69859204211764; Tue, 25 Jun 2019 14:23:47 -0700 (PDT) Received: from localhost ([::1]:35336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfsul-0001t1-4U for importer@patchew.org; Tue, 25 Jun 2019 17:23:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41518) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfsrK-00088X-Va for qemu-devel@nongnu.org; Tue, 25 Jun 2019 17:20:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hfsrJ-0003pn-P1 for qemu-devel@nongnu.org; Tue, 25 Jun 2019 17:20:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58356) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hfsrH-0003gm-Cs; Tue, 25 Jun 2019 17:20:07 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8B16930821BE; Tue, 25 Jun 2019 21:20:06 +0000 (UTC) Received: from localhost (ovpn-204-63.brq.redhat.com [10.40.204.63]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1349B10018F9; Tue, 25 Jun 2019 21:20:03 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Tue, 25 Jun 2019 23:19:51 +0200 Message-Id: <20190625211955.15664-2-mreitz@redhat.com> In-Reply-To: <20190625211955.15664-1-mreitz@redhat.com> References: <20190625211955.15664-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 25 Jun 2019 21:20:06 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH v2 1/5] iotests: Add -display none to the qemu options X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Without this argument, qemu will print an angry message about not being able to connect to a display server if $DISPLAY is not set. For me, that breaks iotests.supported_formats() because it thus only sees ["Could", "not", "connect"] as the supported formats. Signed-off-by: Max Reitz Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- tests/qemu-iotests/check | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index f925606cc5..f2a0df8af2 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -581,13 +581,13 @@ export QEMU_PROG=3D"$(type -p "$QEMU_PROG")" =20 case "$QEMU_PROG" in *qemu-system-arm|*qemu-system-aarch64) - export QEMU_OPTIONS=3D"-nodefaults -machine virt,accel=3Dqtest" + export QEMU_OPTIONS=3D"-nodefaults -display none -machine virt,acc= el=3Dqtest" ;; *qemu-system-tricore) - export QEMU_OPTIONS=3D"-nodefaults -machine tricore_testboard,acce= l=3Dqtest" + export QEMU_OPTIONS=3D"-nodefaults -display none -machine tricore_= testboard,accel=3Dqtest" ;; *) - export QEMU_OPTIONS=3D"-nodefaults -machine accel=3Dqtest" + export QEMU_OPTIONS=3D"-nodefaults -display none -machine accel=3D= qtest" ;; esac =20 --=20 2.21.0 From nobody Tue May 7 20:29:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1561497807; cv=none; d=zoho.com; s=zohoarc; b=Tjg3h9ER+fOcCP3p9Dt12h+ZSEmJnJqthLmDfrKtsPZPwxGzJGyLh6SIWlQ5/IBrUUA5hK3GhROkfSDsJbEgKnKizeeR6ShzJoTr7vv+c27hMaAxIq+xOsw+n1mbR3cCtUnWJfZnP+bvmCofmac4pZaJnOnhDj5aLNngG3EPERs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561497807; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=8TySomQ3l2oGdl+e2oe7wPudN8EurKEqrk+J8MCiwm8=; b=TITaxphAxf4/hrjmtGyOBBcwjG+xltKPM5Yq5hv+N5fFGGC/mN1xHaeBa0QlLIl5gUpc/J5BgxoiAMbgf0fLzu5ONFnfUO4JdKbchlZmW/I8cTupr4GGlk146J65SIk0UB90ASFOnzpqs1hddqpPbq3syWTseR6OUVVaD2Uw3wQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1561497807379981.4842013574466; Tue, 25 Jun 2019 14:23:27 -0700 (PDT) Received: from localhost ([::1]:35332 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfsuP-0001ZZ-Ab for importer@patchew.org; Tue, 25 Jun 2019 17:23:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41840) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfsrj-0008U9-B3 for qemu-devel@nongnu.org; Tue, 25 Jun 2019 17:20:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hfsri-0004cR-6Q for qemu-devel@nongnu.org; Tue, 25 Jun 2019 17:20:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55066) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hfsrQ-00048J-Pf; Tue, 25 Jun 2019 17:20:18 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D95ED308FFB1; Tue, 25 Jun 2019 21:20:10 +0000 (UTC) Received: from localhost (ovpn-204-63.brq.redhat.com [10.40.204.63]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 707F3600C7; Tue, 25 Jun 2019 21:20:08 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Tue, 25 Jun 2019 23:19:52 +0200 Message-Id: <20190625211955.15664-3-mreitz@redhat.com> In-Reply-To: <20190625211955.15664-1-mreitz@redhat.com> References: <20190625211955.15664-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 25 Jun 2019 21:20:15 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH v2 2/5] iotests: Prefer null-co over null-aio X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" We use null-co basically everywhere in the iotests. Unless we want to test null-aio specifically, we should use it instead (for consistency). Signed-off-by: Max Reitz Reviewed-by: John Snow --- tests/qemu-iotests/093 | 7 +++---- tests/qemu-iotests/245 | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/093 b/tests/qemu-iotests/093 index d88fbc182e..bd56c94708 100755 --- a/tests/qemu-iotests/093 +++ b/tests/qemu-iotests/093 @@ -267,13 +267,12 @@ class ThrottleTestCoroutine(ThrottleTestCase): test_img =3D "null-co://" =20 class ThrottleTestGroupNames(iotests.QMPTestCase): - test_img =3D "null-aio://" max_drives =3D 3 =20 def setUp(self): self.vm =3D iotests.VM() for i in range(0, self.max_drives): - self.vm.add_drive(self.test_img, "throttling.iops-total=3D100") + self.vm.add_drive("null-co://", "throttling.iops-total=3D100") self.vm.launch() =20 def tearDown(self): @@ -377,10 +376,10 @@ class ThrottleTestRemovableMedia(iotests.QMPTestCase): =20 def test_removable_media(self): # Add a couple of dummy nodes named cd0 and cd1 - result =3D self.vm.qmp("blockdev-add", driver=3D"null-aio", + result =3D self.vm.qmp("blockdev-add", driver=3D"null-co", node_name=3D"cd0") self.assert_qmp(result, 'return', {}) - result =3D self.vm.qmp("blockdev-add", driver=3D"null-aio", + result =3D self.vm.qmp("blockdev-add", driver=3D"null-co", node_name=3D"cd1") self.assert_qmp(result, 'return', {}) =20 diff --git a/tests/qemu-iotests/245 b/tests/qemu-iotests/245 index bc1ceb9792..ae169778b0 100644 --- a/tests/qemu-iotests/245 +++ b/tests/qemu-iotests/245 @@ -598,7 +598,7 @@ class TestBlockdevReopen(iotests.QMPTestCase): ################## ###### null ###### ################## - opts =3D {'driver': 'null-aio', 'node-name': 'root', 'size': 1024} + opts =3D {'driver': 'null-co', 'node-name': 'root', 'size': 1024} =20 result =3D self.vm.qmp('blockdev-add', conv_keys =3D False, **opts) self.assert_qmp(result, 'return', {}) --=20 2.21.0 From nobody Tue May 7 20:29:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1561498642; cv=none; d=zoho.com; s=zohoarc; b=RotC9jQI7N8ZLLPjH8CfktvLjJTsxxL9p+PceXsmFy23VXmO5yRu4CAqEcO6849UMWuxzghTdjIyGw3hr6O7LN+VsiK5LC+eKgVPO4Xit7XLDzuCI7mjyJ7rhTGzstW4BR4QIAsxmeINcJl3oeGT11nBinOBTva1Zt+gLaULPYU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561498642; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=fnq19Gxfp6zqZ0zXqzJtRTq3n1bXeRLtLuiEYRNQK5E=; b=SoN8cDbrdnBmGQIA4elVfkaDQfySr0wOQPwoKt7B5rHowabIFLUualU8qKX/4jA8qkqO8kbVokCkMV+PLQhEUS1Ye0PFf5rdpoTMkRY9cu15FvYVPCknPkU1mPHjRhKmht7fFcGZhC8ACUH10vc4Lb/9ubIZ59d3PjY1LYQIlv8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 156149864269672.06066466398659; Tue, 25 Jun 2019 14:37:22 -0700 (PDT) Received: from localhost ([::1]:35426 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hft7n-0000TB-0k for importer@patchew.org; Tue, 25 Jun 2019 17:37:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41981) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfsro-00008J-2o for qemu-devel@nongnu.org; Tue, 25 Jun 2019 17:20:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hfsrm-0004ju-9x for qemu-devel@nongnu.org; Tue, 25 Jun 2019 17:20:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34406) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hfsrZ-0004Bn-Sh; Tue, 25 Jun 2019 17:20:29 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2FD0D369AC; Tue, 25 Jun 2019 21:20:14 +0000 (UTC) Received: from localhost (ovpn-204-63.brq.redhat.com [10.40.204.63]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BDE181972B; Tue, 25 Jun 2019 21:20:12 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Tue, 25 Jun 2019 23:19:53 +0200 Message-Id: <20190625211955.15664-4-mreitz@redhat.com> In-Reply-To: <20190625211955.15664-1-mreitz@redhat.com> References: <20190625211955.15664-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 25 Jun 2019 21:20:17 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH v2 3/5] iotests: Allow skipping test cases X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" case_notrun() does not actually skip the current test case. It just adds a "notrun" note and then returns to the caller, who manually has to skip the test. Generally, skipping a test case is as simple as returning from the current function, but not always: For example, this model does not allow skipping tests already in the setUp() function. Thus, add a QMPTestCase.case_skip() function that invokes case_notrun() and then self.skipTest(). To make this work, we need to filter the information on how many test cases were skipped from the unittest output. Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 3ecef5bc90..1b0ac50153 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -741,6 +741,11 @@ class QMPTestCase(unittest.TestCase): return self.pause_wait(job_id) return result =20 + def case_skip(self, reason): + '''Skip this test case''' + case_notrun(reason) + self.skipTest(reason) + =20 def notrun(reason): '''Skip this test suite''' @@ -752,7 +757,10 @@ def notrun(reason): sys.exit(0) =20 def case_notrun(reason): - '''Skip this test case''' + '''Mark this test case as not having been run, but do not actually + skip it; that is left to the caller. See QMPTestCase.case_skip() + for a variant that actually skips the current test case.''' + # Each test in qemu-iotests has a number ("seq") seq =3D os.path.basename(sys.argv[0]) =20 @@ -879,4 +887,12 @@ def main(supported_fmts=3D[], supported_oses=3D['linux= '], supported_cache_modes=3D[], unittest.main(testRunner=3DMyTestRunner) finally: if not debug: - sys.stderr.write(re.sub(r'Ran (\d+) tests? in [\d.]+s', r'Ran = \1 tests', output.getvalue())) + out =3D output.getvalue() + out =3D re.sub(r'Ran (\d+) tests? in [\d.]+s', r'Ran \1 tests'= , out) + + # Hide skipped tests from the reference output + out =3D re.sub(r'OK \(skipped=3D\d+\)', 'OK', out) + out_first_line, out_rest =3D out.split('\n', 1) + out =3D out_first_line.replace('s', '.') + '\n' + out_rest + + sys.stderr.write(out) --=20 2.21.0 From nobody Tue May 7 20:29:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1561498161; cv=none; d=zoho.com; s=zohoarc; b=WqNgtfS6nG7Jlui0mQR6wbrTlyjN20Ee7+rw0cB7w4dco2F7BEcR1J/ph35ZqrQLhI9jF2pEo7cB3FU0kotNBMsepf7jGZ8dFTYrHvdzDkfLx5ryPS2lRbXGaFdOHZbKzwd5NlMvaklYXm4OYhyHfxnnn1RLs4mqOauIN26H+80= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561498161; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=TR4Vc7TmhyMYPeXJLPFkmmJ7a645sMN7NGtvIdAwd+8=; b=ezSS3ZNCmdwRHecTlNCzf2EA2nqZefO/3Gl0WYUNCnPK8Xl0vSWbLirVCoFHQEU4QvrXbaOlwf5K+Aui3bZT3RLlMCmT6Pbl7Q5attWsd8Dpuao5NnJbNsTC6IpKXeBMHurvunlJ1nsML+KSYqZeYq2IDzsqnwiJrbYhMMR+bmk= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1561498161074962.4108589830405; Tue, 25 Jun 2019 14:29:21 -0700 (PDT) Received: from localhost ([::1]:35370 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hft06-0004dW-Dn for importer@patchew.org; Tue, 25 Jun 2019 17:29:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41974) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfsrn-00007h-S8 for qemu-devel@nongnu.org; Tue, 25 Jun 2019 17:20:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hfsrm-0004jp-AV for qemu-devel@nongnu.org; Tue, 25 Jun 2019 17:20:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57368) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hfsrf-0004Bm-Ue; Tue, 25 Jun 2019 17:20:32 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7A052882FF; Tue, 25 Jun 2019 21:20:16 +0000 (UTC) Received: from localhost (ovpn-204-63.brq.redhat.com [10.40.204.63]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 128381972D; Tue, 25 Jun 2019 21:20:15 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Tue, 25 Jun 2019 23:19:54 +0200 Message-Id: <20190625211955.15664-5-mreitz@redhat.com> In-Reply-To: <20190625211955.15664-1-mreitz@redhat.com> References: <20190625211955.15664-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 25 Jun 2019 21:20:17 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH v2 4/5] iotests: Test driver whitelisting in 093 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" null-aio may not be whitelisted. Skip all test cases that require it. Signed-off-by: Max Reitz --- tests/qemu-iotests/093 | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/093 b/tests/qemu-iotests/093 index bd56c94708..806bdcaa24 100755 --- a/tests/qemu-iotests/093 +++ b/tests/qemu-iotests/093 @@ -22,9 +22,11 @@ import iotests =20 nsec_per_sec =3D 1000000000 +supported_null_drivers =3D [ f for f in iotests.supported_formats() + if f.startswith('null-') ] =20 class ThrottleTestCase(iotests.QMPTestCase): - test_img =3D "null-aio://" + test_driver =3D "null-aio" max_drives =3D 3 =20 def blockstats(self, device): @@ -36,9 +38,13 @@ class ThrottleTestCase(iotests.QMPTestCase): raise Exception("Device not found for blockstats: %s" % device) =20 def setUp(self): + global supported_null_drivers + if self.test_driver not in supported_null_drivers: + self.case_skip('%s support missing' % self.test_driver) + self.vm =3D iotests.VM() for i in range(0, self.max_drives): - self.vm.add_drive(self.test_img) + self.vm.add_drive(self.test_driver + "://") self.vm.launch() =20 def tearDown(self): @@ -264,7 +270,7 @@ class ThrottleTestCase(iotests.QMPTestCase): self.assertEqual(self.blockstats('drive1')[0], 4096) =20 class ThrottleTestCoroutine(ThrottleTestCase): - test_img =3D "null-co://" + test_driver =3D "null-co" =20 class ThrottleTestGroupNames(iotests.QMPTestCase): max_drives =3D 3 @@ -426,4 +432,6 @@ class ThrottleTestRemovableMedia(iotests.QMPTestCase): =20 =20 if __name__ =3D=3D '__main__': + if 'null-co' not in supported_null_drivers: + iotests.notrun('null-co driver support missing') iotests.main(supported_fmts=3D["raw"]) --=20 2.21.0 From nobody Tue May 7 20:29:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1561498270; cv=none; d=zoho.com; s=zohoarc; b=E+leutE+ndTbkTzLoifBLKy5ZLOycSDsI8VnK5eLlwluVqOb0dsRpYUCPObLEpKJelDttY7t8DlHmIrxWsMwVr+dL7GejK0eXIPiEoJemZ69gN7aaAMMp9WJDDfoYrry1uxkdcugup0itnYU+w/oPdG4R6eutKiUHgrNi3yTRlg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561498270; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=HbdyBx9fA+FG+wBs1xPXDbi7k0+b0TnAN8Lmx1e7HyI=; b=A3NaVHiuL0ZMJchlxoLJEbIvabkTNhOTMlC5ORoXmyF1XruvGIY7OL8JgjpUB4m+hngb94SE7VZ9uvFs+3VeU3PUP2qBcFVw1XPYKGirTQ4h0P94BbHCk5yqsd71dW3FT7adfxnKwn76krSJSfqsxDznZrAAq5K19D6aVqsAyYU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1561498270661247.3487245203504; Tue, 25 Jun 2019 14:31:10 -0700 (PDT) Received: from localhost ([::1]:35378 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hft1u-0006B0-FT for importer@patchew.org; Tue, 25 Jun 2019 17:31:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41978) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfsro-000089-0W for qemu-devel@nongnu.org; Tue, 25 Jun 2019 17:20:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hfsrm-0004k2-A9 for qemu-devel@nongnu.org; Tue, 25 Jun 2019 17:20:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43778) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hfsrf-0004DJ-VA; Tue, 25 Jun 2019 17:20:32 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CCA5681DF0; Tue, 25 Jun 2019 21:20:18 +0000 (UTC) Received: from localhost (ovpn-204-63.brq.redhat.com [10.40.204.63]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5E9A61972B; Tue, 25 Jun 2019 21:20:18 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Date: Tue, 25 Jun 2019 23:19:55 +0200 Message-Id: <20190625211955.15664-6-mreitz@redhat.com> In-Reply-To: <20190625211955.15664-1-mreitz@redhat.com> References: <20190625211955.15664-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 25 Jun 2019 21:20:18 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH v2 5/5] iotests: Test driver whitelisting in 136 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" null-aio may not be whitelisted. Skip all test cases that require it. Signed-off-by: Max Reitz --- tests/qemu-iotests/136 | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/136 b/tests/qemu-iotests/136 index af7ffa4540..4ef95517a1 100755 --- a/tests/qemu-iotests/136 +++ b/tests/qemu-iotests/136 @@ -28,9 +28,11 @@ op_latency =3D nsec_per_sec // 1000 # See qtest_latency_= ns in accounting.c bad_sector =3D 8192 bad_offset =3D bad_sector * 512 blkdebug_file =3D os.path.join(iotests.test_dir, 'blkdebug.conf') +supported_null_drivers =3D [ f for f in iotests.supported_formats() + if f.startswith('null-') ] =20 class BlockDeviceStatsTestCase(iotests.QMPTestCase): - test_img =3D "null-aio://" + test_driver =3D "null-aio" total_rd_bytes =3D 0 total_rd_ops =3D 0 total_wr_bytes =3D 0 @@ -68,6 +70,10 @@ sector =3D "%d" file.close() =20 def setUp(self): + global supported_null_drivers + if self.test_driver not in supported_null_drivers: + self.case_skip('%s support missing' % self.test_driver) + drive_args =3D [] drive_args.append("stats-intervals.0=3D%d" % interval_length) drive_args.append("stats-account-invalid=3D%s" % @@ -75,8 +81,8 @@ sector =3D "%d" drive_args.append("stats-account-failed=3D%s" % (self.account_failed and "on" or "off")) self.create_blkdebug_file() - self.vm =3D iotests.VM().add_drive('blkdebug:%s:%s' % - (blkdebug_file, self.test_img), + self.vm =3D iotests.VM().add_drive('blkdebug:%s:%s://' % + (blkdebug_file, self.test_driver), ','.join(drive_args)) self.vm.launch() # Set an initial value for the clock @@ -336,7 +342,9 @@ class BlockDeviceStatsTestAccountBoth(BlockDeviceStatsT= estCase): account_failed =3D True =20 class BlockDeviceStatsTestCoroutine(BlockDeviceStatsTestCase): - test_img =3D "null-co://" + test_driver =3D "null-co" =20 if __name__ =3D=3D '__main__': + if 'null-co' not in supported_null_drivers: + iotests.notrun('null-co driver support missing') iotests.main(supported_fmts=3D["raw"]) --=20 2.21.0