From nobody Sun Feb 8 23:05:15 2026 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=1569246684; cv=none; d=zoho.com; s=zohoarc; b=TR7Luwz+mUVFHr1jtYWwo7Jy4r0IQJvAfUkX2gLc+MYUotTmY/Cy0PPl4WNH8DwYPE5NBjYM/pqcGcx9gLc3ue5Sfbm3tuX0cshm20SLxQ37sHtZ2GcTA2EoN7OQDp1mSrFNxYGDCfK25sjiBO5ESZtAa+XLRPzLPv34Y2iRjqI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569246684; 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=H8UYWcwReqY3dzfipdwgufXQStULVCbyzF9/5kU7YPk=; b=ccrXjI8k3IGdBnWfPkUcW7MTP1bSh79ijTcSm3IiOiswf3QB0DJoD7y2rfPC9f44+PB469IlXfjptI4bcW3MR2MeWhfWJsQAoopNIwAzslbNsETJgGl6AV6+qvd2KjtNf9gpeJatcfRSsremFP972+/sCBOmrf3OCu/7tcrUPjg= 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 156924668490666.29861999972684; Mon, 23 Sep 2019 06:51:24 -0700 (PDT) Received: from localhost ([::1]:56812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCOkN-0008Pi-MZ for importer@patchew.org; Mon, 23 Sep 2019 09:51:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59474) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCOZw-0007Ms-Vt for qemu-devel@nongnu.org; Mon, 23 Sep 2019 09:40:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCOZv-0007Yf-LN for qemu-devel@nongnu.org; Mon, 23 Sep 2019 09:40:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59688) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCOZv-0007YU-EB for qemu-devel@nongnu.org; Mon, 23 Sep 2019 09:40:35 -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 B5F723086213; Mon, 23 Sep 2019 13:40:34 +0000 (UTC) Received: from dhcp-17-179.bos.redhat.com (dhcp-17-179.bos.redhat.com [10.18.17.179]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8B49419C78; Mon, 23 Sep 2019 13:40:33 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 4/7] Acceptance test x86_cpu_model_versions: split into smaller tests Date: Mon, 23 Sep 2019 09:40:16 -0400 Message-Id: <20190923134019.8548-5-crosa@redhat.com> In-Reply-To: <20190923134019.8548-1-crosa@redhat.com> References: <20190923134019.8548-1-crosa@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.42]); Mon, 23 Sep 2019 13:40:34 +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 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: Fam Zheng , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" The justifications being automatic destruction of the vm instances when no longer needed and more compact test naming under a common class. Besides those, a smaller test makes the one and only assertion rather obvious, which suggests that we could even get rid of the more verbose (and manual) error messages (to be decided). Naming of the tests tries to follow the following pattern: test_($cpu_version)_($no_arch_capabitilies_set_or_unset)_($machine_version) The presence of each naming component is optional, depending on whether the test manually sets it or not. Signed-off-by: Cleber Rosa Message-Id: <20190828193628.7687-4-crosa@redhat.com> Reviewed-by: Eduardo Habkost Signed-off-by: Eduardo Habkost --- tests/acceptance/x86_cpu_model_versions.py | 23 ++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/tests/acceptance/x86_cpu_model_versions.py b/tests/acceptance/= x86_cpu_model_versions.py index 220d18f68d..5fc9ca4bc6 100644 --- a/tests/acceptance/x86_cpu_model_versions.py +++ b/tests/acceptance/x86_cpu_model_versions.py @@ -234,7 +234,14 @@ class X86CPUModelAliases(avocado_qemu.Test): =20 self.validate_aliases(cpus) =20 - def test_Cascadelake_arch_capabilities_result(self): + +class CascadelakeArchCapabilities(avocado_qemu.Test): + """ + Validation of Cascadelake arch-capabilities + + :avocado: tags=3Darch:x86_64 + """ + def test_4_1(self): # machine-type only: vm =3D self.get_vm() vm.add_args('-S') @@ -243,8 +250,8 @@ class X86CPUModelAliases(avocado_qemu.Test): vm.launch() self.assertFalse(get_cpu_prop(vm, 'arch-capabilities'), 'pc-i440fx-4.1 + Cascadelake-Server should not ha= ve arch-capabilities') - vm.shutdown() =20 + def test_4_0(self): vm =3D self.get_vm() vm.add_args('-S') vm.set_machine('pc-i440fx-4.0') @@ -252,8 +259,8 @@ class X86CPUModelAliases(avocado_qemu.Test): vm.launch() self.assertFalse(get_cpu_prop(vm, 'arch-capabilities'), 'pc-i440fx-4.0 + Cascadelake-Server should not ha= ve arch-capabilities') - vm.shutdown() =20 + def test_set_4_0(self): # command line must override machine-type if CPU model is not vers= ioned: vm =3D self.get_vm() vm.add_args('-S') @@ -262,8 +269,8 @@ class X86CPUModelAliases(avocado_qemu.Test): vm.launch() self.assertTrue(get_cpu_prop(vm, 'arch-capabilities'), 'pc-i440fx-4.0 + Cascadelake-Server,+arch-capabili= ties should have arch-capabilities') - vm.shutdown() =20 + def test_unset_4_1(self): vm =3D self.get_vm() vm.add_args('-S') vm.set_machine('pc-i440fx-4.1') @@ -271,8 +278,8 @@ class X86CPUModelAliases(avocado_qemu.Test): vm.launch() self.assertFalse(get_cpu_prop(vm, 'arch-capabilities'), 'pc-i440fx-4.1 + Cascadelake-Server,-arch-capabil= ities should not have arch-capabilities') - vm.shutdown() =20 + def test_v1_4_0(self): # versioned CPU model overrides machine-type: vm =3D self.get_vm() vm.add_args('-S') @@ -281,8 +288,8 @@ class X86CPUModelAliases(avocado_qemu.Test): vm.launch() self.assertFalse(get_cpu_prop(vm, 'arch-capabilities'), 'pc-i440fx-4.0 + Cascadelake-Server-v1 should not= have arch-capabilities') - vm.shutdown() =20 + def test_v2_4_0(self): vm =3D self.get_vm() vm.add_args('-S') vm.set_machine('pc-i440fx-4.0') @@ -290,8 +297,8 @@ class X86CPUModelAliases(avocado_qemu.Test): vm.launch() self.assertTrue(get_cpu_prop(vm, 'arch-capabilities'), 'pc-i440fx-4.0 + Cascadelake-Server-v2 should hav= e arch-capabilities') - vm.shutdown() =20 + def test_v1_set_4_0(self): # command line must override machine-type and versioned CPU model: vm =3D self.get_vm() vm.add_args('-S') @@ -300,8 +307,8 @@ class X86CPUModelAliases(avocado_qemu.Test): vm.launch() self.assertTrue(get_cpu_prop(vm, 'arch-capabilities'), 'pc-i440fx-4.0 + Cascadelake-Server-v1,+arch-capa= bilities should have arch-capabilities') - vm.shutdown() =20 + def test_v2_unset_4_1(self): vm =3D self.get_vm() vm.add_args('-S') vm.set_machine('pc-i440fx-4.1') --=20 2.21.0