From nobody Mon Sep 16 19:23:42 2024 Delivered-To: importer2@patchew.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+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 171924616541917.266574556269802; Mon, 24 Jun 2024 09:22:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLmRF-0000Fg-FQ; Mon, 24 Jun 2024 12:21:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLmRB-0000CR-7V; Mon, 24 Jun 2024 12:21:01 -0400 Received: from muminek.juszkiewicz.com.pl ([213.251.184.221]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLmR8-00022x-VB; Mon, 24 Jun 2024 12:21:00 -0400 Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id E6857260662; Mon, 24 Jun 2024 18:20:55 +0200 (CEST) Received: from muminek.juszkiewicz.com.pl ([127.0.0.1]) by localhost (muminek.juszkiewicz.com.pl [127.0.0.1]) (amavis, port 10024) with ESMTP id 4Ket3AMKbuMr; Mon, 24 Jun 2024 18:20:53 +0200 (CEST) Received: from applejack.lan (83.11.22.244.ipv4.supernova.orange.pl [83.11.22.244]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id 5980926071B; Mon, 24 Jun 2024 18:20:53 +0200 (CEST) X-Virus-Scanned: Debian amavis at juszkiewicz.com.pl From: Marcin Juszkiewicz Date: Mon, 24 Jun 2024 18:20:43 +0200 Subject: [PATCH v3 1/2] tests/avocado: sbsa-ref: add FreeBSD tests MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240624-b4-move-to-freebsd-v3-1-71496bf119d4@linaro.org> References: <20240624-b4-move-to-freebsd-v3-0-71496bf119d4@linaro.org> In-Reply-To: <20240624-b4-move-to-freebsd-v3-0-71496bf119d4@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Leif Lindholm , Radoslaw Biernacki , Peter Maydell , Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal , Marcin Juszkiewicz X-Mailer: b4 0.13.0 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: softfail client-ip=213.251.184.221; envelope-from=marcin.juszkiewicz@linaro.org; helo=muminek.juszkiewicz.com.pl X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZM-MESSAGEID: 1719246166139100007 FreeBSD has longer support cycle for stable release (14.x EoL in 2028) than OpenBSD (7.3 we used is already EoL). Also bugfixes are backported so we can stay on 14.x for longer. Tests done on OpenBSD will now be done using FreeBSD. OpenBSD 7.3 stays with Cortex-A57 test for local runs only. Moved from Neoverse-N1 to Neoverse-N2 as sbsa-ref defaults were changed. Timeout messages expanded to mention being affected by PAuth emulation. Signed-off-by: Marcin Juszkiewicz --- tests/avocado/machine_aarch64_sbsaref.py | 75 ++++++++++++++++++++++++----= ---- 1 file changed, 56 insertions(+), 19 deletions(-) diff --git a/tests/avocado/machine_aarch64_sbsaref.py b/tests/avocado/machi= ne_aarch64_sbsaref.py index 6bb82f2a03..bb2c098aac 100644 --- a/tests/avocado/machine_aarch64_sbsaref.py +++ b/tests/avocado/machine_aarch64_sbsaref.py @@ -1,4 +1,4 @@ -# Functional test that boots a Linux kernel and checks the console +# Functional test that boots a kernel and checks the console # # SPDX-FileCopyrightText: 2023-2024 Linaro Ltd. # SPDX-FileContributor: Philippe Mathieu-Daud=C3=A9 @@ -8,7 +8,7 @@ =20 import os =20 -from avocado import skipUnless +from avocado import skipIf, skipUnless from avocado.utils import archive =20 from avocado_qemu import QemuSystemTest @@ -165,7 +165,8 @@ def test_sbsaref_alpine_linux_max_pauth_impdef(self): """ self.boot_alpine_linux("max,pauth-impdef=3Don") =20 - @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout= ') + @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), + 'Test might timeout due to PAuth emulation') def test_sbsaref_alpine_linux_max(self): """ :avocado: tags=3Dcpu:max @@ -173,7 +174,6 @@ def test_sbsaref_alpine_linux_max(self): """ self.boot_alpine_linux("max") =20 - # This tests the whole boot chain from EFI to Userspace # We only boot a whole OS for the current top level CPU and GIC # Other test profiles should use more minimal boots @@ -200,6 +200,9 @@ def boot_openbsd73(self, cpu): "Welcome to the OpenBSD/arm64" " 7.3 installation program.") =20 + + # we keep OpenBSD 7.3 on Cortex-A57 by request + @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') def test_sbsaref_openbsd73_cortex_a57(self): """ :avocado: tags=3Dcpu:cortex-a57 @@ -207,32 +210,66 @@ def test_sbsaref_openbsd73_cortex_a57(self): """ self.boot_openbsd73("cortex-a57") =20 - def test_sbsaref_openbsd73_neoverse_n1(self): + + # This tests the whole boot chain from EFI to Userspace + # We only boot a whole OS for the current top level CPU and GIC + # Other test profiles should use more minimal boots + def boot_freebsd(self, cpu): + self.fetch_firmware() + + img_url =3D ( + "https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGE= S/" + "14.1/FreeBSD-14.1-RELEASE-arm64-aarch64-bootonly.iso" + ) + + img_hash =3D "44cdbae275ef1bb6dab1d5fbb59473d4f741e1c8ea8a80fd9e90= 6b531d6ad461" + img_path =3D self.fetch_asset(img_url, algorithm=3D"sha256", asset= _hash=3Dimg_hash) + + self.vm.set_console() + self.vm.add_args( + "-cpu", + cpu, + "-drive", + f"file=3D{img_path},format=3Draw", + ) + + self.vm.launch() + wait_for_console_pattern(self, "Welcome to FreeBSD!") + + def test_sbsaref_freebsd_cortex_a57(self): """ - :avocado: tags=3Dcpu:neoverse-n1 - :avocado: tags=3Dos:openbsd + :avocado: tags=3Dcpu:cortex-a57 + :avocado: tags=3Dos:freebsd + """ + self.boot_freebsd("cortex-a57") + + # We use Neoverse-N2 as default cpu + def test_sbsaref_freebsd_neoverse_n2(self): """ - self.boot_openbsd73("neoverse-n1") + :avocado: tags=3Dcpu:neoverse-n2 + :avocado: tags=3Dos:freebsd + """ + self.boot_freebsd("neoverse-n2") =20 - def test_sbsaref_openbsd73_max_pauth_off(self): + def test_sbsaref_freebsd_max_pauth_off(self): """ :avocado: tags=3Dcpu:max - :avocado: tags=3Dos:openbsd + :avocado: tags=3Dos:freebsd """ - self.boot_openbsd73("max,pauth=3Doff") + self.boot_freebsd("max,pauth=3Doff") =20 - @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout= ') - def test_sbsaref_openbsd73_max_pauth_impdef(self): + def test_sbsaref_freebsd_max_pauth_impdef(self): """ :avocado: tags=3Dcpu:max - :avocado: tags=3Dos:openbsd + :avocado: tags=3Dos:freebsd """ - self.boot_openbsd73("max,pauth-impdef=3Don") + self.boot_freebsd("max,pauth-impdef=3Don") =20 - @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout= ') - def test_sbsaref_openbsd73_max(self): + @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), + 'Test might timeout due to PAuth emulation') + def test_sbsaref_freebsd_max(self): """ :avocado: tags=3Dcpu:max - :avocado: tags=3Dos:openbsd + :avocado: tags=3Dos:freebsd """ - self.boot_openbsd73("max") + self.boot_freebsd("max") --=20 2.45.2 From nobody Mon Sep 16 19:23:42 2024 Delivered-To: importer2@patchew.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+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 171924614755154.217281039286945; Mon, 24 Jun 2024 09:22:27 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLmRI-0000H6-Tl; Mon, 24 Jun 2024 12:21:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLmRD-0000FA-Ro; Mon, 24 Jun 2024 12:21:04 -0400 Received: from muminek.juszkiewicz.com.pl ([213.251.184.221]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLmRB-00023T-8H; Mon, 24 Jun 2024 12:21:03 -0400 Received: from localhost (localhost [127.0.0.1]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTP id 8A4F126071B; Mon, 24 Jun 2024 18:20:57 +0200 (CEST) Received: from muminek.juszkiewicz.com.pl ([127.0.0.1]) by localhost (muminek.juszkiewicz.com.pl [127.0.0.1]) (amavis, port 10024) with ESMTP id NPAEIO_mzgcV; Mon, 24 Jun 2024 18:20:55 +0200 (CEST) Received: from applejack.lan (83.11.22.244.ipv4.supernova.orange.pl [83.11.22.244]) by muminek.juszkiewicz.com.pl (Postfix) with ESMTPSA id 0C348261A96; Mon, 24 Jun 2024 18:20:54 +0200 (CEST) X-Virus-Scanned: Debian amavis at juszkiewicz.com.pl From: Marcin Juszkiewicz Date: Mon, 24 Jun 2024 18:20:44 +0200 Subject: [PATCH v3 2/2] tests/avocado: add test for default sbsa-ref cpu MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240624-b4-move-to-freebsd-v3-2-71496bf119d4@linaro.org> References: <20240624-b4-move-to-freebsd-v3-0-71496bf119d4@linaro.org> In-Reply-To: <20240624-b4-move-to-freebsd-v3-0-71496bf119d4@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Leif Lindholm , Radoslaw Biernacki , Peter Maydell , Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal , Marcin Juszkiewicz X-Mailer: b4 0.13.0 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: softfail client-ip=213.251.184.221; envelope-from=marcin.juszkiewicz@linaro.org; helo=muminek.juszkiewicz.com.pl X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZM-MESSAGEID: 1719246149684100001 We changed sbsa-ref cpu several times already and may do it again in a future. To newer core or to enable/disable some properties. This change switches Neoverse-N2 tests to 'let test default cpu' ones. Signed-off-by: Marcin Juszkiewicz --- tests/avocado/machine_aarch64_sbsaref.py | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/tests/avocado/machine_aarch64_sbsaref.py b/tests/avocado/machi= ne_aarch64_sbsaref.py index bb2c098aac..43bb1860e0 100644 --- a/tests/avocado/machine_aarch64_sbsaref.py +++ b/tests/avocado/machine_aarch64_sbsaref.py @@ -115,7 +115,7 @@ def test_sbsaref_edk2_firmware(self): # This tests the whole boot chain from EFI to Userspace # We only boot a whole OS for the current top level CPU and GIC # Other test profiles should use more minimal boots - def boot_alpine_linux(self, cpu): + def boot_alpine_linux(self, cpu=3DFalse): self.fetch_firmware() =20 iso_url =3D ( @@ -128,12 +128,14 @@ def boot_alpine_linux(self, cpu): =20 self.vm.set_console() self.vm.add_args( - "-cpu", - cpu, "-drive", f"file=3D{iso_path},format=3Draw", ) =20 + # let allow test which will use default cpu of platform + if cpu: + self.vm.add_args("-cpu", cpu) + self.vm.launch() wait_for_console_pattern(self, "Welcome to Alpine Linux 3.17") =20 @@ -144,12 +146,12 @@ def test_sbsaref_alpine_linux_cortex_a57(self): """ self.boot_alpine_linux("cortex-a57") =20 - def test_sbsaref_alpine_linux_neoverse_n1(self): + # Let test whichever cpu is used as default + def test_sbsaref_alpine_linux_default(self): """ - :avocado: tags=3Dcpu:neoverse-n1 :avocado: tags=3Dos:linux """ - self.boot_alpine_linux("neoverse-n1") + self.boot_alpine_linux() =20 def test_sbsaref_alpine_linux_max_pauth_off(self): """ @@ -214,7 +216,7 @@ def test_sbsaref_openbsd73_cortex_a57(self): # This tests the whole boot chain from EFI to Userspace # We only boot a whole OS for the current top level CPU and GIC # Other test profiles should use more minimal boots - def boot_freebsd(self, cpu): + def boot_freebsd(self, cpu=3DFalse): self.fetch_firmware() =20 img_url =3D ( @@ -227,12 +229,14 @@ def boot_freebsd(self, cpu): =20 self.vm.set_console() self.vm.add_args( - "-cpu", - cpu, "-drive", f"file=3D{img_path},format=3Draw", ) =20 + # let allow test which will use default cpu of platform + if cpu: + self.vm.add_args("-cpu", cpu) + self.vm.launch() wait_for_console_pattern(self, "Welcome to FreeBSD!") =20 @@ -243,13 +247,12 @@ def test_sbsaref_freebsd_cortex_a57(self): """ self.boot_freebsd("cortex-a57") =20 - # We use Neoverse-N2 as default cpu - def test_sbsaref_freebsd_neoverse_n2(self): + # Let test whichever cpu is used as default + def test_sbsaref_freebsd_default(self): """ - :avocado: tags=3Dcpu:neoverse-n2 :avocado: tags=3Dos:freebsd """ - self.boot_freebsd("neoverse-n2") + self.boot_freebsd() =20 def test_sbsaref_freebsd_max_pauth_off(self): """ --=20 2.45.2