From nobody Thu Nov 13 16:21:21 2025 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; 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=virtuozzo.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581431226254631.2359965385573; Tue, 11 Feb 2020 06:27:06 -0800 (PST) Received: from localhost ([::1]:50512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1WVB-0002eS-Ho for importer@patchew.org; Tue, 11 Feb 2020 09:27:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50384) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1WUB-0001Ne-VJ for qemu-devel@nongnu.org; Tue, 11 Feb 2020 09:26:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1WUA-0002Ra-O9 for qemu-devel@nongnu.org; Tue, 11 Feb 2020 09:25:59 -0500 Received: from relay.sw.ru ([185.231.240.75]:45006) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j1WUA-0002QB-Gg for qemu-devel@nongnu.org; Tue, 11 Feb 2020 09:25:58 -0500 Received: from dptest2.qa.sw.ru ([10.94.4.71]) by relay.sw.ru with esmtp (Exim 4.92.3) (envelope-from ) id 1j1WU4-00009Q-D7; Tue, 11 Feb 2020 17:25:52 +0300 From: Denis Plotnikov To: qemu-devel@nongnu.org Subject: [PATCH v1 1/2] tests/acceptance/virtio_check_params: remove excluded machine types carefully Date: Tue, 11 Feb 2020 17:25:50 +0300 Message-Id: <20200211142551.13072-2-dplotnikov@virtuozzo.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20200211142551.13072-1-dplotnikov@virtuozzo.com> References: <20200211142551.13072-1-dplotnikov@virtuozzo.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 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: cohuck@redhat.com, philmd@redhat.com, wainersm@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Before, the test failed if an excluded machine type was absent in the machi= ne types lists. Signed-off-by: Denis Plotnikov --- tests/acceptance/virtio_check_params.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/acceptance/virtio_check_params.py b/tests/acceptance/vir= tio_check_params.py index 87e6c839d1..deec89bf86 100644 --- a/tests/acceptance/virtio_check_params.py +++ b/tests/acceptance/virtio_check_params.py @@ -40,6 +40,8 @@ VM_DEV_PARAMS =3D {'virtio-scsi-pci': ['-device', 'virtio= -scsi-pci,id=3Dscsi0'], '-drive', 'driver=3Dnull-co,id=3Ddrive0,if=3Dnon= e']} =20 +EXCLUDED_MACHINES =3D ['none', 'isapc', 'microvm'] + =20 class VirtioMaxSegSettingsCheck(Test): @staticmethod @@ -117,6 +119,13 @@ class VirtioMaxSegSettingsCheck(Test): return True return False =20 + @staticmethod + def filter_machines(machines): + for mt in EXCLUDED_MACHINES: + if mt in machines: + machines.remove(mt) + return machines + @skip("break multi-arch CI") def test_machine_types(self): # collect all machine types except 'none', 'isapc', 'microvm' @@ -124,9 +133,8 @@ class VirtioMaxSegSettingsCheck(Test): vm.launch() machines =3D [m['name'] for m in vm.command('query-machines')] vm.shutdown() - machines.remove('none') - machines.remove('isapc') - machines.remove('microvm') + + machines =3D self.filter_machines(machines) =20 for dev_type in DEV_TYPES: # create the list of machine types and their parameters. --=20 2.17.0