From patchwork Fri Sep 6 18:05:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 826012 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp935333wrb; Fri, 6 Sep 2024 11:09:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXblUJMItcaOKZYHT4a7NX1YFQODrtqvQbMS6+XlaRxQ5j52vCXnTIZrNueghJwXNPz5tuW5A==@linaro.org X-Google-Smtp-Source: AGHT+IEk76F1dxTnbxdge5c35Mj0flrzJCunjXw6VpzMR3cgs8yuL8rSp3+6J1G4JBjfmADbaahj X-Received: by 2002:a05:6102:32c7:b0:493:de37:b3ef with SMTP id ada2fe7eead31-49bde1b5b56mr3587630137.13.1725646183473; Fri, 06 Sep 2024 11:09:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725646183; cv=none; d=google.com; s=arc-20240605; b=HlPE8JBexutYEGH1CEANmzTEJt4gRGyMQ+T1hRtCc3tNeOO3GNim0AXCUd87N4YFUN 80e4LHFTNwcSJnwy0yj5z3DC1MQ4EMafeOkci9Ld4jnDkvi+dy+ZLJAY+7DrAHg/WF2M npKvGPn4Dbyj7vIALYZPCGsBUbH6QakX/Qhkuscs382Qag4plrErq+iWVzJD9CYGSs2U uMR1jxy+AfcNn/Rx7vPkbQg4Q3puxvbw+Yv0kNd3yGWBHeRdhaS45myAP5ujVCDVo7ud PTGVfP6MptdGwz7pxBA8ILnf9uO/3HG333SqZaQz0GHYAdqyj7zRMeAvv2J0nvGS8gEn xJ8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=Ji84iv9XBJKYjEg7xYMJZg1LQX8VnwwUmA7czsLEGX8=; fh=VOF6bQVLSA3u9h7K9Ndv4flYyB0yigrftfoYRGPxwh0=; b=hqgkPOcOgWYQ0lIAAd/RlyUQFCIc9+llLC7ZNlnmIW/hACL89SUU97XPDrqMiac6Hx mmD9TgoW8mGJfo7lEgdnIH8FgSYLYY7wdD5KvRe5+bxDweQxwaRfIjuPDXvsodAVoLMh Ia70rJbsVoxEFcguhVPvcDe2oQtcrsIIFkzcN6YPsFUftsIrH8MOvkm+UrbK8i3KHjho jE43zxLbQTMp1L5ISv4izBib3zOCPwo68DYmP/X7id7Uif4jN+k1/GDqw9P4PJ5SdCvt yKZYbEM6fZQo41OwcEYczPz+vFeKsMrco3sYTRRTTIInI5o7OxsOEWExBJIQ+dGb81On OOmA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hwJzwMWh; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-49bdbe74413si900458137.125.2024.09.06.11.09.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Sep 2024 11:09:43 -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=@redhat.com header.s=mimecast20190719 header.b=hwJzwMWh; 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=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smdM6-0008C0-G3; Fri, 06 Sep 2024 14:06:46 -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 1smdLs-0007ma-EP for qemu-devel@nongnu.org; Fri, 06 Sep 2024 14:06:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1smdLp-00053o-Jg for qemu-devel@nongnu.org; Fri, 06 Sep 2024 14:06:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725645989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ji84iv9XBJKYjEg7xYMJZg1LQX8VnwwUmA7czsLEGX8=; b=hwJzwMWhppqrNvEiH9sDz0A6n1FPYAxaxBMCgWxK2YwtO1W6OSNPBzwOaszkeqv/z7fKDh mWSGDjPcYYPELQCrC3WuOd2O9JWZr5we/NUCbX/zAHQd5EH3hg0fwZwifa5hTxlnrbDiCB d5tOaJBnS/EIFXZ73MnDWW6lUgLv7A4= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-540--OPRPHQjPD6smKOd9JS_YQ-1; Fri, 06 Sep 2024 14:06:27 -0400 X-MC-Unique: -OPRPHQjPD6smKOd9JS_YQ-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A83921977009; Fri, 6 Sep 2024 18:06:26 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.194.70]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2815C19560AA; Fri, 6 Sep 2024 18:06:23 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , "Daniel P . Berrange" Subject: [PATCH 10/14] tests/functional: Convert Aarch64 Raspi3 avocado tests Date: Fri, 6 Sep 2024 20:05:45 +0200 Message-ID: <20240906180549.792832-11-thuth@redhat.com> In-Reply-To: <20240906180549.792832-1-thuth@redhat.com> References: <20240906180549.792832-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 11 X-Spam_score: 1.1 X-Spam_bar: + X-Spam_report: (1.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.142, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Straight forward conversion. Update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20240826221058.75126-4-philmd@linaro.org> [thuth: Use the LinuxKernelTest class] Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 23 -------------- tests/functional/meson.build | 1 + tests/functional/test_aarch64_raspi3.py | 41 +++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 23 deletions(-) create mode 100755 tests/functional/test_aarch64_raspi3.py diff --git a/MAINTAINERS b/MAINTAINERS index eaf71bb976..4e5a6d71b8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -912,6 +912,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 827a286429..e4caf34379 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 ff3fe7981e..35eebbe9b9 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -35,6 +35,7 @@ tests_generic_bsduser = [ ] tests_aarch64_system_thorough = [ + 'aarch64_raspi3', 'aarch64_sbsaref', 'aarch64_virt', ] diff --git a/tests/functional/test_aarch64_raspi3.py b/tests/functional/test_aarch64_raspi3.py new file mode 100755 index 0000000000..369f95a3d9 --- /dev/null +++ b/tests/functional/test_aarch64_raspi3.py @@ -0,0 +1,41 @@ +#!/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 LinuxKernelTest, Asset + + +class Aarch64Raspi3Machine(LinuxKernelTest): + + 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() + self.wait_for_console_pattern('version UEFI Firmware v1.15') + + +if __name__ == '__main__': + LinuxKernelTest.main()