From nobody Wed May 7 20:06:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1733490762; cv=none; d=zohomail.com; s=zohoarc; b=irJ6KGoF1xjKsh0bKacW9wm3x+TqG6O6Q4vZRHHKhW5/GDgm3ODSwmIsXRfp+kNi5ItNMcqYDnNLI7o4KM3dLAd6gjzF8nyNjMk+Zl4Zm68Her+oMcEW+YAUKHRISrWxuslUVVE6qqHsVDeJf7YTd9F7Gz4WccjpIaeiJJkcINA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733490762; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8neQhB33IAP3rGE+MU7aNDE3LSYRDS74ps8QfIex8pQ=; b=XCchsvSxtx5LMCcpoJvPVJveNtK3YQ6m+Ej0IEaek8coGXOg3MkNBUWWXvjoZXgc8gck57/zfHuBi1bsSTX0J5GQLBY7TS8fV65GFlsAb0xiy/yXW4AF2g0MhEQmxhiOm1p89P7jHX9HGL1vXCJIuMGFwKBgYHLkRqSbl6aibgI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from=<clg@redhat.com> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1733490761947779.6556166671706; Fri, 6 Dec 2024 05:12:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tJY7p-0003xj-1j; Fri, 06 Dec 2024 08:12:05 -0500 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 <clg@redhat.com>) id 1tJY7l-0003x7-DF for qemu-devel@nongnu.org; Fri, 06 Dec 2024 08:12:01 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <clg@redhat.com>) id 1tJY7i-00072W-8h for qemu-devel@nongnu.org; Fri, 06 Dec 2024 08:12:00 -0500 Received: from mx-prod-mc-04.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-311-Bf8BgN0nMEikFLQEfFD2Zg-1; Fri, 06 Dec 2024 08:11:54 -0500 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2D9D41955DD5; Fri, 6 Dec 2024 13:11:51 +0000 (UTC) Received: from corto.redhat.com (unknown [10.39.192.16]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0497C1954200; Fri, 6 Dec 2024 13:11:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733490717; 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=8neQhB33IAP3rGE+MU7aNDE3LSYRDS74ps8QfIex8pQ=; b=cAFUAgtdOOLqUDPVT/6JQKT/oejYm52SqnXaVo1D92y5DsANCLbAi6WA2y23bFDc2x0z3t S9lme8svFVBbAWiFvzSb0HX+HFVmwRXhhdAlJcxWUxhNSXF5VfnrJdaQJvFdn/4kvooNYA DR7esTVNv3CLKNSroG1qL2B5L8KsVsM= X-MC-Unique: Bf8BgN0nMEikFLQEfFD2Zg-1 X-Mimecast-MFC-AGG-ID: Bf8BgN0nMEikFLQEfFD2Zg From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@redhat.com> To: qemu-devel@nongnu.org, qemu-arm@nongnu.org Cc: Peter Maydell <peter.maydell@linaro.org>, Steven Lee <steven_lee@aspeedtech.com>, Troy Lee <leetroy@gmail.com>, Jamin Lin <jamin_lin@aspeedtech.com>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>, Thomas Huth <thuth@redhat.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@redhat.com> Subject: [PATCH 1/7] tests/functional: Introduce a specific test for ast1030 SoC Date: Fri, 6 Dec 2024 14:11:26 +0100 Message-ID: <20241206131132.520911-2-clg@redhat.com> In-Reply-To: <20241206131132.520911-1-clg@redhat.com> References: <20241206131132.520911-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.996, 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_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1733490762830116600 This simply moves the ast1030 tests to a new test file. No changes. Signed-off-by: C=C3=A9dric Le Goater <clg@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> --- tests/functional/meson.build | 2 + tests/functional/test_arm_aspeed.py | 64 ---------------- tests/functional/test_arm_aspeed_ast1030.py | 81 +++++++++++++++++++++ 3 files changed, 83 insertions(+), 64 deletions(-) create mode 100644 tests/functional/test_arm_aspeed_ast1030.py diff --git a/tests/functional/meson.build b/tests/functional/meson.build index d6d2c0196c76..ef593d4b9928 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -18,6 +18,7 @@ test_timeouts =3D { 'aarch64_tuxrun' : 240, 'aarch64_virt' : 720, 'acpi_bits' : 420, + 'arm_aspeed_ast1030' : 10, 'arm_aspeed' : 600, 'arm_bpim2u' : 500, 'arm_collie' : 180, @@ -66,6 +67,7 @@ tests_alpha_system_thorough =3D [ =20 tests_arm_system_thorough =3D [ 'arm_aspeed', + 'arm_aspeed_ast1030', 'arm_bpim2u', 'arm_canona1100', 'arm_collie', diff --git a/tests/functional/test_arm_aspeed.py b/tests/functional/test_ar= m_aspeed.py index d88170ac2415..9e58fcd84009 100755 --- a/tests/functional/test_arm_aspeed.py +++ b/tests/functional/test_arm_aspeed.py @@ -19,70 +19,6 @@ from zipfile import ZipFile from unittest import skipUnless =20 -class AST1030Machine(LinuxKernelTest): - - ASSET_ZEPHYR_1_04 =3D Asset( - ('https://github.com/AspeedTech-BMC' - '/zephyr/releases/download/v00.01.04/ast1030-evb-demo.zip'), - '4ac6210adcbc61294927918707c6762483fd844dde5e07f3ba834ad1f91434d3') - - def test_ast1030_zephyros_1_04(self): - self.set_machine('ast1030-evb') - - zip_file =3D self.ASSET_ZEPHYR_1_04.fetch() - - kernel_name =3D "ast1030-evb-demo/zephyr.elf" - with ZipFile(zip_file, 'r') as zf: - zf.extract(kernel_name, path=3Dself.workdir) - kernel_file =3D os.path.join(self.workdir, kernel_name) - - self.vm.set_console() - self.vm.add_args('-kernel', kernel_file, '-nographic') - self.vm.launch() - self.wait_for_console_pattern("Booting Zephyr OS") - exec_command_and_wait_for_pattern(self, "help", - "Available commands") - - ASSET_ZEPHYR_1_07 =3D Asset( - ('https://github.com/AspeedTech-BMC' - '/zephyr/releases/download/v00.01.07/ast1030-evb-demo.zip'), - 'ad52e27959746988afaed8429bf4e12ab988c05c4d07c9d90e13ec6f7be4574c') - - def test_ast1030_zephyros_1_07(self): - self.set_machine('ast1030-evb') - - zip_file =3D self.ASSET_ZEPHYR_1_07.fetch() - - kernel_name =3D "ast1030-evb-demo/zephyr.bin" - with ZipFile(zip_file, 'r') as zf: - zf.extract(kernel_name, path=3Dself.workdir) - kernel_file =3D os.path.join(self.workdir, kernel_name) - - self.vm.set_console() - self.vm.add_args('-kernel', kernel_file, '-nographic') - self.vm.launch() - self.wait_for_console_pattern("Booting Zephyr OS") - for shell_cmd in [ - 'kernel stacks', - 'otp info conf', - 'otp info scu', - 'hwinfo devid', - 'crypto aes256_cbc_vault', - 'random get', - 'jtag JTAG1 sw_xfer high TMS', - 'adc ADC0 resolution 12', - 'adc ADC0 read 42', - 'adc ADC1 read 69', - 'i2c scan I2C_0', - 'i3c attach I3C_0', - 'hash test', - 'kernel uptime', - 'kernel reboot warm', - 'kernel uptime', - 'kernel reboot cold', - 'kernel uptime', - ]: exec_command_and_wait_for_pattern(self, shell_cmd, "uart:~$") - class AST2x00Machine(LinuxKernelTest): =20 def do_test_arm_aspeed(self, machine, image): diff --git a/tests/functional/test_arm_aspeed_ast1030.py b/tests/functional= /test_arm_aspeed_ast1030.py new file mode 100644 index 000000000000..380a76ec015c --- /dev/null +++ b/tests/functional/test_arm_aspeed_ast1030.py @@ -0,0 +1,81 @@ +#!/usr/bin/env python3 +# +# Functional test that boots the ASPEED SoCs with firmware +# +# Copyright (C) 2022 ASPEED Technology Inc +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os + +from qemu_test import LinuxKernelTest, Asset +from qemu_test import exec_command_and_wait_for_pattern +from zipfile import ZipFile + +class AST1030Machine(LinuxKernelTest): + + ASSET_ZEPHYR_1_04 =3D Asset( + ('https://github.com/AspeedTech-BMC' + '/zephyr/releases/download/v00.01.04/ast1030-evb-demo.zip'), + '4ac6210adcbc61294927918707c6762483fd844dde5e07f3ba834ad1f91434d3') + + def test_ast1030_zephyros_1_04(self): + self.set_machine('ast1030-evb') + + zip_file =3D self.ASSET_ZEPHYR_1_04.fetch() + + kernel_name =3D "ast1030-evb-demo/zephyr.elf" + with ZipFile(zip_file, 'r') as zf: + zf.extract(kernel_name, path=3Dself.workdir) + kernel_file =3D os.path.join(self.workdir, kernel_name) + + self.vm.set_console() + self.vm.add_args('-kernel', kernel_file, '-nographic') + self.vm.launch() + self.wait_for_console_pattern("Booting Zephyr OS") + exec_command_and_wait_for_pattern(self, "help", + "Available commands") + + ASSET_ZEPHYR_1_07 =3D Asset( + ('https://github.com/AspeedTech-BMC' + '/zephyr/releases/download/v00.01.07/ast1030-evb-demo.zip'), + 'ad52e27959746988afaed8429bf4e12ab988c05c4d07c9d90e13ec6f7be4574c') + + def test_ast1030_zephyros_1_07(self): + self.set_machine('ast1030-evb') + + zip_file =3D self.ASSET_ZEPHYR_1_07.fetch() + + kernel_name =3D "ast1030-evb-demo/zephyr.bin" + with ZipFile(zip_file, 'r') as zf: + zf.extract(kernel_name, path=3Dself.workdir) + kernel_file =3D os.path.join(self.workdir, kernel_name) + + self.vm.set_console() + self.vm.add_args('-kernel', kernel_file, '-nographic') + self.vm.launch() + self.wait_for_console_pattern("Booting Zephyr OS") + for shell_cmd in [ + 'kernel stacks', + 'otp info conf', + 'otp info scu', + 'hwinfo devid', + 'crypto aes256_cbc_vault', + 'random get', + 'jtag JTAG1 sw_xfer high TMS', + 'adc ADC0 resolution 12', + 'adc ADC0 read 42', + 'adc ADC1 read 69', + 'i2c scan I2C_0', + 'i3c attach I3C_0', + 'hash test', + 'kernel uptime', + 'kernel reboot warm', + 'kernel uptime', + 'kernel reboot cold', + 'kernel uptime', + ]: exec_command_and_wait_for_pattern(self, shell_cmd, "uart:~$") + + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.47.0 From nobody Wed May 7 20:06:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1733490762; cv=none; d=zohomail.com; s=zohoarc; b=ks1UPJOa5guaJloNROkrnglhYbLBo+8bE/Nvlz+irCim7D0khI4NN2V2BDFzuSPZeta59VGyRMrAUYE8e3jNV/Nvo/l6w+H7qbrdZHmqj/6o9ZG9z6XF0z3W1x8K7Sfhrb04iVEJuiMh2NES/zx+Ed5kO9kYYhAsy+hP6f3WrHM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733490762; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8UzU8VmtwuxYdLR2F2yxMMWNha2eFBb4W2uXMJRDx+E=; b=UYxiA0uSXk7tVF+m5WTlJdZTCGLaOgAho80IoRw3NmZuZQfAu5ucLrxySgKYSTUVMYXqGE7AndxIOPXm2D1z6X4dRRkUNOIq8FWIPyQyQrc/BVN36WKpwjpgrNAcN8oXKb4Y2LbQMWApkBTF/BdIg0Aei3tTB4zhzOhB4/wqSFw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from=<clg@redhat.com> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1733490762471311.50814536195423; Fri, 6 Dec 2024 05:12:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tJY7s-0003zc-Nu; Fri, 06 Dec 2024 08:12:08 -0500 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 <clg@redhat.com>) id 1tJY7q-0003y5-AZ for qemu-devel@nongnu.org; Fri, 06 Dec 2024 08:12:06 -0500 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 <clg@redhat.com>) id 1tJY7o-000742-AK for qemu-devel@nongnu.org; Fri, 06 Dec 2024 08:12:06 -0500 Received: from mx-prod-mc-01.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-422-CKWmnaqdOdO0IaCQw8sffw-1; Fri, 06 Dec 2024 08:11:59 -0500 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 74D16195608B; Fri, 6 Dec 2024 13:11:55 +0000 (UTC) Received: from corto.redhat.com (unknown [10.39.192.16]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 771791954201; Fri, 6 Dec 2024 13:11:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733490723; 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=8UzU8VmtwuxYdLR2F2yxMMWNha2eFBb4W2uXMJRDx+E=; b=G09OpmmnssgSSX4EiPasZNLFtm9hKpektxPdY4ywDEqBQe/YQ2F7oVA8sLvaaB5R+iG7Co jIDy6owYtTQnrxxt1UYVNoz877HWYr9RjKDFKvuzn4+ngdobY56Z11nIiMdz3aIyO62p3j dGh/ORIIKKU1KpobfdD2ADlQC5fc94I= X-MC-Unique: CKWmnaqdOdO0IaCQw8sffw-1 X-Mimecast-MFC-AGG-ID: CKWmnaqdOdO0IaCQw8sffw From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@redhat.com> To: qemu-devel@nongnu.org, qemu-arm@nongnu.org Cc: Peter Maydell <peter.maydell@linaro.org>, Steven Lee <steven_lee@aspeedtech.com>, Troy Lee <leetroy@gmail.com>, Jamin Lin <jamin_lin@aspeedtech.com>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>, Thomas Huth <thuth@redhat.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@redhat.com> Subject: [PATCH 2/7] tests/functional: Introduce a specific test for palmetto-bmc machine Date: Fri, 6 Dec 2024 14:11:27 +0100 Message-ID: <20241206131132.520911-3-clg@redhat.com> In-Reply-To: <20241206131132.520911-1-clg@redhat.com> References: <20241206131132.520911-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.996, 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_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1733490765705116600 This introduces a new aspeed module for sharing code between tests and moves the palmetto test to a new test file. No changes in the test. Signed-off-by: C=C3=A9dric Le Goater <clg@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> --- tests/functional/aspeed.py | 23 +++++++++++++++++++ tests/functional/meson.build | 2 ++ tests/functional/test_arm_aspeed.py | 10 -------- tests/functional/test_arm_aspeed_palmetto.py | 24 ++++++++++++++++++++ 4 files changed, 49 insertions(+), 10 deletions(-) create mode 100644 tests/functional/aspeed.py create mode 100644 tests/functional/test_arm_aspeed_palmetto.py diff --git a/tests/functional/aspeed.py b/tests/functional/aspeed.py new file mode 100644 index 000000000000..d4dc5320b97a --- /dev/null +++ b/tests/functional/aspeed.py @@ -0,0 +1,23 @@ +# Test class to boot aspeed machines +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import LinuxKernelTest + +class AspeedTest(LinuxKernelTest): + + def do_test_arm_aspeed(self, machine, image): + self.set_machine(machine) + self.vm.set_console() + self.vm.add_args('-drive', 'file=3D' + image + ',if=3Dmtd,format= =3Draw', + '-net', 'nic', '-snapshot') + self.vm.launch() + + self.wait_for_console_pattern("U-Boot 2016.07") + self.wait_for_console_pattern("## Loading kernel from FIT Image at= 20080000") + self.wait_for_console_pattern("Starting kernel ...") + self.wait_for_console_pattern("Booting Linux on physical CPU 0x0") + self.wait_for_console_pattern( + "aspeed-smc 1e620000.spi: read control register: 203b0641") + self.wait_for_console_pattern("ftgmac100 1e660000.ethernet eth0: i= rq ") + self.wait_for_console_pattern("systemd[1]: Set hostname to") diff --git a/tests/functional/meson.build b/tests/functional/meson.build index ef593d4b9928..3cd079f910a8 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -19,6 +19,7 @@ test_timeouts =3D { 'aarch64_virt' : 720, 'acpi_bits' : 420, 'arm_aspeed_ast1030' : 10, + 'arm_aspeed_palmetto' : 120, 'arm_aspeed' : 600, 'arm_bpim2u' : 500, 'arm_collie' : 180, @@ -68,6 +69,7 @@ tests_alpha_system_thorough =3D [ tests_arm_system_thorough =3D [ 'arm_aspeed', 'arm_aspeed_ast1030', + 'arm_aspeed_palmetto', 'arm_bpim2u', 'arm_canona1100', 'arm_collie', diff --git a/tests/functional/test_arm_aspeed.py b/tests/functional/test_ar= m_aspeed.py index 9e58fcd84009..48a229608ef6 100755 --- a/tests/functional/test_arm_aspeed.py +++ b/tests/functional/test_arm_aspeed.py @@ -37,16 +37,6 @@ def do_test_arm_aspeed(self, machine, image): self.wait_for_console_pattern("ftgmac100 1e660000.ethernet eth0: i= rq ") self.wait_for_console_pattern("systemd[1]: Set hostname to") =20 - ASSET_PALMETTO_FLASH =3D Asset( - ('https://github.com/openbmc/openbmc/releases/download/2.9.0/' - 'obmc-phosphor-image-palmetto.static.mtd'), - '3e13bbbc28e424865dc42f35ad672b10f2e82cdb11846bb28fa625b48beafd0d'= ); - - def test_arm_ast2400_palmetto_openbmc_v2_9_0(self): - image_path =3D self.ASSET_PALMETTO_FLASH.fetch() - - self.do_test_arm_aspeed('palmetto-bmc', image_path) - ASSET_ROMULUS_FLASH =3D Asset( ('https://github.com/openbmc/openbmc/releases/download/2.9.0/' 'obmc-phosphor-image-romulus.static.mtd'), diff --git a/tests/functional/test_arm_aspeed_palmetto.py b/tests/functiona= l/test_arm_aspeed_palmetto.py new file mode 100644 index 000000000000..6588c02aad79 --- /dev/null +++ b/tests/functional/test_arm_aspeed_palmetto.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python3 +# +# Functional test that boots the ASPEED machines +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from aspeed import AspeedTest + +class PalmettoMachine(AspeedTest): + + ASSET_PALMETTO_FLASH =3D Asset( + ('https://github.com/openbmc/openbmc/releases/download/2.9.0/' + 'obmc-phosphor-image-palmetto.static.mtd'), + '3e13bbbc28e424865dc42f35ad672b10f2e82cdb11846bb28fa625b48beafd0d'= ); + + def test_arm_ast2400_palmetto_openbmc_v2_9_0(self): + image_path =3D self.ASSET_PALMETTO_FLASH.fetch() + + self.do_test_arm_aspeed('palmetto-bmc', image_path) + + +if __name__ =3D=3D '__main__': + AspeedTest.main() --=20 2.47.0 From nobody Wed May 7 20:06:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1733490830; cv=none; d=zohomail.com; s=zohoarc; b=YGX+M9qpCpPPIuV30yo9wOwqp464ytuovmyWv5n2QOZAzxP7HIDJGkRZYXeeDUmZ8X6misi2u5Nss0MTW1pYNJJDxrySWJNemVEG01Bg8cHQH5a1ELs+nyx7egNCXDllL0L5qeM5td28/FbfoLgnH0mn6WCC543KRUNmwe9SYRI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733490830; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ltopHPl4FJwLk1EyTLSPlsFmVlnaNjiR9PzEZvBjdcY=; b=UFXVqb4pAeit53VqUtILYiMFPQuYBTJg540KJNxz9wF+Jg2mn3ETswNsKBjWY47aj+5m5PsOn6coS6JeLcPy/2bzyyKo0X0rLojawE2y5Au60HdMga2mPSu4CC2vJeJQwiv5VJlFxvoTnbJWagb7572mKJQtB41MGlGNu1xBVV8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from=<clg@redhat.com> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1733490830598756.5928489234976; Fri, 6 Dec 2024 05:13:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tJY7t-0003zo-HH; Fri, 06 Dec 2024 08:12:09 -0500 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 <clg@redhat.com>) id 1tJY7s-0003zD-6W for qemu-devel@nongnu.org; Fri, 06 Dec 2024 08:12:08 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <clg@redhat.com>) id 1tJY7q-00074L-IV for qemu-devel@nongnu.org; Fri, 06 Dec 2024 08:12:07 -0500 Received: from mx-prod-mc-01.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-341-yxRFsP1BM3Gy4sE7k3XrQA-1; Fri, 06 Dec 2024 08:12:01 -0500 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1A7191955E70; Fri, 6 Dec 2024 13:11:59 +0000 (UTC) Received: from corto.redhat.com (unknown [10.39.192.16]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DD7F41955F3F; Fri, 6 Dec 2024 13:11:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733490725; 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=ltopHPl4FJwLk1EyTLSPlsFmVlnaNjiR9PzEZvBjdcY=; b=XhXj1XstOC/sMoQ/FoiOANou3nmXRhDSm/M/HdWU1q9wj8Q2BBAuBw2tPu9QI5M3qnvgBJ CKxqq3Yip87rJZYntysGaECVees6tvsTVH+i8B1SwsOr2uF2BWuYNirgX++jY3bszYDlKp Hc0epyaw79bMSjtR2OzrO9ShlDyGz0Y= X-MC-Unique: yxRFsP1BM3Gy4sE7k3XrQA-1 X-Mimecast-MFC-AGG-ID: yxRFsP1BM3Gy4sE7k3XrQA From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@redhat.com> To: qemu-devel@nongnu.org, qemu-arm@nongnu.org Cc: Peter Maydell <peter.maydell@linaro.org>, Steven Lee <steven_lee@aspeedtech.com>, Troy Lee <leetroy@gmail.com>, Jamin Lin <jamin_lin@aspeedtech.com>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>, Thomas Huth <thuth@redhat.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@redhat.com> Subject: [PATCH 3/7] tests/functional: Introduce a specific test for romulus-bmc machine Date: Fri, 6 Dec 2024 14:11:28 +0100 Message-ID: <20241206131132.520911-4-clg@redhat.com> In-Reply-To: <20241206131132.520911-1-clg@redhat.com> References: <20241206131132.520911-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.996, 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_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1733490830946116600 This simply moves the romulus-bmc test to a new test file. No changes in the test. The do_test_arm_aspeed routine is removed from the test_arm_aspeed.py file because it is now unused. Signed-off-by: C=C3=A9dric Le Goater <clg@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> --- tests/functional/meson.build | 2 ++ tests/functional/test_arm_aspeed.py | 26 --------------------- tests/functional/test_arm_aspeed_romulus.py | 24 +++++++++++++++++++ 3 files changed, 26 insertions(+), 26 deletions(-) create mode 100644 tests/functional/test_arm_aspeed_romulus.py diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 3cd079f910a8..65eda5a394bc 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -20,6 +20,7 @@ test_timeouts =3D { 'acpi_bits' : 420, 'arm_aspeed_ast1030' : 10, 'arm_aspeed_palmetto' : 120, + 'arm_aspeed_romulus' : 120, 'arm_aspeed' : 600, 'arm_bpim2u' : 500, 'arm_collie' : 180, @@ -70,6 +71,7 @@ tests_arm_system_thorough =3D [ 'arm_aspeed', 'arm_aspeed_ast1030', 'arm_aspeed_palmetto', + 'arm_aspeed_romulus', 'arm_bpim2u', 'arm_canona1100', 'arm_collie', diff --git a/tests/functional/test_arm_aspeed.py b/tests/functional/test_ar= m_aspeed.py index 48a229608ef6..bdc000a00a32 100755 --- a/tests/functional/test_arm_aspeed.py +++ b/tests/functional/test_arm_aspeed.py @@ -21,32 +21,6 @@ =20 class AST2x00Machine(LinuxKernelTest): =20 - def do_test_arm_aspeed(self, machine, image): - self.set_machine(machine) - self.vm.set_console() - self.vm.add_args('-drive', 'file=3D' + image + ',if=3Dmtd,format= =3Draw', - '-net', 'nic', '-snapshot') - self.vm.launch() - - self.wait_for_console_pattern("U-Boot 2016.07") - self.wait_for_console_pattern("## Loading kernel from FIT Image at= 20080000") - self.wait_for_console_pattern("Starting kernel ...") - self.wait_for_console_pattern("Booting Linux on physical CPU 0x0") - self.wait_for_console_pattern( - "aspeed-smc 1e620000.spi: read control register: 203b0641") - self.wait_for_console_pattern("ftgmac100 1e660000.ethernet eth0: i= rq ") - self.wait_for_console_pattern("systemd[1]: Set hostname to") - - ASSET_ROMULUS_FLASH =3D Asset( - ('https://github.com/openbmc/openbmc/releases/download/2.9.0/' - 'obmc-phosphor-image-romulus.static.mtd'), - '820341076803f1955bc31e647a512c79f9add4f5233d0697678bab4604c7bb25') - - def test_arm_ast2500_romulus_openbmc_v2_9_0(self): - image_path =3D self.ASSET_ROMULUS_FLASH.fetch() - - self.do_test_arm_aspeed('romulus-bmc', image_path) - def do_test_arm_aspeed_buildroot_start(self, image, cpu_id, pattern=3D= 'Aspeed EVB'): self.require_netdev('user') self.vm.set_console() diff --git a/tests/functional/test_arm_aspeed_romulus.py b/tests/functional= /test_arm_aspeed_romulus.py new file mode 100644 index 000000000000..747b616201ce --- /dev/null +++ b/tests/functional/test_arm_aspeed_romulus.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python3 +# +# Functional test that boots the ASPEED machines +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from aspeed import AspeedTest + +class RomulusMachine(AspeedTest): + + ASSET_ROMULUS_FLASH =3D Asset( + ('https://github.com/openbmc/openbmc/releases/download/2.9.0/' + 'obmc-phosphor-image-romulus.static.mtd'), + '820341076803f1955bc31e647a512c79f9add4f5233d0697678bab4604c7bb25') + + def test_arm_ast2500_romulus_openbmc_v2_9_0(self): + image_path =3D self.ASSET_ROMULUS_FLASH.fetch() + + self.do_test_arm_aspeed('romulus-bmc', image_path) + + +if __name__ =3D=3D '__main__': + AspeedTest.main() --=20 2.47.0 From nobody Wed May 7 20:06:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1733490789; cv=none; d=zohomail.com; s=zohoarc; b=ZgbPzBXZp4Wc0wOtEkBOigiaXU821l8yGx54NvXsmrJth1ULxhXbBPXAcGPWvYyGVJmXWvRbzKdKJAydqcXH4u74Rsb4E3w0ZNNIzbXbRQw3uozzTvpvM2QjIenc9XmqJ311QTEDYboS7R3S6gtDphhfddCTuwgmDYLKcVoVJn0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733490789; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=UAAAAiM0475wZNa8rSgVc1/uIRi97fuWFDt0ZAEV3Kk=; b=MdLW5seinDW+dkkJAqfczX5HKtLdm+nmi1MCZP7pc2kdgTGCgzPNBHGiP+zOJZtgE+xpu0tuG6ZDmc4yZ3GvnWuQJIcm4rflqiqzLVUCHZkcDaSlp5J+ndsOc1bS0Ktf9TgDE+oJtam6XDp026eTMXB6KH7kRGieXbUspC+F3nw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from=<clg@redhat.com> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1733490789498894.7088126388072; Fri, 6 Dec 2024 05:13:09 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tJY7z-0004AN-7E; Fri, 06 Dec 2024 08:12:15 -0500 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 <clg@redhat.com>) id 1tJY7w-00043N-Ts for qemu-devel@nongnu.org; Fri, 06 Dec 2024 08:12:12 -0500 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 <clg@redhat.com>) id 1tJY7u-000755-PX for qemu-devel@nongnu.org; Fri, 06 Dec 2024 08:12:12 -0500 Received: from mx-prod-mc-05.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-60-Z7mVCnkGMpymbmtWs0vGzg-1; Fri, 06 Dec 2024 08:12:04 -0500 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8B7DD195C256; Fri, 6 Dec 2024 13:12:02 +0000 (UTC) Received: from corto.redhat.com (unknown [10.39.192.16]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 833DA1955F3F; Fri, 6 Dec 2024 13:11:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733490730; 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=UAAAAiM0475wZNa8rSgVc1/uIRi97fuWFDt0ZAEV3Kk=; b=Jb08dYPiMKyKqrcQH27aKtZoLox1OoJx3z/NaPkvwIEBeLNBuUZ1lZmkT/ENp0yAWFO2pq fDOPKJApm9BSFhTnvt159iOw4XNoDStRql2kmBtaXZL3f/b9Typ5WP8y5euMu0GnLtmLb2 6C0Yn/MOHOLPAqdZOX0YSAWd1w5Sqig= X-MC-Unique: Z7mVCnkGMpymbmtWs0vGzg-1 X-Mimecast-MFC-AGG-ID: Z7mVCnkGMpymbmtWs0vGzg From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@redhat.com> To: qemu-devel@nongnu.org, qemu-arm@nongnu.org Cc: Peter Maydell <peter.maydell@linaro.org>, Steven Lee <steven_lee@aspeedtech.com>, Troy Lee <leetroy@gmail.com>, Jamin Lin <jamin_lin@aspeedtech.com>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>, Thomas Huth <thuth@redhat.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@redhat.com> Subject: [PATCH 4/7] tests/functional: Introduce a specific test for ast2500 SoC Date: Fri, 6 Dec 2024 14:11:29 +0100 Message-ID: <20241206131132.520911-5-clg@redhat.com> In-Reply-To: <20241206131132.520911-1-clg@redhat.com> References: <20241206131132.520911-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.996, 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_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1733490790912116600 This moves the ast2500-evb tests to a new test file and extends the aspeed module with routines used to run the buildroot and sdk tests. No changes in the test. Signed-off-by: C=C3=A9dric Le Goater <clg@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> --- tests/functional/aspeed.py | 33 ++++++++++++ tests/functional/meson.build | 2 + tests/functional/test_arm_aspeed.py | 44 --------------- tests/functional/test_arm_aspeed_ast2500.py | 59 +++++++++++++++++++++ 4 files changed, 94 insertions(+), 44 deletions(-) create mode 100644 tests/functional/test_arm_aspeed_ast2500.py diff --git a/tests/functional/aspeed.py b/tests/functional/aspeed.py index d4dc5320b97a..62f50bab7a33 100644 --- a/tests/functional/aspeed.py +++ b/tests/functional/aspeed.py @@ -2,6 +2,7 @@ # # SPDX-License-Identifier: GPL-2.0-or-later =20 +from qemu_test import exec_command_and_wait_for_pattern from qemu_test import LinuxKernelTest =20 class AspeedTest(LinuxKernelTest): @@ -21,3 +22,35 @@ def do_test_arm_aspeed(self, machine, image): "aspeed-smc 1e620000.spi: read control register: 203b0641") self.wait_for_console_pattern("ftgmac100 1e660000.ethernet eth0: i= rq ") self.wait_for_console_pattern("systemd[1]: Set hostname to") + + def do_test_arm_aspeed_buildroot_start(self, image, cpu_id, pattern=3D= 'Aspeed EVB'): + self.require_netdev('user') + self.vm.set_console() + self.vm.add_args('-drive', 'file=3D' + image + ',if=3Dmtd,format= =3Draw,read-only=3Dtrue', + '-net', 'nic', '-net', 'user') + self.vm.launch() + + self.wait_for_console_pattern('U-Boot 2019.04') + self.wait_for_console_pattern('## Loading kernel from FIT Image') + self.wait_for_console_pattern('Starting kernel ...') + self.wait_for_console_pattern('Booting Linux on physical CPU ' + c= pu_id) + self.wait_for_console_pattern('lease of 10.0.2.15') + # the line before login: + self.wait_for_console_pattern(pattern) + exec_command_and_wait_for_pattern(self, 'root', 'Password:') + exec_command_and_wait_for_pattern(self, 'passw0rd', '#') + + def do_test_arm_aspeed_buildroot_poweroff(self): + exec_command_and_wait_for_pattern(self, 'poweroff', + 'reboot: System halted'); + + def do_test_arm_aspeed_sdk_start(self, image): + self.require_netdev('user') + self.vm.set_console() + self.vm.add_args('-drive', 'file=3D' + image + ',if=3Dmtd,format= =3Draw', + '-net', 'nic', '-net', 'user', '-snapshot') + self.vm.launch() + + self.wait_for_console_pattern('U-Boot 2019.04') + self.wait_for_console_pattern('## Loading kernel from FIT Image') + self.wait_for_console_pattern('Starting kernel ...') diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 65eda5a394bc..6a9c20b30156 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -21,6 +21,7 @@ test_timeouts =3D { 'arm_aspeed_ast1030' : 10, 'arm_aspeed_palmetto' : 120, 'arm_aspeed_romulus' : 120, + 'arm_aspeed_ast2500' : 480, 'arm_aspeed' : 600, 'arm_bpim2u' : 500, 'arm_collie' : 180, @@ -72,6 +73,7 @@ tests_arm_system_thorough =3D [ 'arm_aspeed_ast1030', 'arm_aspeed_palmetto', 'arm_aspeed_romulus', + 'arm_aspeed_ast2500', 'arm_bpim2u', 'arm_canona1100', 'arm_collie', diff --git a/tests/functional/test_arm_aspeed.py b/tests/functional/test_ar= m_aspeed.py index bdc000a00a32..48cf0bfb27ca 100755 --- a/tests/functional/test_arm_aspeed.py +++ b/tests/functional/test_arm_aspeed.py @@ -41,34 +41,6 @@ def do_test_arm_aspeed_buildroot_start(self, image, cpu_= id, pattern=3D'Aspeed EVB' def do_test_arm_aspeed_buildroot_poweroff(self): exec_command_and_wait_for_pattern(self, 'poweroff', 'reboot: System halted'); - - ASSET_BR2_202311_AST2500_FLASH =3D Asset( - ('https://github.com/legoater/qemu-aspeed-boot/raw/master/' - 'images/ast2500-evb/buildroot-2023.11/flash.img'), - 'c23db6160cf77d0258397eb2051162c8473a56c441417c52a91ba217186e715f') - - def test_arm_ast2500_evb_buildroot(self): - self.set_machine('ast2500-evb') - - image_path =3D self.ASSET_BR2_202311_AST2500_FLASH.fetch() - - self.vm.add_args('-device', - 'tmp105,bus=3Daspeed.i2c.bus.3,address=3D0x4d,id= =3Dtmp-test'); - self.do_test_arm_aspeed_buildroot_start(image_path, '0x0', - 'ast2500-evb login:') - - exec_command_and_wait_for_pattern(self, - 'echo lm75 0x4d > /sys/class/i2c-dev/i2c-3/device/new_device', - 'i2c i2c-3: new_device: Instantiated device lm75 at 0x4d'); - exec_command_and_wait_for_pattern(self, - 'cat /sys/class/hwmon/hwmon1/temp1_input', '0= ') - self.vm.cmd('qom-set', path=3D'/machine/peripheral/tmp-test', - property=3D'temperature', value=3D18000); - exec_command_and_wait_for_pattern(self, - 'cat /sys/class/hwmon/hwmon1/temp1_input', '1= 8000') - - self.do_test_arm_aspeed_buildroot_poweroff() - ASSET_BR2_202311_AST2600_FLASH =3D Asset( ('https://github.com/legoater/qemu-aspeed-boot/raw/master/' 'images/ast2600-evb/buildroot-2023.11/flash.img'), @@ -161,22 +133,6 @@ def do_test_arm_aspeed_sdk_start(self, image): self.wait_for_console_pattern('## Loading kernel from FIT Image') self.wait_for_console_pattern('Starting kernel ...') =20 - ASSET_SDK_V806_AST2500 =3D Asset( - 'https://github.com/AspeedTech-BMC/openbmc/releases/download/v08.0= 6/ast2500-default-obmc.tar.gz', - 'e1755f3cadff69190438c688d52dd0f0d399b70a1e14b1d3d5540fc4851d38ca') - - def test_arm_ast2500_evb_sdk(self): - self.set_machine('ast2500-evb') - - image_path =3D self.ASSET_SDK_V806_AST2500.fetch() - - archive_extract(image_path, self.workdir) - - self.do_test_arm_aspeed_sdk_start( - self.workdir + '/ast2500-default/image-bmc') - - self.wait_for_console_pattern('ast2500-default login:') - ASSET_SDK_V806_AST2600_A2 =3D Asset( 'https://github.com/AspeedTech-BMC/openbmc/releases/download/v08.0= 6/ast2600-a2-obmc.tar.gz', '9083506135f622d5e7351fcf7d4e1c7125cee5ba16141220c0ba88931f3681a4') diff --git a/tests/functional/test_arm_aspeed_ast2500.py b/tests/functional= /test_arm_aspeed_ast2500.py new file mode 100644 index 000000000000..79baf37537e5 --- /dev/null +++ b/tests/functional/test_arm_aspeed_ast2500.py @@ -0,0 +1,59 @@ +#!/usr/bin/env python3 +# +# Functional test that boots the ASPEED machines +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from aspeed import AspeedTest +from qemu_test import exec_command_and_wait_for_pattern +from qemu_test.utils import archive_extract + +class AST2500Machine(AspeedTest): + + ASSET_BR2_202311_AST2500_FLASH =3D Asset( + ('https://github.com/legoater/qemu-aspeed-boot/raw/master/' + 'images/ast2500-evb/buildroot-2023.11/flash.img'), + 'c23db6160cf77d0258397eb2051162c8473a56c441417c52a91ba217186e715f') + + def test_arm_ast2500_evb_buildroot(self): + self.set_machine('ast2500-evb') + + image_path =3D self.ASSET_BR2_202311_AST2500_FLASH.fetch() + + self.vm.add_args('-device', + 'tmp105,bus=3Daspeed.i2c.bus.3,address=3D0x4d,id= =3Dtmp-test'); + self.do_test_arm_aspeed_buildroot_start(image_path, '0x0', + 'ast2500-evb login:') + + exec_command_and_wait_for_pattern(self, + 'echo lm75 0x4d > /sys/class/i2c-dev/i2c-3/device/new_device', + 'i2c i2c-3: new_device: Instantiated device lm75 at 0x4d'); + exec_command_and_wait_for_pattern(self, + 'cat /sys/class/hwmon/hwmon1/temp1_input', '0= ') + self.vm.cmd('qom-set', path=3D'/machine/peripheral/tmp-test', + property=3D'temperature', value=3D18000); + exec_command_and_wait_for_pattern(self, + 'cat /sys/class/hwmon/hwmon1/temp1_input', '1= 8000') + + self.do_test_arm_aspeed_buildroot_poweroff() + + ASSET_SDK_V806_AST2500 =3D Asset( + 'https://github.com/AspeedTech-BMC/openbmc/releases/download/v08.0= 6/ast2500-default-obmc.tar.gz', + 'e1755f3cadff69190438c688d52dd0f0d399b70a1e14b1d3d5540fc4851d38ca') + + def test_arm_ast2500_evb_sdk(self): + self.set_machine('ast2500-evb') + + image_path =3D self.ASSET_SDK_V806_AST2500.fetch() + + archive_extract(image_path, self.workdir) + + self.do_test_arm_aspeed_sdk_start( + self.workdir + '/ast2500-default/image-bmc') + + self.wait_for_console_pattern('ast2500-default login:') + + +if __name__ =3D=3D '__main__': + AspeedTest.main() --=20 2.47.0 From nobody Wed May 7 20:06:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1733490804; cv=none; d=zohomail.com; s=zohoarc; b=VGjotbuUSqoS0Wg0wPCHxDfwaR/Vq5B5yl5psjToT4w2W40JGKYpHD4FeiTXnBrujydxV224MBz0PImOjAY2BUPgUY2S2JRhG1pHZ+YuZBE+4Rvi1T6u288EPMIjRzVmblxaDSPpiUih7FGd6H+wAxwHWttW7uWKNWWpy4Li0qM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733490804; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0cC2sGkAVWkI0+JZagpAquyy3a7MRA+KC7K1yHInldI=; b=DafyAtChZptF3tEYW+Z7cL4WcPfNKr4J/GKrOFOSZQ15hqdzje6Mg65nFnUmPTk7azipMU/mn1Fy0s5pBT387GjaXWMjJvfnbPEFuX6gGoeb4ABkwagC1cc2k6lZtragX8XB/OwHgY+PiSPb3SkehGVlgO9pSDHaSjl0YHb2u/E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from=<clg@redhat.com> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1733490804003944.681321681183; Fri, 6 Dec 2024 05:13:24 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tJY80-0004EU-I5; Fri, 06 Dec 2024 08:12:16 -0500 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 <clg@redhat.com>) id 1tJY7y-00047d-RT for qemu-devel@nongnu.org; Fri, 06 Dec 2024 08:12:14 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <clg@redhat.com>) id 1tJY7u-000751-Pa for qemu-devel@nongnu.org; Fri, 06 Dec 2024 08:12:14 -0500 Received: from mx-prod-mc-01.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-319-wvsgVi5BM5uhdqgkVjFSOQ-1; Fri, 06 Dec 2024 08:12:07 -0500 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E117A195609D; Fri, 6 Dec 2024 13:12:05 +0000 (UTC) Received: from corto.redhat.com (unknown [10.39.192.16]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E85C41955E9C; Fri, 6 Dec 2024 13:12:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733490729; 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=0cC2sGkAVWkI0+JZagpAquyy3a7MRA+KC7K1yHInldI=; b=YOueOFnJoAQciACwwDfCROv+U7KWvjL0FR7H5FHWb0HZzxxvVyaxfolgFOfqEQd8HOdxFC TU88WidunXuQWh7P6/poTH1c3KvtSvNN3CZMfRKtMk8GgYgkSa5Qsd4kL6TBVCHtYfr20z 21F04rclgKG2xYRjZzIs2ZPd8BGZemk= X-MC-Unique: wvsgVi5BM5uhdqgkVjFSOQ-1 X-Mimecast-MFC-AGG-ID: wvsgVi5BM5uhdqgkVjFSOQ From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@redhat.com> To: qemu-devel@nongnu.org, qemu-arm@nongnu.org Cc: Peter Maydell <peter.maydell@linaro.org>, Steven Lee <steven_lee@aspeedtech.com>, Troy Lee <leetroy@gmail.com>, Jamin Lin <jamin_lin@aspeedtech.com>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>, Thomas Huth <thuth@redhat.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@redhat.com> Subject: [PATCH 5/7] tests/functional: Introduce a specific test for ast2600 SoC Date: Fri, 6 Dec 2024 14:11:30 +0100 Message-ID: <20241206131132.520911-6-clg@redhat.com> In-Reply-To: <20241206131132.520911-1-clg@redhat.com> References: <20241206131132.520911-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.996, 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_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1733490805158116600 This moves the ast2600-evb tests to a new test file. No changes in the test. The routines used to run the buildroot and sdk tests are removed from the test_arm_aspeed.py file because now unused. Signed-off-by: C=C3=A9dric Le Goater <clg@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> --- tests/functional/meson.build | 2 + tests/functional/test_arm_aspeed.py | 155 -------------------- tests/functional/test_arm_aspeed_ast2600.py | 143 ++++++++++++++++++ 3 files changed, 145 insertions(+), 155 deletions(-) create mode 100644 tests/functional/test_arm_aspeed_ast2600.py diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 6a9c20b30156..68df574ee72e 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -22,6 +22,7 @@ test_timeouts =3D { 'arm_aspeed_palmetto' : 120, 'arm_aspeed_romulus' : 120, 'arm_aspeed_ast2500' : 480, + 'arm_aspeed_ast2600' : 720, 'arm_aspeed' : 600, 'arm_bpim2u' : 500, 'arm_collie' : 180, @@ -74,6 +75,7 @@ tests_arm_system_thorough =3D [ 'arm_aspeed_palmetto', 'arm_aspeed_romulus', 'arm_aspeed_ast2500', + 'arm_aspeed_ast2600', 'arm_bpim2u', 'arm_canona1100', 'arm_collie', diff --git a/tests/functional/test_arm_aspeed.py b/tests/functional/test_ar= m_aspeed.py index 48cf0bfb27ca..8cf86795af3c 100755 --- a/tests/functional/test_arm_aspeed.py +++ b/tests/functional/test_arm_aspeed.py @@ -19,161 +19,6 @@ from zipfile import ZipFile from unittest import skipUnless =20 -class AST2x00Machine(LinuxKernelTest): - - def do_test_arm_aspeed_buildroot_start(self, image, cpu_id, pattern=3D= 'Aspeed EVB'): - self.require_netdev('user') - self.vm.set_console() - self.vm.add_args('-drive', 'file=3D' + image + ',if=3Dmtd,format= =3Draw,read-only=3Dtrue', - '-net', 'nic', '-net', 'user') - self.vm.launch() - - self.wait_for_console_pattern('U-Boot 2019.04') - self.wait_for_console_pattern('## Loading kernel from FIT Image') - self.wait_for_console_pattern('Starting kernel ...') - self.wait_for_console_pattern('Booting Linux on physical CPU ' + c= pu_id) - self.wait_for_console_pattern('lease of 10.0.2.15') - # the line before login: - self.wait_for_console_pattern(pattern) - exec_command_and_wait_for_pattern(self, 'root', 'Password:') - exec_command_and_wait_for_pattern(self, 'passw0rd', '#') - - def do_test_arm_aspeed_buildroot_poweroff(self): - exec_command_and_wait_for_pattern(self, 'poweroff', - 'reboot: System halted'); - ASSET_BR2_202311_AST2600_FLASH =3D Asset( - ('https://github.com/legoater/qemu-aspeed-boot/raw/master/' - 'images/ast2600-evb/buildroot-2023.11/flash.img'), - 'b62808daef48b438d0728ee07662290490ecfa65987bb91294cafb1bb7ad1a68') - - def test_arm_ast2600_evb_buildroot(self): - self.set_machine('ast2600-evb') - - image_path =3D self.ASSET_BR2_202311_AST2600_FLASH.fetch() - - self.vm.add_args('-device', - 'tmp105,bus=3Daspeed.i2c.bus.3,address=3D0x4d,id= =3Dtmp-test'); - self.vm.add_args('-device', - 'ds1338,bus=3Daspeed.i2c.bus.3,address=3D0x32'); - self.vm.add_args('-device', - 'i2c-echo,bus=3Daspeed.i2c.bus.3,address=3D0x42'); - self.do_test_arm_aspeed_buildroot_start(image_path, '0xf00', - 'ast2600-evb login:') - - exec_command_and_wait_for_pattern(self, - 'echo lm75 0x4d > /sys/class/i2c-dev/i2c-3/device/new_device', - 'i2c i2c-3: new_device: Instantiated device lm75 at 0x4d'); - exec_command_and_wait_for_pattern(self, - 'cat /sys/class/hwmon/hwmon1/temp1_input', '0= ') - self.vm.cmd('qom-set', path=3D'/machine/peripheral/tmp-test', - property=3D'temperature', value=3D18000); - exec_command_and_wait_for_pattern(self, - 'cat /sys/class/hwmon/hwmon1/temp1_input', '1= 8000') - - exec_command_and_wait_for_pattern(self, - 'echo ds1307 0x32 > /sys/class/i2c-dev/i2c-3/device/new_devic= e', - 'i2c i2c-3: new_device: Instantiated device ds1307 at 0x32'); - year =3D time.strftime("%Y") - exec_command_and_wait_for_pattern(self, 'hwclock -f /dev/rtc1', ye= ar); - - exec_command_and_wait_for_pattern(self, - 'echo slave-24c02 0x1064 > /sys/bus/i2c/devices/i2c-3/new_dev= ice', - 'i2c i2c-3: new_device: Instantiated device slave-24c02 at 0x= 64'); - exec_command_and_wait_for_pattern(self, - 'i2cset -y 3 0x42 0x64 0x00 0xaa i', '#'); - exec_command_and_wait_for_pattern(self, - 'hexdump /sys/bus/i2c/devices/3-1064/slave-eeprom', - '0000000 ffaa ffff ffff ffff ffff ffff ffff ffff'); - self.do_test_arm_aspeed_buildroot_poweroff() - - ASSET_BR2_202302_AST2600_TPM_FLASH =3D Asset( - ('https://github.com/legoater/qemu-aspeed-boot/raw/master/' - 'images/ast2600-evb/buildroot-2023.02-tpm/flash.img'), - 'a46009ae8a5403a0826d607215e731a8c68d27c14c41e55331706b8f9c7bd997') - - @skipUnless(*has_cmd('swtpm')) - def test_arm_ast2600_evb_buildroot_tpm(self): - self.set_machine('ast2600-evb') - - image_path =3D self.ASSET_BR2_202302_AST2600_TPM_FLASH.fetch() - - tpmstate_dir =3D tempfile.TemporaryDirectory(prefix=3D"qemu_") - socket =3D os.path.join(tpmstate_dir.name, 'swtpm-socket') - - # We must put the TPM state dir in /tmp/, not the build dir, - # because some distros use AppArmor to lock down swtpm and - # restrict the set of locations it can access files in. - subprocess.run(['swtpm', 'socket', '-d', '--tpm2', - '--tpmstate', f'dir=3D{tpmstate_dir.name}', - '--ctrl', f'type=3Dunixio,path=3D{socket}']) - - self.vm.add_args('-chardev', f'socket,id=3Dchrtpm,path=3D{socket}') - self.vm.add_args('-tpmdev', 'emulator,id=3Dtpm0,chardev=3Dchrtpm') - self.vm.add_args('-device', - 'tpm-tis-i2c,tpmdev=3Dtpm0,bus=3Daspeed.i2c.bus.1= 2,address=3D0x2e') - self.do_test_arm_aspeed_buildroot_start(image_path, '0xf00', 'Aspe= ed AST2600 EVB') - - exec_command_and_wait_for_pattern(self, - 'echo tpm_tis_i2c 0x2e > /sys/bus/i2c/devices/i2c-12/new_devic= e', - 'tpm_tis_i2c 12-002e: 2.0 TPM (device-id 0x1, rev-id 1)'); - exec_command_and_wait_for_pattern(self, - 'cat /sys/class/tpm/tpm0/pcr-sha256/0', - 'B804724EA13F52A9072BA87FE8FDCC497DFC9DF9AA15B9088694639C43168= 8E0'); - - self.do_test_arm_aspeed_buildroot_poweroff() - - def do_test_arm_aspeed_sdk_start(self, image): - self.require_netdev('user') - self.vm.set_console() - self.vm.add_args('-drive', 'file=3D' + image + ',if=3Dmtd,format= =3Draw', - '-net', 'nic', '-net', 'user', '-snapshot') - self.vm.launch() - - self.wait_for_console_pattern('U-Boot 2019.04') - self.wait_for_console_pattern('## Loading kernel from FIT Image') - self.wait_for_console_pattern('Starting kernel ...') - - ASSET_SDK_V806_AST2600_A2 =3D Asset( - 'https://github.com/AspeedTech-BMC/openbmc/releases/download/v08.0= 6/ast2600-a2-obmc.tar.gz', - '9083506135f622d5e7351fcf7d4e1c7125cee5ba16141220c0ba88931f3681a4') - - def test_arm_ast2600_evb_sdk(self): - self.set_machine('ast2600-evb') - - image_path =3D self.ASSET_SDK_V806_AST2600_A2.fetch() - - archive_extract(image_path, self.workdir) - - self.vm.add_args('-device', - 'tmp105,bus=3Daspeed.i2c.bus.5,address=3D0x4d,id=3Dtmp-test'); - self.vm.add_args('-device', - 'ds1338,bus=3Daspeed.i2c.bus.5,address=3D0x32'); - self.do_test_arm_aspeed_sdk_start( - self.workdir + '/ast2600-a2/image-bmc') - - self.wait_for_console_pattern('ast2600-a2 login:') - - exec_command_and_wait_for_pattern(self, 'root', 'Password:') - exec_command_and_wait_for_pattern(self, '0penBmc', 'root@ast2600-a= 2:~#') - - exec_command_and_wait_for_pattern(self, - 'echo lm75 0x4d > /sys/class/i2c-dev/i2c-5/device/new_device', - 'i2c i2c-5: new_device: Instantiated device lm75 at 0x4d'); - exec_command_and_wait_for_pattern(self, - 'cat /sys/class/hwmon/hwmon19/temp1_input', '0') - self.vm.cmd('qom-set', path=3D'/machine/peripheral/tmp-test', - property=3D'temperature', value=3D18000); - exec_command_and_wait_for_pattern(self, - 'cat /sys/class/hwmon/hwmon19/temp1_input', '18000') - - exec_command_and_wait_for_pattern(self, - 'echo ds1307 0x32 > /sys/class/i2c-dev/i2c-5/device/new_devic= e', - 'i2c i2c-5: new_device: Instantiated device ds1307 at 0x32'); - year =3D time.strftime("%Y") - exec_command_and_wait_for_pattern(self, - '/sbin/hwclock -f /dev/rtc1', year); - - class AST2x00MachineMMC(LinuxKernelTest): =20 ASSET_RAINIER_EMMC =3D Asset( diff --git a/tests/functional/test_arm_aspeed_ast2600.py b/tests/functional= /test_arm_aspeed_ast2600.py new file mode 100644 index 000000000000..74d025e0fc76 --- /dev/null +++ b/tests/functional/test_arm_aspeed_ast2600.py @@ -0,0 +1,143 @@ +#!/usr/bin/env python3 +# +# Functional test that boots the ASPEED machines +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os +import time +import tempfile +import subprocess + +from qemu_test import Asset +from aspeed import AspeedTest +from qemu_test import exec_command_and_wait_for_pattern +from qemu_test import has_cmd +from qemu_test.utils import archive_extract +from unittest import skipUnless + +class AST2600Machine(AspeedTest): + + ASSET_BR2_202311_AST2600_FLASH =3D Asset( + ('https://github.com/legoater/qemu-aspeed-boot/raw/master/' + 'images/ast2600-evb/buildroot-2023.11/flash.img'), + 'b62808daef48b438d0728ee07662290490ecfa65987bb91294cafb1bb7ad1a68') + + def test_arm_ast2600_evb_buildroot(self): + self.set_machine('ast2600-evb') + + image_path =3D self.ASSET_BR2_202311_AST2600_FLASH.fetch() + + self.vm.add_args('-device', + 'tmp105,bus=3Daspeed.i2c.bus.3,address=3D0x4d,id= =3Dtmp-test'); + self.vm.add_args('-device', + 'ds1338,bus=3Daspeed.i2c.bus.3,address=3D0x32'); + self.vm.add_args('-device', + 'i2c-echo,bus=3Daspeed.i2c.bus.3,address=3D0x42'); + self.do_test_arm_aspeed_buildroot_start(image_path, '0xf00', + 'ast2600-evb login:') + + exec_command_and_wait_for_pattern(self, + 'echo lm75 0x4d > /sys/class/i2c-dev/i2c-3/device/new_device', + 'i2c i2c-3: new_device: Instantiated device lm75 at 0x4d'); + exec_command_and_wait_for_pattern(self, + 'cat /sys/class/hwmon/hwmon1/temp1_input', '0= ') + self.vm.cmd('qom-set', path=3D'/machine/peripheral/tmp-test', + property=3D'temperature', value=3D18000); + exec_command_and_wait_for_pattern(self, + 'cat /sys/class/hwmon/hwmon1/temp1_input', '1= 8000') + + exec_command_and_wait_for_pattern(self, + 'echo ds1307 0x32 > /sys/class/i2c-dev/i2c-3/device/new_devic= e', + 'i2c i2c-3: new_device: Instantiated device ds1307 at 0x32'); + year =3D time.strftime("%Y") + exec_command_and_wait_for_pattern(self, 'hwclock -f /dev/rtc1', ye= ar); + + exec_command_and_wait_for_pattern(self, + 'echo slave-24c02 0x1064 > /sys/bus/i2c/devices/i2c-3/new_dev= ice', + 'i2c i2c-3: new_device: Instantiated device slave-24c02 at 0x= 64'); + exec_command_and_wait_for_pattern(self, + 'i2cset -y 3 0x42 0x64 0x00 0xaa i', '#'); + exec_command_and_wait_for_pattern(self, + 'hexdump /sys/bus/i2c/devices/3-1064/slave-eeprom', + '0000000 ffaa ffff ffff ffff ffff ffff ffff ffff'); + self.do_test_arm_aspeed_buildroot_poweroff() + + ASSET_BR2_202302_AST2600_TPM_FLASH =3D Asset( + ('https://github.com/legoater/qemu-aspeed-boot/raw/master/' + 'images/ast2600-evb/buildroot-2023.02-tpm/flash.img'), + 'a46009ae8a5403a0826d607215e731a8c68d27c14c41e55331706b8f9c7bd997') + + @skipUnless(*has_cmd('swtpm')) + def test_arm_ast2600_evb_buildroot_tpm(self): + self.set_machine('ast2600-evb') + + image_path =3D self.ASSET_BR2_202302_AST2600_TPM_FLASH.fetch() + + tpmstate_dir =3D tempfile.TemporaryDirectory(prefix=3D"qemu_") + socket =3D os.path.join(tpmstate_dir.name, 'swtpm-socket') + + # We must put the TPM state dir in /tmp/, not the build dir, + # because some distros use AppArmor to lock down swtpm and + # restrict the set of locations it can access files in. + subprocess.run(['swtpm', 'socket', '-d', '--tpm2', + '--tpmstate', f'dir=3D{tpmstate_dir.name}', + '--ctrl', f'type=3Dunixio,path=3D{socket}']) + + self.vm.add_args('-chardev', f'socket,id=3Dchrtpm,path=3D{socket}') + self.vm.add_args('-tpmdev', 'emulator,id=3Dtpm0,chardev=3Dchrtpm') + self.vm.add_args('-device', + 'tpm-tis-i2c,tpmdev=3Dtpm0,bus=3Daspeed.i2c.bus.1= 2,address=3D0x2e') + self.do_test_arm_aspeed_buildroot_start(image_path, '0xf00', 'Aspe= ed AST2600 EVB') + + exec_command_and_wait_for_pattern(self, + 'echo tpm_tis_i2c 0x2e > /sys/bus/i2c/devices/i2c-12/new_devic= e', + 'tpm_tis_i2c 12-002e: 2.0 TPM (device-id 0x1, rev-id 1)'); + exec_command_and_wait_for_pattern(self, + 'cat /sys/class/tpm/tpm0/pcr-sha256/0', + 'B804724EA13F52A9072BA87FE8FDCC497DFC9DF9AA15B9088694639C43168= 8E0'); + + self.do_test_arm_aspeed_buildroot_poweroff() + + ASSET_SDK_V806_AST2600_A2 =3D Asset( + 'https://github.com/AspeedTech-BMC/openbmc/releases/download/v08.0= 6/ast2600-a2-obmc.tar.gz', + '9083506135f622d5e7351fcf7d4e1c7125cee5ba16141220c0ba88931f3681a4') + + def test_arm_ast2600_evb_sdk(self): + self.set_machine('ast2600-evb') + + image_path =3D self.ASSET_SDK_V806_AST2600_A2.fetch() + + archive_extract(image_path, self.workdir) + + self.vm.add_args('-device', + 'tmp105,bus=3Daspeed.i2c.bus.5,address=3D0x4d,id=3Dtmp-test'); + self.vm.add_args('-device', + 'ds1338,bus=3Daspeed.i2c.bus.5,address=3D0x32'); + self.do_test_arm_aspeed_sdk_start( + self.workdir + '/ast2600-a2/image-bmc') + + self.wait_for_console_pattern('ast2600-a2 login:') + + exec_command_and_wait_for_pattern(self, 'root', 'Password:') + exec_command_and_wait_for_pattern(self, '0penBmc', 'root@ast2600-a= 2:~#') + + exec_command_and_wait_for_pattern(self, + 'echo lm75 0x4d > /sys/class/i2c-dev/i2c-5/device/new_device', + 'i2c i2c-5: new_device: Instantiated device lm75 at 0x4d'); + exec_command_and_wait_for_pattern(self, + 'cat /sys/class/hwmon/hwmon19/temp1_input', '0') + self.vm.cmd('qom-set', path=3D'/machine/peripheral/tmp-test', + property=3D'temperature', value=3D18000); + exec_command_and_wait_for_pattern(self, + 'cat /sys/class/hwmon/hwmon19/temp1_input', '18000') + + exec_command_and_wait_for_pattern(self, + 'echo ds1307 0x32 > /sys/class/i2c-dev/i2c-5/device/new_devic= e', + 'i2c i2c-5: new_device: Instantiated device ds1307 at 0x32'); + year =3D time.strftime("%Y") + exec_command_and_wait_for_pattern(self, + '/sbin/hwclock -f /dev/rtc1', year); + +if __name__ =3D=3D '__main__': + AspeedTest.main() --=20 2.47.0 From nobody Wed May 7 20:06:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1733490767; cv=none; d=zohomail.com; s=zohoarc; b=cRZWBovptf5JYW/4+MP9YXER6o2VTEYLsxcE9Ae/xtC7vbCnYrK/g6GrIB67pDgc29/5eSi04JMQYc2iaDC+iCO7YT8INf/3ckMVxJ8YBfwXmG8GDYewpyFN/69K8ADfVGvP5PlYZHJRB3TpHPlM0lNkrlI6m188JwSoDLP83IY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733490767; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2PE8RAmfsI7GWlpX+l6Rj1u6F66RjHjJ1xlVri1okhg=; b=fhCGf7uOoOFnGjT6c0lGObAuq3ULAifh0+1FOG+gw56LMKCW+08HzB5/pareqe1/bqjEGr2z4ZZpbAFrFCiTMSdw+SYpCjCB76J12x/x8ZzcQkGitFEMUokclp45qefVTxuznvbm2PTJwpd/znCToD5upxLOdD8HffGnsVR4ZeE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from=<clg@redhat.com> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1733490767643312.35448012148424; Fri, 6 Dec 2024 05:12:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tJY85-0004Uo-F0; Fri, 06 Dec 2024 08:12:21 -0500 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 <clg@redhat.com>) id 1tJY81-0004IH-KB for qemu-devel@nongnu.org; Fri, 06 Dec 2024 08:12:17 -0500 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 <clg@redhat.com>) id 1tJY7z-00076X-T6 for qemu-devel@nongnu.org; Fri, 06 Dec 2024 08:12:17 -0500 Received: from mx-prod-mc-04.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-484-L5obIJpJPH6RZleQJOX41w-1; Fri, 06 Dec 2024 08:12:11 -0500 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0427A19560B3; Fri, 6 Dec 2024 13:12:10 +0000 (UTC) Received: from corto.redhat.com (unknown [10.39.192.16]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 54B1B1955F3F; Fri, 6 Dec 2024 13:12:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733490735; 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=2PE8RAmfsI7GWlpX+l6Rj1u6F66RjHjJ1xlVri1okhg=; b=I7fnVNmVe+Jo7Dte7FuGXrdqzJQKONfShb7DUg9e1bTrf4yk1UAnBHPT2q7rtAFoKB4h9D HPvObr8LYDlD8MNySTrC6NGSvXaN/foMROuy+l4IJDXs6XGxGO4E7nXk/g1YoLQHVPGECP 0lFhnL+u4XuOYXD4YqaiRVrABfL7RnQ= X-MC-Unique: L5obIJpJPH6RZleQJOX41w-1 X-Mimecast-MFC-AGG-ID: L5obIJpJPH6RZleQJOX41w From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@redhat.com> To: qemu-devel@nongnu.org, qemu-arm@nongnu.org Cc: Peter Maydell <peter.maydell@linaro.org>, Steven Lee <steven_lee@aspeedtech.com>, Troy Lee <leetroy@gmail.com>, Jamin Lin <jamin_lin@aspeedtech.com>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>, Thomas Huth <thuth@redhat.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@redhat.com> Subject: [PATCH 6/7] tests/functional: Introduce a specific test for rainier-bmc machine Date: Fri, 6 Dec 2024 14:11:31 +0100 Message-ID: <20241206131132.520911-7-clg@redhat.com> In-Reply-To: <20241206131132.520911-1-clg@redhat.com> References: <20241206131132.520911-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.996, 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_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1733490768832116600 This simply moves the rainier-bmc test to a new test file. No changes in the test. The test_arm_aspeed.py is deleted. Signed-off-by: C=C3=A9dric Le Goater <clg@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> --- tests/functional/meson.build | 4 ++-- ...m_aspeed.py =3D> test_arm_aspeed_rainier.py} | 22 +++++-------------- 2 files changed, 7 insertions(+), 19 deletions(-) rename tests/functional/{test_arm_aspeed.py =3D> test_arm_aspeed_rainier.p= y} (71%) mode change 100755 =3D> 100644 diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 68df574ee72e..b3775af70be6 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -23,7 +23,7 @@ test_timeouts =3D { 'arm_aspeed_romulus' : 120, 'arm_aspeed_ast2500' : 480, 'arm_aspeed_ast2600' : 720, - 'arm_aspeed' : 600, + 'arm_aspeed_rainier' : 240, 'arm_bpim2u' : 500, 'arm_collie' : 180, 'arm_orangepi' : 540, @@ -70,12 +70,12 @@ tests_alpha_system_thorough =3D [ ] =20 tests_arm_system_thorough =3D [ - 'arm_aspeed', 'arm_aspeed_ast1030', 'arm_aspeed_palmetto', 'arm_aspeed_romulus', 'arm_aspeed_ast2500', 'arm_aspeed_ast2600', + 'arm_aspeed_rainier', 'arm_bpim2u', 'arm_canona1100', 'arm_collie', diff --git a/tests/functional/test_arm_aspeed.py b/tests/functional/test_ar= m_aspeed_rainier.py old mode 100755 new mode 100644 similarity index 71% rename from tests/functional/test_arm_aspeed.py rename to tests/functional/test_arm_aspeed_rainier.py index 8cf86795af3c..a60274926d6f --- a/tests/functional/test_arm_aspeed.py +++ b/tests/functional/test_arm_aspeed_rainier.py @@ -1,25 +1,13 @@ #!/usr/bin/env python3 # -# Functional test that boots the ASPEED SoCs with firmware -# -# Copyright (C) 2022 ASPEED Technology Inc +# Functional test that boots the ASPEED machines # # SPDX-License-Identifier: GPL-2.0-or-later =20 -import os -import time -import subprocess -import tempfile - -from qemu_test import LinuxKernelTest, Asset -from qemu_test import exec_command_and_wait_for_pattern -from qemu_test import interrupt_interactive_console_until_pattern -from qemu_test import has_cmd -from qemu_test.utils import archive_extract -from zipfile import ZipFile -from unittest import skipUnless +from qemu_test import Asset +from aspeed import AspeedTest =20 -class AST2x00MachineMMC(LinuxKernelTest): +class RainierMachine(AspeedTest): =20 ASSET_RAINIER_EMMC =3D Asset( ('https://fileserver.linaro.org/s/B6pJTwWEkzSDi36/download/' @@ -49,4 +37,4 @@ def test_arm_aspeed_emmc_boot(self): self.wait_for_console_pattern('IBM eBMC (OpenBMC for IBM Enterpris= e') =20 if __name__ =3D=3D '__main__': - LinuxKernelTest.main() + AspeedTest.main() --=20 2.47.0 From nobody Wed May 7 20:06:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1733490815; cv=none; d=zohomail.com; s=zohoarc; b=ZsYN6uPmQIbBlVcjoBD5r9N8nxmioyUdYnrbJSs6vTuTItAIn/1WoGsfSJ711nbN3D8tIB8kn3hqvIr6R6HhXq92TrmqhQFP9vC8oGI9LqCaVkwisVTzdp10mU9Xd++94b50BzuUMAlLIeIUM1GvIQMnd7xTcN3+JaAq8EQqS7k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733490815; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8ZrjqSEqsqiCmDFS4Jy0NVtxIhdOdq1hlkgv8ya55oc=; b=AQGgD3ctiQQQvtSvCqARMzYF49A7KsI7jMs4X4NvFpM0hb+UI++hJgqs7UYWW8FnH54kECgoYgwU3SSay/KstEnpP5v3Y/jIzVBcGNzBo1xnPPbTmaRizSjyH7KodUf+oAdjING0CV5OPnuB9i4cryTf3n/raDgbn+P64e0tO1I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from=<clg@redhat.com> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1733490815000234.7629108410049; Fri, 6 Dec 2024 05:13:35 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tJY86-0004Ze-Oj; Fri, 06 Dec 2024 08:12:22 -0500 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 <clg@redhat.com>) id 1tJY85-0004Uf-8i for qemu-devel@nongnu.org; Fri, 06 Dec 2024 08:12:21 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <clg@redhat.com>) id 1tJY83-000770-FY for qemu-devel@nongnu.org; Fri, 06 Dec 2024 08:12:20 -0500 Received: from mx-prod-mc-01.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-589-ga61lMDnPeaVzMiRvn7Jig-1; Fri, 06 Dec 2024 08:12:14 -0500 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 66F731955F3E; Fri, 6 Dec 2024 13:12:13 +0000 (UTC) Received: from corto.redhat.com (unknown [10.39.192.16]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6E02B1955E9C; Fri, 6 Dec 2024 13:12:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733490738; 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=8ZrjqSEqsqiCmDFS4Jy0NVtxIhdOdq1hlkgv8ya55oc=; b=GUBD69efKCCOXsNa4xXIRaM9U59fRi9KJdIHfTB0VQOMgFSBeFdT77Z5TMt8N7+m5r4W/b jbaUvVPFKv8K6FaKihs0nE4BOltPp2BQ/RgyeOGQ1qfH2yjYLzrCpFEeC4UubANvPCTYGS qq6DvbMCw0M/apK7s+jcFMlSVZi3KxQ= X-MC-Unique: ga61lMDnPeaVzMiRvn7Jig-1 X-Mimecast-MFC-AGG-ID: ga61lMDnPeaVzMiRvn7Jig From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@redhat.com> To: qemu-devel@nongnu.org, qemu-arm@nongnu.org Cc: Peter Maydell <peter.maydell@linaro.org>, Steven Lee <steven_lee@aspeedtech.com>, Troy Lee <leetroy@gmail.com>, Jamin Lin <jamin_lin@aspeedtech.com>, Andrew Jeffery <andrew@codeconstruct.com.au>, Joel Stanley <joel@jms.id.au>, Thomas Huth <thuth@redhat.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@redhat.com> Subject: [PATCH 7/7] tests/functional: Move debian boot test from avocado Date: Fri, 6 Dec 2024 14:11:32 +0100 Message-ID: <20241206131132.520911-8-clg@redhat.com> In-Reply-To: <20241206131132.520911-1-clg@redhat.com> References: <20241206131132.520911-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -50 X-Spam_score: -5.1 X-Spam_bar: ----- X-Spam_report: (-5.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.996, 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_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1733490816853116600 This simply moves the debian boot test from the avocado testsuite to the new functional testsuite. No changes in the test. Signed-off-by: C=C3=A9dric Le Goater <clg@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> --- tests/avocado/boot_linux_console.py | 26 --------------------- tests/functional/test_arm_aspeed_rainier.py | 24 +++++++++++++++++++ 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux= _console.py index 12e24bb05a75..738dd5a8c4bf 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -470,29 +470,3 @@ def test_arm_quanta_gsj_initrd(self): self.wait_for_console_pattern('CPU1: thread -1, cpu 1, socket 0') self.wait_for_console_pattern( 'Give root password for system maintenance') - - def test_arm_ast2600_debian(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Dmachine:rainier-bmc - """ - deb_url =3D ('http://snapshot.debian.org/archive/debian/' - '20220606T211338Z/' - 'pool/main/l/linux/' - 'linux-image-5.17.0-2-armmp_5.17.6-1%2Bb1_armhf.deb') - deb_hash =3D '8acb2b4439faedc2f3ed4bdb2847ad4f6e0491f73debaeb7f660= c8abe4dcdc0e' - deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash, - algorithm=3D'sha256') - kernel_path =3D self.extract_from_deb(deb_path, '/boot/vmlinuz-5.1= 7.0-2-armmp') - dtb_path =3D self.extract_from_deb(deb_path, - '/usr/lib/linux-image-5.17.0-2-armmp/aspeed-bmc-ibm-rainie= r.dtb') - - self.vm.set_console() - self.vm.add_args('-kernel', kernel_path, - '-dtb', dtb_path, - '-net', 'nic') - self.vm.launch() - self.wait_for_console_pattern("Booting Linux on physical CPU 0xf00= ") - self.wait_for_console_pattern("SMP: Total of 2 processors activate= d") - self.wait_for_console_pattern("No filesystem could mount root") - diff --git a/tests/functional/test_arm_aspeed_rainier.py b/tests/functional= /test_arm_aspeed_rainier.py index a60274926d6f..b856aea6dbd7 100644 --- a/tests/functional/test_arm_aspeed_rainier.py +++ b/tests/functional/test_arm_aspeed_rainier.py @@ -36,5 +36,29 @@ def test_arm_aspeed_emmc_boot(self): self.wait_for_console_pattern('mmcblk0: p1 p2 p3 p4 p5 p6 p7') self.wait_for_console_pattern('IBM eBMC (OpenBMC for IBM Enterpris= e') =20 + ASSET_DEBIAN_LINUX_ARMHF_DEB =3D Asset( + ('http://snapshot.debian.org/archive/debian/20220606T211338Z/p= ool/main/l/linux/linux-image-5.17.0-2-armmp_5.17.6-1%2Bb1_armhf.deb'), + '8acb2b4439faedc2f3ed4bdb2847ad4f6e0491f73debaeb7f660c8abe4dcdc0e') + + def test_arm_debian_kernel_boot(self): + self.set_machine('rainier-bmc') + + deb_path =3D self.ASSET_DEBIAN_LINUX_ARMHF_DEB.fetch() + + kernel_path =3D self.extract_from_deb(deb_path, '/boot/vmlinuz-5.1= 7.0-2-armmp') + dtb_path =3D self.extract_from_deb(deb_path, + '/usr/lib/linux-image-5.17.0-2-armmp/aspeed-bmc-ibm-rainie= r.dtb') + + self.vm.set_console() + self.vm.add_args('-kernel', kernel_path, + '-dtb', dtb_path, + '-net', 'nic') + self.vm.launch() + + self.wait_for_console_pattern("Booting Linux on physical CPU 0xf00= ") + self.wait_for_console_pattern("SMP: Total of 2 processors activate= d") + self.wait_for_console_pattern("No filesystem could mount root") + + if __name__ =3D=3D '__main__': AspeedTest.main() --=20 2.47.0