From nobody Thu Sep 19 01:08:57 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=1721843764; cv=none; d=zohomail.com; s=zohoarc; b=Z3NdboQwYqtP0DVmsqUn14YjQF99VkX7Ckc68bQhP61Mo2qkregZIF0rRRV9uoKGJDSkvEyPlut3TPwFDWr1jCr6+lCXczBXoSmqaNyhEFUV2Q2SjvFRnUh0gytAsbiSr+Ygnj7dCO7FZomLORe48nt0tBwz0w5Jn91fHXTJ2VY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1721843764; 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=Wf8X5omgUCDws1rOtaLrgrsexFOXN3/9UU728c0iMCo=; b=K3fHUponx2o4zHhiTLGDlHTivMWrBPQaSHNnd06cBmgjdctFkmSFIn9Z8Bhr8ViqZgVQc4s2LXk9swva3fUtkmKwE7zFjWbrqBQDQ7VdtS+n+Q+eIb4rjU1rpZMPHhlPPb7TEMN4Pm0QB4oQmQJpckVe8Bu1954409ifHLasojQ= 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 1721843764975499.5869414173625; Wed, 24 Jul 2024 10:56:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWgCS-00077e-5V; Wed, 24 Jul 2024 13:54:52 -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 1sWgCL-0006Yl-EK for qemu-devel@nongnu.org; Wed, 24 Jul 2024 13:54:45 -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 1sWgCE-0005xw-Sc for qemu-devel@nongnu.org; Wed, 24 Jul 2024 13:54:43 -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-475-YtVkMZwNP-WuL4DdxrAK8g-1; Wed, 24 Jul 2024 13:54:33 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (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 B33711955BEE; Wed, 24 Jul 2024 17:54:31 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.194.144]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2A8631955D48; Wed, 24 Jul 2024 17:54:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721843676; 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=Wf8X5omgUCDws1rOtaLrgrsexFOXN3/9UU728c0iMCo=; b=G9k7SX8+x0yvzTeYjRhce+rgw6vPA4QTwR7408zCxFckOBYJBpOT62jR2CElEUc+FIKe1x ukgb9sDdd+p1AJXlAReaDftNk9YkWuVhIhlc4RLs5afjKMYclyGMHr7xah6Ye/PVme7QTq y01HEcnL0wGR7BtY2JsSsb0p2Oi0cJU= X-MC-Unique: YtVkMZwNP-WuL4DdxrAK8g-1 From: Thomas Huth To: =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Cc: Ani Sinha , Richard Henderson , Paolo Bonzini , "Daniel P . Berrange" , John Snow , qemu-ppc@nongnu.org, Fabiano Rosas Subject: [PATCH v2 17/23] tests/functional: Convert most ppc avocado tests into standalone tests Date: Wed, 24 Jul 2024 19:52:35 +0200 Message-ID: <20240724175248.1389201-18-thuth@redhat.com> In-Reply-To: <20240724175248.1389201-1-thuth@redhat.com> References: <20240724175248.1389201-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.15 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: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.136, 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, 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: 1721843766400116600 Nothing thrilling in here, just straight forward conversions. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 8 ++-- tests/functional/meson.build | 10 +++++ .../test_ppc64_powernv.py} | 45 +++++-------------- .../test_ppc64_pseries.py} | 45 +++++-------------- .../test_ppc_40p.py} | 37 ++++++--------- .../test_ppc_mpc8544ds.py} | 19 ++++---- .../test_ppc_virtex_ml507.py} | 19 ++++---- 7 files changed, 71 insertions(+), 112 deletions(-) rename tests/{avocado/ppc_powernv.py =3D> functional/test_ppc64_powernv.py= } (80%) mode change 100644 =3D> 100755 rename tests/{avocado/ppc_pseries.py =3D> functional/test_ppc64_pseries.py= } (83%) mode change 100644 =3D> 100755 rename tests/{avocado/ppc_prep_40p.py =3D> functional/test_ppc_40p.py} (78= %) mode change 100644 =3D> 100755 rename tests/{avocado/ppc_mpc8544ds.py =3D> functional/test_ppc_mpc8544ds.= py} (75%) mode change 100644 =3D> 100755 rename tests/{avocado/ppc_virtex_ml507.py =3D> functional/test_ppc_virtex_= ml507.py} (78%) mode change 100644 =3D> 100755 diff --git a/MAINTAINERS b/MAINTAINERS index 02cf39e94d..cec9a209a9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1449,7 +1449,7 @@ L: qemu-ppc@nongnu.org S: Orphan F: hw/ppc/mpc8544ds.c F: hw/ppc/mpc8544_guts.c -F: tests/avocado/ppc_mpc8544ds.py +F: tests/functional/test_ppc_mpc8544ds.py =20 New World (mac99) M: Mark Cave-Ayland @@ -1502,7 +1502,7 @@ F: hw/dma/i82374.c F: hw/rtc/m48t59-isa.c F: include/hw/isa/pc87312.h F: include/hw/rtc/m48t59.h -F: tests/avocado/ppc_prep_40p.py +F: tests/functional/test_ppc_40p.py =20 sPAPR (pseries) M: Nicholas Piggin @@ -1526,7 +1526,7 @@ F: tests/qtest/spapr* F: tests/qtest/libqos/*spapr* F: tests/qtest/rtas* F: tests/qtest/libqos/rtas* -F: tests/avocado/ppc_pseries.py +F: tests/functional/test_ppc64_pseries.py F: tests/avocado/ppc_hv_tests.py =20 PowerNV (Non-Virtualized) @@ -1558,7 +1558,7 @@ M: Edgar E. Iglesias L: qemu-ppc@nongnu.org S: Odd Fixes F: hw/ppc/virtex_ml507.c -F: tests/avocado/ppc_virtex_ml507.py +F: tests/functional/test_ppc_virtex_ml507.py =20 sam460ex M: BALATON Zoltan diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 91fe835e8f..510dddfc49 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -12,6 +12,8 @@ endif # Timeouts for individual tests that can be slow e.g. with debugging enabl= ed test_timeouts =3D { 'netdev_ethtool' : 180, + 'ppc_40p' : 240, + 'ppc64_powernv' : 120, 's390x_ccw_virtio' : 180, } =20 @@ -52,7 +54,15 @@ tests_ppc_quick =3D [ =20 tests_ppc_thorough =3D [ 'ppc_405', + 'ppc_40p', 'ppc_bamboo', + 'ppc_mpc8544ds', + 'ppc_virtex_ml507', +] + +tests_ppc64_thorough =3D [ + 'ppc64_powernv', + 'ppc64_pseries', ] =20 tests_riscv32_quick =3D [ diff --git a/tests/avocado/ppc_powernv.py b/tests/functional/test_ppc64_pow= ernv.py old mode 100644 new mode 100755 similarity index 80% rename from tests/avocado/ppc_powernv.py rename to tests/functional/test_ppc64_powernv.py index 4342941d5d..f3203e5609 --- a/tests/avocado/ppc_powernv.py +++ b/tests/functional/test_ppc64_powernv.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 +# # Test that Linux kernel boots on ppc powernv machines and check the conso= le # # Copyright (c) 2018, 2020 Red Hat, Inc. @@ -5,9 +7,8 @@ # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. =20 -from avocado.utils import archive -from avocado_qemu import QemuSystemTest -from avocado_qemu import wait_for_console_pattern +from qemu_test import QemuSystemTest +from qemu_test import wait_for_console_pattern =20 class powernvMachine(QemuSystemTest): =20 @@ -30,23 +31,13 @@ def do_test_linux_boot(self, command_line =3D KERNEL_CO= MMON_COMMAND_LINE): self.vm.launch() =20 def test_linux_boot(self): - """ - :avocado: tags=3Darch:ppc64 - :avocado: tags=3Dmachine:powernv - :avocado: tags=3Daccel:tcg - """ - + self.set_machine('powernv') self.do_test_linux_boot() console_pattern =3D 'VFS: Cannot open root device' wait_for_console_pattern(self, console_pattern, self.panic_message) =20 def test_linux_smp_boot(self): - """ - :avocado: tags=3Darch:ppc64 - :avocado: tags=3Dmachine:powernv - :avocado: tags=3Daccel:tcg - """ - + self.set_machine('powernv') self.vm.add_args('-smp', '4') self.do_test_linux_boot() console_pattern =3D 'smp: Brought up 1 node, 4 CPUs' @@ -54,12 +45,7 @@ def test_linux_smp_boot(self): wait_for_console_pattern(self, self.good_message, self.panic_messa= ge) =20 def test_linux_smp_hpt_boot(self): - """ - :avocado: tags=3Darch:ppc64 - :avocado: tags=3Dmachine:powernv - :avocado: tags=3Daccel:tcg - """ - + self.set_machine('powernv') self.vm.add_args('-smp', '4') self.do_test_linux_boot(self.KERNEL_COMMON_COMMAND_LINE + 'disable_radix') @@ -70,12 +56,7 @@ def test_linux_smp_hpt_boot(self): wait_for_console_pattern(self, self.good_message, self.panic_messa= ge) =20 def test_linux_smt_boot(self): - """ - :avocado: tags=3Darch:ppc64 - :avocado: tags=3Dmachine:powernv - :avocado: tags=3Daccel:tcg - """ - + self.set_machine('powernv') self.vm.add_args('-smp', '4,threads=3D4') self.do_test_linux_boot() console_pattern =3D 'CPU maps initialized for 4 threads per core' @@ -85,12 +66,7 @@ def test_linux_smt_boot(self): wait_for_console_pattern(self, self.good_message, self.panic_messa= ge) =20 def test_linux_big_boot(self): - """ - :avocado: tags=3Darch:ppc64 - :avocado: tags=3Dmachine:powernv - :avocado: tags=3Daccel:tcg - """ - + self.set_machine('powernv') self.vm.add_args('-smp', '16,threads=3D4,cores=3D2,sockets=3D2') =20 # powernv does not support NUMA @@ -100,3 +76,6 @@ def test_linux_big_boot(self): console_pattern =3D 'smp: Brought up 2 nodes, 16 CPUs' wait_for_console_pattern(self, console_pattern, self.panic_message) wait_for_console_pattern(self, self.good_message, self.panic_messa= ge) + +if __name__ =3D=3D '__main__': + QemuSystemTest.main() diff --git a/tests/avocado/ppc_pseries.py b/tests/functional/test_ppc64_pse= ries.py old mode 100644 new mode 100755 similarity index 83% rename from tests/avocado/ppc_pseries.py rename to tests/functional/test_ppc64_pseries.py index 74aaa4ac4a..9521ed80a5 --- a/tests/avocado/ppc_pseries.py +++ b/tests/functional/test_ppc64_pseries.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 +# # Test that Linux kernel boots on ppc machines and check the console # # Copyright (c) 2018, 2020 Red Hat, Inc. @@ -5,9 +7,8 @@ # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. =20 -from avocado.utils import archive -from avocado_qemu import QemuSystemTest -from avocado_qemu import wait_for_console_pattern +from qemu_test import QemuSystemTest +from qemu_test import wait_for_console_pattern =20 class pseriesMachine(QemuSystemTest): =20 @@ -29,32 +30,20 @@ def do_test_ppc64_linux_boot(self, kernel_command_line = =3D KERNEL_COMMON_COMMAND_L self.vm.launch() =20 def test_ppc64_vof_linux_boot(self): - """ - :avocado: tags=3Darch:ppc64 - :avocado: tags=3Dmachine:pseries - """ - + self.set_machine('pseries') self.vm.add_args('-machine', 'x-vof=3Don') self.do_test_ppc64_linux_boot() console_pattern =3D 'VFS: Cannot open root device' wait_for_console_pattern(self, console_pattern, self.panic_message) =20 def test_ppc64_linux_boot(self): - """ - :avocado: tags=3Darch:ppc64 - :avocado: tags=3Dmachine:pseries - """ - + self.set_machine('pseries') self.do_test_ppc64_linux_boot() console_pattern =3D 'VFS: Cannot open root device' wait_for_console_pattern(self, console_pattern, self.panic_message) =20 def test_ppc64_linux_smp_boot(self): - """ - :avocado: tags=3Darch:ppc64 - :avocado: tags=3Dmachine:pseries - """ - + self.set_machine('pseries') self.vm.add_args('-smp', '4') self.do_test_ppc64_linux_boot() console_pattern =3D 'smp: Brought up 1 node, 4 CPUs' @@ -62,11 +51,7 @@ def test_ppc64_linux_smp_boot(self): wait_for_console_pattern(self, self.good_message, self.panic_messa= ge) =20 def test_ppc64_linux_hpt_smp_boot(self): - """ - :avocado: tags=3Darch:ppc64 - :avocado: tags=3Dmachine:pseries - """ - + self.set_machine('pseries') self.vm.add_args('-smp', '4') self.do_test_ppc64_linux_boot(self.KERNEL_COMMON_COMMAND_LINE + 'disable_radix') @@ -77,11 +62,6 @@ def test_ppc64_linux_hpt_smp_boot(self): wait_for_console_pattern(self, self.good_message, self.panic_messa= ge) =20 def test_ppc64_linux_smt_boot(self): - """ - :avocado: tags=3Darch:ppc64 - :avocado: tags=3Dmachine:pseries - """ - self.vm.add_args('-smp', '4,threads=3D4') self.do_test_ppc64_linux_boot() console_pattern =3D 'CPU maps initialized for 4 threads per core' @@ -91,11 +71,7 @@ def test_ppc64_linux_smt_boot(self): wait_for_console_pattern(self, self.good_message, self.panic_messa= ge) =20 def test_ppc64_linux_big_boot(self): - """ - :avocado: tags=3Darch:ppc64 - :avocado: tags=3Dmachine:pseries - """ - + self.set_machine('pseries') self.vm.add_args('-smp', '16,threads=3D4,cores=3D2,sockets=3D2') self.vm.add_args('-m', '512M', '-object', 'memory-backend-ram,size=3D256M,id=3Dm= 0', @@ -108,3 +84,6 @@ def test_ppc64_linux_big_boot(self): console_pattern =3D 'smp: Brought up 2 nodes, 16 CPUs' wait_for_console_pattern(self, console_pattern, self.panic_message) wait_for_console_pattern(self, self.good_message, self.panic_messa= ge) + +if __name__ =3D=3D '__main__': + QemuSystemTest.main() diff --git a/tests/avocado/ppc_prep_40p.py b/tests/functional/test_ppc_40p.= py old mode 100644 new mode 100755 similarity index 78% rename from tests/avocado/ppc_prep_40p.py rename to tests/functional/test_ppc_40p.py index d4f1eb7e1d..c3f713dc51 --- a/tests/avocado/ppc_prep_40p.py +++ b/tests/functional/test_ppc_40p.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 +# # Functional test that boots a PReP/40p machine and checks its serial cons= ole. # # Copyright (c) Philippe Mathieu-Daud=C3=A9 @@ -7,9 +9,9 @@ =20 import os =20 -from avocado import skipUnless -from avocado_qemu import QemuSystemTest -from avocado_qemu import wait_for_console_pattern +from unittest import skipUnless +from qemu_test import QemuSystemTest +from qemu_test import wait_for_console_pattern =20 =20 class IbmPrep40pMachine(QemuSystemTest): @@ -23,13 +25,7 @@ class IbmPrep40pMachine(QemuSystemTest): # restricted by GSA ADP Schedule Contract with IBM Corp. @skipUnless(os.getenv('AVOCADO_ALLOW_UNTRUSTED_CODE'), 'untrusted code= ') def test_factory_firmware_and_netbsd(self): - """ - :avocado: tags=3Darch:ppc - :avocado: tags=3Dmachine:40p - :avocado: tags=3Dos:netbsd - :avocado: tags=3Dslowness:high - :avocado: tags=3Daccel:tcg - """ + self.set_machine('40p') self.require_accelerator("tcg") bios_url =3D ('http://ftpmirror.your.org/pub/misc/' 'ftp.software.ibm.com/rs6000/firmware/' @@ -50,11 +46,7 @@ def test_factory_firmware_and_netbsd(self): wait_for_console_pattern(self, 'Model: IBM PPS Model 6015') =20 def test_openbios_192m(self): - """ - :avocado: tags=3Darch:ppc - :avocado: tags=3Dmachine:40p - :avocado: tags=3Daccel:tcg - """ + self.set_machine('40p') self.require_accelerator("tcg") self.vm.set_console() self.vm.add_args('-m', '192') # test fw_cfg @@ -65,21 +57,18 @@ def test_openbios_192m(self): wait_for_console_pattern(self, '>> CPU type PowerPC,604') =20 def test_openbios_and_netbsd(self): - """ - :avocado: tags=3Darch:ppc - :avocado: tags=3Dmachine:40p - :avocado: tags=3Dos:netbsd - :avocado: tags=3Daccel:tcg - """ + self.set_machine('40p') self.require_accelerator("tcg") drive_url =3D ('https://archive.netbsd.org/pub/NetBSD-archive/' 'NetBSD-7.1.2/iso/NetBSD-7.1.2-prep.iso') - drive_hash =3D 'ac6fa2707d888b36d6fa64de6e7fe48e' - drive_path =3D self.fetch_asset(drive_url, asset_hash=3Ddrive_hash, - algorithm=3D'md5') + drive_hash =3D 'cc7cb290b06aaa839362deb7bd9f417ac5015557db24088508= 330f76c3f825ec' + drive_path =3D self.fetch_asset(drive_url, asset_hash=3Ddrive_hash) self.vm.set_console() self.vm.add_args('-cdrom', drive_path, '-boot', 'd') =20 self.vm.launch() wait_for_console_pattern(self, 'NetBSD/prep BOOT, Revision 1.9') + +if __name__ =3D=3D '__main__': + QemuSystemTest.main() diff --git a/tests/avocado/ppc_mpc8544ds.py b/tests/functional/test_ppc_mpc= 8544ds.py old mode 100644 new mode 100755 similarity index 75% rename from tests/avocado/ppc_mpc8544ds.py rename to tests/functional/test_ppc_mpc8544ds.py index b599fb1cc9..6817ed8091 --- a/tests/avocado/ppc_mpc8544ds.py +++ b/tests/functional/test_ppc_mpc8544ds.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 +# # Test that Linux kernel boots on ppc machines and check the console # # Copyright (c) 2018, 2020 Red Hat, Inc. @@ -5,9 +7,9 @@ # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. =20 -from avocado.utils import archive -from avocado_qemu import QemuSystemTest -from avocado_qemu import wait_for_console_pattern +from qemu_test.utils import archive_extract +from qemu_test import QemuSystemTest +from qemu_test import wait_for_console_pattern =20 class Mpc8544dsMachine(QemuSystemTest): =20 @@ -16,19 +18,18 @@ class Mpc8544dsMachine(QemuSystemTest): panic_message =3D 'Kernel panic - not syncing' =20 def test_ppc_mpc8544ds(self): - """ - :avocado: tags=3Darch:ppc - :avocado: tags=3Dmachine:mpc8544ds - :avocado: tags=3Daccel:tcg - """ self.require_accelerator("tcg") + self.set_machine('mpc8544ds') tar_url =3D ('https://qemu-advcal.gitlab.io' '/qac-best-of-multiarch/download/day04.tar.xz') tar_hash =3D 'f46724d281a9f30fa892d458be7beb7d34dc25f9' file_path =3D self.fetch_asset(tar_url, asset_hash=3Dtar_hash) - archive.extract(file_path, self.workdir) + archive_extract(file_path, self.workdir, member=3D'creek/creek.bin= ') self.vm.set_console() self.vm.add_args('-kernel', self.workdir + '/creek/creek.bin') self.vm.launch() wait_for_console_pattern(self, 'QEMU advent calendar 2020', self.panic_message) + +if __name__ =3D=3D '__main__': + QemuSystemTest.main() diff --git a/tests/avocado/ppc_virtex_ml507.py b/tests/functional/test_ppc_= virtex_ml507.py old mode 100644 new mode 100755 similarity index 78% rename from tests/avocado/ppc_virtex_ml507.py rename to tests/functional/test_ppc_virtex_ml507.py index a73f8ae396..6d1f1455be --- a/tests/avocado/ppc_virtex_ml507.py +++ b/tests/functional/test_ppc_virtex_ml507.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 +# # Test that Linux kernel boots on ppc machines and check the console # # Copyright (c) 2018, 2020 Red Hat, Inc. @@ -5,9 +7,9 @@ # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. =20 -from avocado.utils import archive -from avocado_qemu import QemuSystemTest -from avocado_qemu import wait_for_console_pattern +from qemu_test.utils import archive_extract +from qemu_test import QemuSystemTest +from qemu_test import wait_for_console_pattern =20 class VirtexMl507Machine(QemuSystemTest): =20 @@ -16,17 +18,13 @@ class VirtexMl507Machine(QemuSystemTest): panic_message =3D 'Kernel panic - not syncing' =20 def test_ppc_virtex_ml507(self): - """ - :avocado: tags=3Darch:ppc - :avocado: tags=3Dmachine:virtex-ml507 - :avocado: tags=3Daccel:tcg - """ self.require_accelerator("tcg") + self.set_machine('virtex-ml507') tar_url =3D ('https://qemu-advcal.gitlab.io' '/qac-best-of-multiarch/download/day08.tar.xz') tar_hash =3D '74c68f5af7a7b8f21c03097b298f3bb77ff52c1f' file_path =3D self.fetch_asset(tar_url, asset_hash=3Dtar_hash) - archive.extract(file_path, self.workdir) + archive_extract(file_path, self.workdir) self.vm.set_console() self.vm.add_args('-kernel', self.workdir + '/hippo/hippo.linux', '-dtb', self.workdir + '/hippo/virtex440-ml507.dt= b', @@ -34,3 +32,6 @@ def test_ppc_virtex_ml507(self): self.vm.launch() wait_for_console_pattern(self, 'QEMU advent calendar 2020', self.panic_message) + +if __name__ =3D=3D '__main__': + QemuSystemTest.main() --=20 2.45.2