From nobody Wed May 8 21:31:09 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=1569246186; cv=none; d=zoho.com; s=zohoarc; b=VJvkJJff+tnofFMQfWU7HQUneoNuowoBl59/jIRnmppSRosSrd0+za8lYCAXHANET8USFyaUAr4XWDM4j/iu/iZyjiGZvuZr7W8ZLeyRdlov0hV7+7+PGl3X0Wj7Mj59NzQvxrClavyMsy5taro9TbrW0t2+Q+qnGhktQ1coPh4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569246186; h=Content-Type: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=m+22Kdu6b2MSaCS2sKxDr225KgffpgLRKv3fl9fG3eI=; b=eo9DAQ02YF93VOPJmyUB4G9ur3EzraPQTQJ/A229CVgKhpfML8R7Q230xX5cyc7HahIVT/9fB4EKeA4F2dLeVddZaRFwEEenJ8GKqilBZF/Z/T4G9wlFHP1KIQOLtWhGzy3VEato8n48uBlpW+rnvLKXdkSRWn6WqQqBB9S98q8= 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 1569246186200536.94638445329; Mon, 23 Sep 2019 06:43:06 -0700 (PDT) Received: from localhost ([::1]:56738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCOcI-0000Yp-0J for importer@patchew.org; Mon, 23 Sep 2019 09:43:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59436) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCOZt-0007IR-4y for qemu-devel@nongnu.org; Mon, 23 Sep 2019 09:40:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCOZs-0007Xc-44 for qemu-devel@nongnu.org; Mon, 23 Sep 2019 09:40:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52682) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCOZr-0007XQ-Vd for qemu-devel@nongnu.org; Mon, 23 Sep 2019 09:40: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 DE89F10C092B; Mon, 23 Sep 2019 13:40:30 +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 E67AD19C77; Mon, 23 Sep 2019 13:40:26 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 1/7] Acceptance test machine_m68k_nextcube.py: relax the error code pattern Date: Mon, 23 Sep 2019 09:40:13 -0400 Message-Id: <20190923134019.8548-2-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.6.2 (mx1.redhat.com [10.5.110.66]); Mon, 23 Sep 2019 13:40:31 +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 , Thomas Huth , 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" Instead of looking for a specific error, let's relax the pattern because different errors have been seen (I'm consistenly getting 52) and the real goal of this test is to validate the framebuffer operation, and not to reproduce one specific error. Signed-off-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Message-Id: <20190919161400.26399-1-crosa@redhat.com> Signed-off-by: Cleber Rosa --- tests/acceptance/machine_m68k_nextcube.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/acceptance/machine_m68k_nextcube.py b/tests/acceptance/m= achine_m68k_nextcube.py index e09cab9f20..fcd2c58ee7 100644 --- a/tests/acceptance/machine_m68k_nextcube.py +++ b/tests/acceptance/machine_m68k_nextcube.py @@ -116,6 +116,6 @@ class NextCubeMachine(Test): if len(line): console_logger.debug(line) self.assertIn('Testing the FPU, SCC', text) - self.assertIn('System test failed. Error code 51', text) + self.assertIn('System test failed. Error code', text) self.assertIn('Boot command', text) self.assertIn('Next>', text) --=20 2.21.0 From nobody Wed May 8 21:31:09 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=1569246188; cv=none; d=zoho.com; s=zohoarc; b=KfiWLX11wtp2mMCE5OxrnonItDwg5sR5NoLZKnhF41K0PPRnenWpTiXSvEe3VAE2UPcuDMp64ad4Zx0K0PweXTHnhS02V8JMRrItidf7M/dJHaNTiiQ942LCbSxs6Faj5TffW8RbkCCOJwtfMNXs89XD8Pm+jDUfRrO5Bcu7AcM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569246188; 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=Z15Src4OGvkdGKUbEh2kztQcepEYP7fKGODmROHjCYw=; b=oVc2o3Uamd4TVmfEQzXAqWVubI6S5xNas3NWS2eo4H+IhM2Tvw089nTr+tawy2mx5G0TCKGm/abZTM9vItPqejVmA1VT3uu72keA+FQMXEYmkq81K9/A4AGcabL0velmmkE3smr5aApewtvoEjbCaTv9BAXf5z+p/sFNT06Vt3w= 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 1569246188525103.90561311955298; Mon, 23 Sep 2019 06:43:08 -0700 (PDT) Received: from localhost ([::1]:56740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCOcN-0000fD-5J for importer@patchew.org; Mon, 23 Sep 2019 09:43:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59447) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCOZu-0007JV-5H for qemu-devel@nongnu.org; Mon, 23 Sep 2019 09:40:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCOZt-0007Xz-3D for qemu-devel@nongnu.org; Mon, 23 Sep 2019 09:40:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55334) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCOZs-0007Xh-SD for qemu-devel@nongnu.org; Mon, 23 Sep 2019 09:40:33 -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 290EE30917AA; Mon, 23 Sep 2019 13:40:32 +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 0A62E19C78; Mon, 23 Sep 2019 13:40:30 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 2/7] Acceptance test x86_cpu_model_versions: shutdown VMs Date: Mon, 23 Sep 2019 09:40:14 -0400 Message-Id: <20190923134019.8548-3-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.41]); Mon, 23 Sep 2019 13:40:32 +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" This shuts down the VMs that won't be used any longer during the remainder of the test. It's debatable if the very last one should also be shutdown manually, and my opinion is that it shouldn't because that's taken care by the immediately following tearDown(). Signed-off-by: Cleber Rosa Message-Id: <20190828193628.7687-2-crosa@redhat.com> Reviewed-by: Eduardo Habkost Signed-off-by: Eduardo Habkost --- tests/acceptance/x86_cpu_model_versions.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/acceptance/x86_cpu_model_versions.py b/tests/acceptance/= x86_cpu_model_versions.py index 1c9fd6a56e..e6c76b0d4c 100644 --- a/tests/acceptance/x86_cpu_model_versions.py +++ b/tests/acceptance/x86_cpu_model_versions.py @@ -243,6 +243,7 @@ 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 vm =3D self.get_vm() vm.add_args('-S') @@ -251,6 +252,7 @@ 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 # command line must override machine-type if CPU model is not vers= ioned: vm =3D self.get_vm() @@ -260,6 +262,7 @@ 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 vm =3D self.get_vm() vm.add_args('-S') @@ -268,6 +271,7 @@ 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 # versioned CPU model overrides machine-type: vm =3D self.get_vm() @@ -277,6 +281,7 @@ class X86CPUModelAliases(avocado_qemu.Test): vm.launch() self.assertFalse(get_cpu_prop(vm, 'arch-capabilities'), 'pc-i440fx-4.1 + Cascadelake-Server-v1 should not= have arch-capabilities') + vm.shutdown() =20 vm =3D self.get_vm() vm.add_args('-S') @@ -285,6 +290,7 @@ class X86CPUModelAliases(avocado_qemu.Test): vm.launch() self.assertTrue(get_cpu_prop(vm, 'arch-capabilities'), 'pc-i440fx-4.1 + Cascadelake-Server-v1 should hav= e arch-capabilities') + vm.shutdown() =20 # command line must override machine-type and versioned CPU model: vm =3D self.get_vm() @@ -294,6 +300,7 @@ 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 vm =3D self.get_vm() vm.add_args('-S') --=20 2.21.0 From nobody Wed May 8 21:31:09 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=1569246452; cv=none; d=zoho.com; s=zohoarc; b=nVNqbgxcpFchWu4J7mB6y7DGTQUw8J5Pu4zAT80AdA9jQCqLicd513szqzJe6RfoQHLrQrfIU21yJtCAtDJ5aGsF4Y6+9h3MLudVkDPZplWL7BedxIdV0IF4wpxxqZr40P2fKBIELei3HdB3KHGq0ICM5dW6eZN4AIBGYk3HttA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569246452; 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=Bg8pYrQ/qFvNzyJ4/1qehgDaqhVRhfVDbCiwKIopZKE=; b=SlUCFKQjmzsCnIwfak5jLXYp2gQ7Mgix2OfiQhV3BELzi6RhXNwfXuV/CrPvWoOoMSzC8cIDUe8UzZbXM7QPlw+cozg/QguAXxO54u5WDelKW+ZNESoeKBkRqI78huujLqTCRHBpfl0xHUHNeGPx/rJMA2IKvzJZMr5Jo60K8vY= 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 1569246452393483.75766836099604; Mon, 23 Sep 2019 06:47:32 -0700 (PDT) Received: from localhost ([::1]:56786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCOgd-0004jx-5j for importer@patchew.org; Mon, 23 Sep 2019 09:47:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59460) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCOZv-0007Km-EG for qemu-devel@nongnu.org; Mon, 23 Sep 2019 09:40:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCOZu-0007YI-AI for qemu-devel@nongnu.org; Mon, 23 Sep 2019 09:40:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46720) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCOZu-0007Y8-5P for qemu-devel@nongnu.org; Mon, 23 Sep 2019 09:40:34 -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 69BEA81DE7; Mon, 23 Sep 2019 13:40:33 +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 49F9619C78; Mon, 23 Sep 2019 13:40:32 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 3/7] Acceptance test x86_cpu_model_versions: fix mismatches between test and messages Date: Mon, 23 Sep 2019 09:40:15 -0400 Message-Id: <20190923134019.8548-4-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.25]); Mon, 23 Sep 2019 13:40:33 +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" This fixes a few mismatches between the test and the error messages produced in case of failures. Signed-off-by: Cleber Rosa Message-Id: <20190828193628.7687-3-crosa@redhat.com> Reviewed-by: Eduardo Habkost Signed-off-by: Eduardo Habkost --- tests/acceptance/x86_cpu_model_versions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/acceptance/x86_cpu_model_versions.py b/tests/acceptance/= x86_cpu_model_versions.py index e6c76b0d4c..220d18f68d 100644 --- a/tests/acceptance/x86_cpu_model_versions.py +++ b/tests/acceptance/x86_cpu_model_versions.py @@ -280,7 +280,7 @@ class X86CPUModelAliases(avocado_qemu.Test): vm.add_args('-cpu', 'Cascadelake-Server-v1,x-force-features=3Don,c= heck=3Doff,enforce=3Doff') vm.launch() self.assertFalse(get_cpu_prop(vm, 'arch-capabilities'), - 'pc-i440fx-4.1 + Cascadelake-Server-v1 should not= have arch-capabilities') + 'pc-i440fx-4.0 + Cascadelake-Server-v1 should not= have arch-capabilities') vm.shutdown() =20 vm =3D self.get_vm() @@ -289,14 +289,14 @@ class X86CPUModelAliases(avocado_qemu.Test): vm.add_args('-cpu', 'Cascadelake-Server-v2,x-force-features=3Don,c= heck=3Doff,enforce=3Doff') vm.launch() self.assertTrue(get_cpu_prop(vm, 'arch-capabilities'), - 'pc-i440fx-4.1 + Cascadelake-Server-v1 should hav= e arch-capabilities') + 'pc-i440fx-4.0 + Cascadelake-Server-v2 should hav= e arch-capabilities') vm.shutdown() =20 # command line must override machine-type and versioned CPU model: vm =3D self.get_vm() vm.add_args('-S') vm.set_machine('pc-i440fx-4.0') - vm.add_args('-cpu', 'Cascadelake-Server,x-force-features=3Don,chec= k=3Doff,enforce=3Doff,+arch-capabilities') + vm.add_args('-cpu', 'Cascadelake-Server-v1,x-force-features=3Don,c= heck=3Doff,enforce=3Doff,+arch-capabilities') vm.launch() self.assertTrue(get_cpu_prop(vm, 'arch-capabilities'), 'pc-i440fx-4.0 + Cascadelake-Server-v1,+arch-capa= bilities should have arch-capabilities') --=20 2.21.0 From nobody Wed May 8 21:31:09 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=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 From nobody Wed May 8 21:31:09 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=1569246194; cv=none; d=zoho.com; s=zohoarc; b=W+PUQMJTiFC36ZYaS5YiLWZiGcwKKgDARrOmlhMPzxpTrPUci/ZLnnrr6cgG+ZVhqgl4u+nhiL5+D4xkgWF7g9lnvKve5q22qQ7XlVy5bYZw9g3zXwTZGZKTHS7xQGAKRlsz2eRn1SyZ6o4siKrnPQcmBfmeYmZwmhBDHmBcGV0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569246194; h=Content-Type: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=z+OLYuhuwSBkKMYWDPjdPxzsnhNEyqq41gXno/9autg=; b=gp+VT/GAtHdzn8a+nFRKN8DqF7WH8QoxdH9/isXoPdBlTZcRoY3pIBIpd9jaWEB8dCWWhcg3rgHSdHDZvmqvkZUdVA622l8LUPjyY39irJrDJxeAkAmc5mphJxjdbPY0GL4ef7zlDAE1KYqbU+2Y5MnmwqnE5sSVFBbaibPJ2CA= 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 1569246194400315.36785121493267; Mon, 23 Sep 2019 06:43:14 -0700 (PDT) Received: from localhost ([::1]:56742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCOcS-0000oi-Md for importer@patchew.org; Mon, 23 Sep 2019 09:43:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59485) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCOZy-0007OK-6g for qemu-devel@nongnu.org; Mon, 23 Sep 2019 09:40:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCOZw-0007Z7-Ug for qemu-devel@nongnu.org; Mon, 23 Sep 2019 09:40:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24076) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCOZw-0007Ys-Mz for qemu-devel@nongnu.org; Mon, 23 Sep 2019 09:40:36 -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 EFE621196E60; Mon, 23 Sep 2019 13:40:35 +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 D0DAE19C78; Mon, 23 Sep 2019 13:40:34 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 5/7] tests/acceptance: Refactor and improve reporting in linux_ssh_mips_malta.py Date: Mon, 23 Sep 2019 09:40:17 -0400 Message-Id: <20190923134019.8548-6-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.6.2 (mx1.redhat.com [10.5.110.65]); Mon, 23 Sep 2019 13:40:36 +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 Markovic , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , =?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" From: Aleksandar Markovic This patch restructures code organization around the test case executions. At the same time, rather than outputing a cryptic message: FAIL: True not found in [False], the following will be reported too, if the command output does not meet specified expectations: 'lspci -d 11ab:4620' output doesn't contain the word 'GT-64120' Signed-off-by: Aleksandar Markovic Message-Id: <1564760158-27536-2-git-send-email-aleksandar.markovic@rt-rk.co= m> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Eduardo Habkost --- tests/acceptance/linux_ssh_mips_malta.py | 36 ++++++++++++++---------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/tests/acceptance/linux_ssh_mips_malta.py b/tests/acceptance/li= nux_ssh_mips_malta.py index 7200507a3a..7fc44f43d1 100644 --- a/tests/acceptance/linux_ssh_mips_malta.py +++ b/tests/acceptance/linux_ssh_mips_malta.py @@ -145,27 +145,33 @@ class LinuxSSH(Test): self.ssh_disconnect_vm() self.wait_for_console_pattern('Power down') =20 + def ssh_command_output_contains(self, cmd, exp): + stdout, _ =3D self.ssh_command(cmd) + for line in stdout: + if exp in line: + break + else: + self.fail('"%s" output does not contain "%s"' % (cmd, exp)) + def run_common_commands(self): - stdout, stderr =3D self.ssh_command('lspci -d 11ab:4620') - self.assertIn(True, ["GT-64120" in line for line in stdout]) - - stdout, stderr =3D self.ssh_command('cat /sys/bus/i2c/devices/i2c-= 0/name') - self.assertIn(True, ["SMBus PIIX4 adapter" in line - for line in stdout]) - - stdout, stderr =3D self.ssh_command('cat /proc/mtd') - self.assertIn(True, ["YAMON" in line - for line in stdout]) - + self.ssh_command_output_contains( + 'lspci -d 11ab:4620', + 'GT-64120') + self.ssh_command_output_contains( + 'cat /sys/bus/i2c/devices/i2c-0/name', + 'SMBus PIIX4 adapter') + self.ssh_command_output_contains( + 'cat /proc/mtd', + 'YAMON') # Empty 'Board Config' - stdout, stderr =3D self.ssh_command('md5sum /dev/mtd2ro') - self.assertIn(True, ["0dfbe8aa4c20b52e1b8bf3cb6cbdf193" in line - for line in stdout]) + self.ssh_command_output_contains( + 'md5sum /dev/mtd2ro', + '0dfbe8aa4c20b52e1b8bf3cb6cbdf193') =20 def check_mips_malta(self, endianess, kernel_path, uname_m): self.boot_debian_wheezy_image_and_ssh_login(endianess, kernel_path) =20 - stdout, stderr =3D self.ssh_command('uname -a') + stdout, _ =3D self.ssh_command('uname -a') self.assertIn(True, [uname_m + " GNU/Linux" in line for line in st= dout]) =20 self.run_common_commands() --=20 2.21.0 From nobody Wed May 8 21:31:09 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=1569246448; cv=none; d=zoho.com; s=zohoarc; b=SYc7uZzgrre3NaYXGF7wpLlTb1zpYC0stVy/67MZlvsiErnwCodEn4NLhwfie2kVFUTZSfGx8zvvy5pFro6S/8JuX0z4UvbaxpuxZVu33AurWdievo+UGriUS3gBUFOpY2LjdJwF7W86FKqenNp2d7lwyNvMEu4Km+fBJBzXQRg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569246448; 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=qsTW1svk7cLKgDmSplnt+8J9BcZ+ZfHjhQxOPGioH88=; b=TVthDPt5KT0Y7bkq5JTY8TTQzqZLQv+EaV0aB1q4++vmxSXT3CRyq3FQkysgNqm3PHlk3h2sZX3ocz/XHCN+jFGaO9DcW8q1RrEvCjvek8htmNR4uZ3OfDnop6+JspRIPW2bBFdCU9CVK4Q+yD6O4GCjTCgkNv24Qw6r/9CXsjA= 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 1569246448498858.0351549937412; Mon, 23 Sep 2019 06:47:28 -0700 (PDT) Received: from localhost ([::1]:56782 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCOgZ-0004Yi-3t for importer@patchew.org; Mon, 23 Sep 2019 09:47:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59498) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCOZz-0007Pr-Fg for qemu-devel@nongnu.org; Mon, 23 Sep 2019 09:40:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCOZy-0007ZS-8K for qemu-devel@nongnu.org; Mon, 23 Sep 2019 09:40:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47386) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCOZy-0007ZG-0D for qemu-devel@nongnu.org; Mon, 23 Sep 2019 09:40:38 -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 4DD4B20E3; Mon, 23 Sep 2019 13:40:37 +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 1C6C019C58; Mon, 23 Sep 2019 13:40:36 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 6/7] tests/acceptance: Add new test cases in linux_ssh_mips_malta.py Date: Mon, 23 Sep 2019 09:40:18 -0400 Message-Id: <20190923134019.8548-7-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.6.2 (mx1.redhat.com [10.5.110.71]); Mon, 23 Sep 2019 13:40:37 +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 Markovic , 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" From: Aleksandar Markovic Add 15 new tests cases. They all rely on simple commands used for detecting hardware configuration information. Signed-off-by: Aleksandar Markovic Message-Id: <1564760158-27536-3-git-send-email-aleksandar.markovic@rt-rk.co= m> Reviewed-by: Cleber Rosa Signed-off-by: Eduardo Habkost --- tests/acceptance/linux_ssh_mips_malta.py | 45 ++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/tests/acceptance/linux_ssh_mips_malta.py b/tests/acceptance/li= nux_ssh_mips_malta.py index 7fc44f43d1..1d334432a0 100644 --- a/tests/acceptance/linux_ssh_mips_malta.py +++ b/tests/acceptance/linux_ssh_mips_malta.py @@ -154,6 +154,51 @@ class LinuxSSH(Test): self.fail('"%s" output does not contain "%s"' % (cmd, exp)) =20 def run_common_commands(self): + self.ssh_command_output_contains( + 'cat /proc/cpuinfo', + '24Kc') + self.ssh_command_output_contains( + 'uname -m', + 'mips') + self.ssh_command_output_contains( + 'uname -r', + '3.2.0-4-4kc-malta') + self.ssh_command_output_contains( + 'cat /proc/interrupts', + 'timer') + self.ssh_command_output_contains( + 'cat /proc/interrupts', + 'i8042') + self.ssh_command_output_contains( + 'cat /proc/interrupts', + 'serial') + self.ssh_command_output_contains( + 'cat /proc/interrupts', + 'ata_piix') + self.ssh_command_output_contains( + 'cat /proc/interrupts', + 'eth0') + self.ssh_command_output_contains( + 'cat /proc/interrupts', + 'eth0') + self.ssh_command_output_contains( + 'cat /proc/devices', + 'input') + self.ssh_command_output_contains( + 'cat /proc/devices', + 'usb') + self.ssh_command_output_contains( + 'cat /proc/devices', + 'fb') + self.ssh_command_output_contains( + 'cat /proc/ioports', + 'serial') + self.ssh_command_output_contains( + 'cat /proc/ioports', + 'ata_piix') + self.ssh_command_output_contains( + 'cat /proc/ioports', + 'piix4_smbus') self.ssh_command_output_contains( 'lspci -d 11ab:4620', 'GT-64120') --=20 2.21.0 From nobody Wed May 8 21:31:09 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=1569246679; cv=none; d=zoho.com; s=zohoarc; b=RQd8WxXMy2JUY7j8KtbK8chp5FGPbfdcuJHfrJlWZ2blTsmrpeLT1EKW4pf1hDmNQ0sVGlP0HuCBQ8Ca259lq7ELNJ4YGmeaSyD1XtVGMivU7JB+pBYG7Ly+qhFNJdVhbLtYRC9OmExGumY8BDtKkKbtdPHHsyYeP4sDCNvK6sk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569246679; 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=RXms8XAoIE1cxDUH1m2ezXLmCNLTlOtzmq0NHJj2ZSs=; b=bw88EDxTu8gSOLyvOic84/XfM/LreMwh5XolEjq/6yH6l7ZjKM3sI+zyzsKhip1jfvp+HpXZIT+1k5emQzTZ8Hu0F4glnaGqs3ovc8DJvxiaV3n7dWxMU27UlLBW0KewoGDh5e+T1MM0tKNcaGKtuooyRZIBHZhnDgKLvtb+iJo= 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 1569246679585804.9099160269636; Mon, 23 Sep 2019 06:51:19 -0700 (PDT) Received: from localhost ([::1]:56810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCOkI-0008DR-3x for importer@patchew.org; Mon, 23 Sep 2019 09:51:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59510) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCOa1-0007SG-8i for qemu-devel@nongnu.org; Mon, 23 Sep 2019 09:40:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCOZz-0007Zv-GN for qemu-devel@nongnu.org; Mon, 23 Sep 2019 09:40:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33340) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCOZz-0007Zd-8y for qemu-devel@nongnu.org; Mon, 23 Sep 2019 09:40:39 -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 8ACBF58569; Mon, 23 Sep 2019 13:40:38 +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 6FCA619C58; Mon, 23 Sep 2019 13:40:37 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 7/7] Acceptance tests: use avocado.utils.ssh for SSH interaction Date: Mon, 23 Sep 2019 09:40:19 -0400 Message-Id: <20190923134019.8548-8-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.39]); Mon, 23 Sep 2019 13:40:38 +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" This replaces paramiko with avocado.utils.ssh module, which is based on a (open)ssh binary, supposedly more ubiquitous. Signed-off-by: Cleber Rosa Reviewed-by: Eduardo Habkost Message-Id: <20190919225905.10829-1-crosa@redhat.com> [Cleber: consolidated existing skipUnless from tests to setUp] Signed-off-by: Cleber Rosa --- tests/acceptance/linux_ssh_mips_malta.py | 78 ++++++++---------------- tests/requirements.txt | 3 +- 2 files changed, 25 insertions(+), 56 deletions(-) diff --git a/tests/acceptance/linux_ssh_mips_malta.py b/tests/acceptance/li= nux_ssh_mips_malta.py index 1d334432a0..25a1df5098 100644 --- a/tests/acceptance/linux_ssh_mips_malta.py +++ b/tests/acceptance/linux_ssh_mips_malta.py @@ -9,13 +9,13 @@ import os import re import base64 import logging -import paramiko import time =20 from avocado import skipUnless from avocado_qemu import Test from avocado.utils import process from avocado.utils import archive +from avocado.utils import ssh =20 =20 class LinuxSSH(Test): @@ -26,35 +26,19 @@ class LinuxSSH(Test): VM_IP =3D '127.0.0.1' =20 IMAGE_INFO =3D { - 'be': { - 'image_url': 'https://people.debian.org/~aurel32/qemu/mips/' - 'debian_wheezy_mips_standard.qcow2', - 'image_hash': '8987a63270df67345b2135a6b7a4885a35e392d5', - 'rsa_hostkey': b'AAAAB3NzaC1yc2EAAAADAQABAAABAQCca1VitiyLAdQOl= d' - b'zT43IOEVJZ0wHD78GJi8wDAjMiYWUzNSSn0rXGQsINHuH= 5' - b'IlF+kBZsHinb/FtKCAyS9a8uCHhQI4SuB4QhAb0+39MlU= w' - b'Mm0CLkctgM2eUUZ6MQMQvDlqnue6CCkxN62EZYbaxmby7= j' - b'CQa1125o1HRKBvdGm2zrJWxXAfA+f1v6jHLyE8Jnu83eQ= +' - b'BFY25G+Vzx1PVc3zQBwJ8r0NGTRqy2//oWQP0h+bMsgeF= e' - b'KH/J3RJM22vg6+I4JAdBFcxnK+l781h1FuRxOn4O/Xslb= g' - b'go6WtB4V4TOsw2E/KfxI5IZ/icxF+swVcnvF46Hf3uQc/= 0' - b'BBqb', - }, - 'le': { - 'image_url': 'https://people.debian.org/~aurel32/qemu/mipsel/' - 'debian_wheezy_mipsel_standard.qcow2', - 'image_hash': '7866764d9de3ef536ffca24c9fb9f04ffdb45802', - 'rsa_hostkey': b'AAAAB3NzaC1yc2EAAAADAQABAAABAQClXJlBT71HL5yKv= v' - b'gfC7jmxSWx5zSBCzET6CLZczwAafSIs7YKfNOy/dQTxhu= k' - b'yIGFUugZFoF3E9PzdhunuyvyTd56MPoNIqFbb5rGokwU5= I' - b'TOx3dBHZR0mClypL6MVrwe0bsiIb8GhF1zioNwcsaAZnA= i' - b'KfXStVDtXvn/kLLq+xLABYt48CC5KYWoFaCoICskLAY+q= o' - b'L+LWyAnQisj4jAH8VSaSKIImFpfkHWEXPhHcC4ZBlDKtn= H' - b'po9vhfCHgnfW3Pzrqmk8BI4HysqPFVmJWkJGlGUL+sGeg= 3' - b'ZZolAYuDXGuBrw8ooPJq2v2dOH+z6dyD2q/ypmAbyPqj5= C' - b'rc8H', - }, - } + 'be': {'image_url': ('https://people.debian.org/~aurel32/qemu/mips= /' + 'debian_wheezy_mips_standard.qcow2'), + 'image_hash': '8987a63270df67345b2135a6b7a4885a35e392d5'}, + 'le': {'image_url': ('https://people.debian.org/~aurel32/qemu/mips= el/' + 'debian_wheezy_mipsel_standard.qcow2'), + 'image_hash': '7866764d9de3ef536ffca24c9fb9f04ffdb45802'} + } + + + @skipUnless(ssh.SSH_CLIENT_BINARY, 'No SSH client available') + @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout= ') + def setUp(self): + super(LinuxSSH, self).setUp() =20 def wait_for_console_pattern(self, success_message, failure_message=3D'Oops'): @@ -78,23 +62,14 @@ class LinuxSSH(Test): self.log.debug("sshd listening on port:" + port) return port =20 - def ssh_connect(self, username, password, rsa_hostkey_b64=3DNone): + def ssh_connect(self, username, password): self.ssh_logger =3D logging.getLogger('ssh') - self.ssh_username =3D username - self.ssh_ps1 =3D '# ' if username is 'root' else '$ ' - self.ssh_client =3D paramiko.SSHClient() port =3D self.get_portfwd() - if rsa_hostkey_b64: - rsa_hostkey_bin =3D base64.b64decode(rsa_hostkey_b64) - rsa_hostkey =3D paramiko.RSAKey(data =3D rsa_hostkey_bin) - ipport =3D '[%s]:%s' % (self.VM_IP, port) - self.ssh_logger.debug('ipport ' + ipport) - self.ssh_client.get_host_keys().add(ipport, 'ssh-rsa', rsa_hos= tkey) + self.ssh_session =3D ssh.Session(self.VM_IP, port=3Dint(port), + user=3Dusername, password=3Dpasswor= d) for i in range(10): try: - self.ssh_client.connect(self.VM_IP, int(port), - username, password, banner_timeout= =3D90) - self.ssh_logger.info("Entering interactive session.") + self.ssh_session.connect() return except: time.sleep(4) @@ -102,15 +77,15 @@ class LinuxSSH(Test): self.fail("sshd timeout") =20 def ssh_disconnect_vm(self): - self.ssh_client.close() + self.ssh_session.quit() =20 def ssh_command(self, command, is_root=3DTrue): - self.ssh_logger.info(self.ssh_ps1 + command) - stdin, stdout, stderr =3D self.ssh_client.exec_command(command) - stdout_lines =3D [line.strip('\n') for line in stdout] + self.ssh_logger.info(command) + result =3D self.ssh_session.cmd(command) + stdout_lines =3D [line.rstrip() for line in result.stdout_text.spl= itlines()] for line in stdout_lines: self.ssh_logger.info(line) - stderr_lines =3D [line.strip('\n') for line in stderr] + stderr_lines =3D [line.rstrip() for line in result.stderr_text.spl= itlines()] for line in stderr_lines: self.ssh_logger.warning(line) return stdout_lines, stderr_lines @@ -119,7 +94,6 @@ class LinuxSSH(Test): image_url =3D self.IMAGE_INFO[endianess]['image_url'] image_hash =3D self.IMAGE_INFO[endianess]['image_hash'] image_path =3D self.fetch_asset(image_url, asset_hash=3Dimage_hash) - rsa_hostkey_b64 =3D self.IMAGE_INFO[endianess]['rsa_hostkey'] =20 self.vm.set_machine('malta') self.vm.set_console() @@ -138,7 +112,7 @@ class LinuxSSH(Test): self.wait_for_console_pattern(console_pattern) self.log.info('sshd ready') =20 - self.ssh_connect('root', 'root', rsa_hostkey_b64=3Drsa_hostkey_b64) + self.ssh_connect('root', 'root') =20 def shutdown_via_ssh(self): self.ssh_command('poweroff') @@ -222,7 +196,6 @@ class LinuxSSH(Test): self.run_common_commands() self.shutdown_via_ssh() =20 - @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout= ') def test_mips_malta32eb_kernel3_2_0(self): """ :avocado: tags=3Darch:mips @@ -237,7 +210,6 @@ class LinuxSSH(Test): =20 self.check_mips_malta('be', kernel_path, 'mips') =20 - @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout= ') def test_mips_malta32el_kernel3_2_0(self): """ :avocado: tags=3Darch:mipsel @@ -252,7 +224,6 @@ class LinuxSSH(Test): =20 self.check_mips_malta('le', kernel_path, 'mips') =20 - @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout= ') def test_mips_malta64eb_kernel3_2_0(self): """ :avocado: tags=3Darch:mips64 @@ -266,7 +237,6 @@ class LinuxSSH(Test): kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) self.check_mips_malta('be', kernel_path, 'mips64') =20 - @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout= ') def test_mips_malta64el_kernel3_2_0(self): """ :avocado: tags=3Darch:mips64el diff --git a/tests/requirements.txt b/tests/requirements.txt index bd1f7590ed..a2a587223a 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,5 +1,4 @@ # Add Python module requirements, one per line, to be installed # in the tests/venv Python virtual environment. For more info, # refer to: https://pip.pypa.io/en/stable/user_guide/#id1 -avocado-framework=3D=3D68.0 -paramiko=3D=3D2.4.2 +avocado-framework=3D=3D72.0 --=20 2.21.0