From patchwork Fri Apr 8 16:47:28 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: 558855 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp499528map; Fri, 8 Apr 2022 09:56:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7SzOTgkIXkcdrIT/roKb8y6zx57j22fo9WOCO0fDNmCviV24gAkeDudM5/gjgM9ihNRNx X-Received: by 2002:a25:e90a:0:b0:63d:a832:829 with SMTP id n10-20020a25e90a000000b0063da8320829mr13685627ybd.187.1649437000878; Fri, 08 Apr 2022 09:56:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649437000; cv=none; d=google.com; s=arc-20160816; b=kF1GNQcDPxss4Ny4kLgs56yNw988Rir//6DByQP/NZwkmK3JJ1XNyGDWYuooDSqR42 gfkjlelxDwmCaWPTmvngrbgZ/XI/AdGM2jN1KE6hVoy9V7GtlnMUFNz5hd/USMWGwhyv 7NNKYcxYAy5ELNZVUmZCMCqAAOhqYB+x3k8HSTrUFuILsfVdGcqRcZGu28R6aPZ3gMNs RhIayqU6RWhjqc3y6AFF1WhGYCDdrF5fA2XtLR9NO3NtsHd8Wc/7r3IoTCq27cWx1tjL pDG6A55XMsGXuwIHsFFKc2MFc9PUOKHDV1Zrp9jCUs8a13niFj63JtdZju8+18r19CDN l2Jw== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=BZbWPiXBtnz0VkzdX0DVcMc8Bcjhgo9EGKHKpmgZy9A=; b=Nd8W/orgkSc9JfpeqNslV2mxse3XA6ZBlqak7wUQ71QahMdCwJB1uzq2Lo24TrTqtV E51LPtagxQmiF5N4XdtQlInV3Eujx0125pgWa77tftbN+WSbYoPQnG5t2pVxkLZdoHH6 2KMz/7AFoc3JXzo1O5zKILHQi5KxjwhV0XuscCggRqqf/T8Z4JoAvN1SqSyjL8/QKv2Z epy/SMzvuzH21Edh3e7EoLmRujeVD9ZAgLl3nUwtAk0lSH9OufvpM6PV4Ja5t8tH9O7M Dk+2rxeqm7NMoZhQnazQB8zAgE3BvMqeXEf982m3VA2g81dtEEaqgZXUV42qNrQrREIz P2Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JeFEVtdJ; 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 bg5-20020a05690c030500b002ebf11713ddsi703381ywb.191.2022.04.08.09.56.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Apr 2022 09:56:40 -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=JeFEVtdJ; 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]:40618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ncruY-0008RZ-Nt for patch@linaro.org; Fri, 08 Apr 2022 12:56:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ncrmK-000787-T5 for qemu-devel@nongnu.org; Fri, 08 Apr 2022 12:48:08 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:36567) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ncrmH-00031i-IC for qemu-devel@nongnu.org; Fri, 08 Apr 2022 12:48:08 -0400 Received: by mail-wm1-x334.google.com with SMTP id i6-20020a1c3b06000000b0038e710da2dcso8018078wma.1 for ; Fri, 08 Apr 2022 09:47:50 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=BZbWPiXBtnz0VkzdX0DVcMc8Bcjhgo9EGKHKpmgZy9A=; b=JeFEVtdJriKS5wzkW05lhnTJb/USR5XG9IB6Lfe67H/7ByKWSoFuTQJa1QnDRZVUzd yUykSP3AwFFqHu4ZCpQ7mgpp1VnGDNOf8jt3pAMWjwz5C7sf2xE21U6+GVGWd7HjfSVC HkpdEy6X3VQQP9p9VjIpIs4A2rXLxIoJvIaWoly5headMDp7f0ECum5Av9UiIt6BlH/V mJVUDykpXCtYe7Y7hLQ/jEjuxfhZ1l5YhX5ACdZHeDTlbRsXSzvKSh/iMAOWChMihVSV +Ql8T3urJRQPhc/Hy/DLNuQaeOmCjAJ7GflU3KKwElVA2vJu3jbungpoGi34N8WI+9uW 63rg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=BZbWPiXBtnz0VkzdX0DVcMc8Bcjhgo9EGKHKpmgZy9A=; b=k6xZYXGyxtzbJVTFUnLPBdA1Tr3C6Pxxzbhgai85Lu5pi8DIW5wMuG8/vTLdfEXfXc kbTlGAPCWB6DW8NS9fQvkUy8hteoxt89YmqdlR2uR2WfmnUtAgH8pv9lCRwwKkH+/44v ixvTkgqG5osYpsznNOZWUAU9/qiHO3au0If5g1RILJyw9IjiUp28Y4Wt2pC2FsgI5tuW 2qZAIP6a7Bb7cWgSF76z3UzQ8CorOtUBLR04009NbikmIwL7nY8aAWkDSFVToYWo5iRt 6pl3J/dTfSBpAdXg0wjRu7HXRi5SNRC+Dq3YXVgYZZ3bsrbb9X39uoyf0TlQd5uQZMQx WeFg== X-Gm-Message-State: AOAM532XBrrqxJpyPWls3okYfohy0dunjXRyqxexO+FxIWXj8oCmMqRy 0PxVFETmQc0c5RyaaIAJ6c/7ug== X-Received: by 2002:a05:600c:1e8d:b0:38e:6eb6:f18b with SMTP id be13-20020a05600c1e8d00b0038e6eb6f18bmr17595723wmb.125.1649436469594; Fri, 08 Apr 2022 09:47:49 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id n20-20020a05600c4f9400b0038cbd13e06esm10932021wmq.2.2022.04.08.09.47.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Apr 2022 09:47:44 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D701B1FFB8; Fri, 8 Apr 2022 17:47:42 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 01/15] tests/avocado: update aarch64_virt test to exercise -cpu max Date: Fri, 8 Apr 2022 17:47:28 +0100 Message-Id: <20220408164742.2844631-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220408164742.2844631-1-alex.bennee@linaro.org> References: <20220408164742.2844631-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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: fam@euphon.net, Peter Maydell , berrange@redhat.com, stefanha@redhat.com, "open list:Virt" , crosa@redhat.com, Richard Henderson , aaron@os.amperecomputing.com, robhenry@microsoft.com, f4bug@amsat.org, mahmoudabdalghany@outlook.com, minyihh@uci.edu, cota@braap.org, Wainer dos Santos Moschetta , Luke.Craig@ll.mit.edu, pbonzini@redhat.com, kuhn.chenqun@huawei.com, ma.mandourr@gmail.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net, Beraldo Leal 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 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ée 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 4ad2451e03..dcedfaed1f 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)