From patchwork Thu Sep 19 18:57:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 13807947 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 23E21CF3962 for ; Thu, 19 Sep 2024 18:58:55 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srMLz-0006vI-AE; Thu, 19 Sep 2024 14:58:11 -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 1srMLx-0006uQ-FD for qemu-devel@nongnu.org; Thu, 19 Sep 2024 14:58:09 -0400 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 ) id 1srMLv-0001Mj-Fu for qemu-devel@nongnu.org; Thu, 19 Sep 2024 14:58:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1726772285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s/jVT1toi5ItR/N3+efyb7G4g+J8iS9fe3pgU++6rRs=; b=Le+8Q1Y5Mqw2mBPRycbdWwDQ4XMl0LAJruCT4j0hUsDx7EJA5bUdiD2BoMyRSaaXdzGYyb nQRJYp8BqamGHrkDXfOQawo9CV8sLZLhGJxjHJAw724pJCM+D+uDsz8s5Hm1MgnjCIp/aZ myUqukWiDeDetzr+7gmZnWuSH8os5yQ= 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-455-I2z6dIvMMKKKifgbsAvkTg-1; Thu, 19 Sep 2024 14:58:02 -0400 X-MC-Unique: I2z6dIvMMKKKifgbsAvkTg-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (unknown [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 AEDFD1958B3A; Thu, 19 Sep 2024 18:58:00 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.46]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9071A19560AA; Thu, 19 Sep 2024 18:57:55 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Mark Cave-Ayland , Yoshinori Sato , Magnus Damm , Max Filippov Subject: [PATCH 1/7] tests/functional/qemu_test: Add a function for launching kernels more easily Date: Thu, 19 Sep 2024 20:57:41 +0200 Message-ID: <20240919185749.71222-2-thuth@redhat.com> In-Reply-To: <20240919185749.71222-1-thuth@redhat.com> References: <20240919185749.71222-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The task for launching a kernel is quite repetitive: Set the serial console, set the -kernel and maybe -initrd and -dtb parameters, launch the VM and then wait for the expected console output. So it's easier in some tests to provide these steps via a separate function. Signed-off-by: Thomas Huth --- tests/functional/qemu_test/linuxkernel.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/functional/qemu_test/linuxkernel.py b/tests/functional/qemu_test/linuxkernel.py index fdd5307629..2b5b9a5fda 100644 --- a/tests/functional/qemu_test/linuxkernel.py +++ b/tests/functional/qemu_test/linuxkernel.py @@ -17,6 +17,18 @@ def wait_for_console_pattern(self, success_message, vm=None): failure_message='Kernel panic - not syncing', vm=vm) + def launch_kernel(self, kernel, initrd=None, dtb=None, console_index=0, + wait_for=None): + self.vm.set_console(console_index=console_index) + self.vm.add_args('-kernel', kernel) + if initrd: + self.vm.add_args('-initrd', initrd) + if dtb: + self.vm.add_args('-dtb', dtb) + self.vm.launch() + if wait_for: + self.wait_for_console_pattern(wait_for) + def extract_from_deb(self, deb_path, path): """ Extracts a file from a deb package into the test workdir From patchwork Thu Sep 19 18:57:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 13807951 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C83BBCF3962 for ; Thu, 19 Sep 2024 18:59:34 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srMM1-00076R-UH; Thu, 19 Sep 2024 14:58:13 -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 1srMM0-0006yh-2M for qemu-devel@nongnu.org; Thu, 19 Sep 2024 14:58:12 -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 1srMLy-0001NJ-HM for qemu-devel@nongnu.org; Thu, 19 Sep 2024 14:58:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1726772289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UwlFYwPN+QHlMLSj5ERxLP4JF1V2FyHI7rXBw43Qfsw=; b=ApV4d/vlwcTftegBfz6rF1ujKYwgiad8C80OtEaGYmhpAwpap0QaFkSq7dLQEgqxY8Aozk 2CZVuDc2NjqoGX+lpI6Akvk/W44QH9ZZCCEQPPy6C56ivndzzOXJN26RXcA3CEBtEtgXJg 3cgLdKArei2Txg2mnQRRDPDmOdaO8qE= 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-470-NACYhpGvOAq5qkHqBQGWTQ-1; Thu, 19 Sep 2024 14:58:06 -0400 X-MC-Unique: NACYhpGvOAq5qkHqBQGWTQ-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (unknown [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 8A8F0193584E; Thu, 19 Sep 2024 18:58:05 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.46]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AE2A019560AA; Thu, 19 Sep 2024 18:58:01 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Mark Cave-Ayland , Yoshinori Sato , Magnus Damm , Max Filippov Subject: [PATCH 2/7] tests/functional: Convert the vexpressa9 Avocado test Date: Thu, 19 Sep 2024 20:57:42 +0200 Message-ID: <20240919185749.71222-3-thuth@redhat.com> In-Reply-To: <20240919185749.71222-1-thuth@redhat.com> References: <20240919185749.71222-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Use the new launch_kernel function to convert this test in a simple way. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 9 --------- tests/functional/meson.build | 1 + tests/functional/test_arm_vexpress.py | 26 ++++++++++++++++++++++++++ 4 files changed, 28 insertions(+), 9 deletions(-) create mode 100755 tests/functional/test_arm_vexpress.py diff --git a/MAINTAINERS b/MAINTAINERS index ffacd60f40..7f7f4c2be6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1005,6 +1005,7 @@ S: Maintained F: hw/arm/vexpress.c F: hw/display/sii9022.c F: docs/system/arm/vexpress.rst +F: tests/functional/test_arm_vexpress.py Versatile PB M: Peter Maydell diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py index 6c50284986..7a776c2818 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -893,15 +893,6 @@ def do_test_advcal_2018(self, day, tar_hash, kernel_name, console=0): self.vm.launch() self.wait_for_console_pattern('QEMU advent calendar') - def test_arm_vexpressa9(self): - """ - :avocado: tags=arch:arm - :avocado: tags=machine:vexpress-a9 - """ - tar_hash = '32b7677ce8b6f1471fb0059865f451169934245b' - self.vm.add_args('-dtb', self.workdir + '/day16/vexpress-v2p-ca9.dtb') - self.do_test_advcal_2018('16', tar_hash, 'winter.zImage') - def test_arm_ast2600_debian(self): """ :avocado: tags=arch:arm diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 8d5520349d..3fc1bb192d 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -50,6 +50,7 @@ tests_arm_system_thorough = [ 'arm_canona1100', 'arm_integratorcp', 'arm_raspi2', + 'arm_vexpress', ] tests_arm_linuxuser_thorough = [ diff --git a/tests/functional/test_arm_vexpress.py b/tests/functional/test_arm_vexpress.py new file mode 100755 index 0000000000..cc6015112b --- /dev/null +++ b/tests/functional/test_arm_vexpress.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +# +# Functional test that boots a Linux kernel on an versatile express machine +# and checks the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import LinuxKernelTest, Asset +from qemu_test.utils import archive_extract + +class VExpressTest(LinuxKernelTest): + + ASSET_DAY16 = Asset( + 'https://www.qemu-advent-calendar.org/2018/download/day16.tar.xz', + '63311adb2d4c4e7a73214a86d29988add87266a909719c56acfadd026b4110a7') + + def test_arm_vexpressa9(self): + self.set_machine('vexpress-a9') + file_path = self.ASSET_DAY16.fetch() + archive_extract(file_path, self.workdir) + self.launch_kernel(self.workdir + '/day16/winter.zImage', + dtb=self.workdir + '/day16/vexpress-v2p-ca9.dtb', + wait_for='QEMU advent calendar') + +if __name__ == '__main__': + LinuxKernelTest.main() From patchwork Thu Sep 19 18:57:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 13807946 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 08149CF3962 for ; Thu, 19 Sep 2024 18:58:48 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srMM9-0007J7-Lq; Thu, 19 Sep 2024 14:58:21 -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 1srMM7-0007IW-7j for qemu-devel@nongnu.org; Thu, 19 Sep 2024 14:58:19 -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 1srMM5-0001Nc-MB for qemu-devel@nongnu.org; Thu, 19 Sep 2024 14:58:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1726772296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cXKmNyfO/xawcB6OvqDOE+mIxb46hce82XDAqY/bvD8=; b=hccCg76m+R60h+M31JSPzsANPjFjwFRDNvTf017fUebLEN+WcimI2l7mlHV1oLLBmC3VjU UYAEEDGcHYELKw/yEL730MGUthW9TiFJSQBVtYbxJIpjoaTSNuR0k12nWKOxMKpOsGE0wq pA9eQ/Wilg/e7Nm4ZSn0jgXsOpfniUQ= 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-288-vftAswZiNJCaKm5jHeH26Q-1; Thu, 19 Sep 2024 14:58:10 -0400 X-MC-Unique: vftAswZiNJCaKm5jHeH26Q-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (unknown [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 549B319373DF; Thu, 19 Sep 2024 18:58:09 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.46]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4C96C19560AA; Thu, 19 Sep 2024 18:58:06 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Mark Cave-Ayland , Yoshinori Sato , Magnus Damm , Max Filippov Subject: [PATCH 3/7] tests/functional: Convert the xtensa lx60 Avocado test Date: Thu, 19 Sep 2024 20:57:43 +0200 Message-ID: <20240919185749.71222-4-thuth@redhat.com> In-Reply-To: <20240919185749.71222-1-thuth@redhat.com> References: <20240919185749.71222-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Use the new launch_kernel function to convert this test in a simple way. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 9 --------- tests/functional/meson.build | 4 ++++ tests/functional/test_xtensa_lx60.py | 26 ++++++++++++++++++++++++++ 4 files changed, 31 insertions(+), 9 deletions(-) create mode 100755 tests/functional/test_xtensa_lx60.py diff --git a/MAINTAINERS b/MAINTAINERS index 7f7f4c2be6..a75d6ba7d2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1915,6 +1915,7 @@ S: Maintained F: hw/xtensa/xtfpga.c F: hw/net/opencores_eth.c F: include/hw/xtensa/mx_pic.h +F: tests/functional/test_xtensa_lx60.py Devices ------- diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py index 7a776c2818..cf58499c84 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -1027,12 +1027,3 @@ def test_sparc_ss20(self): """ tar_hash = 'b18550d5d61c7615d989a06edace051017726a9f' self.do_test_advcal_2018('11', tar_hash, 'zImage.elf') - - def test_xtensa_lx60(self): - """ - :avocado: tags=arch:xtensa - :avocado: tags=machine:lx60 - :avocado: tags=cpu:dc233c - """ - tar_hash = '49e88d9933742f0164b60839886c9739cb7a0d34' - self.do_test_advcal_2018('02', tar_hash, 'santas-sleigh-ride.elf') diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 3fc1bb192d..8fd852f4ab 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -145,6 +145,10 @@ tests_x86_64_system_thorough = [ 'virtio_gpu', ] +tests_xtensa_system_thorough = [ + 'xtensa_lx60', +] + precache_all = [] foreach speed : ['quick', 'thorough'] foreach dir : target_dirs diff --git a/tests/functional/test_xtensa_lx60.py b/tests/functional/test_xtensa_lx60.py new file mode 100755 index 0000000000..8ce5206a4f --- /dev/null +++ b/tests/functional/test_xtensa_lx60.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +# +# Functional test that boots a Linux kernel on an xtensa lx650 machine +# and checks the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import LinuxKernelTest, Asset +from qemu_test.utils import archive_extract + +class XTensaLX60Test(LinuxKernelTest): + + ASSET_DAY02 = Asset( + 'https://www.qemu-advent-calendar.org/2018/download/day02.tar.xz', + '68ff07f9b3fd3df36d015eb46299ba44748e94bfbb2d5295fddc1a8d4a9fd324') + + def test_xtensa_lx60(self): + self.set_machine('lx60') + self.cpu = 'dc233c' + file_path = self.ASSET_DAY02.fetch() + archive_extract(file_path, self.workdir) + self.launch_kernel(self.workdir + '/day02/santas-sleigh-ride.elf', + wait_for='QEMU advent calendar') + +if __name__ == '__main__': + LinuxKernelTest.main() From patchwork Thu Sep 19 18:57:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 13807948 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2A9E4CF3964 for ; Thu, 19 Sep 2024 18:58:55 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srMMC-0007SM-V3; Thu, 19 Sep 2024 14:58:24 -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 1srMMA-0007KV-5V for qemu-devel@nongnu.org; Thu, 19 Sep 2024 14:58:22 -0400 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 ) id 1srMM8-0001Np-9X for qemu-devel@nongnu.org; Thu, 19 Sep 2024 14:58:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1726772299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=32SIVo5ZUcpeDivRWuhw0SoH5RpwYN28O0swWDGMd48=; b=PJUumPVXGJH4z6Rpk9/qp2+NE226runGq45/P6tRWdl9vYlik7hCEGXNJxuRso60syXbgD lgnRJhYHMBxbi9TiN9MdKfSw+dyrBJCsr7IJz3OvVvzdmE6d5O6NMVMv8zOfJ521sTqqLD AlvkAiyK6lIPz/iyAkcOYpQqqe08Gw0= Received: from mx-prod-mc-02.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-571-X3q4BCyoNRO4oYNxPuaYvg-1; Thu, 19 Sep 2024 14:58:15 -0400 X-MC-Unique: X3q4BCyoNRO4oYNxPuaYvg-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (unknown [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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 83AE81953954; Thu, 19 Sep 2024 18:58:13 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.46]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2066419560AA; Thu, 19 Sep 2024 18:58:09 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Mark Cave-Ayland , Yoshinori Sato , Magnus Damm , Max Filippov Subject: [PATCH 4/7] tests/functional: Convert the SPARCStation Avocado test Date: Thu, 19 Sep 2024 20:57:44 +0200 Message-ID: <20240919185749.71222-5-thuth@redhat.com> In-Reply-To: <20240919185749.71222-1-thuth@redhat.com> References: <20240919185749.71222-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Use the new launch_kernel function to convert this test in a simple way. Signed-off-by: Thomas Huth Acked-by: Mark Cave-Ayland --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 8 -------- tests/functional/meson.build | 4 ++++ tests/functional/test_sparc_sun4m.py | 25 +++++++++++++++++++++++++ 4 files changed, 30 insertions(+), 8 deletions(-) create mode 100755 tests/functional/test_sparc_sun4m.py diff --git a/MAINTAINERS b/MAINTAINERS index a75d6ba7d2..b85a3fc529 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1693,6 +1693,7 @@ F: include/hw/nvram/sun_nvram.h F: include/hw/sparc/sparc32_dma.h F: include/hw/sparc/sun4m_iommu.h F: pc-bios/openbios-sparc32 +F: tests/functional/test_sparc_sun4m.py Sun4u M: Mark Cave-Ayland diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py index cf58499c84..900af67412 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -1019,11 +1019,3 @@ def test_sh4_r2d(self): tar_hash = 'fe06a4fd8ccbf2e27928d64472939d47829d4c7e' self.vm.add_args('-append', 'console=ttySC1') self.do_test_advcal_2018('09', tar_hash, 'zImage', console=1) - - def test_sparc_ss20(self): - """ - :avocado: tags=arch:sparc - :avocado: tags=machine:SS-20 - """ - tar_hash = 'b18550d5d61c7615d989a06edace051017726a9f' - self.do_test_advcal_2018('11', tar_hash, 'zImage.elf') diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 8fd852f4ab..8aacd15cf3 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -125,6 +125,10 @@ tests_s390x_system_thorough = [ 's390x_topology', ] +tests_sparc_system_thorough = [ + 'sparc_sun4m', +] + tests_sparc64_system_thorough = [ 'sparc64_sun4u', ] diff --git a/tests/functional/test_sparc_sun4m.py b/tests/functional/test_sparc_sun4m.py new file mode 100755 index 0000000000..b334375820 --- /dev/null +++ b/tests/functional/test_sparc_sun4m.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python3 +# +# Functional test that boots a Linux kernel on a sparc sun4m machine +# and checks the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import LinuxKernelTest, Asset +from qemu_test.utils import archive_extract + +class Sun4mTest(LinuxKernelTest): + + ASSET_DAY11 = Asset( + 'https://www.qemu-advent-calendar.org/2018/download/day11.tar.xz', + 'c776533ba756bf4dd3f1fc4c024fb50ef0d853e05c5f5ddf0900a32d1eaa49e0') + + def test_sparc_ss20(self): + self.set_machine('SS-20') + file_path = self.ASSET_DAY11.fetch() + archive_extract(file_path, self.workdir) + self.launch_kernel(self.workdir + '/day11/zImage.elf', + wait_for='QEMU advent calendar') + +if __name__ == '__main__': + LinuxKernelTest.main() From patchwork Thu Sep 19 18:57:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 13807953 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6BBFACF3963 for ; Thu, 19 Sep 2024 18:59:44 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srMMG-0007dy-4P; Thu, 19 Sep 2024 14:58:28 -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 1srMME-0007ZZ-LF for qemu-devel@nongnu.org; Thu, 19 Sep 2024 14:58:27 -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 1srMMC-0001O6-R7 for qemu-devel@nongnu.org; Thu, 19 Sep 2024 14:58:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1726772303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SYa+qomcAX21vpHUSncIfptuYVSKRE7oQzzDiYo3Bk0=; b=AS8D7jNFPS/2shjtU3s6ullGBrD3hFGBxAGG57sCw5qCkUlC9SqiRpZEX6oQUQSiBk594W /8oIS/iGCBcZmHUL72QVAPUVEo76OuRaX6XqK9LmYwPcSyZb+LmrYPv1xpXZetSXVCVfst x76NXR3nP+VHxnPiWjFBNFtcWNq3pmc= Received: from mx-prod-mc-02.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-444-WNNcXUWkMcCX2u4fScrkEQ-1; Thu, 19 Sep 2024 14:58:18 -0400 X-MC-Unique: WNNcXUWkMcCX2u4fScrkEQ-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (unknown [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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 363341953963; Thu, 19 Sep 2024 18:58:17 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.46]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3AE8519560AA; Thu, 19 Sep 2024 18:58:13 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Mark Cave-Ayland , Yoshinori Sato , Magnus Damm , Max Filippov Subject: [PATCH 5/7] tests/functional: Convert the e500 ppc64 Avocado test Date: Thu, 19 Sep 2024 20:57:45 +0200 Message-ID: <20240919185749.71222-6-thuth@redhat.com> In-Reply-To: <20240919185749.71222-1-thuth@redhat.com> References: <20240919185749.71222-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Use the new launch_kernel function to convert this test in a simple way. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 11 ----------- tests/functional/meson.build | 1 + tests/functional/test_ppc64_e500.py | 25 +++++++++++++++++++++++++ 4 files changed, 27 insertions(+), 11 deletions(-) create mode 100755 tests/functional/test_ppc64_e500.py diff --git a/MAINTAINERS b/MAINTAINERS index b85a3fc529..3dd80a0138 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1445,6 +1445,7 @@ F: pc-bios/u-boot.e500 F: hw/intc/openpic_kvm.c F: include/hw/ppc/openpic_kvm.h F: docs/system/ppc/ppce500.rst +F: tests/functional/test_ppc64_e500.py mpc8544ds L: qemu-ppc@nongnu.org diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py index 900af67412..344c7835a2 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -918,17 +918,6 @@ def test_arm_ast2600_debian(self): self.wait_for_console_pattern("SMP: Total of 2 processors activated") self.wait_for_console_pattern("No filesystem could mount root") - def test_ppc64_e500(self): - """ - :avocado: tags=arch:ppc64 - :avocado: tags=machine:ppce500 - :avocado: tags=cpu:e5500 - :avocado: tags=accel:tcg - """ - self.require_accelerator("tcg") - tar_hash = '6951d86d644b302898da2fd701739c9406527fe1' - self.do_test_advcal_2018('19', tar_hash, 'uImage') - def do_test_ppc64_powernv(self, proc): self.require_accelerator("tcg") images_url = ('https://github.com/open-power/op-build/releases/download/v2.7/') diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 8aacd15cf3..bc33332313 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -111,6 +111,7 @@ tests_ppc_system_thorough = [ ] tests_ppc64_system_thorough = [ + 'ppc64_e500', 'ppc64_hv', 'ppc64_powernv', 'ppc64_pseries', diff --git a/tests/functional/test_ppc64_e500.py b/tests/functional/test_ppc64_e500.py new file mode 100755 index 0000000000..3558ae0c8c --- /dev/null +++ b/tests/functional/test_ppc64_e500.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python3 +# +# Boot a Linux kernel on a e500 ppc64 machine and check the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import LinuxKernelTest, Asset +from qemu_test.utils import archive_extract + +class E500Test(LinuxKernelTest): + + ASSET_DAY19 = Asset( + 'https://www.qemu-advent-calendar.org/2018/download/day19.tar.xz', + '20b1bb5a8488c664defbb5d283addc91a05335a936c63b3f5ff7eee74b725755') + + def test_ppc64_e500(self): + self.set_machine('ppce500') + self.cpu = 'e5500' + file_path = self.ASSET_DAY19.fetch() + archive_extract(file_path, self.workdir) + self.launch_kernel(self.workdir + '/day19/uImage', + wait_for='QEMU advent calendar') + +if __name__ == '__main__': + LinuxKernelTest.main() From patchwork Thu Sep 19 18:57:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 13807950 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 78211CF3962 for ; Thu, 19 Sep 2024 18:59:27 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srMMO-0007om-TW; Thu, 19 Sep 2024 14:58:38 -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 1srMMJ-0007oD-SQ for qemu-devel@nongnu.org; Thu, 19 Sep 2024 14:58:32 -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 1srMMG-0001OK-OX for qemu-devel@nongnu.org; Thu, 19 Sep 2024 14:58:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1726772307; 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=DFsR7wISCOc7VHWHWUczMQ3VkF23yYewNSUH/p5x32w=; b=AHlxxjEWKa3y7IZyEZNT4ylTQ+co+YvYaggJecRHLjVWwoOyPIHTcnjwFBHgRscTNQE6pC hb6obZHdYMla2PXUIj1wwezlB4U4C5si/U8iljGm4cWSqyBFpdTLNG/E3e5UW+Cuq8LAo+ PXT49ybigexkYSAs13D8A31jFR09z4c= 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-642-pqVZcxGoMuCqcuDyi82kMQ-1; Thu, 19 Sep 2024 14:58:21 -0400 X-MC-Unique: pqVZcxGoMuCqcuDyi82kMQ-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (unknown [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 669C7193EF45; Thu, 19 Sep 2024 18:58:20 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.46]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C6D9A19560AA; Thu, 19 Sep 2024 18:58:17 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Mark Cave-Ayland , Yoshinori Sato , Magnus Damm , Max Filippov Subject: [PATCH 6/7] tests/functional: Convert the mac ppc Avocado tests Date: Thu, 19 Sep 2024 20:57:46 +0200 Message-ID: <20240919185749.71222-7-thuth@redhat.com> In-Reply-To: <20240919185749.71222-1-thuth@redhat.com> References: <20240919185749.71222-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The g3beige and mac99 tests use the same asset, so put them together in a new test_ppc_mac.py file. Signed-off-by: Thomas Huth Acked-by: Mark Cave-Ayland --- MAINTAINERS | 2 ++ tests/avocado/boot_linux_console.py | 30 ----------------------- tests/functional/meson.build | 1 + tests/functional/test_ppc_mac.py | 38 +++++++++++++++++++++++++++++ 4 files changed, 41 insertions(+), 30 deletions(-) create mode 100755 tests/functional/test_ppc_mac.py diff --git a/MAINTAINERS b/MAINTAINERS index 3dd80a0138..63eb306d6e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1474,6 +1474,7 @@ F: include/hw/ppc/mac_dbdma.h F: include/hw/pci-host/uninorth.h F: include/hw/input/adb* F: pc-bios/qemu_vga.ndrv +F: tests/functional/test_ppc_mac.py Old World (g3beige) M: Mark Cave-Ayland @@ -1489,6 +1490,7 @@ F: include/hw/intc/heathrow_pic.h F: include/hw/input/adb* F: include/hw/pci-host/grackle.h F: pc-bios/qemu_vga.ndrv +F: tests/functional/test_ppc_mac.py PReP M: Hervé Poussineau diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py index 344c7835a2..f5dc9e9cfa 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -965,36 +965,6 @@ def test_ppc_powernv10(self): """ self.do_test_ppc64_powernv('P10') - def test_ppc_g3beige(self): - """ - :avocado: tags=arch:ppc - :avocado: tags=machine:g3beige - :avocado: tags=accel:tcg - """ - # TODO: g3beige works with kvm_pr but we don't have a - # reliable way ATM (e.g. looking at /proc/modules) to detect - # whether we're running kvm_hv or kvm_pr. For now let's - # disable this test if we don't have TCG support. - self.require_accelerator("tcg") - tar_hash = 'e0b872a5eb8fdc5bed19bd43ffe863900ebcedfc' - self.vm.add_args('-M', 'graphics=off') - self.do_test_advcal_2018('15', tar_hash, 'invaders.elf') - - def test_ppc_mac99(self): - """ - :avocado: tags=arch:ppc - :avocado: tags=machine:mac99 - :avocado: tags=accel:tcg - """ - # TODO: mac99 works with kvm_pr but we don't have a - # reliable way ATM (e.g. looking at /proc/modules) to detect - # whether we're running kvm_hv or kvm_pr. For now let's - # disable this test if we don't have TCG support. - self.require_accelerator("tcg") - tar_hash = 'e0b872a5eb8fdc5bed19bd43ffe863900ebcedfc' - self.vm.add_args('-M', 'graphics=off') - self.do_test_advcal_2018('15', tar_hash, 'invaders.elf') - # This test has a 6-10% failure rate on various hosts that look # like issues with a buggy kernel. As a result we don't want it # gating releases on Gitlab. diff --git a/tests/functional/meson.build b/tests/functional/meson.build index bc33332313..449c6a95ea 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -106,6 +106,7 @@ tests_ppc_system_thorough = [ 'ppc_40p', 'ppc_amiga', 'ppc_bamboo', + 'ppc_mac', 'ppc_mpc8544ds', 'ppc_virtex_ml507', ] diff --git a/tests/functional/test_ppc_mac.py b/tests/functional/test_ppc_mac.py new file mode 100755 index 0000000000..a6b1ca2d4c --- /dev/null +++ b/tests/functional/test_ppc_mac.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python3 +# +# Boot Linux kernel on a mac99 and g3beige ppc machine and check the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import LinuxKernelTest, Asset +from qemu_test.utils import archive_extract + +class MacTest(LinuxKernelTest): + + ASSET_DAY15 = Asset( + 'https://www.qemu-advent-calendar.org/2018/download/day15.tar.xz', + '03e0757c131d2959decf293a3572d3b96c5a53587165bf05ce41b2818a2bccd5') + + def do_day15_test(self): + # mac99 also works with kvm_pr but we don't have a reliable way at + # the moment (e.g. by looking at /proc/modules) to detect whether + # we're running kvm_hv or kvm_pr. For now let's disable this test + # if we don't have TCG support. + self.require_accelerator("tcg") + + file_path = self.ASSET_DAY15.fetch() + archive_extract(file_path, self.workdir) + self.vm.add_args('-M', 'graphics=off') + self.launch_kernel(self.workdir + '/day15/invaders.elf', + wait_for='QEMU advent calendar') + + def test_ppc_g3beige(self): + self.set_machine('g3beige') + self.do_day15_test() + + def test_ppc_mac99(self): + self.set_machine('mac99') + self.do_day15_test() + +if __name__ == '__main__': + LinuxKernelTest.main() From patchwork Thu Sep 19 18:57:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 13807949 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DB9A4CF3962 for ; Thu, 19 Sep 2024 18:59:08 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srMMW-00080c-7w; Thu, 19 Sep 2024 14:58:44 -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 1srMMS-0007ut-L7 for qemu-devel@nongnu.org; Thu, 19 Sep 2024 14:58:40 -0400 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 ) id 1srMMO-0001Oj-Rk for qemu-devel@nongnu.org; Thu, 19 Sep 2024 14:58:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1726772315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F+7Df5RlRnVhdLECEw4E+fTPOMXYOLddRglbS63IbB4=; b=L+TMGJFSOyNpw44RNkJXGxhvAYMGSyj9UAymesCjxL34sfOjVAcfEzRpF1xNLT5PyoUkng sRzcdCiZj/h4uyjEA6XWLtsP7GYwTIb8MPw/iWrX9Yc4QUWbdKmFzuOQHvIVpYAYjzM6UX PnUnNDJ9Pzt/i3x1rBXKf2bqu4jMU3k= 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-627-UIQrJIxIM5WNQ3mHlmkANg-1; Thu, 19 Sep 2024 14:58:26 -0400 X-MC-Unique: UIQrJIxIM5WNQ3mHlmkANg-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (unknown [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 D6C8D19772E3; Thu, 19 Sep 2024 18:58:24 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.46]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 24EFF19560AA; Thu, 19 Sep 2024 18:58:20 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Mark Cave-Ayland , Yoshinori Sato , Magnus Damm , Max Filippov Subject: [PATCH 7/7] tests/functional: Convert the r2d sh4 Avocado test Date: Thu, 19 Sep 2024 20:57:47 +0200 Message-ID: <20240919185749.71222-8-thuth@redhat.com> In-Reply-To: <20240919185749.71222-1-thuth@redhat.com> References: <20240919185749.71222-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org This is the last test that is using the do_test_advcal_2018() function, so we can now remove that function from boot_linux_console.py, too. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 25 ----------------------- tests/functional/meson.build | 4 ++++ tests/functional/test_sh4_r2d.py | 31 +++++++++++++++++++++++++++++ 4 files changed, 36 insertions(+), 25 deletions(-) create mode 100755 tests/functional/test_sh4_r2d.py diff --git a/MAINTAINERS b/MAINTAINERS index 63eb306d6e..62f5255f40 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1679,6 +1679,7 @@ F: hw/pci-host/sh_pci.c F: hw/timer/sh_timer.c F: include/hw/sh4/sh_intc.h F: include/hw/timer/tmu012.h +F: tests/functional/test_sh4_r2d.py SPARC Machines -------------- diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py index f5dc9e9cfa..759fda9cc8 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -882,17 +882,6 @@ def test_arm_orangepi_uboot_netbsd9(self): # Wait for user-space wait_for_console_pattern(self, 'Starting root file system check') - def do_test_advcal_2018(self, day, tar_hash, kernel_name, console=0): - tar_url = ('https://qemu-advcal.gitlab.io' - '/qac-best-of-multiarch/download/day' + day + '.tar.xz') - file_path = self.fetch_asset(tar_url, asset_hash=tar_hash) - archive.extract(file_path, self.workdir) - self.vm.set_console(console_index=console) - self.vm.add_args('-kernel', - self.workdir + '/day' + day + '/' + kernel_name) - self.vm.launch() - self.wait_for_console_pattern('QEMU advent calendar') - def test_arm_ast2600_debian(self): """ :avocado: tags=arch:arm @@ -964,17 +953,3 @@ def test_ppc_powernv10(self): :avocado: tags=accel:tcg """ self.do_test_ppc64_powernv('P10') - - # This test has a 6-10% failure rate on various hosts that look - # like issues with a buggy kernel. As a result we don't want it - # gating releases on Gitlab. - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') - def test_sh4_r2d(self): - """ - :avocado: tags=arch:sh4 - :avocado: tags=machine:r2d - :avocado: tags=flaky - """ - tar_hash = 'fe06a4fd8ccbf2e27928d64472939d47829d4c7e' - self.vm.add_args('-append', 'console=ttySC1') - self.do_test_advcal_2018('09', tar_hash, 'zImage', console=1) diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 449c6a95ea..56a541530f 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -127,6 +127,10 @@ tests_s390x_system_thorough = [ 's390x_topology', ] +tests_sh4_system_thorough = [ + 'sh4_r2d', +] + tests_sparc_system_thorough = [ 'sparc_sun4m', ] diff --git a/tests/functional/test_sh4_r2d.py b/tests/functional/test_sh4_r2d.py new file mode 100755 index 0000000000..5fe8cf9f8d --- /dev/null +++ b/tests/functional/test_sh4_r2d.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 +# +# Boot a Linux kernel on a r2d sh4 machine and check the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os + +from qemu_test import LinuxKernelTest, Asset +from qemu_test.utils import archive_extract +from unittest import skipUnless + +class R2dTest(LinuxKernelTest): + + ASSET_DAY09 = Asset( + 'https://www.qemu-advent-calendar.org/2018/download/day09.tar.xz', + 'a61b44d2630a739d1380cc4ff4b80981d47ccfd5992f1484ccf48322c35f09ac') + + # This test has a 6-10% failure rate on various hosts that look + # like issues with a buggy kernel. + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable') + def test_r2d(self): + self.set_machine('r2d') + file_path = self.ASSET_DAY09.fetch() + archive_extract(file_path, self.workdir) + self.vm.add_args('-append', 'console=ttySC1') + self.launch_kernel(self.workdir + '/day09/zImage', console_index=1, + wait_for='QEMU advent calendar') + +if __name__ == '__main__': + LinuxKernelTest.main()