From nobody Tue Oct 22 23:17:41 2024 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=1726772336; cv=none; d=zohomail.com; s=zohoarc; b=BUFTPV/9iYQmBoiZsIbj8nusb6Zxfy2mZeoM6FMi7KaOHU4lrn83iMBxrVQ3ys1hWYEKxg3wHBeGd60vxRGW2pKuNXtKJkfuEMiM6tuZgj/ETZ6pPoMo+g3iX2jFqC9dbZCHfDyXp/aZ0442HDcLRrsNNLU1u840tIk4/k7/z1M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726772336; h=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=s/jVT1toi5ItR/N3+efyb7G4g+J8iS9fe3pgU++6rRs=; b=Tg55Owk4YUr2LnsPOAZpieK+GRL78rK4XffNhvwppIOlcLGlAI05f4sqZ2hfE63kwMIoy0ct/CrpCrQDpTiVwUkLapOC8hdQXGf/YO/hQeJfgPhYc/DNKcQGcuX58WiBiHp6bcIHfzFUuyEmGrg55QFWpo58uPjMmFmNdA15UvM= 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= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1726772336325306.60841622905855; Thu, 19 Sep 2024 11:58:56 -0700 (PDT) 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 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 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) 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= X-MC-Unique: I2z6dIvMMKKKifgbsAvkTg-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=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 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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1726772338968116600 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Richard Henderson --- tests/functional/qemu_test/linuxkernel.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/functional/qemu_test/linuxkernel.py b/tests/functional/q= emu_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= =3DNone): failure_message=3D'Kernel panic - not syn= cing', vm=3Dvm) =20 + def launch_kernel(self, kernel, initrd=3DNone, dtb=3DNone, console_ind= ex=3D0, + wait_for=3DNone): + self.vm.set_console(console_index=3Dconsole_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 --=20 2.46.0 From nobody Tue Oct 22 23:17:41 2024 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=1726772381; cv=none; d=zohomail.com; s=zohoarc; b=atagfBBQptSxq4Siz+9Jppp1KutRb1HXx7jsOxA5nrdA8QGuxO3AUTh7nUhWtJh90suUyyHPtKz2osXwx9tVNLWTtrWo3SQjr5oq+GwpP/WAmITBuTXmGoYY3wcFfRT/FpGigaSglpy+PhjQVmaKr53BCOdpMAhaVLCm3QGx2hA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726772381; h=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=UwlFYwPN+QHlMLSj5ERxLP4JF1V2FyHI7rXBw43Qfsw=; b=ShAKwc/7OgysiR9i23boc8twu0uN3wsd8BjGdPrpRSdF32ktv+Y8f45EXJXleS+YkETscAq9UmflR+an5d4dM2umHxcF2vLaPAhPdWO9n9GWyUCXmCPZkf0mfpPuSg8Vfjps1R9VjTf7M3ieZTYT1swVEtwhrwk2yf5hwtRFPRU= 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= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17267723817051013.240434500392; Thu, 19 Sep 2024 11:59:41 -0700 (PDT) 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 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 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) 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= X-MC-Unique: NACYhpGvOAq5qkHqBQGWTQ-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=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 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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1726772383187116600 Content-Type: text/plain; charset="utf-8" Use the new launch_kernel function to convert this test in a simple way. Signed-off-by: Thomas Huth Reviewed-by: Richard Henderson --- 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 =20 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_na= me, console=3D0): self.vm.launch() self.wait_for_console_pattern('QEMU advent calendar') =20 - def test_arm_vexpressa9(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Dmachine:vexpress-a9 - """ - tar_hash =3D '32b7677ce8b6f1471fb0059865f451169934245b' - self.vm.add_args('-dtb', self.workdir + '/day16/vexpress-v2p-ca9.d= tb') - self.do_test_advcal_2018('16', tar_hash, 'winter.zImage') - def test_arm_ast2600_debian(self): """ :avocado: tags=3Darch: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 =3D [ 'arm_canona1100', 'arm_integratorcp', 'arm_raspi2', + 'arm_vexpress', ] =20 tests_arm_linuxuser_thorough =3D [ 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 =3D 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 =3D self.ASSET_DAY16.fetch() + archive_extract(file_path, self.workdir) + self.launch_kernel(self.workdir + '/day16/winter.zImage', + dtb=3Dself.workdir + '/day16/vexpress-v2p-ca9.d= tb', + wait_for=3D'QEMU advent calendar') + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.46.0 From nobody Tue Oct 22 23:17:41 2024 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=1726772340; cv=none; d=zohomail.com; s=zohoarc; b=XO5nFVXZONMT2PVS8R5aOd167Il6GcJJz+RSRaA9mpAI+c/sfWoE943uVK1LOkvJIW37ZV5vvVokUZ4stSUZ2LknibHtuAZxFt6aUIfjGcuD+UC+1E8WOSPlDC9c0L4LPZtskVl1u97eUvriW4ZbjB7Y9jA2HbQ5VGubeBYAJO8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726772340; h=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=cXKmNyfO/xawcB6OvqDOE+mIxb46hce82XDAqY/bvD8=; b=lacIOzA6o8xX04AVLZ6AIwU6/FoPi2MBo+wHuM+aghr4wVWkG/uaKvNHlt7Hjfg3KO2rp0XjkBJTqVu2jtQS++k4rB1D7nCWBplHpOsgpU3iEZhImUk1eT8veNzbF310iuO6tDocutzpBE4lqi07xQHd58Z+eEZAMBaKQzfCEcQ= 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= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1726772336246924.9324819989585; Thu, 19 Sep 2024 11:58:56 -0700 (PDT) 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 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 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) 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= X-MC-Unique: vftAswZiNJCaKm5jHeH26Q-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=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 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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1726772342987116600 Content-Type: text/plain; charset="utf-8" Use the new launch_kernel function to convert this test in a simple way. Signed-off-by: Thomas Huth Reviewed-by: Richard Henderson --- 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 =20 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 =3D 'b18550d5d61c7615d989a06edace051017726a9f' self.do_test_advcal_2018('11', tar_hash, 'zImage.elf') - - def test_xtensa_lx60(self): - """ - :avocado: tags=3Darch:xtensa - :avocado: tags=3Dmachine:lx60 - :avocado: tags=3Dcpu:dc233c - """ - tar_hash =3D '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 =3D [ 'virtio_gpu', ] =20 +tests_xtensa_system_thorough =3D [ + 'xtensa_lx60', +] + precache_all =3D [] foreach speed : ['quick', 'thorough'] foreach dir : target_dirs diff --git a/tests/functional/test_xtensa_lx60.py b/tests/functional/test_x= tensa_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 =3D Asset( + 'https://www.qemu-advent-calendar.org/2018/download/day02.tar.xz', + '68ff07f9b3fd3df36d015eb46299ba44748e94bfbb2d5295fddc1a8d4a9fd324') + + def test_xtensa_lx60(self): + self.set_machine('lx60') + self.cpu =3D 'dc233c' + file_path =3D self.ASSET_DAY02.fetch() + archive_extract(file_path, self.workdir) + self.launch_kernel(self.workdir + '/day02/santas-sleigh-ride.elf', + wait_for=3D'QEMU advent calendar') + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.46.0 From nobody Tue Oct 22 23:17:41 2024 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=1726772340; cv=none; d=zohomail.com; s=zohoarc; b=Ia93m1dNf8GWKBSjyWh8jX1WzuBggeBPlLN0pKOmwDh8AVLGIXp7ZE+HuryUGq62BMms5lWI2gem+apIbZvh7I1Gv+ZWUx/DY/wOCasdnBAXpknpACcmBw65Lw8W9O9d8wtoooeHh8WsyUAnifUv9iKGVLl9lsZV2mwImVvvX/M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726772340; h=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=32SIVo5ZUcpeDivRWuhw0SoH5RpwYN28O0swWDGMd48=; b=GPRt0Lr0pM4AtWGyPE98YTUNQFXr+evOEpE+ZtxjudRJHIVYYvu2MD0tFqoy9dR6d4AyPdh3HifV6T10ASYWsnmvFywvXbdd2jgGV4y00XFFQIUzxMd61ohi5u8x6Smwigvc31qCjX1JplR3Lxgk2787w+yTxF3f1C5ZFBi1Pvc= 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= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1726772340683309.8023681643492; Thu, 19 Sep 2024 11:59:00 -0700 (PDT) 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 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 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) 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= X-MC-Unique: X3q4BCyoNRO4oYNxPuaYvg-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=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 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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1726772344956116600 Content-Type: text/plain; charset="utf-8" Use the new launch_kernel function to convert this test in a simple way. Signed-off-by: Thomas Huth Acked-by: Mark Cave-Ayland Reviewed-by: Richard Henderson --- 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 =20 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 =3D 'fe06a4fd8ccbf2e27928d64472939d47829d4c7e' self.vm.add_args('-append', 'console=3DttySC1') self.do_test_advcal_2018('09', tar_hash, 'zImage', console=3D1) - - def test_sparc_ss20(self): - """ - :avocado: tags=3Darch:sparc - :avocado: tags=3Dmachine:SS-20 - """ - tar_hash =3D '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 =3D [ 's390x_topology', ] =20 +tests_sparc_system_thorough =3D [ + 'sparc_sun4m', +] + tests_sparc64_system_thorough =3D [ 'sparc64_sun4u', ] diff --git a/tests/functional/test_sparc_sun4m.py b/tests/functional/test_s= parc_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 =3D 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 =3D self.ASSET_DAY11.fetch() + archive_extract(file_path, self.workdir) + self.launch_kernel(self.workdir + '/day11/zImage.elf', + wait_for=3D'QEMU advent calendar') + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.46.0 From nobody Tue Oct 22 23:17:41 2024 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=1726772391; cv=none; d=zohomail.com; s=zohoarc; b=lJGYcx0myfzYhopdesiwukp9KtqCgoie+nLNCaLWQB9OzZcfTDN3lOQSbyzns0znbSk8D/QhHa51oCEHCGvl+gEd3m7QfRq0qF50X1JwToC+f7oBVm7eXPiDdOgp76FvdRrClUCFvaiX2P2JtMhIdX9QPhvmsCF/Grv1zbEkqiM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726772391; h=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=SYa+qomcAX21vpHUSncIfptuYVSKRE7oQzzDiYo3Bk0=; b=ZkA7OW6bAP+3tV2uHHiBNeSmJWc7WnPdEANTWrC6W3pu7QBBejyv3ajVMno/uaKTBgRrLExk+juURT9DKXWgBKxQdVMC7FDTdYAzRnEbSUa7/Zh8TrMpJWj6YIglsAzNFs3KogXFjRZCqXHZrgBvS6MqdiqoCQquMb13vpnOo4Y= 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= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1726772388817180.05201651621303; Thu, 19 Sep 2024 11:59:48 -0700 (PDT) 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 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 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) 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= X-MC-Unique: WNNcXUWkMcCX2u4fScrkEQ-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=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 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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1726772397262116600 Content-Type: text/plain; charset="utf-8" Use the new launch_kernel function to convert this test in a simple way. Signed-off-by: Thomas Huth Reviewed-by: Richard Henderson --- 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 =20 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 activate= d") self.wait_for_console_pattern("No filesystem could mount root") =20 - def test_ppc64_e500(self): - """ - :avocado: tags=3Darch:ppc64 - :avocado: tags=3Dmachine:ppce500 - :avocado: tags=3Dcpu:e5500 - :avocado: tags=3Daccel:tcg - """ - self.require_accelerator("tcg") - tar_hash =3D '6951d86d644b302898da2fd701739c9406527fe1' - self.do_test_advcal_2018('19', tar_hash, 'uImage') - def do_test_ppc64_powernv(self, proc): self.require_accelerator("tcg") images_url =3D ('https://github.com/open-power/op-build/releases/d= ownload/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 =3D [ ] =20 tests_ppc64_system_thorough =3D [ + 'ppc64_e500', 'ppc64_hv', 'ppc64_powernv', 'ppc64_pseries', diff --git a/tests/functional/test_ppc64_e500.py b/tests/functional/test_pp= c64_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 =3D Asset( + 'https://www.qemu-advent-calendar.org/2018/download/day19.tar.xz', + '20b1bb5a8488c664defbb5d283addc91a05335a936c63b3f5ff7eee74b725755') + + def test_ppc64_e500(self): + self.set_machine('ppce500') + self.cpu =3D 'e5500' + file_path =3D self.ASSET_DAY19.fetch() + archive_extract(file_path, self.workdir) + self.launch_kernel(self.workdir + '/day19/uImage', + wait_for=3D'QEMU advent calendar') + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.46.0 From nobody Tue Oct 22 23:17:41 2024 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=1726772369; cv=none; d=zohomail.com; s=zohoarc; b=h8WoZnG8dLvz7Qu7mpk3a4MU2bHsrTuud4p9rMmMlR5OJQkWjPWPPxqQ3juMYn+0E+lQKNF2q+fsdTKtVqp2IErrfstd26UEfpHaBb1BiFqLWkm7kjRr9anmZM3+Exi7JQYCAlo6KglXJEWSn4KE5w4wSzsyN9A2UD/0wgXd28A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726772369; 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=DFsR7wISCOc7VHWHWUczMQ3VkF23yYewNSUH/p5x32w=; b=jsmm/GYpWivEDRfrx9WPzQoZk6hOU7ntZ1ffAbWa7BzlJOe0GclyZYib5WYA7Sm3KvXRT7+bye4QlKMrPbbWDnX1Ot2ZEfqrEGIvyQFhKjBAl5kXRrxdFxEv+f01mAl53xGLLFDXL4S1NgOYA7tPjG524cRvtv9+5AQkr/ogE5g= 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= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1726772369625622.8893381893965; Thu, 19 Sep 2024 11:59:29 -0700 (PDT) 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 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 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) 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= X-MC-Unique: pqVZcxGoMuCqcuDyi82kMQ-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=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 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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1726772371183116600 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 Reviewed-by: Richard Henderson --- 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 =20 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 =20 PReP M: Herv=C3=A9 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') =20 - def test_ppc_g3beige(self): - """ - :avocado: tags=3Darch:ppc - :avocado: tags=3Dmachine:g3beige - :avocado: tags=3Daccel: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 =3D 'e0b872a5eb8fdc5bed19bd43ffe863900ebcedfc' - self.vm.add_args('-M', 'graphics=3Doff') - self.do_test_advcal_2018('15', tar_hash, 'invaders.elf') - - def test_ppc_mac99(self): - """ - :avocado: tags=3Darch:ppc - :avocado: tags=3Dmachine:mac99 - :avocado: tags=3Daccel: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 =3D 'e0b872a5eb8fdc5bed19bd43ffe863900ebcedfc' - self.vm.add_args('-M', 'graphics=3Doff') - 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 =3D [ '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_m= ac.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 conso= le +# +# 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 =3D 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 =3D self.ASSET_DAY15.fetch() + archive_extract(file_path, self.workdir) + self.vm.add_args('-M', 'graphics=3Doff') + self.launch_kernel(self.workdir + '/day15/invaders.elf', + wait_for=3D'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__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.46.0 From nobody Tue Oct 22 23:17:41 2024 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=1726772349; cv=none; d=zohomail.com; s=zohoarc; b=cDwcwR6wOV2LEtkzbVrDZhp3Jkt6odyG3vS3vTj9w4LrQfrLqGc1h+lMpa70Wd1azamkSW5V3yL+HphdUafXKkhCQEpZBcyzrVilPtEIHzdQBq3SKh+21867BtM8QUIRE/ZtAqmKwUcMggy4q8eQa8mSp6e/vbd1B9+pMBoa/LY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726772349; h=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=F+7Df5RlRnVhdLECEw4E+fTPOMXYOLddRglbS63IbB4=; b=NHT8rKV5GZP/nXUDKlHVqhkRounTiHBMH4HBg05V1M9zbkUwZmTNeCYkC6migO7zRjs+3W6WYaj5gmA16fRyzjeu9jysdW+hij6VmiH8x6h40Eui66NQgH5xMEekLUdspel8yMA+YtPvDD6lIdyWfCnJOgKLW5EYlPDeb27GdQ4= 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= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1726772349063764.1781479305716; Thu, 19 Sep 2024 11:59:09 -0700 (PDT) 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 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 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) 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= X-MC-Unique: UIQrJIxIM5WNQ3mHlmkANg-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=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 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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1726772351023116600 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Richard Henderson --- 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 =20 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') =20 - def do_test_advcal_2018(self, day, tar_hash, kernel_name, console=3D0): - tar_url =3D ('https://qemu-advcal.gitlab.io' - '/qac-best-of-multiarch/download/day' + day + '.tar.xz') - file_path =3D self.fetch_asset(tar_url, asset_hash=3Dtar_hash) - archive.extract(file_path, self.workdir) - self.vm.set_console(console_index=3Dconsole) - 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=3Darch:arm @@ -964,17 +953,3 @@ def test_ppc_powernv10(self): :avocado: tags=3Daccel: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 G= itLab') - def test_sh4_r2d(self): - """ - :avocado: tags=3Darch:sh4 - :avocado: tags=3Dmachine:r2d - :avocado: tags=3Dflaky - """ - tar_hash =3D 'fe06a4fd8ccbf2e27928d64472939d47829d4c7e' - self.vm.add_args('-append', 'console=3DttySC1') - self.do_test_advcal_2018('09', tar_hash, 'zImage', console=3D1) 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 =3D [ 's390x_topology', ] =20 +tests_sh4_system_thorough =3D [ + 'sh4_r2d', +] + tests_sparc_system_thorough =3D [ 'sparc_sun4m', ] diff --git a/tests/functional/test_sh4_r2d.py b/tests/functional/test_sh4_r= 2d.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 =3D 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 =3D self.ASSET_DAY09.fetch() + archive_extract(file_path, self.workdir) + self.vm.add_args('-append', 'console=3DttySC1') + self.launch_kernel(self.workdir + '/day09/zImage', console_index= =3D1, + wait_for=3D'QEMU advent calendar') + +if __name__ =3D=3D '__main__': + LinuxKernelTest.main() --=20 2.46.0