From patchwork Tue Apr 19 09:09:56 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: 563314 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3100513map; Tue, 19 Apr 2022 02:28:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxF+M7uPGBK6F/uvgix6MoVpfXn2d49B244UvtgpZHw5ByHuGBLwbp3UI+lx8CsPljad+X5 X-Received: by 2002:a05:620a:7fb:b0:69e:b470:c847 with SMTP id k27-20020a05620a07fb00b0069eb470c847mr3376711qkk.543.1650360506362; Tue, 19 Apr 2022 02:28:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650360506; cv=none; d=google.com; s=arc-20160816; b=kHbkq6HE4ikqD9LZadW1wtx0gn6MBpKdyUbQZ91jO7RXH37Dz2m/A77Bug7jv2ceih Y4jJZpNg1B0yjifif7ONRgDKSR8N0IkxU8SEnO1uL5PQtuyAbc0b0ZNCjBYMY8JWnqtU ektuQILP2K3ZDx20fo5ugm/z9l3BHOE5oDlDXdiykeBZVPDpvneQlAodkJa2fz1wb8R+ Q5S0NvdtFtWaO1pOkgZCMoq6b9nUtw3a2AmNaKewy+Yuszv4xplme6NNxLv2u5JtaC8p R7TYV80AXF9YlnNpg8ELp2lbWA4/UpaQUhyvvmbzATG3r3nGUqwo6Ib6i216zafcYp/K 7gFQ== 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=KSXqgOcZyOcNEzhBxpdRPS+XbJYKhRwmvKf0vs16U1CqQuwgzlqWwqCDM3BtlEfo46 wGPt2ai37Pim0B8bMC2PxxBTVIf2+fYUSitd6/9uhjh6yduqjRyEsOUyN3RyGT2gumUE ndIRwQHjbjuJGWSjDmscP43vCKz7l7t80T6VaK45b/UzPyMMAsob8NXHMD0WS9HNWO3Y 9PFHmrjsbj+lkqQfgcpZXGt99M8LwKgwWDuqj6T7A0her2O239a6keun7z+puyP8C06T +4kT7AiDrG+Zi3lkWHNO30W3ZwW427PhuBqyBg2W2e9DcTbsv27cuxXbElwkNW+UHgMC z6IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=BLzAGurp; 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 i11-20020a05620a248b00b00699f96e29a4si3737333qkn.499.2022.04.19.02.28.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Apr 2022 02:28:26 -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=BLzAGurp; 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]:47844 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ngk9p-0004MC-Sw for patch@linaro.org; Tue, 19 Apr 2022 05:28:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngjsS-0005Hk-6z for qemu-devel@nongnu.org; Tue, 19 Apr 2022 05:10:28 -0400 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:42656) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ngjsO-0008II-NW for qemu-devel@nongnu.org; Tue, 19 Apr 2022 05:10:27 -0400 Received: by mail-ed1-x533.google.com with SMTP id t25so20402792edt.9 for ; Tue, 19 Apr 2022 02:10:24 -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=BLzAGurppIziuBWLaPdc920fMRyKMUFaflW7pPmMMsBPqv8Pxm1ToRAhaRX5ueYeCK f8wR5BQDXnA08VrFNHXgBb+DoM5/RqQwUxilrIHhO4fjUK+uHPkhRdjaA7Nb9ckrBC/K y7S0+BPUS0YEf1DxkjlKLYovx6dg3u0Bdjiy5Puh52V9hDk0MMkJKijnvK1kqp+dLYTR Or6Vf7ovtdw/SkNlha0EMw1GHhfLPXrFoBw6lJzWkNlhPnEZk6nA2Hue6CpKKI+UMgVt Qo3BD5l1k0pm4JkndJ5hATt87ODDsrOYCtcDek5A6B6UwQIuvmzGqfjWbdY6Z2LuNbmj ISuw== 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=YTcziAnYitwBIJ7Bbpn6uBfCx0AMH55FsQdbjGgkbTgDWvf7gs1T0UQsb1BmW/Mpzp 1jzfNqa6GII4m8ED3mpU4hPe4gSUeVmxD/hGFh/VEH/2F+LrQT8tYEbuytvU03F65hB7 1ldOw4QlFPTEw10H34f8e9qts3eStJ+eO6d5OB/k8mp7dgdd6GIlMJWoK8WFTbJU4G4w F5s3eLKy/eIL07yvf7tCmX/jKjzy5saDgB5rxpMkUiAp87QFqV6H0X1HBKqR0tReAMP9 WvINqidzPWeET0cr2tH5CQiR3QxDI9TASpjTLfPrbvhatKoRl9iIKMLy2mVNN6lASPDS rILw== X-Gm-Message-State: AOAM5301S+bCRUXRa55n9aAkdmvt8dbx8tep0DLnCtWKhsDAWi9+HEj0 YAfAH6SfA+jTl9zQyl6rw/r4lg== X-Received: by 2002:a50:ba8a:0:b0:423:bdf5:41d6 with SMTP id x10-20020a50ba8a000000b00423bdf541d6mr14895435ede.204.1650359423079; Tue, 19 Apr 2022 02:10:23 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id ch26-20020a0564021bda00b00422dfcce6e2sm5973962edb.50.2022.04.19.02.10.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Apr 2022 02:10:21 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 712871FFB8; Tue, 19 Apr 2022 10:10:20 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 01/25] tests/avocado: update aarch64_virt test to exercise -cpu max Date: Tue, 19 Apr 2022 10:09:56 +0100 Message-Id: <20220419091020.3008144-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220419091020.3008144-1-alex.bennee@linaro.org> References: <20220419091020.3008144-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x533.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, Beraldo Leal , Richard Henderson , f4bug@amsat.org, Wainer dos Santos Moschetta , "open list:Virt" , stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net 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)