From nobody Sat May 18 15:49:38 2024 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 1648484158434182.50737205353357; Mon, 28 Mar 2022 09:15:58 -0700 (PDT) Received: from localhost ([::1]:57850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nYs28-0004sM-Pb for importer@patchew.org; Mon, 28 Mar 2022 12:15:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYs0N-0003cn-R4 for qemu-devel@nongnu.org; Mon, 28 Mar 2022 12:14:07 -0400 Received: from [2a00:1450:4864:20::530] (port=45809 helo=mail-ed1-x530.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nYs0L-0000et-Ry for qemu-devel@nongnu.org; Mon, 28 Mar 2022 12:14:07 -0400 Received: by mail-ed1-x530.google.com with SMTP id u26so17492980eda.12 for ; Mon, 28 Mar 2022 09:14:04 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id rh26-20020a17090720fa00b006e0da7ef847sm3139597ejb.13.2022.03.28.09.14.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 09:14:01 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id EE39A1FFB7; Mon, 28 Mar 2022 17:14:00 +0100 (BST) 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=aKpBv3U0hobzkCwe2ZAGwg6ApjZd5S9HLueRuddE1qg=; b=Ok94tF4X62f0h1lxr/08ALmUHVpp1FTSfBJWaiDGIfo/GDpZVWQ4xh+wPE1iuqh9EN t66xXyL1j4RRrpX6JstehIqcUDR31fT9AtaSybuxFXCmGbc7LajwUPaUfMVt7V+edfq1 0NvcRqKiPYD/CBHAxWamxikRt/+E7FS2fpmXMKxswCyo7PJ59i2SA52bft6E49OCbTCy mxQce4gWK0V3tQoUNW37H91UIQBchCU9K81cbW02kPbCa0+DXsKkVcKDNVdW19a01Qla Zj7TVxpo08ZBcpMG+rSUOdrCT7RG3W6xrbll7/WyAZwMwbVtzyiv3m2o4xlQWfZe+CLu RodQ== 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=aKpBv3U0hobzkCwe2ZAGwg6ApjZd5S9HLueRuddE1qg=; b=rF9DE9ddZExk5Fl0H4tg8CFKkLgxdc/MaAKx3KwatlKD8FfrOXiW3o1uUtOObyMnnS hesZX1G6sLtHZM/RC1SWf+I+7TpPP19e6ti9F+Dr1lr4OlNMWpoABOPeB7wHZc7Jhc11 qgmtP8B5GRQHJYNPDq59SgXp5hDlJrYocBQQQZFj4zaZdO7mif6KLW0fHAWlj4kPaYul 9IFjFYNTdzUd3CPazqChYqCp4EPtUkzvyJsyYXCZa+Q38HhrgmQDSSWCZR6DHIFvYhei 4YpWuSdZxA8rVzPfVfI3WF8L3si7rqon1p4VuNH93tMyUjnffS5bn3/Krs2q1KeDDIJW 8/kw== X-Gm-Message-State: AOAM533QPFnTv60s2tL264FXHjaC71+lpu4me4QxuUQj0yKjAf3NO+MS FmB4ZNC8EK+wbnuCNmtMCRzMfw== X-Google-Smtp-Source: ABdhPJwCkupY3CrOxr7+jOXiH7kqeQvTQ4+4sLPO+PfIJjjCH2cb1jveVf+RnoDsdmlME11RAYtBYA== X-Received: by 2002:a05:6402:278d:b0:419:3794:de39 with SMTP id b13-20020a056402278d00b004193794de39mr17150898ede.137.1648484042873; Mon, 28 Mar 2022 09:14:02 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3] tests/avocado: update aarch64_virt test to exercise -cpu max Date: Mon, 28 Mar 2022 17:13:57 +0100 Message-Id: <20220328161357.2464572-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::530 (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::530; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x530.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: 1648484161555100003 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 would fail with a v8.0 cpu like cortex-a53. While we are at it move the test into its own file so it can have an assigned maintainer. Signed-off-by: Alex Benn=C3=A9e Acked-by: Richard Henderson Tested-by: Richard Henderson Message-Id: <20220315121251.2280317-3-alex.bennee@linaro.org> --- v2 - move test into own machine file v3 - minor reword of commit, added tags --- 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