From patchwork Mon Aug 26 22:10:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 822466 Delivered-To: patch@linaro.org Received: by 2002:adf:f4c1:0:b0:367:895a:4699 with SMTP id h1csp51114wrp; Mon, 26 Aug 2024 15:12:48 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXRZd3vrEUy4vxA6Zvzucom22TKYH4232MBmBG9gDmb4J9fYzhV+LgHEFjucDT2j+c4U1NP0w==@linaro.org X-Google-Smtp-Source: AGHT+IGC4bpFE1w+hTG1umYX47PP5tC6cil4SeP9+E0ZBZs8huSJ1+9cdaHUFHDQsleVK1vSmKPK X-Received: by 2002:a05:6830:7309:b0:709:3d2f:7b46 with SMTP id 46e09a7af769-70e0eba86ecmr13006956a34.12.1724710368537; Mon, 26 Aug 2024 15:12:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724710368; cv=none; d=google.com; s=arc-20160816; b=MDlI46kpdHSKxbVoUpV2YQQM2V5+gvjfyZbBj+F0cnb++EA0NKS0X2XJ7kbmKtfL+t 3XzMNJZ0FBEtTuEnjKGfb1vn8GD+T+s0Lh5K/JGS7KCyKDNECVcKvefZMRFdKry114kw yZkC4ntf8SnJA6ZhosbdxpahqVkclEaX2i5A0WmTS2N+Y96O3zKf3fVyGPLAg6YTu1LU pHum22LPn2uuWQO0xjV9+OYPKwVGcrruQ8dzORb6OK34ke8EtsgkRWSZZjjpuVkkDYCz V4M8s6xjj8Ythq94A4viedFDtQ9/vFnOOGyVZImCgpdvZVpzewIhniVljYwa+vfQVnic hRbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=QNLodhe7eJCHWO8QXeEyfzJb37RRfhG0yPpBje69vMY=; fh=749F8T7gNyWgII2TFFxdY2Xgi9YaJvcw7lbWJ6sHwPE=; b=Uqq6KkpoQYNhuXqZBypjDrvFMxR83PlxSJG1soFhK9p/UIDgFMAVaFdubBD6pPY+kP Nu7SymC5a5dd7W1obPiQ6V89bM1hWX+QZJ/fK+suFMrZdhwMXwYjh0g1s7MEagN/4guG iIseoYZDqlXCN5CGi9EdIg6QJx3tb6C5CLgUh6Aj2AP8avRkj+K0nRa4URLX5EMeP+Eo B+M+/QUry2ae7gdpgkjC0Nh7CnPGN6gTSRc5Qp7OoiYyel61kgT7wGIMkU0WgKBV1IEZ kda32u79IZlILHq5ckCOWOLF3RpYZ17FP154iW+UveJgA2Edb02ET2ONxTS5K3H3qYNe B2dg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D0eCCHtZ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-454fe0edbd2si113203821cf.199.2024.08.26.15.12.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Aug 2024 15:12:48 -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=pass header.i=@linaro.org header.s=google header.b=D0eCCHtZ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sihvu-0001Lu-20; Mon, 26 Aug 2024 18:11:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sihvs-0001Ha-QL for qemu-devel@nongnu.org; Mon, 26 Aug 2024 18:11:28 -0400 Received: from mail-oo1-xc2c.google.com ([2607:f8b0:4864:20::c2c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sihvr-0000nY-1i for qemu-devel@nongnu.org; Mon, 26 Aug 2024 18:11:28 -0400 Received: by mail-oo1-xc2c.google.com with SMTP id 006d021491bc7-5dca9cc71b2so3479893eaf.2 for ; Mon, 26 Aug 2024 15:11:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724710285; x=1725315085; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QNLodhe7eJCHWO8QXeEyfzJb37RRfhG0yPpBje69vMY=; b=D0eCCHtZlrcaPlDgvSxTv991wznH74DkIbFTDHkEYGdV5zukfc4nJIRGPauvRy4xsY S3MN9g7yKj10plgEwOviwju0kTo2QqVqPxmCDVDDZ6vrh6hoXBXqKqtt/XpXsNOgATVy 8XmMbtJAdk2nVSa5qplRGKtICpmD6ayhaukMmYZHar17rR5Bc9r9rzK0UXvIrbsNlzpi g9mhFdtNrEtdIbaXaG7kAOvRDN1GfRJrX9LYkcv4D6ulOKI3e7buZbm0Vc0LzSJYCmEx vEiwwHnzpjQuBe+jILwV3okoh9ZR42jXgJZiMgEaReLEiMQlFE6xFeCmOwo0DkwDxGtH 92DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724710285; x=1725315085; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QNLodhe7eJCHWO8QXeEyfzJb37RRfhG0yPpBje69vMY=; b=eWzbBQ9262TTLJJQzRAp8sVuiNM1WnVw94t3xgS1FW650iATh8NAR8ZRGcVrpcJIS+ 1MOmLUfMiOfCe/3b8ytlQ3MKQSrGV46G4w2XVkLTMVG4dFESEr0M2+AYR/yZ4Xb+cFfP EsAHFCwsdQrsl0ArllCaizNIxlt9QVQ3qXSaj8SABRgTrlGNTxneSJVvIuhvoLJuH2mk M32Z1wqPTR+Lj4SxJOG0G+997F3VvmXfvZ+MqEez/dbtyBLQsp3jqr86v960QPnO9MwQ oe1X9XbENxvUxn5JOhVyEgXyOiaLWGBrAS3ldC7NHetQUTThH75qo0zd9JZJWwcUemF6 Xwug== X-Gm-Message-State: AOJu0YyNHFFZDUGbJVPVXyeUjJxU6NfSxHomyQOIYhzXKZ5onckHypzL YTKzp1qAhLYm5TpJpdBtIqM8wXUXETCAO4kHVZSXsmnKdV2yWcaODN/H7D0KkcnZ4yQCy7NUYOz + X-Received: by 2002:a05:6820:80f:b0:5da:a462:6a49 with SMTP id 006d021491bc7-5dcc5b641f6mr13385490eaf.0.1724710285653; Mon, 26 Aug 2024 15:11:25 -0700 (PDT) Received: from m1x-phil.lan ([176.187.216.241]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6c162db0bacsm50629426d6.83.2024.08.26.15.11.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 26 Aug 2024 15:11:25 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , Thomas Huth , Sergey Kambalin , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Beraldo Leal , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 3/4] tests/functional: Convert Aarch64 Raspi3 avocado tests Date: Tue, 27 Aug 2024 00:10:57 +0200 Message-ID: <20240826221058.75126-4-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240826221058.75126-1-philmd@linaro.org> References: <20240826221058.75126-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::c2c; envelope-from=philmd@linaro.org; helo=mail-oo1-xc2c.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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Straight forward conversion. Update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 23 -------------- tests/functional/meson.build | 4 +++ tests/functional/test_aarch64_raspi3.py | 42 +++++++++++++++++++++++++ 4 files changed, 47 insertions(+), 23 deletions(-) create mode 100755 tests/functional/test_aarch64_raspi3.py diff --git a/MAINTAINERS b/MAINTAINERS index e2bbf1a994..9ce41df6d8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -911,6 +911,7 @@ F: include/hw/arm/rasp* F: include/hw/*/bcm283* F: docs/system/arm/raspi.rst F: tests/functional/test_arm_raspi2.py +F: tests/functional/test_aarch64_raspi3.py Real View M: Peter Maydell diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py index 226b92d057..cb7301a456 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -979,29 +979,6 @@ def test_arm_orangepi_uboot_netbsd9(self): # Wait for user-space wait_for_console_pattern(self, 'Starting root file system check') - def test_aarch64_raspi3_atf(self): - """ - :avocado: tags=accel:tcg - :avocado: tags=arch:aarch64 - :avocado: tags=machine:raspi3b - :avocado: tags=cpu:cortex-a53 - :avocado: tags=device:pl011 - :avocado: tags=atf - """ - zip_url = ('https://github.com/pbatard/RPi3/releases/download/' - 'v1.15/RPi3_UEFI_Firmware_v1.15.zip') - zip_hash = '74b3bd0de92683cadb14e008a7575e1d0c3cafb9' - zip_path = self.fetch_asset(zip_url, asset_hash=zip_hash) - - archive.extract(zip_path, self.workdir) - efi_fd = os.path.join(self.workdir, 'RPI_EFI.fd') - - self.vm.set_console(console_index=1) - self.vm.add_args('-nodefaults', - '-device', 'loader,file=%s,force-raw=true' % efi_fd) - self.vm.launch() - self.wait_for_console_pattern('version UEFI Firmware v1.15') - def test_alpha_clipper(self): """ :avocado: tags=arch:alpha diff --git a/tests/functional/meson.build b/tests/functional/meson.build index ec77835199..3fab8e0d0c 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -26,6 +26,10 @@ tests_generic = [ 'version', ] +tests_aarch64_thorough = [ + 'aarch64_raspi3', +] + tests_arm_thorough = [ 'arm_canona1100', 'arm_n8x0', diff --git a/tests/functional/test_aarch64_raspi3.py b/tests/functional/test_aarch64_raspi3.py new file mode 100755 index 0000000000..630b1039ee --- /dev/null +++ b/tests/functional/test_aarch64_raspi3.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python3 +# +# Functional test that boots a Linux kernel on a Raspberry Pi machine +# and checks the console +# +# Copyright (c) 2020 Philippe Mathieu-Daudé +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os +from zipfile import ZipFile + +from qemu_test import QemuSystemTest, Asset +from qemu_test.linux_kernel import linux_kernel_wait_for_pattern + + +class Aarch64Raspi3Machine(QemuSystemTest): + + ASSET_RPI3_UEFI = Asset( + ('https://github.com/pbatard/RPi3/releases/download/' + 'v1.15/RPi3_UEFI_Firmware_v1.15.zip'), + '8cff2e979560048b4c84921f41a91893240b9fb71a88f0b5c5d6c8edd994bd5b') + + def test_aarch64_raspi3_atf(self): + efi_name = 'RPI_EFI.fd' + zip_path = self.ASSET_RPI3_UEFI.fetch() + + with ZipFile(zip_path, 'r') as zf: + zf.extract(efi_name, path=self.workdir) + efi_fd = os.path.join(self.workdir, efi_name) + + self.set_machine('raspi3b') + self.vm.set_console(console_index=1) + self.vm.add_args('-cpu', 'cortex-a53', + '-nodefaults', + '-device', f'loader,file={efi_fd},force-raw=true') + self.vm.launch() + linux_kernel_wait_for_pattern(self, 'version UEFI Firmware v1.15') + + +if __name__ == '__main__': + QemuSystemTest.main()