From nobody Sat May 4 05:58:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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; dkim=fail; spf=pass (zohomail.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=1576680290; cv=none; d=zohomail.com; s=zohoarc; b=TYYQ4bYiP/vmeLgepFPeys3YoUWgrXvY6Ir2yGYioTsOIWpQoVTTYYjoWki5hpVohlSONg6KqbUzRDVjTpiovgtzzRq+i71/3AhMXmBdV7YKDYorMoATGHeJtYHq+FUcBA1+uciw9/V6DPkGOI2szXmo3Ubo4Nof8r2JVTVLqrc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576680290; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To; bh=2arDANuKcCRoUOX9pzo6ycOeu9V/Wt7V7uq/JXcQjis=; b=aHElZ0MVh2rLxaqpPGK+Elu6ISpJypopg7Dc4idWsYil1xhl5DbFVwW3XBjpzvxN8tUhiaWt478HvHIhPkXIcw6lCkdfXM5+ovSNPTMGe3NwEBi578+w6fSei392K8GHkG+0UlCKA0W4nCinr0ZYcPrktVEBlrSmoBH5FQEySbM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 1576680290155271.9722263460642; Wed, 18 Dec 2019 06:44:50 -0800 (PST) Received: from localhost ([::1]:55218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihaZD-0004gV-Hs for importer@patchew.org; Wed, 18 Dec 2019 09:44:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51222) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihaYV-0004H7-CY for qemu-devel@nongnu.org; Wed, 18 Dec 2019 09:44:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihaYS-0007CB-OU for qemu-devel@nongnu.org; Wed, 18 Dec 2019 09:44:02 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:43914 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihaYS-000739-3u for qemu-devel@nongnu.org; Wed, 18 Dec 2019 09:44:00 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-244-7C4Wyl9qOvmAUxHycJpizw-1; Wed, 18 Dec 2019 09:43:55 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 63AFBCF1D2; Wed, 18 Dec 2019 14:43:54 +0000 (UTC) Received: from thuth.com (ovpn-116-150.ams2.redhat.com [10.36.116.150]) by smtp.corp.redhat.com (Postfix) with ESMTP id CFF295D9E2; Wed, 18 Dec 2019 14:43:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576680239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2arDANuKcCRoUOX9pzo6ycOeu9V/Wt7V7uq/JXcQjis=; b=JFGGdzbVPFqaHnaNgr4qUnExMFpRWnbh4UzKXrNJ+qF3CmNR7KXSkPdwXqgmOTU7ldtO7T LWfWStf0nCQhIr4E6Ky0YwvJXF53QhEvvQdBrI3+Bv2cnd7lC2vLXbgO23Dez0bjMy4y2v +k+oq/bXSgZfYy1ECyqUwi3y49+xKF8= From: Thomas Huth To: qemu-devel@nongnu.org, Max Reitz Subject: [PATCH v2] iotests: Add more "skip_if_unsupported" statements to the python tests Date: Wed, 18 Dec 2019 15:43:49 +0100 Message-Id: <20191218144349.19354-1-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: 7C4Wyl9qOvmAUxHycJpizw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.120 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 , Andrey Shinkevich , qemu-block@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The python code already contains a possibility to skip tests if the corresponding driver is not available in the qemu binary - use it in more spots to avoid that the tests are failing if the driver has been disabled. Signed-off-by: Thomas Huth --- v2: Thanks to Max' "iotests: Allow skipping test cases" patch (see commit 6be012252018249d3a), this patch has been greatly simplified by only marking the setUp functions instead of all functions from a class. tests/qemu-iotests/030 | 1 + tests/qemu-iotests/040 | 2 ++ tests/qemu-iotests/041 | 1 + tests/qemu-iotests/245 | 2 ++ 4 files changed, 6 insertions(+) diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030 index f3766f2a81..a585554c61 100755 --- a/tests/qemu-iotests/030 +++ b/tests/qemu-iotests/030 @@ -530,6 +530,7 @@ class TestQuorum(iotests.QMPTestCase): children =3D [] backing =3D [] =20 + @iotests.skip_if_unsupported(['quorum']) def setUp(self): opts =3D ['driver=3Dquorum', 'vote-threshold=3D2'] =20 diff --git a/tests/qemu-iotests/040 b/tests/qemu-iotests/040 index 762ad1ebcb..74f62c3c4a 100755 --- a/tests/qemu-iotests/040 +++ b/tests/qemu-iotests/040 @@ -106,6 +106,7 @@ class TestSingleDrive(ImageCommitTestCase): self.assertEqual(-1, qemu_io('-f', 'raw', '-c', 'read -P 0xab 0 52= 4288', backing_img).find("verification failed")) self.assertEqual(-1, qemu_io('-f', 'raw', '-c', 'read -P 0xef 5242= 88 524288', backing_img).find("verification failed")) =20 + @iotests.skip_if_unsupported(['throttle']) def test_commit_with_filter_and_quit(self): result =3D self.vm.qmp('object-add', qom_type=3D'throttle-group', = id=3D'tg') self.assert_qmp(result, 'return', {}) @@ -125,6 +126,7 @@ class TestSingleDrive(ImageCommitTestCase): self.has_quit =3D True =20 # Same as above, but this time we add the filter after starting the job + @iotests.skip_if_unsupported(['throttle']) def test_commit_plus_filter_and_quit(self): result =3D self.vm.qmp('object-add', qom_type=3D'throttle-group', = id=3D'tg') self.assert_qmp(result, 'return', {}) diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041 index 8568426311..ef95fba656 100755 --- a/tests/qemu-iotests/041 +++ b/tests/qemu-iotests/041 @@ -871,6 +871,7 @@ class TestRepairQuorum(iotests.QMPTestCase): image_len =3D 1 * 1024 * 1024 # MB IMAGES =3D [ quorum_img1, quorum_img2, quorum_img3 ] =20 + @iotests.skip_if_unsupported(['quorum']) def setUp(self): self.vm =3D iotests.VM() =20 diff --git a/tests/qemu-iotests/245 b/tests/qemu-iotests/245 index e66a23c5f0..36d7ca6ded 100644 --- a/tests/qemu-iotests/245 +++ b/tests/qemu-iotests/245 @@ -478,6 +478,7 @@ class TestBlockdevReopen(iotests.QMPTestCase): # This test verifies that we can't change the children of a block # device during a reopen operation in a way that would create # cycles in the node graph + @iotests.skip_if_unsupported(['blkverify']) def test_graph_cycles(self): opts =3D [] =20 @@ -534,6 +535,7 @@ class TestBlockdevReopen(iotests.QMPTestCase): self.assert_qmp(result, 'return', {}) =20 # Misc reopen tests with different block drivers + @iotests.skip_if_unsupported(['quorum']) def test_misc_drivers(self): #################### ###### quorum ###### --=20 2.18.1