From nobody Mon Feb 9 13:45:28 2026 Delivered-To: importer@patchew.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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1648042098074252.0346746866769; Wed, 23 Mar 2022 06:28:18 -0700 (PDT) Received: from localhost ([::1]:46558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nX128-0003Hi-P3 for importer@patchew.org; Wed, 23 Mar 2022 09:28:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nX0vK-0001y9-6v for qemu-devel@nongnu.org; Wed, 23 Mar 2022 09:21:14 -0400 Received: from [2a00:1450:4864:20::335] (port=39550 helo=mail-wm1-x335.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nX0vD-0006R1-Vz for qemu-devel@nongnu.org; Wed, 23 Mar 2022 09:21:12 -0400 Received: by mail-wm1-x335.google.com with SMTP id bi13-20020a05600c3d8d00b0038c2c33d8f3so5302633wmb.4 for ; Wed, 23 Mar 2022 06:21:02 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g6-20020adfd1e6000000b0020581602ddfsm4233757wrd.90.2022.03.23.06.21.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Mar 2022 06:21:00 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8302C1FFB7; Wed, 23 Mar 2022 13:20:59 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gY/zMi6zAju7yUc0nP8zN1HiT/DfIco8fDCixv5yZzY=; b=gEYX+hDLIIUDbCGCyrEUPxohG3UqYfyvkQjD73CqXci5DG4GSwaAs+bj6aFKS+C/Od 2Uzs+/Kqsy0EOZHZBWco/LS4Q+/zURPh2oO9weeIoO4METiTi213BOr1Ks7n9DK9VyTV lGVM5ZnUfFV2rN8AF7GQfkhDU/iKOWO0MTV96TpGmqm82UQryJ9Qv8rFdYF5RY981slm Jaz+cCPiJeFBAj/hf6yanl1XHCfHNF+P9zTFruESeeMRqdo6e8Tcp7TQCd/9MrjBM/v6 rnuBg99U1cMg9fF3XrVxvHXvVqZRSAM2S+tnSUs54VWCrAoFF0x+nweoif3DUiTZjD+S OIZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gY/zMi6zAju7yUc0nP8zN1HiT/DfIco8fDCixv5yZzY=; b=cxqABNf9k2wZGhVQPITXuPDFbMirLDGsarcwBwechhNvSPpRPsoRpojDFwq/uByu+m H5wllA4XPEIZ2UDDlTzNiJm3dwTgx5kM3gPcDkzenZhKrhVW2LRoMlTod66eL0CaGYRL 6/s6Yg3J27KWMXyLVrFuHQPD1KSSz9NeZhNl2g0ygbZjROaciAgxbRVHYWPu18BhyTx8 chiuXaNDPTiBSqToL4XivRZ+YRT2cS7i1arkMdeg+3GN2gfpZ+wBA0ScN/sJ+yPllgD2 5Tu5RLopX9DjKYLTH3NBVyGusvDFfqy+4+guqSGKRV6x32Sd7ZUuoqa6YPz6GFDcoTCT 42lA== X-Gm-Message-State: AOAM5332AOD+u/oTPYK3JAUh0BoZCW7pXJ6yRsSLcaDXqoNsXVZzzA59 BdwGEChutcGLG643Sah/qGe/Ag== X-Google-Smtp-Source: ABdhPJzZ1hmKv28iii4Wj7j0JF5buETG8lRKGP8SUdDEm5kG+c5QYSpYiype6wBpuItQwo9/a1Q8Jw== X-Received: by 2002:a1c:7517:0:b0:38c:8722:9bc6 with SMTP id o23-20020a1c7517000000b0038c87229bc6mr9470803wmc.2.1648041661638; Wed, 23 Mar 2022 06:21:01 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2] tests/avocado: update aarch64_virt test to exercise -cpu max Date: Wed, 23 Mar 2022 13:20:53 +0000 Message-Id: <20220323132053.505201-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::335 (failed) 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; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: Peter Maydell , Beraldo Leal , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , "open list:Virt" , Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1648042100249100001 The Fedora 29 kernel is quite old and importantly fails when running in LPA2 scenarios. As it's not really exercising much of the CPU space replace it with a custom 5.16.12 kernel with all the architecture options turned on. There is a minimal buildroot initramfs included in the kernel which has a few tools for stress testing the memory subsystem. The userspace also targets the Neoverse N1 processor so will fail without additional v8.x+ features. While we are at it move the test into it's own file so it can have an assigned maintainer. Signed-off-by: Alex Benn=C3=A9e Cc: Richard Henderson Message-Id: <20220315121251.2280317-3-alex.bennee@linaro.org> --- v2 - move test into own machine file --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 25 ------------- tests/avocado/machine_aarch64_virt.py | 51 +++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 25 deletions(-) create mode 100644 tests/avocado/machine_aarch64_virt.py diff --git a/MAINTAINERS b/MAINTAINERS index cc364afef7..4fd1c2c955 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -942,6 +942,7 @@ S: Maintained F: hw/arm/virt* F: include/hw/arm/virt.h F: docs/system/arm/virt.rst +F: tests/avocado/machine_aarch64_virt.py =20 Xilinx Zynq M: Edgar E. Iglesias diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index b40a3abc81..45a2ceda22 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -325,31 +325,6 @@ def test_mips_malta32el_nanomips_64k_dbg(self): kernel_hash =3D '18d1c68f2e23429e266ca39ba5349ccd0aeb7180' self.do_test_mips_malta32el_nanomips(kernel_url, kernel_hash) =20 - def test_aarch64_virt(self): - """ - :avocado: tags=3Darch:aarch64 - :avocado: tags=3Dmachine:virt - :avocado: tags=3Daccel:tcg - :avocado: tags=3Dcpu:cortex-a53 - """ - kernel_url =3D ('https://archives.fedoraproject.org/pub/archive/fe= dora' - '/linux/releases/29/Everything/aarch64/os/images/pxe= boot' - '/vmlinuz') - kernel_hash =3D '8c73e469fc6ea06a58dc83a628fc695b693b8493' - kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) - - self.vm.set_console() - kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + - 'console=3DttyAMA0') - self.require_accelerator("tcg") - self.vm.add_args('-cpu', 'cortex-a53', - '-accel', 'tcg', - '-kernel', kernel_path, - '-append', kernel_command_line) - self.vm.launch() - console_pattern =3D 'Kernel command line: %s' % kernel_command_line - self.wait_for_console_pattern(console_pattern) - def test_aarch64_xlnx_versal_virt(self): """ :avocado: tags=3Darch:aarch64 diff --git a/tests/avocado/machine_aarch64_virt.py b/tests/avocado/machine_= aarch64_virt.py new file mode 100644 index 0000000000..21848cba70 --- /dev/null +++ b/tests/avocado/machine_aarch64_virt.py @@ -0,0 +1,51 @@ +# Functional test that boots a Linux kernel and checks the console +# +# Copyright (c) 2022 Linaro Ltd. +# +# Author: +# Alex Benn=C3=A9e +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import time + +from avocado_qemu import QemuSystemTest +from avocado_qemu import wait_for_console_pattern +from avocado_qemu import exec_command + +class Aarch64VirtMachine(QemuSystemTest): + KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 ' + + def wait_for_console_pattern(self, success_message, vm=3DNone): + wait_for_console_pattern(self, success_message, + failure_message=3D'Kernel panic - not syn= cing', + vm=3Dvm) + + def test_aarch64_virt(self): + """ + :avocado: tags=3Darch:aarch64 + :avocado: tags=3Dmachine:virt + :avocado: tags=3Daccel:tcg + :avocado: tags=3Dcpu:max + """ + kernel_url =3D ('https://fileserver.linaro.org/s/' + 'z6B2ARM7DQT3HWN/download') + + kernel_hash =3D 'ed11daab50c151dde0e1e9c9cb8b2d9bd3215347' + kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) + + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'console=3DttyAMA0') + self.require_accelerator("tcg") + self.vm.add_args('-cpu', 'max,pauth-impdef=3Don', + '-accel', 'tcg', + '-kernel', kernel_path, + '-append', kernel_command_line) + self.vm.launch() + self.wait_for_console_pattern('Welcome to Buildroot') + time.sleep(0.1) + exec_command(self, 'root') + time.sleep(0.1) + exec_command(self, 'cat /proc/self/maps') + time.sleep(0.1) --=20 2.30.2