From patchwork Wed Apr 20 18:08:08 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: 563995 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp4414302map; Wed, 20 Apr 2022 11:29:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyq4GQIY8zPx637CS26A3uC0C2JIUhYq92uZUmKQb0BV3b+jKPuE6cvBFd1cximtEaLiOMO X-Received: by 2002:a25:9f90:0:b0:624:521e:d4a5 with SMTP id u16-20020a259f90000000b00624521ed4a5mr21261547ybq.230.1650479374533; Wed, 20 Apr 2022 11:29:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650479374; cv=none; d=google.com; s=arc-20160816; b=KipRZHjDLmUsw2QihhLUXIcqzjqBuuZgfWZ0g9K57HPYURdUw8g585/b0Lo+b2u+Jm BKWAedwp5+uyI/oameGVwzdwhSX5DW0EqZnkO5IcxSzB8wyqfsKC6zr/7+mF/vHTQjT1 G+PsZM91rdBU+ZusROPSdUSrjDuIntJcotqevnI8z5ML0VUkRjHC8+xjKH+fQVyLHpbn zNE/tihlJalZTASEEIatCk0yO26lfu1gZ8UuHzw5YoMVx2XwCO/BxdSvTMxGqnmU6OSA hIm5YBda/OiUwCJt6VRskIxRf2xJfm6IU105+F8WtXlsl/vOo6dW9QlEAJwRDZnkQgqX yfqQ== 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=BCfb2M1EMdx2J6Ios5fRL0JpYBgbG9auHILrcitJ3XE=; b=yUVcDDomwlxpCBMH3uKKVsRMaLCgv0x/jpxOXHzzz0t5Xcubg/9LVDSsA0DxHY9HiD yDlsS9dK3z1X0GIjd0XMqjNluFa63kdstwXqMh/xAoATDui+gNo3py/D+/eJeZqD0D5M l6gOg5neKhu8s1tKS7RF1CMW7gCApk0cH9cVHmOjPXgBiCcQ/Gf8od7DdrKZr57GHIC+ 6MfhbiQTY34saGDE5612izpCcH5d6K4Fw5O+7YcD+8HtykdR6mKbTp0OUKo0nwra03Vy qfj/sfuGzvPHvlEdUASG0l04tANXb5u58zv9ng4wswL1vO5rhNHXWN4gDT0AqIIO43Qn u8DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=syvZ5H0u; 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 e136-20020a25d38e000000b00641158460c1si615132ybf.536.2022.04.20.11.29.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Apr 2022 11:29:34 -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=syvZ5H0u; 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]:60780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhF54-0002b7-0R for patch@linaro.org; Wed, 20 Apr 2022 14:29:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhEkn-0001Y4-PE for qemu-devel@nongnu.org; Wed, 20 Apr 2022 14:08:37 -0400 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]:39794) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhEkl-0001Wt-Pf for qemu-devel@nongnu.org; Wed, 20 Apr 2022 14:08:37 -0400 Received: by mail-ej1-x634.google.com with SMTP id bv19so5171164ejb.6 for ; Wed, 20 Apr 2022 11:08:35 -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=BCfb2M1EMdx2J6Ios5fRL0JpYBgbG9auHILrcitJ3XE=; b=syvZ5H0uT5d7lJgmr0ctw9tUKxl97wcpWe+dEmxmwxwPskoEeZTE1e/rGm1XoyHVlo 9f3f91xosEq4/gXXSLmwxcVHbYejncbKq2oYuDigQ/FdMuMsenwXMHwct256Ues5v2kP WO8+G+QsZem8wrB3NoIoubvsSNxYjSv4cLbGs8SMtt6yNfUM6Xa69A1M3OzkgyNcgp4i 1kkYo9ViCse8cZWxuWB2zJgxogiR2O4JH0b0Chs3warpF54fP22n+kd9QEihwPfwlRdb lgezEEhU99F7nZinjYP71iokEtCQXltOP5QuG7JQL/x647T8/rQKVRLMZwv4O+sd9eKq aFjA== 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=BCfb2M1EMdx2J6Ios5fRL0JpYBgbG9auHILrcitJ3XE=; b=sQ8ekP/bVD+xOB0ksBV6+AGpVMFOVEpui4sHAHQdmTdtGK4gZqqNagEsLNJbJ7MhEe Q7ThrcLIxd5Bok62FSeSWmKEW3yldBZfVcZsS9DaBnpWFNBfE3X34kYNa8cr9JD5OpWp xRn8OSfz5cZhGEOWxJypHaMhYIG8qeglxU1aj7bnMz2HNISY3d0dPKkkWGtE6Ct4/DnK C8xyTG/BDQpcNV++nHeZN6T3UmG2XIugIj00kjqqsDNDUFyipd1FAO1wdnEUjGTGBlu6 21EZGjEYxppBfmEgb74Seow4RalhI5x4N36dmFDmXhx4UKtGvFBaBhukTphxel2mbgvZ e4Eg== X-Gm-Message-State: AOAM531BxeZX0gWSbKMexiR/ykFrR87/wmC+3FHP31C7j4ZsOrgzkfKR j1rVQfGYND9ZVm0tr+7Wcbgm/Q== X-Received: by 2002:a17:906:5cb:b0:6cf:954:d84d with SMTP id t11-20020a17090605cb00b006cf0954d84dmr20202968ejt.560.1650478114120; Wed, 20 Apr 2022 11:08:34 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id kk23-20020a170907767700b006e8a6e53a7bsm6943928ejc.139.2022.04.20.11.08.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 11:08:33 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6795A1FFB8; Wed, 20 Apr 2022 19:08:32 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, richard.henderson@linaro.org Subject: [PULL 01/25] tests/avocado: update aarch64_virt test to exercise -cpu max Date: Wed, 20 Apr 2022 19:08:08 +0100 Message-Id: <20220420180832.3812543-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220420180832.3812543-1-alex.bennee@linaro.org> References: <20220420180832.3812543-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x634.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=ham 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: Beraldo Leal , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , qemu-devel@nongnu.org, "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 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: <20220419091020.3008144-2-alex.bennee@linaro.org> 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)