From patchwork Wed Mar 23 13:20:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 553748 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1248:0:0:0:0 with SMTP id z8csp3401935mag; Wed, 23 Mar 2022 06:27:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOI5gv4te8BnOnlPp9VjK0bGJll/OEoq9+6O234n3XxRDjzynIdpvqw90zoHe+CauQBvg4 X-Received: by 2002:a05:622a:1192:b0:2e2:2cac:3d03 with SMTP id m18-20020a05622a119200b002e22cac3d03mr3717697qtk.449.1648042062631; Wed, 23 Mar 2022 06:27:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648042062; cv=none; d=google.com; s=arc-20160816; b=W4jsexhzjtrbTFwK58oPgephfVG7cHb0ARln9J8LnB/cDY2NOK29XiRolYc01Ipmdz TSADJdU3gU9Xfuv9/nOArBZsRWWDVxSMyyuJtbcdNqsU7OhHjZ98xAxbfHv/CZCMbRCH r5MsBMfbSfgRPGddyXwplp/Tq9ztS5imxlIAZFJbqZVDkh058f8S1/qMnoSoyKkGPu// S75toB23IEu/Y46y3FhNkjWtOZCeEi1IBcvTSqAQ8zR5zpCVYxoY2J785eYYiarBzr9w pkBVI6SLHhTSgUec3dLa/sR/1gQclgAryqkSO6pONwWoO4wmFk57WsKGDdOeg2Q9QvdT ikUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=gY/zMi6zAju7yUc0nP8zN1HiT/DfIco8fDCixv5yZzY=; b=0dTMiUfbFlvqSF2mFy6Bi0PhBxfOEcaOlapyfI8ROf1MAuPWPeI1kwFgyg2qnlal2b TflrRCMKrWWAv/QB6fyiZhn2hF96au+1948qwwoH8XQMnSbYZKvZpd9jbjWb/ys4DCqe GvjSZO/sGruTD+NXju7Fss1UFJyK0nmXYoe1khPO86bGTD6oSe+clx3gM38PV//zKgF+ JodgL6rsnFFAqf23G4G2NkB2/nO+nE43iwy3mGD7kD2m4nQJHBFZ68mjZFxW0g/X30iq zlg7Irco3IUL4byxwX7ubyKv/wBFho+9ZgWTy9PxmCYd2fFL1v1bfujyovD8KoIt5MUI PDzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=gEYX+hDL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c5-20020ac85a85000000b002e1fbf3bfacsi4826817qtc.413.2022.03.23.06.27.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Mar 2022 06:27:42 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=gEYX+hDL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:44442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nX11a-0001rf-5v for patch@linaro.org; Wed, 23 Mar 2022 09:27:42 -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) 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-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) 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) From: =?utf-8?q?Alex_Benn=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 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::335 (failed) 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_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Wainer dos Santos Moschetta , "open list:Virt" , Cleber Rosa , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée 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 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 = '18d1c68f2e23429e266ca39ba5349ccd0aeb7180' self.do_test_mips_malta32el_nanomips(kernel_url, kernel_hash) - def test_aarch64_virt(self): - """ - :avocado: tags=arch:aarch64 - :avocado: tags=machine:virt - :avocado: tags=accel:tcg - :avocado: tags=cpu:cortex-a53 - """ - kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora' - '/linux/releases/29/Everything/aarch64/os/images/pxeboot' - '/vmlinuz') - kernel_hash = '8c73e469fc6ea06a58dc83a628fc695b693b8493' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) - - self.vm.set_console() - kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + - 'console=ttyAMA0') - 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 = 'Kernel command line: %s' % kernel_command_line - self.wait_for_console_pattern(console_pattern) - def test_aarch64_xlnx_versal_virt(self): """ :avocado: tags=arch: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ée +# +# 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 = 'printk.time=0 ' + + def wait_for_console_pattern(self, success_message, vm=None): + wait_for_console_pattern(self, success_message, + failure_message='Kernel panic - not syncing', + vm=vm) + + def test_aarch64_virt(self): + """ + :avocado: tags=arch:aarch64 + :avocado: tags=machine:virt + :avocado: tags=accel:tcg + :avocado: tags=cpu:max + """ + kernel_url = ('https://fileserver.linaro.org/s/' + 'z6B2ARM7DQT3HWN/download') + + kernel_hash = 'ed11daab50c151dde0e1e9c9cb8b2d9bd3215347' + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + + self.vm.set_console() + kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + + 'console=ttyAMA0') + self.require_accelerator("tcg") + self.vm.add_args('-cpu', 'max,pauth-impdef=on', + '-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)