From nobody Sat Nov 23 22:50:46 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=1728667083; cv=none; d=zohomail.com; s=zohoarc; b=nXuSFtfO33T2IELtL9ZnBJSXmPv5THW9Fws08gUCLPXFAiQVdqXwjcP2WuhCbdToRW1pPT7OhWFMKje+Pv66Q0hHUcXDPY/NkF+v8E8vYnEum8O+dmVTLVF3QaRHkUUiw4kSfigc52PQuDTwzofvhamp/bGE8JNHG6/09ZDb1Ic= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728667083; 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=OUgsTaBnHviGRvhwISvHm7Ex/ZTmQ4HeHoZthDt3Qsg=; b=Mb+uo9T1uwl3mnjEJdIOiaRZYtPcDiTeLvHuBF5nLSnZkzz/6YxqZu7KMnplLlE/Kh27AWrRDDSRA28y1x/dI0vmGIVlYK/854OB3tL0jaraswRk0PxNQO6Ml1BVRdvYpdXONhIFJN/MYZWQCb4FlYzqvJzUVadsLGQks0MYm4o= 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 1728667083098416.65281202906954; Fri, 11 Oct 2024 10:18:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szJDN-0000hx-BB; Fri, 11 Oct 2024 13:14:09 -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 1szJ7I-0004AI-Bn for qemu-devel@nongnu.org; Fri, 11 Oct 2024 13:07:54 -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 1szFYt-0004J1-NJ for qemu-devel@nongnu.org; Fri, 11 Oct 2024 09:20:10 -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-199-bneyTQ9kM32OWukVG5Iscw-1; Fri, 11 Oct 2024 09:20:04 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 2A4471955F29; Fri, 11 Oct 2024 13:20:03 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.77]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 264E91956052; Fri, 11 Oct 2024 13:19:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728652806; 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=OUgsTaBnHviGRvhwISvHm7Ex/ZTmQ4HeHoZthDt3Qsg=; b=EKDK3tBI+dGI/XsLBctGcvMpltkYtFLnO2jEflgpXnisfL+YqiZYh4AZxbocE7miSZqay9 3N4wSvQVNrrZxJQg9EMF2O8//gWXX65leenogo3VwpKWWizIu3thhWL/AgnZuVSrevUNpk fdLOo7Ug7/bCz9OJvMVQeAG+jdeOjio= X-MC-Unique: bneyTQ9kM32OWukVG5Iscw-1 From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Cc: Guenter Roeck , Yoshinori Sato , Magnus Damm , qemu-arm@nongnu.org, Thomas Huth Subject: [PATCH 01/17] tests/functional: Add a base class for the TuxRun tests Date: Fri, 11 Oct 2024 15:19:18 +0200 Message-ID: <20241011131937.377223-2-thuth@redhat.com> In-Reply-To: <20241011131937.377223-1-thuth@redhat.com> References: <20241011131937.377223-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.17 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.15, 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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1728667085191116600 Add a base class for the TuxRun tests, based on the code from tests/avocado/tuxrun_baselines.py (the test have to be put into separate file in the following commits, depending on the target architecture that gets tested). Signed-off-by: Thomas Huth --- tests/functional/qemu_test/tuxruntest.py | 158 +++++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 tests/functional/qemu_test/tuxruntest.py diff --git a/tests/functional/qemu_test/tuxruntest.py b/tests/functional/qe= mu_test/tuxruntest.py new file mode 100644 index 0000000000..904da6f609 --- /dev/null +++ b/tests/functional/qemu_test/tuxruntest.py @@ -0,0 +1,158 @@ +# Functional test that boots known good tuxboot images the same way +# that tuxrun (www.tuxrun.org) does. This tool is used by things like +# the LKFT project to run regression tests on kernels. +# +# Copyright (c) 2023 Linaro Ltd. +# +# Author: +# Alex Benn=C3=A9e +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os +import time + +from qemu_test import QemuSystemTest +from qemu_test import exec_command, exec_command_and_wait_for_pattern +from qemu_test import wait_for_console_pattern +from qemu_test import has_cmd, run_cmd, get_qemu_img + +class TuxRunBaselineTest(QemuSystemTest): + + KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0' + # Tests are ~10-40s, allow for --debug/--enable-gcov overhead + timeout =3D 100 + + def get_tag(self, tagname, default=3DNone): + """ + Get the metadata tag or return the default. + """ + utag =3D self._get_unique_tag_val(tagname) + print(f"{tagname}/{default} -> {utag}") + if utag: + return utag + + return default + + def setUp(self): + super().setUp() + + # We need zstd for all the tuxrun tests + # See https://github.com/avocado-framework/avocado/issues/5609 + (has_zstd, msg) =3D has_cmd('zstd') + if has_zstd is False: + self.skipTest(msg) + self.zstd =3D 'zstd' + + # Pre-init TuxRun specific settings: Most machines work with + # reasonable defaults but we sometimes need to tweak the + # config. To avoid open coding everything we store all these + # details in the metadata for each test. + + # The tuxboot tag matches the root directory + self.tuxboot =3D self.arch + + # Most Linux's use ttyS0 for their serial port + self.console =3D "ttyS0" + + # Does the machine shutdown QEMU nicely on "halt" + self.wait_for_shutdown =3D True + + self.root =3D "vda" + + # Occasionally we need extra devices to hook things up + self.extradev =3D None + + self.qemu_img =3D get_qemu_img(self) + + def wait_for_console_pattern(self, success_message, vm=3DNone): + wait_for_console_pattern(self, success_message, + failure_message=3D'Kernel panic - not syn= cing', + vm=3Dvm) + + def fetch_tuxrun_assets(self, kernel_asset, rootfs_asset, dtb_asset=3D= None): + """ + Fetch the TuxBoot assets. + """ + kernel_image =3D kernel_asset.fetch() + disk_image_zst =3D rootfs_asset.fetch() + + run_cmd([self.zstd, "-f", "-d", disk_image_zst, + "-o", self.workdir + "/rootfs.ext4"]) + + dtb =3D dtb_asset.fetch() if dtb_asset is not None else None + + return (kernel_image, self.workdir + "/rootfs.ext4", dtb) + + def prepare_run(self, kernel, disk, drive, dtb=3DNone, console_index= =3D0): + """ + Setup to run and add the common parameters to the system + """ + self.vm.set_console(console_index=3Dconsole_index) + + # all block devices are raw ext4's + blockdev =3D "driver=3Draw,file.driver=3Dfile," \ + + f"file.filename=3D{disk},node-name=3Dhd0" + + kcmd_line =3D self.KERNEL_COMMON_COMMAND_LINE + kcmd_line +=3D f" root=3D/dev/{self.root}" + kcmd_line +=3D f" console=3D{self.console}" + + self.vm.add_args('-kernel', kernel, + '-append', kcmd_line, + '-blockdev', blockdev) + + # Sometimes we need extra devices attached + if self.extradev: + self.vm.add_args('-device', self.extradev) + + self.vm.add_args('-device', + f"{drive},drive=3Dhd0") + + # Some machines need an explicit DTB + if dtb: + self.vm.add_args('-dtb', dtb) + + def run_tuxtest_tests(self, haltmsg): + """ + Wait for the system to boot up, wait for the login prompt and + then do a few things on the console. Trigger a shutdown and + wait to exit cleanly. + """ + self.wait_for_console_pattern("Welcome to TuxTest") + time.sleep(0.2) + exec_command(self, 'root') + time.sleep(0.2) + exec_command(self, 'cat /proc/interrupts') + time.sleep(0.1) + exec_command(self, 'cat /proc/self/maps') + time.sleep(0.1) + exec_command(self, 'uname -a') + time.sleep(0.1) + exec_command_and_wait_for_pattern(self, 'halt', haltmsg) + + # Wait for VM to shut down gracefully if it can + if self.wait_for_shutdown: + self.vm.wait() + else: + self.vm.shutdown() + + def common_tuxrun(self, + kernel_asset, + rootfs_asset, + dtb_asset=3DNone, + drive=3D"virtio-blk-device", + haltmsg=3D"reboot: System halted", + console_index=3D0): + """ + Common path for LKFT tests. Unless we need to do something + special with the command line we can process most things using + the tag metadata. + """ + (kernel, disk, dtb) =3D self.fetch_tuxrun_assets(kernel_asset, roo= tfs_asset, + dtb_asset) + + self.prepare_run(kernel, disk, drive, dtb, console_index) + self.vm.launch() + self.run_tuxtest_tests(haltmsg) + os.remove(disk) --=20 2.46.1 From nobody Sat Nov 23 22:50:46 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=1728668267; cv=none; d=zohomail.com; s=zohoarc; b=cVDbbsUd8pK0tEJSQm322F77QrNpGHPpEPeIOI/GhHut39RdXwumWnqPG4EfENAAhUwu6pAMcPnDxt8Qjb78+ZZe2/Q4dAqIrl/YRQ77Ywv3zOINhD7DvZoe97nB14+cNVwMDjpYUem6J+N8V6bwcu1KHwTQ9ueSv2xSZ5f5h0w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728668267; 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=iExu0BKUjo7aDQdE9TBBJh4waWrgjWK9Bk9xyIATP/0=; b=VwuMNcThOIZrFuYhW7SQ2FSJEcym44broUB95VsobdeXzvIAVA3bTNaN/arStVV3fP/BMfD0QpQFf0xQjeOM0kxZY+ljDlVWem7sFPrVpIjg9HLkNQa+llp41fY65oaaA7AzA29Cs5egaYFHciKjkXOXugZ6QinMmUHQkxcgCqc= 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 1728668267938610.3199855053438; Fri, 11 Oct 2024 10:37:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szJEX-0002Ej-8e; Fri, 11 Oct 2024 13:15: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 1szJ7B-0003Vw-Bi for qemu-devel@nongnu.org; Fri, 11 Oct 2024 13:07:50 -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 1szFYy-0004Jt-KF for qemu-devel@nongnu.org; Fri, 11 Oct 2024 09:20:14 -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-479-g6v04WiFPy2gb6K7UpXmEg-1; Fri, 11 Oct 2024 09:20:08 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 E80711955F3F; Fri, 11 Oct 2024 13:20:06 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.77]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E0CD31955E8F; Fri, 11 Oct 2024 13:20:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728652812; 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=iExu0BKUjo7aDQdE9TBBJh4waWrgjWK9Bk9xyIATP/0=; b=fdTB8PMw7Fjr0LatQ6qH9xA9K5q4K3crOdtL+TsMKskcaFe2Rz++Uo2mMuF6P+OmQMa5J6 rBakbltG9BPqpNuLREmU+4aRO8rMhE0FvEeYMrlj3zEJWaaAJRcVnXXJaEAKEE2LyGMPyD ackHRr4qaBLOLTJ/iG5Tb9AhOgPxuoU= X-MC-Unique: g6v04WiFPy2gb6K7UpXmEg-1 From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Cc: Guenter Roeck , Yoshinori Sato , Magnus Damm , qemu-arm@nongnu.org, Thomas Huth Subject: [PATCH 02/17] tests/functional: Convert the Avocado ppc64 tuxrun tests Date: Fri, 11 Oct 2024 15:19:19 +0200 Message-ID: <20241011131937.377223-3-thuth@redhat.com> In-Reply-To: <20241011131937.377223-1-thuth@redhat.com> References: <20241011131937.377223-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.17 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.15, 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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1728668269575116600 Move the tests to a new file so that they can be run via qemu-system-ppc64 in the functional framework. Signed-off-by: Thomas Huth --- tests/avocado/tuxrun_baselines.py | 92 --------------------- tests/functional/test_ppc64_tuxrun.py | 110 ++++++++++++++++++++++++++ 2 files changed, 110 insertions(+), 92 deletions(-) create mode 100755 tests/functional/test_ppc64_tuxrun.py diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_basel= ines.py index 736e4aa289..56c8bdb2dc 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -182,63 +182,6 @@ def common_tuxrun(self, self.vm.launch() self.run_tuxtest_tests(haltmsg) =20 - def ppc64_common_tuxrun(self, sums, prefix): - # add device args to command line. - self.require_netdev('user') - self.vm.add_args('-netdev', 'user,id=3Dvnet,hostfwd=3D:127.0.0.1:0= -:22', - '-device', 'virtio-net,netdev=3Dvnet') - self.vm.add_args('-netdev', '{"type":"user","id":"hostnet0"}', - '-device', '{"driver":"virtio-net-pci","netdev":' - '"hostnet0","id":"net0","mac":"52:54:00:4c:e3:86"= ,' - '"bus":"pci.0","addr":"0x9"}') - self.vm.add_args('-device', '{"driver":"qemu-xhci","p2":15,"p3":15= ,' - '"id":"usb","bus":"pci.0","addr":"0x2"}') - self.vm.add_args('-device', '{"driver":"virtio-scsi-pci","id":"scs= i0"' - ',"bus":"pci.0","addr":"0x3"}') - self.vm.add_args('-device', '{"driver":"virtio-serial-pci","id":' - '"virtio-serial0","bus":"pci.0","addr":"0x4"}') - self.vm.add_args('-device', '{"driver":"scsi-cd","bus":"scsi0.0"' - ',"channel":0,"scsi-id":0,"lun":0,"device_id":' - '"drive-scsi0-0-0-0","id":"scsi0-0-0-0"}') - self.vm.add_args('-device', '{"driver":"virtio-balloon-pci",' - '"id":"balloon0","bus":"pci.0","addr":"0x6"}') - self.vm.add_args('-audiodev', '{"id":"audio1","driver":"none"}') - self.vm.add_args('-device', '{"driver":"usb-tablet","id":"input0"' - ',"bus":"usb.0","port":"1"}') - self.vm.add_args('-device', '{"driver":"usb-kbd","id":"input1"' - ',"bus":"usb.0","port":"2"}') - self.vm.add_args('-device', '{"driver":"VGA","id":"video0",' - '"vgamem_mb":16,"bus":"pci.0","addr":"0x7"}') - self.vm.add_args('-object', '{"qom-type":"rng-random","id":"objrng= 0"' - ',"filename":"/dev/urandom"}', - '-device', '{"driver":"virtio-rng-pci","rng":"obj= rng0"' - ',"id":"rng0","bus":"pci.0","addr":"0x8"}') - self.vm.add_args('-object', '{"qom-type":"cryptodev-backend-builti= n",' - '"id":"objcrypto0","queues":1}', - '-device', '{"driver":"virtio-crypto-pci",' - '"cryptodev":"objcrypto0","id":"crypto0","bus"' - ':"pci.0","addr":"0xa"}') - self.vm.add_args('-device', '{"driver":"spapr-pci-host-bridge"' - ',"index":1,"id":"pci.1"}') - self.vm.add_args('-device', '{"driver":"spapr-vscsi","id":"scsi1"' - ',"reg":12288}') - self.vm.add_args('-m', '2G,slots=3D32,maxmem=3D4G', - '-object', 'memory-backend-ram,id=3Dram1,size=3D1= G', - '-device', 'pc-dimm,id=3Ddimm1,memdev=3Dram1') - - # Create a temporary qcow2 and launch the test-case - with tempfile.NamedTemporaryFile(prefix=3Dprefix, - suffix=3D'.qcow2') as qcow2: - process.run(self.qemu_img + ' create -f qcow2 ' + - qcow2.name + ' 1G') - - self.vm.add_args('-drive', 'file=3D' + qcow2.name + - ',format=3Dqcow2,if=3Dnone,id=3D' - 'drive-virtio-disk1', - '-device', 'virtio-blk-pci,bus=3Dpci.0,' - 'addr=3D0xb,drive=3Ddrive-virtio-disk1,id=3Dvirti= o-disk1' - ',bootindex=3D2') - self.common_tuxrun(csums=3Dsums, drive=3D"scsi-hd") =20 # # The tests themselves. The configuration is derived from how @@ -436,41 +379,6 @@ def test_ppc32(self): =20 self.common_tuxrun(csums=3Dsums, drive=3D"virtio-blk-pci") =20 - def test_ppc64(self): - """ - :avocado: tags=3Darch:ppc64 - :avocado: tags=3Dmachine:pseries - :avocado: tags=3Dcpu:POWER10 - :avocado: tags=3Dendian:big - :avocado: tags=3Dconsole:hvc0 - :avocado: tags=3Dtuxboot:ppc64 - :avocado: tags=3Dimage:vmlinux - :avocado: tags=3Dextradev:driver=3Dspapr-vscsi - :avocado: tags=3Droot:sda - """ - sums =3D { "rootfs.ext4.zst" : - "1d953e81a4379e537fc8e41e05a0a59d9b453eef97aa03d47866c6c4= 5b00bdff", - "vmlinux" : - "f22a9b9e924174a4c199f4c7e5d91a2339fcfe51c6eafd0907dc3e09= b64ab728" } - self.ppc64_common_tuxrun(sums, prefix=3D'tuxrun_ppc64_') - - def test_ppc64le(self): - """ - :avocado: tags=3Darch:ppc64 - :avocado: tags=3Dmachine:pseries - :avocado: tags=3Dcpu:POWER10 - :avocado: tags=3Dconsole:hvc0 - :avocado: tags=3Dtuxboot:ppc64le - :avocado: tags=3Dimage:vmlinux - :avocado: tags=3Dextradev:driver=3Dspapr-vscsi - :avocado: tags=3Droot:sda - """ - sums =3D { "rootfs.ext4.zst" : - "b442678c93fb8abe1f7d3bfa20556488de6b475c22c8fed363f42cf8= 1a0a3906", - "vmlinux" : - "979eb61b445a010fb13e2b927126991f8ceef9c590fa2be0996c00e2= 93e80cf2" } - self.ppc64_common_tuxrun(sums, prefix=3D'tuxrun_ppc64le_') - def test_riscv32(self): """ :avocado: tags=3Darch:riscv32 diff --git a/tests/functional/test_ppc64_tuxrun.py b/tests/functional/test_= ppc64_tuxrun.py new file mode 100755 index 0000000000..552b53c97a --- /dev/null +++ b/tests/functional/test_ppc64_tuxrun.py @@ -0,0 +1,110 @@ +#!/usr/bin/env python3 +# +# Functional test that boots known good tuxboot images the same way +# that tuxrun (www.tuxrun.org) does. This tool is used by things like +# the LKFT project to run regression tests on kernels. +# +# Copyright (c) 2023 Linaro Ltd. +# +# Author: +# Alex Benn=C3=A9e +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import tempfile + +from qemu_test import run_cmd, Asset +from qemu_test.tuxruntest import TuxRunBaselineTest + +class TuxRunPPC64Test(TuxRunBaselineTest): + + def ppc64_common_tuxrun(self, kernel_asset, rootfs_asset, prefix): + self.set_machine('pseries') + self.cpu=3D'POWER10' + self.console=3D'hvc0' + self.root=3D'sda' + self.extradev=3D'spapr-vscsi' + # add device args to command line. + self.require_netdev('user') + self.vm.add_args('-netdev', 'user,id=3Dvnet,hostfwd=3D:127.0.0.1:0= -:22', + '-device', 'virtio-net,netdev=3Dvnet') + self.vm.add_args('-netdev', '{"type":"user","id":"hostnet0"}', + '-device', '{"driver":"virtio-net-pci","netdev":' + '"hostnet0","id":"net0","mac":"52:54:00:4c:e3:86"= ,' + '"bus":"pci.0","addr":"0x9"}') + self.vm.add_args('-device', '{"driver":"qemu-xhci","p2":15,"p3":15= ,' + '"id":"usb","bus":"pci.0","addr":"0x2"}') + self.vm.add_args('-device', '{"driver":"virtio-scsi-pci","id":"scs= i0"' + ',"bus":"pci.0","addr":"0x3"}') + self.vm.add_args('-device', '{"driver":"virtio-serial-pci","id":' + '"virtio-serial0","bus":"pci.0","addr":"0x4"}') + self.vm.add_args('-device', '{"driver":"scsi-cd","bus":"scsi0.0"' + ',"channel":0,"scsi-id":0,"lun":0,"device_id":' + '"drive-scsi0-0-0-0","id":"scsi0-0-0-0"}') + self.vm.add_args('-device', '{"driver":"virtio-balloon-pci",' + '"id":"balloon0","bus":"pci.0","addr":"0x6"}') + self.vm.add_args('-audiodev', '{"id":"audio1","driver":"none"}') + self.vm.add_args('-device', '{"driver":"usb-tablet","id":"input0"' + ',"bus":"usb.0","port":"1"}') + self.vm.add_args('-device', '{"driver":"usb-kbd","id":"input1"' + ',"bus":"usb.0","port":"2"}') + self.vm.add_args('-device', '{"driver":"VGA","id":"video0",' + '"vgamem_mb":16,"bus":"pci.0","addr":"0x7"}') + self.vm.add_args('-object', '{"qom-type":"rng-random","id":"objrng= 0"' + ',"filename":"/dev/urandom"}', + '-device', '{"driver":"virtio-rng-pci","rng":"obj= rng0"' + ',"id":"rng0","bus":"pci.0","addr":"0x8"}') + self.vm.add_args('-object', '{"qom-type":"cryptodev-backend-builti= n",' + '"id":"objcrypto0","queues":1}', + '-device', '{"driver":"virtio-crypto-pci",' + '"cryptodev":"objcrypto0","id":"crypto0","bus"' + ':"pci.0","addr":"0xa"}') + self.vm.add_args('-device', '{"driver":"spapr-pci-host-bridge"' + ',"index":1,"id":"pci.1"}') + self.vm.add_args('-device', '{"driver":"spapr-vscsi","id":"scsi1"' + ',"reg":12288}') + self.vm.add_args('-m', '2G,slots=3D32,maxmem=3D4G', + '-object', 'memory-backend-ram,id=3Dram1,size=3D1= G', + '-device', 'pc-dimm,id=3Ddimm1,memdev=3Dram1') + + # Create a temporary qcow2 and launch the test-case + with tempfile.NamedTemporaryFile(prefix=3Dprefix, + suffix=3D'.qcow2') as qcow2: + run_cmd([self.qemu_img, 'create', '-f', 'qcow2', qcow2.name, '= 1G']) + + self.vm.add_args('-drive', 'file=3D' + qcow2.name + + ',format=3Dqcow2,if=3Dnone,id=3D' + 'drive-virtio-disk1', + '-device', 'virtio-blk-pci,bus=3Dpci.0,' + 'addr=3D0xb,drive=3Ddrive-virtio-disk1,id=3Dvirti= o-disk1' + ',bootindex=3D2') + self.common_tuxrun(kernel_asset, rootfs_asset=3Drootfs_asset, + drive=3D"scsi-hd") + + ASSET_PPC64_KERNEL =3D Asset( + 'https://storage.tuxboot.com/20230331/ppc64/vmlinux', + '1d953e81a4379e537fc8e41e05a0a59d9b453eef97aa03d47866c6c45b00bdff') + ASSET_PPC64_ROOTFS =3D Asset( + 'https://storage.tuxboot.com/20230331/ppc64/rootfs.ext4.zst', + 'f22a9b9e924174a4c199f4c7e5d91a2339fcfe51c6eafd0907dc3e09b64ab728') + + def test_ppc64(self): + self.ppc64_common_tuxrun(kernel_asset=3Dself.ASSET_PPC64_KERNEL, + rootfs_asset=3Dself.ASSET_PPC64_ROOTFS, + prefix=3D'tuxrun_ppc64_') + + ASSET_PPC64LE_KERNEL =3D Asset( + 'https://storage.tuxboot.com/20230331/ppc64le/vmlinux', + '979eb61b445a010fb13e2b927126991f8ceef9c590fa2be0996c00e293e80cf2') + ASSET_PPC64LE_ROOTFS =3D Asset( + 'https://storage.tuxboot.com/20230331/ppc64le/rootfs.ext4.zst', + 'b442678c93fb8abe1f7d3bfa20556488de6b475c22c8fed363f42cf81a0a3906') + + def test_ppc64le(self): + self.ppc64_common_tuxrun(kernel_asset=3Dself.ASSET_PPC64LE_KERNEL, + rootfs_asset=3Dself.ASSET_PPC64LE_ROOTFS, + prefix=3D'tuxrun_ppc64le_') + + +if __name__ =3D=3D '__main__': + TuxRunBaselineTest.main() --=20 2.46.1 From nobody Sat Nov 23 22:50:46 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=1728667409; cv=none; d=zohomail.com; s=zohoarc; b=G8aJT7Syz938CK/91awhMqHZ3vWMeEiLgLBjQwjF/A13sY8bTkDhIkE/9wesU8EGTixoVeiERdcmD0htjqS6y1yz1S0CLu/uW1mEr0PBzhARbl+O5rUblzldaOqTNfSrIavS4mwDqTATRb+t3sg31QpEkjXQspVldKdtfehNoe4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728667409; 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=OfD2T2DNljJ4PR1x+jFli4y7dytYo55E8P6pXj2fAdg=; b=MVoiRMaim1uyVy3/SLBIYnRSsvFVixd4qWtjVouX6WBUN7/AulYvpk7Xvy0tBLmNjyJVZ5UasnriGmqDckUnLkfjQJDeKs+dfZ8SP9WvhaUY2In4ssFtVvX6KqN4HuNE2KlhYMi/B1FvPHc20dSi6cH7LtDKo3VRpnIgyCuBjPc= 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 1728667409502753.1261125312082; Fri, 11 Oct 2024 10:23:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szJDH-0000Bq-PW; Fri, 11 Oct 2024 13:14:03 -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 1szJ7B-0004Pd-Ch for qemu-devel@nongnu.org; Fri, 11 Oct 2024 13:07:50 -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 1szFYz-0004Jz-F0 for qemu-devel@nongnu.org; Fri, 11 Oct 2024 09:20:15 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-611-wuLlgpvaMmikJYqAbfnQMg-1; Fri, 11 Oct 2024 09:20:11 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 207981955F3D; Fri, 11 Oct 2024 13:20:10 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.77]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4E9001956052; Fri, 11 Oct 2024 13:20:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728652812; 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=OfD2T2DNljJ4PR1x+jFli4y7dytYo55E8P6pXj2fAdg=; b=ikYartBXeAbeyiRZmy8hlN1pV4+5AspE9O9attLd5PN19eJX9wbSI2vKBD9UY6R+6rbrsf kejb+b8PaCgSngDgWm90OQzYJ18b3vaBzjhPDSleyFPkWauwpHL43+jp0GNap9isgu8Qld Eu8SjxA/jPADEZ0ZZe/3ERSFJ7SXk8w= X-MC-Unique: wuLlgpvaMmikJYqAbfnQMg-1 From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Cc: Guenter Roeck , Yoshinori Sato , Magnus Damm , qemu-arm@nongnu.org, Thomas Huth Subject: [PATCH 03/17] tests/functional: Convert the Avocado aarch64 tuxrun tests Date: Fri, 11 Oct 2024 15:19:20 +0200 Message-ID: <20241011131937.377223-4-thuth@redhat.com> In-Reply-To: <20241011131937.377223-1-thuth@redhat.com> References: <20241011131937.377223-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.17 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.15, 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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1728667411471116600 Move the tests to a new file so that they can be run via qemu-system-aarch64 in the functional framework. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/tuxrun_baselines.py | 31 --------------- tests/functional/meson.build | 2 + tests/functional/test_aarch64_tuxrun.py | 50 +++++++++++++++++++++++++ 4 files changed, 53 insertions(+), 31 deletions(-) create mode 100755 tests/functional/test_aarch64_tuxrun.py diff --git a/MAINTAINERS b/MAINTAINERS index d7a11fe601..ab9da679f5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -987,6 +987,7 @@ F: hw/arm/virt* F: include/hw/arm/virt.h F: docs/system/arm/virt.rst F: tests/functional/test_aarch64_virt.py +F: tests/functional/test_aarch64_tuxrun.py =20 Xilinx Zynq M: Edgar E. Iglesias diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_basel= ines.py index 56c8bdb2dc..dffa4f6339 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -192,37 +192,6 @@ def common_tuxrun(self, # --kernel https://storage.tuxboot.com/{TUXBOOT}/{IMAGE} # =20 - def test_arm64(self): - """ - :avocado: tags=3Darch:aarch64 - :avocado: tags=3Dcpu:cortex-a57 - :avocado: tags=3Dmachine:virt - :avocado: tags=3Dtuxboot:arm64 - :avocado: tags=3Dconsole:ttyAMA0 - :avocado: tags=3Dshutdown:nowait - """ - sums =3D {"Image" : - "ce95a7101a5fecebe0fe630deee6bd97b32ba41bc8754090e9ad8961e= a8674c7", - "rootfs.ext4.zst" : - "bbd5ed4b9c7d3f4ca19ba71a323a843c6b585e880115df3b7765769db= d9dd061"} - self.common_tuxrun(csums=3Dsums) - - def test_arm64be(self): - """ - :avocado: tags=3Darch:aarch64 - :avocado: tags=3Dcpu:cortex-a57 - :avocado: tags=3Dendian:big - :avocado: tags=3Dmachine:virt - :avocado: tags=3Dtuxboot:arm64be - :avocado: tags=3Dconsole:ttyAMA0 - :avocado: tags=3Dshutdown:nowait - """ - sums =3D { "Image" : - "e0df4425eb2cd9ea9a283e808037f805641c65d8fcecc8f6407d8f4f= 339561b4", - "rootfs.ext4.zst" : - "e6ffd8813c8a335bc15728f2835f90539c84be7f8f5f691a8b01451b= 47fb4bd7"} - self.common_tuxrun(csums=3Dsums) - def test_armv5(self): """ :avocado: tags=3Darch:arm diff --git a/tests/functional/meson.build b/tests/functional/meson.build index c90c02517a..222bfbcc62 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -13,6 +13,7 @@ endif test_timeouts =3D { 'aarch64_raspi4' : 120, 'aarch64_sbsaref' : 600, + 'aarch64_tuxrun' : 120, 'aarch64_virt' : 360, 'acpi_bits' : 240, 'arm_raspi2' : 120, @@ -41,6 +42,7 @@ tests_aarch64_system_thorough =3D [ 'aarch64_raspi3', 'aarch64_raspi4', 'aarch64_sbsaref', + 'aarch64_tuxrun', 'aarch64_virt', 'multiprocess', ] diff --git a/tests/functional/test_aarch64_tuxrun.py b/tests/functional/tes= t_aarch64_tuxrun.py new file mode 100755 index 0000000000..da56aee4ed --- /dev/null +++ b/tests/functional/test_aarch64_tuxrun.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python3 +# +# Functional test that boots known good tuxboot images the same way +# that tuxrun (www.tuxrun.org) does. This tool is used by things like +# the LKFT project to run regression tests on kernels. +# +# Copyright (c) 2023 Linaro Ltd. +# +# Author: +# Alex Benn=C3=A9e +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from qemu_test.tuxruntest import TuxRunBaselineTest + +class TuxRunAarch64Test(TuxRunBaselineTest): + + ASSET_ARM64_KERNEL =3D Asset( + 'https://storage.tuxboot.com/20230331/arm64/Image', + 'ce95a7101a5fecebe0fe630deee6bd97b32ba41bc8754090e9ad8961ea8674c7') + ASSET_ARM64_ROOTFS =3D Asset( + 'https://storage.tuxboot.com/20230331/arm64/rootfs.ext4.zst', + 'bbd5ed4b9c7d3f4ca19ba71a323a843c6b585e880115df3b7765769dbd9dd061') + + def test_arm64(self): + self.set_machine('virt') + self.cpu=3D'cortex-a57' + self.console=3D'ttyAMA0' + self.wait_for_shutdown=3DFalse + self.common_tuxrun(kernel_asset=3Dself.ASSET_ARM64_KERNEL, + rootfs_asset=3Dself.ASSET_ARM64_ROOTFS) + + ASSET_ARM64BE_KERNEL =3D Asset( + 'https://storage.tuxboot.com/20230331/arm64be/Image', + 'e0df4425eb2cd9ea9a283e808037f805641c65d8fcecc8f6407d8f4f339561b4') + ASSET_ARM64BE_ROOTFS =3D Asset( + 'https://storage.tuxboot.com/20230331/arm64be/rootfs.ext4.zst', + 'e6ffd8813c8a335bc15728f2835f90539c84be7f8f5f691a8b01451b47fb4bd7') + + def test_arm64be(self): + self.set_machine('virt') + self.cpu=3D'cortex-a57' + self.console=3D'ttyAMA0' + self.wait_for_shutdown=3DFalse + self.common_tuxrun(kernel_asset=3Dself.ASSET_ARM64BE_KERNEL, + rootfs_asset=3Dself.ASSET_ARM64BE_ROOTFS) + +if __name__ =3D=3D '__main__': + TuxRunBaselineTest.main() --=20 2.46.1 From nobody Sat Nov 23 22:50:46 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=1728667693; cv=none; d=zohomail.com; s=zohoarc; b=RcaQdM4SF5sD9XoVs8sXibs0JvZXtdwURzyrUJ9zfF1M5zpptSUcQWWYoEX6GuXfgOF+w7qoNIH0WB7Z9yxURfdZPpvwIdmr4bBqYoe8U68WCYSIfOl9C+bdOLIuzGh/yEngH+33iyBSWMZrD2Jpjuv6TsFi9u0o3IEcmAa/D1g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728667693; 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=j/Tvot+/MKUpHRoONIelj0oUwNzsJh42ipWPCh2ZAtI=; b=HGAbtjtQD8NWksUuP6rJwIOaij+f33+zPImyxigAuQbIIJmeQRv7FBz2T2yzxA6gMpap1XYZ5OJ8kpIkEX4GCJCIh+e+McWpTKBarFyeBzdNntrt05FzLwBNhFLzp18UzDAKVxNOCBe9pgjKZY/Ay/Ub7u+uiL3P6dds9Czki4w= 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 1728667693092533.9658313003956; Fri, 11 Oct 2024 10:28:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szJEZ-0002dF-Jv; Fri, 11 Oct 2024 13:15:23 -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 1szJ7B-0003aE-D6 for qemu-devel@nongnu.org; Fri, 11 Oct 2024 13:07:50 -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 1szFZ5-0004Kj-0e for qemu-devel@nongnu.org; Fri, 11 Oct 2024 09:20:20 -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-140-kDUK8pKWPaK0yT9WBLq6kA-1; Fri, 11 Oct 2024 09:20:15 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 64DBB19560AD; Fri, 11 Oct 2024 13:20:13 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.77]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 98BDE1955E8F; Fri, 11 Oct 2024 13:20:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728652818; 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=j/Tvot+/MKUpHRoONIelj0oUwNzsJh42ipWPCh2ZAtI=; b=URrCtnVANFEb27Sf4VQVYcr2Ja0ulXVf5bTEKgW6qqcybuKemIBFnzRMiX+c177Vdq9cd9 rneTIkrc20sfQuPiFtXwYPJtigivZea7E11jfijWh6Vcbh1XDKdcCpeL/Tkz1VW825FHcE 1BKsruwgZI/96ANUTx5eBS+zQvv1LVc= X-MC-Unique: kDUK8pKWPaK0yT9WBLq6kA-1 From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Cc: Guenter Roeck , Yoshinori Sato , Magnus Damm , qemu-arm@nongnu.org, Thomas Huth Subject: [PATCH 04/17] tests/functional: Convert the Avocado sparc64 tuxrun test Date: Fri, 11 Oct 2024 15:19:21 +0200 Message-ID: <20241011131937.377223-5-thuth@redhat.com> In-Reply-To: <20241011131937.377223-1-thuth@redhat.com> References: <20241011131937.377223-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.17 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: -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.15, 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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1728667694860116600 Move the test to a new file so that it can be run via qemu-system-sparc64 in the functional framework. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/tuxrun_baselines.py | 16 ------------ tests/functional/meson.build | 1 + tests/functional/test_sparc64_tuxrun.py | 34 +++++++++++++++++++++++++ 4 files changed, 36 insertions(+), 16 deletions(-) create mode 100755 tests/functional/test_sparc64_tuxrun.py diff --git a/MAINTAINERS b/MAINTAINERS index ab9da679f5..5493623050 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1656,6 +1656,7 @@ F: hw/pci-bridge/simba.c F: include/hw/pci-bridge/simba.h F: pc-bios/openbios-sparc64 F: tests/functional/test_sparc64_sun4u.py +F: tests/functional/test_sparc64_tuxrun.py =20 Sun4v M: Artyom Tarasenko diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_basel= ines.py index dffa4f6339..dc32735c3f 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -462,22 +462,6 @@ def test_sh4(self): exec_command_and_wait_for_pattern(self, 'halt', "reboot: System halted") =20 - def test_sparc64(self): - """ - :avocado: tags=3Darch:sparc64 - :avocado: tags=3Dtuxboot:sparc64 - :avocado: tags=3Dimage:vmlinux - :avocado: tags=3Droot:sda - :avocado: tags=3Dshutdown:nowait - """ - - sums =3D { "rootfs.ext4.zst" : - "ad2f1dc436ab51583543d25d2c210cab478645d47078d30d129a66ab= 0e281d76", - "vmlinux" : - "e34313e4325ff21deaa3d38a502aa09a373ef62b9bd4d7f8f29388b6= 88225c55" } - - self.common_tuxrun(csums=3Dsums, drive=3D"driver=3Dide-hd,bus=3Did= e.0,unit=3D0") - def test_x86_64(self): """ :avocado: tags=3Darch:x86_64 diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 222bfbcc62..d598f43289 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -142,6 +142,7 @@ tests_sparc_system_thorough =3D [ =20 tests_sparc64_system_thorough =3D [ 'sparc64_sun4u', + 'sparc64_tuxrun', ] =20 tests_x86_64_system_quick =3D [ diff --git a/tests/functional/test_sparc64_tuxrun.py b/tests/functional/tes= t_sparc64_tuxrun.py new file mode 100755 index 0000000000..1c2c005630 --- /dev/null +++ b/tests/functional/test_sparc64_tuxrun.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python3 +# +# Functional test that boots known good tuxboot images the same way +# that tuxrun (www.tuxrun.org) does. This tool is used by things like +# the LKFT project to run regression tests on kernels. +# +# Copyright (c) 2023 Linaro Ltd. +# +# Author: +# Alex Benn=C3=A9e +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from qemu_test.tuxruntest import TuxRunBaselineTest + +class TuxRunSparc64Test(TuxRunBaselineTest): + + ASSET_SPARC64_KERNEL =3D Asset( + 'https://storage.tuxboot.com/20230331/sparc64/vmlinux', + 'e34313e4325ff21deaa3d38a502aa09a373ef62b9bd4d7f8f29388b688225c55') + ASSET_SPARC64_ROOTFS =3D Asset( + 'https://storage.tuxboot.com/20230331/sparc64/rootfs.ext4.zst', + 'ad2f1dc436ab51583543d25d2c210cab478645d47078d30d129a66ab0e281d76') + + def test_sparc64(self): + self.root=3D'sda' + self.wait_for_shutdown=3DFalse + self.common_tuxrun(kernel_asset=3Dself.ASSET_SPARC64_KERNEL, + rootfs_asset=3Dself.ASSET_SPARC64_ROOTFS, + drive=3D"driver=3Dide-hd,bus=3Dide.0,unit=3D0") + +if __name__ =3D=3D '__main__': + TuxRunBaselineTest.main() --=20 2.46.1 From nobody Sat Nov 23 22:50:46 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=1728667195; cv=none; d=zohomail.com; s=zohoarc; b=GAyoBhF9a86tgJIK7/Z1261rHRqlcBppa7Lu96HrHLizlwLJ0KyG//lWXLM4+u6EYkSdmZOG2tE3CfBTVPFuBsic1TaOGK6E6L80Pbn5QineUp6Zjwxy7k+73OTeyNL3n6ckAG8pqa1W83ca6jShnJMwENawfHoX6q0XiaA3r94= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728667195; 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=rIubmt6mmbRv8h3Yr9aJ/pXuvv11oJfx3cgAf0vSBko=; b=bP5IMC7EUek2A5/ovoOE2l6/hgbXt0s9hiF1GkPzSTr+vSiCd9loPjvgfKSZ3haVCfZg4Ym9p8LF8uPZNgWx+MzLhg8IvBmWzzUeRnXrLmrqOgVwd7QugdhJeCMPxT/F1Np6eJrlBjD95SLn45B+b1t4tiU81VXgnjA41XcKaFg= 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 1728667195688238.17138567536358; Fri, 11 Oct 2024 10:19:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szJDE-00082v-4w; Fri, 11 Oct 2024 13:14:00 -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 1szJ7B-0001hX-DC for qemu-devel@nongnu.org; Fri, 11 Oct 2024 13:07:50 -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 1szFZ8-0004L7-O4 for qemu-devel@nongnu.org; Fri, 11 Oct 2024 09:20:24 -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-331--LGffVhPN6mjSprJomwsuw-1; Fri, 11 Oct 2024 09:20:18 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 7CE491956088; Fri, 11 Oct 2024 13:20:17 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.77]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DE5AA1955E8F; Fri, 11 Oct 2024 13:20:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728652821; 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=rIubmt6mmbRv8h3Yr9aJ/pXuvv11oJfx3cgAf0vSBko=; b=Dc4k1GitTCuEJrZqfoUne0Fp4TOU98kzhug/Fc/g2oxKMdfuSCfZXOa+NjA4cl8rM2HP0v c6xlutKm3JrvseLHFcuGgRJ8XPXtpvuaRP/J+9Wmjypgm9exrBCEjcguHiZr9KB8yW/RvN ORaL6NWzB4C7ZmIacIBhqDr5HWK1TtE= X-MC-Unique: -LGffVhPN6mjSprJomwsuw-1 From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Cc: Guenter Roeck , Yoshinori Sato , Magnus Damm , qemu-arm@nongnu.org, Thomas Huth Subject: [PATCH 05/17] tests/functional: Convert the Avocado s390x tuxrun test Date: Fri, 11 Oct 2024 15:19:22 +0200 Message-ID: <20241011131937.377223-6-thuth@redhat.com> In-Reply-To: <20241011131937.377223-1-thuth@redhat.com> References: <20241011131937.377223-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.17 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.15, 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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1728667197630116600 Move the test to a new file so that it can be run via qemu-system-s390x in the functional framework. Signed-off-by: Thomas Huth --- MAINTAINERS | 2 +- tests/avocado/tuxrun_baselines.py | 17 -------------- tests/functional/test_s390x_tuxrun.py | 34 +++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 18 deletions(-) create mode 100755 tests/functional/test_s390x_tuxrun.py diff --git a/MAINTAINERS b/MAINTAINERS index 5493623050..ab9df83c17 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1683,7 +1683,7 @@ S: Supported F: hw/s390x/ F: include/hw/s390x/ F: configs/devices/s390x-softmmu/default.mak -F: tests/functional/test_s390x_ccw_virtio.py +F: tests/functional/test_s390x_* T: git https://github.com/borntraeger/qemu.git s390-next L: qemu-s390x@nongnu.org =20 diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_basel= ines.py index dc32735c3f..98dce857cf 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -410,23 +410,6 @@ def test_riscv64_maxcpu(self): =20 self.common_tuxrun(csums=3Dsums) =20 - def test_s390(self): - """ - :avocado: tags=3Darch:s390x - :avocado: tags=3Dendian:big - :avocado: tags=3Dtuxboot:s390 - :avocado: tags=3Dimage:bzImage - :avocado: tags=3Dshutdown:nowait - """ - sums =3D { "bzImage" : - "0414e98dd1c3dafff8496c9cd9c28a5f8d04553bb5ba37e906a812b4= 8d442ef0", - "rootfs.ext4.zst" : - "88c37c32276677f873a25ab9ec6247895b8e3e6f8259134de2a61608= 0b8ab3fc" } - - self.common_tuxrun(csums=3Dsums, - drive=3D"virtio-blk-ccw", - haltmsg=3D"Requesting system halt") - # Note: some segfaults caused by unaligned userspace access @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on G= itLab') def test_sh4(self): diff --git a/tests/functional/test_s390x_tuxrun.py b/tests/functional/test_= s390x_tuxrun.py new file mode 100755 index 0000000000..dcab17c68b --- /dev/null +++ b/tests/functional/test_s390x_tuxrun.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python3 +# +# Functional test that boots known good tuxboot images the same way +# that tuxrun (www.tuxrun.org) does. This tool is used by things like +# the LKFT project to run regression tests on kernels. +# +# Copyright (c) 2023 Linaro Ltd. +# +# Author: +# Alex Benn=C3=A9e +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from qemu_test.tuxruntest import TuxRunBaselineTest + +class TuxRunS390xTest(TuxRunBaselineTest): + + ASSET_S390X_KERNEL =3D Asset( + 'https://storage.tuxboot.com/20230331/s390/bzImage', + '0414e98dd1c3dafff8496c9cd9c28a5f8d04553bb5ba37e906a812b48d442ef0') + ASSET_S390X_ROOTFS =3D Asset( + 'https://storage.tuxboot.com/20230331/s390/rootfs.ext4.zst', + '88c37c32276677f873a25ab9ec6247895b8e3e6f8259134de2a616080b8ab3fc') + + def test_s390(self): + self.wait_for_shutdown=3DFalse + self.common_tuxrun(kernel_asset=3Dself.ASSET_S390X_KERNEL, + rootfs_asset=3Dself.ASSET_S390X_ROOTFS, + drive=3D"virtio-blk-ccw", + haltmsg=3D"Requesting system halt") + +if __name__ =3D=3D '__main__': + TuxRunBaselineTest.main() --=20 2.46.1 From nobody Sat Nov 23 22:50:46 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=1728668315; cv=none; d=zohomail.com; s=zohoarc; b=NfH5Y4tmsZPUhyLTRH0EPG8sYfRpvg810mfnRcn1v9mJ+yClpA0MRJIbjII9BjaaUgDn9f5kdRmqbvoJJm9ntFq3Ayz6E0Icsz1VM9qSFjr0f89u7VA9zgl6C1koQ2Nc7H4E54G1vK2SowE+RfmFTbVnthaHSYns1mL2/D7FVd0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728668315; 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=zPNfpfDvWtmP4PtGb7znLgZ/uVOBTtjckSTAJHVQg7M=; b=MU414CdOUoyfQAHLicScKtR9aJ6XZJPfIME7S/t1kszx64rM5yEys8IGRS6gy+q+1ieM8pCgQYaWSCTyX4kUhP97PX2MijGY2GXRSNZHW0HTnulPTKd26Wrw/Da8WJ/TU7MUGVFDH6miSR9ySJ7k6CPQI3PjW9GzB0jvsGCYo7A= 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 172866831504876.78768123141458; Fri, 11 Oct 2024 10:38:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szJDd-0001Qa-Ou; Fri, 11 Oct 2024 13:14:29 -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 1szJ7B-0000hD-AJ for qemu-devel@nongnu.org; Fri, 11 Oct 2024 13:07:50 -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 1szFZD-0004LU-90 for qemu-devel@nongnu.org; Fri, 11 Oct 2024 09:20:29 -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-448-Lb80wzUvOy6OwZKlXEKBGQ-1; Fri, 11 Oct 2024 09:20:22 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 1502E1955E9D; Fri, 11 Oct 2024 13:20:21 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.77]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id F308B1955EA2; Fri, 11 Oct 2024 13:20:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728652825; 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=zPNfpfDvWtmP4PtGb7znLgZ/uVOBTtjckSTAJHVQg7M=; b=h4cpiLBaqOSHV0zgq4gYUMF8VOmBUgDf1KCn0giRwdtZGkfJop4LQSKbj+iXUwGN1IppnH huboA8VEhXuxJdRm00YH2SlxLlaldfeyJVWPvM4M7eEmT9tuDTBwMVyxFJjcdHUh44V4GR PK1rMuFAYYh2Sd9cOCOCkopfVVylWeY= X-MC-Unique: Lb80wzUvOy6OwZKlXEKBGQ-1 From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Cc: Guenter Roeck , Yoshinori Sato , Magnus Damm , qemu-arm@nongnu.org, Thomas Huth Subject: [PATCH 06/17] tests/functional: Convert the Avocado arm tuxrun tests Date: Fri, 11 Oct 2024 15:19:23 +0200 Message-ID: <20241011131937.377223-7-thuth@redhat.com> In-Reply-To: <20241011131937.377223-1-thuth@redhat.com> References: <20241011131937.377223-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.17 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: -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.15, 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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1728668315771116600 Move the tests to a new file so that they can be run via qemu-system-arm in the functional framework. Signed-off-by: Thomas Huth --- tests/avocado/tuxrun_baselines.py | 56 ----------------------- tests/functional/meson.build | 2 + tests/functional/test_arm_tuxrun.py | 70 +++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 56 deletions(-) create mode 100755 tests/functional/test_arm_tuxrun.py diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_basel= ines.py index 98dce857cf..59ca9f9706 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -192,62 +192,6 @@ def common_tuxrun(self, # --kernel https://storage.tuxboot.com/{TUXBOOT}/{IMAGE} # =20 - def test_armv5(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Dcpu:arm926 - :avocado: tags=3Dmachine:versatilepb - :avocado: tags=3Dtuxboot:armv5 - :avocado: tags=3Dimage:zImage - :avocado: tags=3Dconsole:ttyAMA0 - :avocado: tags=3Dshutdown:nowait - """ - sums =3D { "rootfs.ext4.zst" : - "17177afa74e7294da0642861f08c88ca3c836764299a54bf6d1ce276= cb9712a5", - "versatile-pb.dtb" : - "0bc0c0b0858cefd3c32b385c0d66d97142ded29472a496f4f490e42f= c7615b25", - "zImage" : - "c95af2f27647c12265d75e9df44c22ff5228c59855f54aaa70f41ec2= 842e3a4d" } - - self.common_tuxrun(csums=3Dsums, - drive=3D"virtio-blk-pci", - dt=3D"versatile-pb.dtb") - - def test_armv7(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Dcpu:cortex-a15 - :avocado: tags=3Dmachine:virt - :avocado: tags=3Dtuxboot:armv7 - :avocado: tags=3Dimage:zImage - :avocado: tags=3Dconsole:ttyAMA0 - :avocado: tags=3Dshutdown:nowait - """ - sums =3D { "rootfs.ext4.zst" : - "ab1fbbeaddda1ffdd45c9405a28cd5370c20f23a7cbc809cc90dc9f2= 43a8eb5a", - "zImage" : - "4c7a22e9f15875bec06bd2a29d822496571eb297d4f22694099ffcdb= 19077572" } - - self.common_tuxrun(csums=3Dsums) - - def test_armv7be(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Dcpu:cortex-a15 - :avocado: tags=3Dendian:big - :avocado: tags=3Dmachine:virt - :avocado: tags=3Dtuxboot:armv7be - :avocado: tags=3Dimage:zImage - :avocado: tags=3Dconsole:ttyAMA0 - :avocado: tags=3Dshutdown:nowait - """ - sums =3D {"rootfs.ext4.zst" : - "42ed46dd2d59986206c5b1f6cf35eab58fe3fd20c96b41aaa16b32f3f= 90a9835", - "zImage" : - "7facc62082b57af12015b08f7fdbaf2f123ba07a478367853ae12b219= afc9f2f" } - - self.common_tuxrun(csums=3Dsums) - def test_i386(self): """ :avocado: tags=3Darch:i386 diff --git a/tests/functional/meson.build b/tests/functional/meson.build index d598f43289..ae913781ec 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -17,6 +17,7 @@ test_timeouts =3D { 'aarch64_virt' : 360, 'acpi_bits' : 240, 'arm_raspi2' : 120, + 'arm_tuxrun' : 120, 'mips_malta' : 120, 'netdev_ethtool' : 180, 'ppc_40p' : 240, @@ -56,6 +57,7 @@ tests_arm_system_thorough =3D [ 'arm_integratorcp', 'arm_raspi2', 'arm_vexpress', + 'arm_tuxrun', ] =20 tests_arm_linuxuser_thorough =3D [ diff --git a/tests/functional/test_arm_tuxrun.py b/tests/functional/test_ar= m_tuxrun.py new file mode 100755 index 0000000000..944f0756e1 --- /dev/null +++ b/tests/functional/test_arm_tuxrun.py @@ -0,0 +1,70 @@ +#!/usr/bin/env python3 +# +# Functional test that boots known good tuxboot images the same way +# that tuxrun (www.tuxrun.org) does. This tool is used by things like +# the LKFT project to run regression tests on kernels. +# +# Copyright (c) 2023 Linaro Ltd. +# +# Author: +# Alex Benn=C3=A9e +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from qemu_test.tuxruntest import TuxRunBaselineTest + +class TuxRunArmTest(TuxRunBaselineTest): + + ASSET_ARMV5_KERNEL =3D Asset( + 'https://storage.tuxboot.com/20230331/armv5/zImage', + 'c95af2f27647c12265d75e9df44c22ff5228c59855f54aaa70f41ec2842e3a4d') + ASSET_ARMV5_ROOTFS =3D Asset( + 'https://storage.tuxboot.com/20230331/armv5/rootfs.ext4.zst', + '17177afa74e7294da0642861f08c88ca3c836764299a54bf6d1ce276cb9712a5') + ASSET_ARMV5_DTB =3D Asset( + 'https://storage.tuxboot.com/20230331/armv5/versatile-pb.dtb', + '0bc0c0b0858cefd3c32b385c0d66d97142ded29472a496f4f490e42fc7615b25') + + def test_armv5(self): + self.set_machine('versatilepb') + self.cpu=3D'arm926' + self.console=3D'ttyAMA0' + self.wait_for_shutdown=3DFalse + self.common_tuxrun(kernel_asset=3Dself.ASSET_ARMV5_KERNEL, + rootfs_asset=3Dself.ASSET_ARMV5_ROOTFS, + dtb_asset=3Dself.ASSET_ARMV5_DTB, + drive=3D"virtio-blk-pci") + + ASSET_ARMV7_KERNEL =3D Asset( + 'https://storage.tuxboot.com/20230331/armv7/zImage', + '4c7a22e9f15875bec06bd2a29d822496571eb297d4f22694099ffcdb19077572') + ASSET_ARMV7_ROOTFS =3D Asset( + 'https://storage.tuxboot.com/20230331/armv7/rootfs.ext4.zst', + 'ab1fbbeaddda1ffdd45c9405a28cd5370c20f23a7cbc809cc90dc9f243a8eb5a') + + def test_armv7(self): + self.set_machine('virt') + self.cpu=3D'cortex-a15' + self.console=3D'ttyAMA0' + self.wait_for_shutdown=3DFalse + self.common_tuxrun(kernel_asset=3Dself.ASSET_ARMV7_KERNEL, + rootfs_asset=3Dself.ASSET_ARMV7_ROOTFS) + + ASSET_ARMV7BE_KERNEL =3D Asset( + 'https://storage.tuxboot.com/20230331/armv7be/zImage', + '7facc62082b57af12015b08f7fdbaf2f123ba07a478367853ae12b219afc9f2f') + ASSET_ARMV7BE_ROOTFS =3D Asset( + 'https://storage.tuxboot.com/20230331/armv7be/rootfs.ext4.zst', + '42ed46dd2d59986206c5b1f6cf35eab58fe3fd20c96b41aaa16b32f3f90a9835') + + def test_armv7be(self): + self.set_machine('virt') + self.cpu=3D'cortex-a15' + self.console=3D'ttyAMA0' + self.wait_for_shutdown=3DFalse + self.common_tuxrun(kernel_asset=3Dself.ASSET_ARMV7BE_KERNEL, + rootfs_asset=3Dself.ASSET_ARMV7BE_ROOTFS) + +if __name__ =3D=3D '__main__': + TuxRunBaselineTest.main() --=20 2.46.1 From nobody Sat Nov 23 22:50:46 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=1728667980; cv=none; d=zohomail.com; s=zohoarc; b=DgjcifWSShkxKmbkC1QUsH3oYqRtarkhmu0Oj37DNPUWEqTRH7Kodj6KHjz4vMagPyBVifySXQLnQ/FQAK0WJe2JMivyhf/o49PH4uzkViXxhjGYryf8/9Eisq8/nQigX+s86mUMK7tA24KNHTah7soDmw8JCRr9Wh7zPI1k+js= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728667980; 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=lz9EgXFU0lWj10nDNVRrBm6fkJnPfK29/UdEKCWZnFw=; b=X82PVRiODTWTGuC6f/LC+J1E7R7nYw+FaXxDSpzTzYXRrRlnwcQKzQwApVIbm62Hg3hARr/XfevrZNDrRnm/3toxNBqxs27zenmh9FUeFftvTIHnbk976kiNlpfl5/i4UkWnoGNlXCFhGXLyuBkUfYCs4uqUH/Nlal2J9gTlUpE= 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 1728667980585843.3642738988016; Fri, 11 Oct 2024 10:33:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szJDQ-0000yu-Bn; Fri, 11 Oct 2024 13:14:12 -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 1szJ7A-0003Vx-7m for qemu-devel@nongnu.org; Fri, 11 Oct 2024 13:07:44 -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 1szFZI-0004MD-Cb for qemu-devel@nongnu.org; Fri, 11 Oct 2024 09:20:34 -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-630-FJleV-SWPbGU95I8dv1LgQ-1; Fri, 11 Oct 2024 09:20:26 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 9531E19560B2; Fri, 11 Oct 2024 13:20:24 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.77]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CCC7A1955E8F; Fri, 11 Oct 2024 13:20:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728652831; 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=lz9EgXFU0lWj10nDNVRrBm6fkJnPfK29/UdEKCWZnFw=; b=LcpLhFJhrNeyTGcpV9NAbzgEffqbfDW+0aCNCVsAxZoXUK66CjF/AkhJDjkP2n3I7jnFpL uDWYC0KkqRQBCamXK+GBiio/rMcJMrOP9R4UIPh8KQntYAlFn0fYmJtPfJ52sHtNHr7Gko o5RKOmjSXqB0utKSn6BxKpUUfMER8zg= X-MC-Unique: FJleV-SWPbGU95I8dv1LgQ-1 From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Cc: Guenter Roeck , Yoshinori Sato , Magnus Damm , qemu-arm@nongnu.org, Thomas Huth Subject: [PATCH 07/17] tests/functional: Convert the Avocado riscv32 tuxrun tests Date: Fri, 11 Oct 2024 15:19:24 +0200 Message-ID: <20241011131937.377223-8-thuth@redhat.com> In-Reply-To: <20241011131937.377223-1-thuth@redhat.com> References: <20241011131937.377223-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.17 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: -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.15, 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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1728667982276116600 Move the tests to a new file so that they can be run via qemu-system-riscv32 in the functional framework. Signed-off-by: Thomas Huth --- tests/avocado/tuxrun_baselines.py | 31 -------------------- tests/functional/meson.build | 4 +++ tests/functional/test_riscv32_tuxrun.py | 38 +++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 31 deletions(-) create mode 100755 tests/functional/test_riscv32_tuxrun.py diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_basel= ines.py index 59ca9f9706..e84fb9c3b9 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -292,21 +292,6 @@ def test_ppc32(self): =20 self.common_tuxrun(csums=3Dsums, drive=3D"virtio-blk-pci") =20 - def test_riscv32(self): - """ - :avocado: tags=3Darch:riscv32 - :avocado: tags=3Dmachine:virt - :avocado: tags=3Dtuxboot:riscv32 - """ - sums =3D { "Image" : - "89599407d7334de629a40e7ad6503c73670359eb5f5ae9d686353a3d= 6deccbd5", - "fw_jump.elf" : - "f2ef28a0b77826f79d085d3e4aa686f1159b315eff9099a37046b189= 36676985", - "rootfs.ext4.zst" : - "7168d296d0283238ea73cd5a775b3dd608e55e04c7b92b76ecce31bb= 13108cba" } - - self.common_tuxrun(csums=3Dsums) - def test_riscv64(self): """ :avocado: tags=3Darch:riscv64 @@ -322,22 +307,6 @@ def test_riscv64(self): =20 self.common_tuxrun(csums=3Dsums) =20 - def test_riscv32_maxcpu(self): - """ - :avocado: tags=3Darch:riscv32 - :avocado: tags=3Dmachine:virt - :avocado: tags=3Dcpu:max - :avocado: tags=3Dtuxboot:riscv32 - """ - sums =3D { "Image" : - "89599407d7334de629a40e7ad6503c73670359eb5f5ae9d686353a3d= 6deccbd5", - "fw_jump.elf" : - "f2ef28a0b77826f79d085d3e4aa686f1159b315eff9099a37046b189= 36676985", - "rootfs.ext4.zst" : - "7168d296d0283238ea73cd5a775b3dd608e55e04c7b92b76ecce31bb= 13108cba" } - - self.common_tuxrun(csums=3Dsums) - def test_riscv64_maxcpu(self): """ :avocado: tags=3Darch:riscv64 diff --git a/tests/functional/meson.build b/tests/functional/meson.build index ae913781ec..1491b4492e 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -129,6 +129,10 @@ tests_rx_system_thorough =3D [ 'rx_gdbsim', ] =20 +tests_riscv32_system_thorough =3D [ + 'riscv32_tuxrun', +] + tests_s390x_system_thorough =3D [ 's390x_ccw_virtio', 's390x_topology', diff --git a/tests/functional/test_riscv32_tuxrun.py b/tests/functional/tes= t_riscv32_tuxrun.py new file mode 100755 index 0000000000..49b57cd428 --- /dev/null +++ b/tests/functional/test_riscv32_tuxrun.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python3 +# +# Functional test that boots known good tuxboot images the same way +# that tuxrun (www.tuxrun.org) does. This tool is used by things like +# the LKFT project to run regression tests on kernels. +# +# Copyright (c) 2023 Linaro Ltd. +# +# Author: +# Alex Benn=C3=A9e +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from qemu_test.tuxruntest import TuxRunBaselineTest + +class TuxRunRiscV32Test(TuxRunBaselineTest): + + ASSET_RISCV32_KERNEL =3D Asset( + 'https://storage.tuxboot.com/20230331/riscv32/Image', + '89599407d7334de629a40e7ad6503c73670359eb5f5ae9d686353a3d6deccbd5') + ASSET_RISCV32_ROOTFS =3D Asset( + 'https://storage.tuxboot.com/20230331/riscv32/rootfs.ext4.zst', + '7168d296d0283238ea73cd5a775b3dd608e55e04c7b92b76ecce31bb13108cba') + + def test_riscv32(self): + self.set_machine('virt') + self.common_tuxrun(kernel_asset=3Dself.ASSET_RISCV32_KERNEL, + rootfs_asset=3Dself.ASSET_RISCV32_ROOTFS) + + def test_riscv32_maxcpu(self): + self.set_machine('virt') + self.cpu=3D'max' + self.common_tuxrun(kernel_asset=3Dself.ASSET_RISCV32_KERNEL, + rootfs_asset=3Dself.ASSET_RISCV32_ROOTFS) + +if __name__ =3D=3D '__main__': + TuxRunBaselineTest.main() --=20 2.46.1 From nobody Sat Nov 23 22:50:46 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=1728667549; cv=none; d=zohomail.com; s=zohoarc; b=dRsbk5mbt7OnrAO8/uQtwcpy4hVg3PFSbpURITNJWkoTKvBR8NjA6v11LuYuF7NHFDAjuPRhookJ9EEpATz+XwWDzBdZ9bxt6kxq1z0hUjnWP/phuRex2h8L8oXQgGhURaUjC/vIhd28IEmTFi6Ur909eEWpleI9GnmFCJojIu0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728667549; 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=EHbqDTEsNRTfcCQbI+P8NJ4FgxUkiptVbty+xZVvFvc=; b=XvMk/kZlLppxFSb2s4BTsfTqG6Cu/7WiurwLyRYdbBGSRri5UpWcOIIDYUE3UpEhdPcPn3AdlxffeTOtmTjsbXDiLXap88kSufAUQpOXZC1h6Q/v9xpqVgjBjRdjt7nVYgbv+mKvVt8SqxgLMl/3heI356mpoX2CkU3KAXEbWj0= 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 172866754897246.299616655981595; Fri, 11 Oct 2024 10:25:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szJDS-0001Ef-FU; Fri, 11 Oct 2024 13:14:15 -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 1szJ7A-0003l6-7V for qemu-devel@nongnu.org; Fri, 11 Oct 2024 13:07: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 1szFZK-0004MT-GO for qemu-devel@nongnu.org; Fri, 11 Oct 2024 09:20:36 -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-177-UDBiOQVnO3CSkYz1LUB_Jw-1; Fri, 11 Oct 2024 09:20:29 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 7D20D1955F3C; Fri, 11 Oct 2024 13:20:28 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.77]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 841891955E7D; Fri, 11 Oct 2024 13:20:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728652833; 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=EHbqDTEsNRTfcCQbI+P8NJ4FgxUkiptVbty+xZVvFvc=; b=AToPemygr+vm3p7HvOB5c/cmpHEdTZMyAFjjglTqWIh6ShFxu9n2xHW1ZYNQiKvVEwCgHB HU4EDJw0txaNIbL/DUw5ds4EfnHYzFHBUiVe/sdGCCNoQBtMtp9vtNix8k2nqm8poQIfo7 beKY/B6IRIpgXL7G3B9SYMRPcIXMNVo= X-MC-Unique: UDBiOQVnO3CSkYz1LUB_Jw-1 From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Cc: Guenter Roeck , Yoshinori Sato , Magnus Damm , qemu-arm@nongnu.org, Thomas Huth Subject: [PATCH 08/17] tests/functional: Convert the Avocado riscv64 tuxrun tests Date: Fri, 11 Oct 2024 15:19:25 +0200 Message-ID: <20241011131937.377223-9-thuth@redhat.com> In-Reply-To: <20241011131937.377223-1-thuth@redhat.com> References: <20241011131937.377223-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.17 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.15, 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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1728667550509116600 Move the tests to a new file so that they can be run via qemu-system-riscv64 in the functional framework. Signed-off-by: Thomas Huth --- tests/avocado/tuxrun_baselines.py | 31 -------------------- tests/functional/meson.build | 4 +++ tests/functional/test_riscv64_tuxrun.py | 38 +++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 31 deletions(-) create mode 100755 tests/functional/test_riscv64_tuxrun.py diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_basel= ines.py index e84fb9c3b9..dcb6589f2f 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -292,37 +292,6 @@ def test_ppc32(self): =20 self.common_tuxrun(csums=3Dsums, drive=3D"virtio-blk-pci") =20 - def test_riscv64(self): - """ - :avocado: tags=3Darch:riscv64 - :avocado: tags=3Dmachine:virt - :avocado: tags=3Dtuxboot:riscv64 - """ - sums =3D { "Image" : - "cd634badc65e52fb63465ec99e309c0de0369f0841b7d9486f9729e1= 19bac25e", - "fw_jump.elf" : - "6e3373abcab4305fe151b564a4c71110d833c21f2c0a1753b7935459= e36aedcf", - "rootfs.ext4.zst" : - "b18e3a3bdf27be03da0b285e84cb71bf09eca071c3a087b42884b698= 2ed679eb" } - - self.common_tuxrun(csums=3Dsums) - - def test_riscv64_maxcpu(self): - """ - :avocado: tags=3Darch:riscv64 - :avocado: tags=3Dmachine:virt - :avocado: tags=3Dcpu:max - :avocado: tags=3Dtuxboot:riscv64 - """ - sums =3D { "Image" : - "cd634badc65e52fb63465ec99e309c0de0369f0841b7d9486f9729e1= 19bac25e", - "fw_jump.elf" : - "6e3373abcab4305fe151b564a4c71110d833c21f2c0a1753b7935459= e36aedcf", - "rootfs.ext4.zst" : - "b18e3a3bdf27be03da0b285e84cb71bf09eca071c3a087b42884b698= 2ed679eb" } - - self.common_tuxrun(csums=3Dsums) - # Note: some segfaults caused by unaligned userspace access @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on G= itLab') def test_sh4(self): diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 1491b4492e..94270c798c 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -133,6 +133,10 @@ tests_riscv32_system_thorough =3D [ 'riscv32_tuxrun', ] =20 +tests_riscv64_system_thorough =3D [ + 'riscv64_tuxrun', +] + tests_s390x_system_thorough =3D [ 's390x_ccw_virtio', 's390x_topology', diff --git a/tests/functional/test_riscv64_tuxrun.py b/tests/functional/tes= t_riscv64_tuxrun.py new file mode 100755 index 0000000000..13501628f9 --- /dev/null +++ b/tests/functional/test_riscv64_tuxrun.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python3 +# +# Functional test that boots known good tuxboot images the same way +# that tuxrun (www.tuxrun.org) does. This tool is used by things like +# the LKFT project to run regression tests on kernels. +# +# Copyright (c) 2023 Linaro Ltd. +# +# Author: +# Alex Benn=C3=A9e +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from qemu_test.tuxruntest import TuxRunBaselineTest + +class TuxRunRiscV64Test(TuxRunBaselineTest): + + ASSET_RISCV64_KERNEL =3D Asset( + 'https://storage.tuxboot.com/20230331/riscv64/Image', + 'cd634badc65e52fb63465ec99e309c0de0369f0841b7d9486f9729e119bac25e') + ASSET_RISCV64_ROOTFS =3D Asset( + 'https://storage.tuxboot.com/20230331/riscv64/rootfs.ext4.zst', + 'b18e3a3bdf27be03da0b285e84cb71bf09eca071c3a087b42884b6982ed679eb') + + def test_riscv64(self): + self.set_machine('virt') + self.common_tuxrun(kernel_asset=3Dself.ASSET_RISCV64_KERNEL, + rootfs_asset=3Dself.ASSET_RISCV64_ROOTFS) + + def test_riscv64_maxcpu(self): + self.set_machine('virt') + self.cpu=3D'max' + self.common_tuxrun(kernel_asset=3Dself.ASSET_RISCV64_KERNEL, + rootfs_asset=3Dself.ASSET_RISCV64_ROOTFS) + +if __name__ =3D=3D '__main__': + TuxRunBaselineTest.main() --=20 2.46.1 From nobody Sat Nov 23 22:50:46 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=1728667598; cv=none; d=zohomail.com; s=zohoarc; b=iZT4mI47w2SHR1kiiJ9Yi860LCmVcUkwckGGVf8UXs3ZGAuEo8+wa6L6N7i+R22ZVKk//tibJ0bIknS7al3y/UgoEEEqSEUJX0ZtvkcuBtnlazxuJhQGyHdOuO7cZTUtxLK4KExG7IYri8ltaOwhNWtY5p3k9PZpwXQKWt0fyHw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728667598; 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=YLuM9npE2IVUKcFdffqYrVlZnagtFCjIqK19Be5FBkU=; b=Scl7d9vACWgQDd3ZVzdn8VW0OBOTm4PFM98r7Y/s29TU3O5sBnBu9SpQCL7jnMdru8qsMPrYL9Iui6Aw34z+5GHbdtFXOmJMqJsV0QlPVXWBAwyW2Xaf/6F9Aw/KYa4iNJB9Tx3U6A332/IzcUS38MagIWQXlS8np4hbC8Vi1IQ= 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 1728667598943440.6250738086369; Fri, 11 Oct 2024 10:26:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szJD2-0007eP-Tr; Fri, 11 Oct 2024 13:13:51 -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 1szJ79-0004Pd-0X for qemu-devel@nongnu.org; Fri, 11 Oct 2024 13:07:44 -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 1szFZP-0004NO-L0 for qemu-devel@nongnu.org; Fri, 11 Oct 2024 09:20:41 -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-570-9J7lmwYePfatbz7xnm1jBQ-1; Fri, 11 Oct 2024 09:20:34 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 9B4A91955EA7; Fri, 11 Oct 2024 13:20:32 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.77]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3CB161956052; Fri, 11 Oct 2024 13:20:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728652839; 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=YLuM9npE2IVUKcFdffqYrVlZnagtFCjIqK19Be5FBkU=; b=XkLGFAhuQZxSCHTPyAzimTLr6iEnOt0UR/fRMQVLJSz6GzF7UKX0pc+p6/n8CvX/gOnS36 TRoMObif/SMIiHmH0tNd+WIcJH8/0B1gZZ6TEYsygPw7vu1DL03w0nX4njXvs4WpI8f3Bs jlbmhbald43YosrA+FhYqhSo88UZvoo= X-MC-Unique: 9J7lmwYePfatbz7xnm1jBQ-1 From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Cc: Guenter Roeck , Yoshinori Sato , Magnus Damm , qemu-arm@nongnu.org, Thomas Huth Subject: [PATCH 09/17] tests/functional: Convert the Avocado i386 tuxrun test Date: Fri, 11 Oct 2024 15:19:26 +0200 Message-ID: <20241011131937.377223-10-thuth@redhat.com> In-Reply-To: <20241011131937.377223-1-thuth@redhat.com> References: <20241011131937.377223-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.17 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: -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.15, 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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1728667600494116600 Move the tests to a new file so that they can be run via qemu-system-i386 in the functional framework. Signed-off-by: Thomas Huth --- tests/avocado/tuxrun_baselines.py | 16 ------------- tests/functional/meson.build | 4 ++++ tests/functional/test_i386_tuxrun.py | 35 ++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 16 deletions(-) create mode 100755 tests/functional/test_i386_tuxrun.py diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_basel= ines.py index dcb6589f2f..72b0ad4951 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -192,22 +192,6 @@ def common_tuxrun(self, # --kernel https://storage.tuxboot.com/{TUXBOOT}/{IMAGE} # =20 - def test_i386(self): - """ - :avocado: tags=3Darch:i386 - :avocado: tags=3Dcpu:coreduo - :avocado: tags=3Dmachine:q35 - :avocado: tags=3Dtuxboot:i386 - :avocado: tags=3Dimage:bzImage - :avocado: tags=3Dshutdown:nowait - """ - sums =3D {"bzImage" : - "a3e5b32a354729e65910f5a1ffcda7c14a6c12a55e8213fb86e277f1b= 76ed956", - "rootfs.ext4.zst" : - "f15e66b2bf673a210ec2a4b2e744a80530b36289e04f5388aab812b97= f69754a" } - - self.common_tuxrun(csums=3Dsums, drive=3D"virtio-blk-pci") - def test_mips32(self): """ :avocado: tags=3Darch:mips diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 94270c798c..9cdfa1c257 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -68,6 +68,10 @@ tests_avr_system_thorough =3D [ 'avr_mega2560', ] =20 +tests_i386_system_thorough =3D [ + 'i386_tuxrun', +] + tests_loongarch64_system_thorough =3D [ 'loongarch64_virt', ] diff --git a/tests/functional/test_i386_tuxrun.py b/tests/functional/test_i= 386_tuxrun.py new file mode 100755 index 0000000000..c593ffbe8c --- /dev/null +++ b/tests/functional/test_i386_tuxrun.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 +# +# Functional test that boots known good tuxboot images the same way +# that tuxrun (www.tuxrun.org) does. This tool is used by things like +# the LKFT project to run regression tests on kernels. +# +# Copyright (c) 2023 Linaro Ltd. +# +# Author: +# Alex Benn=C3=A9e +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from qemu_test.tuxruntest import TuxRunBaselineTest + +class TuxRunI386Test(TuxRunBaselineTest): + + ASSET_I386_KERNEL =3D Asset( + 'https://storage.tuxboot.com/20230331/i386/bzImage', + 'a3e5b32a354729e65910f5a1ffcda7c14a6c12a55e8213fb86e277f1b76ed956') + ASSET_I386_ROOTFS =3D Asset( + 'https://storage.tuxboot.com/20230331/i386/rootfs.ext4.zst', + 'f15e66b2bf673a210ec2a4b2e744a80530b36289e04f5388aab812b97f69754a') + + def test_i386(self): + self.set_machine('q35') + self.cpu=3D"coreduo" + self.wait_for_shutdown=3DFalse + self.common_tuxrun(kernel_asset=3Dself.ASSET_I386_KERNEL, + rootfs_asset=3Dself.ASSET_I386_ROOTFS, + drive=3D"virtio-blk-pci") + +if __name__ =3D=3D '__main__': + TuxRunBaselineTest.main() --=20 2.46.1 From nobody Sat Nov 23 22:50:46 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=1728666862; cv=none; d=zohomail.com; s=zohoarc; b=hArdpL2BzqvEB+DFQmHhMaulNWuUv811s/sH+4WE7xEhqj9VrpIX8DCK/KorXQnTgbHYlCXgpbMoKn1Vi79a6uA04bMGsOP0Afnhroaoe1puApgQk6n9aZyibptG34nHj0nPixmjoDDmd//BUBLIyvD8vtw7BgMlSdY3ApkuyIQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728666862; 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=QKbaSKgzF0euuiH9rV3sdS0N+O3fcLp7omaVV0/V7/U=; b=PY8vDCqm1J9/NYMCezJVcegRHW/nR+Hv5oPNtogt239DcAa6irOcbSg5Old8anGq1jKh5Bl+Te+lMGofZpkm+hFMqJ8OwaMUQqJDtPMzF9M7mLNG6TCVMrEVOWfih1VLqWVC+KIqJunbMGp+2mUAzrdDgTAaF5VxQqMNPik6b+Y= 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 172866686216090.49381567548699; Fri, 11 Oct 2024 10:14:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szJBW-00048f-Ty; Fri, 11 Oct 2024 13:12:17 -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 1szJ78-0001hX-Mj for qemu-devel@nongnu.org; Fri, 11 Oct 2024 13:07:43 -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 1szFZR-0004Ni-HF for qemu-devel@nongnu.org; Fri, 11 Oct 2024 09:20:43 -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-595-5gVXZP4HOLCtO4r1OzV9Sw-1; Fri, 11 Oct 2024 09:20:37 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 82EBF1955F2E; Fri, 11 Oct 2024 13:20:36 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.77]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 47A1F1955E8F; Fri, 11 Oct 2024 13:20:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728652840; 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=QKbaSKgzF0euuiH9rV3sdS0N+O3fcLp7omaVV0/V7/U=; b=PAF+BjbXYSrnij6SbFXXgDgsMDPD3jFOTgbslXT6ACLhCXy32AoytuHHCW69zax8v7fDxF VA06he7HYlY6aixK9W+5MIZ5YcCUpl5O5TPvN1s2sbSMRwIbMJzNytuINQoNb4n64aBiYI W4DfZbQi3zzlLOuNRRAohEnTinLxn6c= X-MC-Unique: 5gVXZP4HOLCtO4r1OzV9Sw-1 From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Cc: Guenter Roeck , Yoshinori Sato , Magnus Damm , qemu-arm@nongnu.org, Thomas Huth Subject: [PATCH 10/17] tests/functional: Convert the Avocado x86_64 tuxrun test Date: Fri, 11 Oct 2024 15:19:27 +0200 Message-ID: <20241011131937.377223-11-thuth@redhat.com> In-Reply-To: <20241011131937.377223-1-thuth@redhat.com> References: <20241011131937.377223-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.17 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.15, 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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1728666864274116600 Move the tests to a new file so that they can be run via qemu-system-x86_64 in the functional framework. Signed-off-by: Thomas Huth --- tests/avocado/tuxrun_baselines.py | 18 ------------- tests/functional/meson.build | 1 + tests/functional/test_x86_64_tuxrun.py | 36 ++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 18 deletions(-) create mode 100755 tests/functional/test_x86_64_tuxrun.py diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_basel= ines.py index 72b0ad4951..6d00b06713 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -310,21 +310,3 @@ def test_sh4(self): time.sleep(0.1) exec_command_and_wait_for_pattern(self, 'halt', "reboot: System halted") - - def test_x86_64(self): - """ - :avocado: tags=3Darch:x86_64 - :avocado: tags=3Dmachine:q35 - :avocado: tags=3Dcpu:Nehalem - :avocado: tags=3Dtuxboot:x86_64 - :avocado: tags=3Dimage:bzImage - :avocado: tags=3Droot:sda - :avocado: tags=3Dshutdown:nowait - """ - sums =3D { "bzImage" : - "2bc7480a669ee9b6b82500a236aba0c54233debe98cb968268fa230f= 52f03461", - "rootfs.ext4.zst" : - "b72ac729769b8f51c6dffb221113c9a063c774dbe1d66af30eb593c4= e9999b4b" } - - self.common_tuxrun(csums=3Dsums, - drive=3D"driver=3Dide-hd,bus=3Dide.0,unit=3D0") diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 9cdfa1c257..84012810f7 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -169,6 +169,7 @@ tests_x86_64_system_quick =3D [ =20 tests_x86_64_system_thorough =3D [ 'acpi_bits', + 'x86_64_tuxrun', 'linux_initrd', 'multiprocess', 'netdev_ethtool', diff --git a/tests/functional/test_x86_64_tuxrun.py b/tests/functional/test= _x86_64_tuxrun.py new file mode 100755 index 0000000000..4f96139871 --- /dev/null +++ b/tests/functional/test_x86_64_tuxrun.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python3 +# +# Functional test that boots known good tuxboot images the same way +# that tuxrun (www.tuxrun.org) does. This tool is used by things like +# the LKFT project to run regression tests on kernels. +# +# Copyright (c) 2023 Linaro Ltd. +# +# Author: +# Alex Benn=C3=A9e +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from qemu_test.tuxruntest import TuxRunBaselineTest + +class TuxRunX86Test(TuxRunBaselineTest): + + ASSET_X86_64_KERNEL =3D Asset( + 'https://storage.tuxboot.com/20230331/x86_64/bzImage', + '2bc7480a669ee9b6b82500a236aba0c54233debe98cb968268fa230f52f03461') + ASSET_X86_64_ROOTFS =3D Asset( + 'https://storage.tuxboot.com/20230331/x86_64/rootfs.ext4.zst', + 'b72ac729769b8f51c6dffb221113c9a063c774dbe1d66af30eb593c4e9999b4b') + + def test_x86_64(self): + self.set_machine('q35') + self.cpu=3D"Nehalem" + self.root=3D'sda' + self.wait_for_shutdown=3DFalse + self.common_tuxrun(kernel_asset=3Dself.ASSET_X86_64_KERNEL, + rootfs_asset=3Dself.ASSET_X86_64_ROOTFS, + drive=3D"driver=3Dide-hd,bus=3Dide.0,unit=3D0") + +if __name__ =3D=3D '__main__': + TuxRunBaselineTest.main() --=20 2.46.1 From nobody Sat Nov 23 22:50:46 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=1728667139; cv=none; d=zohomail.com; s=zohoarc; b=hxJvIfJc9cF/ZjFKktriq8uXtN4/z7Pzzc8hiwBGzJALhF5mRIpDgSLfgiQzWr0qIQSF+JlP8eIFihmRrInNdthKlHF+K+Ic7cqOl/1V2VIyCxxmqfjYJdbd9MKHkscQiIgSG/0CM4kKwIP/8N7JPCfoLQfHlJ4N6cm+Y/n0rSM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728667139; 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=mbcLhTN/YYKZlf/qtxpugDzhSlARKP0MISPf3J+SyrI=; b=LqNLxnil/pxGNnZcIkYwXUG1WvhSLtGL1SS5i3aT/2maJGGTXwq2rbVKshPPWM2CU60ovaoHQH1s0pKg5zQIqcU0FrWvGwg1B4a/XbpKRsDw78AJ9ri94eyP3e6vNuXhSmBwtF4ivSkbKPSTvyE+fjn08eczA5oA9RhPGythCPw= 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 1728667139915329.9518677641778; Fri, 11 Oct 2024 10:18:59 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szJD5-0007fW-8H; Fri, 11 Oct 2024 13:13: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 1szJ78-0000hD-Lm for qemu-devel@nongnu.org; Fri, 11 Oct 2024 13:07:43 -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 1szFZb-0004RQ-HQ for qemu-devel@nongnu.org; Fri, 11 Oct 2024 09:20:54 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-688-8xScTZD5NMOwB-cnZRG32w-1; Fri, 11 Oct 2024 09:20:41 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 34BC91955F3F; Fri, 11 Oct 2024 13:20:40 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.77]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2D73E1956052; Fri, 11 Oct 2024 13:20:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728652851; 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=mbcLhTN/YYKZlf/qtxpugDzhSlARKP0MISPf3J+SyrI=; b=bYhr51+k5JW5op30qTOjgIkWcd/TXSAyFpj5B80aHrzdz2k6Vb3fFgk4MRCn/XweZrR3qR UTVWsJ5M6Q7j0+xaIBF+B2q6rPGtHx5MrED8WSRYUF4bN/wMfX62oi5k4OPP727x+EXqnu 5lGbOW9Yk2Ii+uEFh0xMOZcgSUgWWYg= X-MC-Unique: 8xScTZD5NMOwB-cnZRG32w-1 From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Cc: Guenter Roeck , Yoshinori Sato , Magnus Damm , qemu-arm@nongnu.org, Thomas Huth Subject: [PATCH 11/17] tests/functional: Convert the Avocado mips tuxrun test Date: Fri, 11 Oct 2024 15:19:28 +0200 Message-ID: <20241011131937.377223-12-thuth@redhat.com> In-Reply-To: <20241011131937.377223-1-thuth@redhat.com> References: <20241011131937.377223-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.17 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: -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.15, 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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1728667141462116600 Move the test into a new file so that it can be run via qemu-system-mips in the functional framework. Signed-off-by: Thomas Huth --- tests/avocado/tuxrun_baselines.py | 18 -------------- tests/functional/meson.build | 1 + tests/functional/test_mips_tuxrun.py | 36 ++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 18 deletions(-) create mode 100755 tests/functional/test_mips_tuxrun.py diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_basel= ines.py index 6d00b06713..8593d204b7 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -192,24 +192,6 @@ def common_tuxrun(self, # --kernel https://storage.tuxboot.com/{TUXBOOT}/{IMAGE} # =20 - def test_mips32(self): - """ - :avocado: tags=3Darch:mips - :avocado: tags=3Dmachine:malta - :avocado: tags=3Dcpu:mips32r6-generic - :avocado: tags=3Dendian:big - :avocado: tags=3Dtuxboot:mips32 - :avocado: tags=3Dimage:vmlinux - :avocado: tags=3Droot:sda - :avocado: tags=3Dshutdown:nowait - """ - sums =3D { "rootfs.ext4.zst" : - "fc3da0b4c2f38d74c6d705123bb0f633c76ed953128f9d0859378c32= 8a6d11a0", - "vmlinux" : - "bfd2172f8b17fb32970ca0c8c58f59c5a4ca38aa5855d920be3a69b5= d16e52f0" } - - self.common_tuxrun(csums=3Dsums, drive=3D"driver=3Dide-hd,bus=3Did= e.0,unit=3D0") - def test_mips32el(self): """ :avocado: tags=3Darch:mipsel diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 84012810f7..4a78c5f8b6 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -92,6 +92,7 @@ tests_microblazeel_system_thorough =3D [ =20 tests_mips_system_thorough =3D [ 'mips_malta', + 'mips_tuxrun', ] =20 tests_mipsel_system_thorough =3D [ diff --git a/tests/functional/test_mips_tuxrun.py b/tests/functional/test_m= ips_tuxrun.py new file mode 100755 index 0000000000..6fec44c2bf --- /dev/null +++ b/tests/functional/test_mips_tuxrun.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python3 +# +# Functional test that boots known good tuxboot images the same way +# that tuxrun (www.tuxrun.org) does. This tool is used by things like +# the LKFT project to run regression tests on kernels. +# +# Copyright (c) 2023 Linaro Ltd. +# +# Author: +# Alex Benn=C3=A9e +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from qemu_test.tuxruntest import TuxRunBaselineTest + +class TuxRunMipsTest(TuxRunBaselineTest): + + ASSET_MIPS_KERNEL =3D Asset( + 'https://storage.tuxboot.com/20230331/mips32/vmlinux', + 'bfd2172f8b17fb32970ca0c8c58f59c5a4ca38aa5855d920be3a69b5d16e52f0') + ASSET_MIPS_ROOTFS =3D Asset( + 'https://storage.tuxboot.com/20230331/mips32/rootfs.ext4.zst', + 'fc3da0b4c2f38d74c6d705123bb0f633c76ed953128f9d0859378c328a6d11a0') + + def test_mips32(self): + self.set_machine('malta') + self.cpu=3D"mips32r6-generic" + self.root=3D"sda" + self.wait_for_shutdown=3DFalse + self.common_tuxrun(kernel_asset=3Dself.ASSET_MIPS_KERNEL, + rootfs_asset=3Dself.ASSET_MIPS_ROOTFS, + drive=3D"driver=3Dide-hd,bus=3Dide.0,unit=3D0") + +if __name__ =3D=3D '__main__': + TuxRunBaselineTest.main() --=20 2.46.1 From nobody Sat Nov 23 22:50:46 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=1728667202; cv=none; d=zohomail.com; s=zohoarc; b=AIY9pGsO/KsdY+yZdLek+9bM9Anka83dkEZ16NO5zy/0Fbs4ZYWXtAR3AjdVe3SuuluY/D6PHOB7ieIrrQUxaNv8n8gd+HMFWTdSE7ZgdkjPaY1aGvOYBYI+VKKX6EpNCV657D6djp9+0JqCi3St2zP8KWnqlL3OM6URx7s3Rk8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728667202; 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=hKLNXEIbaQ2WWuifBj7MYKH9Xy1I+/rrjIxbz8im7+Y=; b=gxOsuH6D9F6hDevUJqPZlFJS3uKGIGePuDZIciH7hEn0GBu+egpb4OSCbjuw4NbkUOCnUxNHPOYolPmIFgpP0U8H8z15iyyixpHZvj3+ppaCCBMHo5tcfWHNnO6+TIGHcyllvhzBQvQtfz+3KJ6UfxmThlXeSoyuCxMGf0Xq/7I= 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 1728667202535336.9719426679251; Fri, 11 Oct 2024 10:20:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szJDC-0007sd-KH; Fri, 11 Oct 2024 13:13:58 -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 1szJ78-0003Vw-Kb for qemu-devel@nongnu.org; Fri, 11 Oct 2024 13:07:43 -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 1szFZc-0004RZ-1y for qemu-devel@nongnu.org; Fri, 11 Oct 2024 09:20:54 -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-269-txhUQfpsOeOpbsWfEdADhw-1; Fri, 11 Oct 2024 09:20:45 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 D75981955D56; Fri, 11 Oct 2024 13:20:43 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.77]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C369A1955E8F; Fri, 11 Oct 2024 13:20:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728652851; 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=hKLNXEIbaQ2WWuifBj7MYKH9Xy1I+/rrjIxbz8im7+Y=; b=EoxCr553V+AoTO4aWVK8OZn5n5S6fdfgpkKIGnUjoIuQvxZeJHaAwUrgp9xYE7qDncrliL CYVAaAUSHdj2soeCV2AutyYiJmqL6jUS/7iykiZNR+7ViFyN/wPu/mFnolRJFkIwpbGsz4 qMb7oAwon63WooLLbGDlDPfCZb5BFug= X-MC-Unique: txhUQfpsOeOpbsWfEdADhw-1 From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Cc: Guenter Roeck , Yoshinori Sato , Magnus Damm , qemu-arm@nongnu.org, Thomas Huth Subject: [PATCH 12/17] tests/functional: Convert the Avocado mipsel tuxrun test Date: Fri, 11 Oct 2024 15:19:29 +0200 Message-ID: <20241011131937.377223-13-thuth@redhat.com> In-Reply-To: <20241011131937.377223-1-thuth@redhat.com> References: <20241011131937.377223-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.17 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.15, 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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1728667203641116600 Move the test into a new file so that it can be run via qemu-system-mipsel in the functional framework. Signed-off-by: Thomas Huth --- tests/avocado/tuxrun_baselines.py | 17 ------------ tests/functional/meson.build | 1 + tests/functional/test_mipsel_tuxrun.py | 36 ++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 17 deletions(-) create mode 100755 tests/functional/test_mipsel_tuxrun.py diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_basel= ines.py index 8593d204b7..d45c2ce35e 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -192,23 +192,6 @@ def common_tuxrun(self, # --kernel https://storage.tuxboot.com/{TUXBOOT}/{IMAGE} # =20 - def test_mips32el(self): - """ - :avocado: tags=3Darch:mipsel - :avocado: tags=3Dmachine:malta - :avocado: tags=3Dcpu:mips32r6-generic - :avocado: tags=3Dtuxboot:mips32el - :avocado: tags=3Dimage:vmlinux - :avocado: tags=3Droot:sda - :avocado: tags=3Dshutdown:nowait - """ - sums =3D { "rootfs.ext4.zst" : - "e799768e289fd69209c21f4dacffa11baea7543d5db101e8ce27e3bc= 2c41d90e", - "vmlinux" : - "8573867c68a8443db8de6d08bb33fb291c189ca2ca671471d3973a3e= 712096a3" } - - self.common_tuxrun(csums=3Dsums, drive=3D"driver=3Dide-hd,bus=3Did= e.0,unit=3D0") - def test_mips64(self): """ :avocado: tags=3Darch:mips64 diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 4a78c5f8b6..813237e412 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -97,6 +97,7 @@ tests_mips_system_thorough =3D [ =20 tests_mipsel_system_thorough =3D [ 'mipsel_malta', + 'mipsel_tuxrun', ] =20 tests_mips64el_system_thorough =3D [ diff --git a/tests/functional/test_mipsel_tuxrun.py b/tests/functional/test= _mipsel_tuxrun.py new file mode 100755 index 0000000000..2965bbd913 --- /dev/null +++ b/tests/functional/test_mipsel_tuxrun.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python3 +# +# Functional test that boots known good tuxboot images the same way +# that tuxrun (www.tuxrun.org) does. This tool is used by things like +# the LKFT project to run regression tests on kernels. +# +# Copyright (c) 2023 Linaro Ltd. +# +# Author: +# Alex Benn=C3=A9e +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from qemu_test.tuxruntest import TuxRunBaselineTest + +class TuxRunMipsELTest(TuxRunBaselineTest): + + ASSET_MIPSEL_KERNEL =3D Asset( + 'https://storage.tuxboot.com/20230331/mips32el/vmlinux', + '8573867c68a8443db8de6d08bb33fb291c189ca2ca671471d3973a3e712096a3') + ASSET_MIPSEL_ROOTFS =3D Asset( + 'https://storage.tuxboot.com/20230331/mips32el/rootfs.ext4.zst', + 'e799768e289fd69209c21f4dacffa11baea7543d5db101e8ce27e3bc2c41d90e') + + def test_mips32el(self): + self.set_machine('malta') + self.cpu=3D"mips32r6-generic" + self.root=3D"sda" + self.wait_for_shutdown=3DFalse + self.common_tuxrun(kernel_asset=3Dself.ASSET_MIPSEL_KERNEL, + rootfs_asset=3Dself.ASSET_MIPSEL_ROOTFS, + drive=3D"driver=3Dide-hd,bus=3Dide.0,unit=3D0") + +if __name__ =3D=3D '__main__': + TuxRunBaselineTest.main() --=20 2.46.1 From nobody Sat Nov 23 22:50:46 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=1728667746; cv=none; d=zohomail.com; s=zohoarc; b=VX4eCos50OHDb+qZB0Uy/MvgHpxg1bzCOuVUokTSo989EhedAn83ZSb9Zqu53E/C9Sbb2aP1nU0ZtIS1ExafgDn31HRViR6J8h6OBH0OWZAHLZmw5EJJxciUs5UriT1x2DevSE9tlwSgto6WL4EehPMuUZQ//O3FIuB+pUF6yo4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728667746; 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=OcUoJ5PXttCpLGQ6HYe2UvZN9SjHytyJH4avjZ+Qm5g=; b=ZGu7THP3zRHAUPTF2GSMJC5xVr5wUwhTk1bQn6q5rlCmumTa1NyhTxyav12andlvGoC6SpSAXfaQT60c/aigdXkM9su8Q54QSRByxtOevmgLrWewrqCb52UdKVL+NJ19fHc0bgXnz2cGhscKkzFwC4LYkU5Y7s04JLDltT/kHWA= 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 1728667746426165.55625393485536; Fri, 11 Oct 2024 10:29:06 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szJDK-0000Rk-Qu; Fri, 11 Oct 2024 13:14:06 -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 1szJ78-0004AI-KS for qemu-devel@nongnu.org; Fri, 11 Oct 2024 13:07:43 -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 1szFZf-0004Ri-IL for qemu-devel@nongnu.org; Fri, 11 Oct 2024 09:20:56 -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-515-SG5v50-HPv6Dp-mKY8YTwA-1; Fri, 11 Oct 2024 09:20:50 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 B66B11955D47; Fri, 11 Oct 2024 13:20:48 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.77]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D527B1956052; Fri, 11 Oct 2024 13:20:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728652851; 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=OcUoJ5PXttCpLGQ6HYe2UvZN9SjHytyJH4avjZ+Qm5g=; b=L1e/5NKe+674O4Bda5qwP8cMiQL066D36zqnycQbyw9xJap/ArXN+wPP3lvxX4us9HVHM2 pAPTrc2juN4vbsQfhA1TfMosSKjMVbBnckAeTEyB/23F07pMaPYNo/eB3QrcB01pvEl2Ho /fuXVws44e3xJtk03acbCDUaHSRbxV4= X-MC-Unique: SG5v50-HPv6Dp-mKY8YTwA-1 From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Cc: Guenter Roeck , Yoshinori Sato , Magnus Damm , qemu-arm@nongnu.org, Thomas Huth Subject: [PATCH 13/17] tests/functional: Convert the Avocado mips64 tuxrun test Date: Fri, 11 Oct 2024 15:19:30 +0200 Message-ID: <20241011131937.377223-14-thuth@redhat.com> In-Reply-To: <20241011131937.377223-1-thuth@redhat.com> References: <20241011131937.377223-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.17 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.15, 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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1728667747031116600 Move the test into a new file so that it can be run via qemu-system-mips64 in the functional framework. Signed-off-by: Thomas Huth --- tests/avocado/tuxrun_baselines.py | 17 ------------- tests/functional/meson.build | 4 +++ tests/functional/test_mips64_tuxrun.py | 35 ++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 17 deletions(-) create mode 100755 tests/functional/test_mips64_tuxrun.py diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_basel= ines.py index d45c2ce35e..e0e6a56067 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -192,23 +192,6 @@ def common_tuxrun(self, # --kernel https://storage.tuxboot.com/{TUXBOOT}/{IMAGE} # =20 - def test_mips64(self): - """ - :avocado: tags=3Darch:mips64 - :avocado: tags=3Dmachine:malta - :avocado: tags=3Dtuxboot:mips64 - :avocado: tags=3Dendian:big - :avocado: tags=3Dimage:vmlinux - :avocado: tags=3Droot:sda - :avocado: tags=3Dshutdown:nowait - """ - sums =3D { "rootfs.ext4.zst" : - "69d91eeb04df3d8d172922c6993bb37d4deeb6496def75d8580f6f9d= e3e431da", - "vmlinux" : - "09010e51e4b8bcbbd2494786ffb48eca78f228e96e5c5438344b0eac= 4029dc61" } - - self.common_tuxrun(csums=3Dsums, drive=3D"driver=3Dide-hd,bus=3Did= e.0,unit=3D0") - def test_mips64el(self): """ :avocado: tags=3Darch:mips64el diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 813237e412..eef48edf52 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -100,6 +100,10 @@ tests_mipsel_system_thorough =3D [ 'mipsel_tuxrun', ] =20 +tests_mips64_system_thorough =3D [ + 'mips64_tuxrun', +] + tests_mips64el_system_thorough =3D [ 'mips64el_fuloong2e', 'mips64el_loongson3v', diff --git a/tests/functional/test_mips64_tuxrun.py b/tests/functional/test= _mips64_tuxrun.py new file mode 100755 index 0000000000..54af1ae794 --- /dev/null +++ b/tests/functional/test_mips64_tuxrun.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 +# +# Functional test that boots known good tuxboot images the same way +# that tuxrun (www.tuxrun.org) does. This tool is used by things like +# the LKFT project to run regression tests on kernels. +# +# Copyright (c) 2023 Linaro Ltd. +# +# Author: +# Alex Benn=C3=A9e +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from qemu_test.tuxruntest import TuxRunBaselineTest + +class TuxRunMips64Test(TuxRunBaselineTest): + + ASSET_MIPS64_KERNEL =3D Asset( + 'https://storage.tuxboot.com/20230331/mips64/vmlinux', + '09010e51e4b8bcbbd2494786ffb48eca78f228e96e5c5438344b0eac4029dc61') + ASSET_MIPS64_ROOTFS =3D Asset( + 'https://storage.tuxboot.com/20230331/mips64/rootfs.ext4.zst', + '69d91eeb04df3d8d172922c6993bb37d4deeb6496def75d8580f6f9de3e431da') + + def test_mips64(self): + self.set_machine('malta') + self.root=3D"sda" + self.wait_for_shutdown=3DFalse + self.common_tuxrun(kernel_asset=3Dself.ASSET_MIPS64_KERNEL, + rootfs_asset=3Dself.ASSET_MIPS64_ROOTFS, + drive=3D"driver=3Dide-hd,bus=3Dide.0,unit=3D0") + +if __name__ =3D=3D '__main__': + TuxRunBaselineTest.main() --=20 2.46.1 From nobody Sat Nov 23 22:50:46 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=1728667964; cv=none; d=zohomail.com; s=zohoarc; b=YaY1yZug7GxpsNQME4om05XPSuVQGr9+mNpzKMvqTHa7mRXM4hfPYUS42VjmKLqUSVeUbkJyLF2Uv69a9GULzTcGR5Ap5jAh4UxEdPuQtVFtH5x8pUg5i3ay/5Ko4NZUao2R5j2lhEHXHe/7yv5TizsNQyxWE+O01Gi6OMA7c10= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728667964; 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=GVVahyK6aiG7rFiHC9ll3BUOZPbdp7wyzMUyWTHzn+g=; b=fMEF3nUrCAk3hYrMkiUuEwjtYHb6VQY9fnQOeasFLV0iSXGBgD6/Ov4ZvIbHvBEnhVP4TW87539Uq6ayqoj5L0yGsOI5V+MWe0nbjPgYorXm4kfyAbhmwEol/Tou+H1SDfkTIbdp90pLHPBRQvT1e0Ut2hZUBurtc3VJEapwpME= 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 1728667964840214.90937582355457; Fri, 11 Oct 2024 10:32:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szJGd-0006UI-1q; Fri, 11 Oct 2024 13:17:31 -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 1szJ76-0003Vw-03 for qemu-devel@nongnu.org; Fri, 11 Oct 2024 13:07:40 -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 1szFZo-0004Un-MQ for qemu-devel@nongnu.org; Fri, 11 Oct 2024 09:21:06 -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-28-eV-Y9c6hMQGPQRAkEQl6lg-1; Fri, 11 Oct 2024 09:20:56 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 0F3DF1955F44; Fri, 11 Oct 2024 13:20:52 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.77]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 496501955E7B; Fri, 11 Oct 2024 13:20:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728652864; 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=GVVahyK6aiG7rFiHC9ll3BUOZPbdp7wyzMUyWTHzn+g=; b=Dz+SDplIro5CakysydjH5X2/fBhByZl7ZQQXqpimxhGmSEmS1CaUibdx0dBHWNQN/r/t93 5psGo/ezX/Abgue470veaj/3bE+iIo+p0HvcLIfEIONa23JJKBIoixWBbuNCcPi00XenW6 a5fFl7Fv3lfmrqZzPrb/S5OVwIgoIVY= X-MC-Unique: eV-Y9c6hMQGPQRAkEQl6lg-1 From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Cc: Guenter Roeck , Yoshinori Sato , Magnus Damm , qemu-arm@nongnu.org, Thomas Huth Subject: [PATCH 14/17] tests/functional: Convert the Avocado mips64el tuxrun test Date: Fri, 11 Oct 2024 15:19:31 +0200 Message-ID: <20241011131937.377223-15-thuth@redhat.com> In-Reply-To: <20241011131937.377223-1-thuth@redhat.com> References: <20241011131937.377223-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.17 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: -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.15, 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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1728667966266116600 Move the test into a new file so that it can be run via qemu-system-mips64el in the functional framework. Signed-off-by: Thomas Huth --- tests/avocado/tuxrun_baselines.py | 16 ----------- tests/functional/meson.build | 1 + tests/functional/test_mips64el_tuxrun.py | 35 ++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 16 deletions(-) create mode 100755 tests/functional/test_mips64el_tuxrun.py diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_basel= ines.py index e0e6a56067..18dc7ddaab 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -192,22 +192,6 @@ def common_tuxrun(self, # --kernel https://storage.tuxboot.com/{TUXBOOT}/{IMAGE} # =20 - def test_mips64el(self): - """ - :avocado: tags=3Darch:mips64el - :avocado: tags=3Dmachine:malta - :avocado: tags=3Dtuxboot:mips64el - :avocado: tags=3Dimage:vmlinux - :avocado: tags=3Droot:sda - :avocado: tags=3Dshutdown:nowait - """ - sums =3D { "rootfs.ext4.zst" : - "fba585368f5915b1498ed081863474b2d7ec4e97cdd46d21bdcb2f96= 98f83de4", - "vmlinux" : - "d4e08965e2155c4cccce7c5f34d18fe34c636cda2f2c9844387d6149= 50155266" } - - self.common_tuxrun(csums=3Dsums, drive=3D"driver=3Dide-hd,bus=3Did= e.0,unit=3D0") - def test_ppc32(self): """ :avocado: tags=3Darch:ppc diff --git a/tests/functional/meson.build b/tests/functional/meson.build index eef48edf52..48445edfab 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -108,6 +108,7 @@ tests_mips64el_system_thorough =3D [ 'mips64el_fuloong2e', 'mips64el_loongson3v', 'mips64el_malta', + 'mips64el_tuxrun', ] =20 tests_or1k_system_thorough =3D [ diff --git a/tests/functional/test_mips64el_tuxrun.py b/tests/functional/te= st_mips64el_tuxrun.py new file mode 100755 index 0000000000..819549a27b --- /dev/null +++ b/tests/functional/test_mips64el_tuxrun.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 +# +# Functional test that boots known good tuxboot images the same way +# that tuxrun (www.tuxrun.org) does. This tool is used by things like +# the LKFT project to run regression tests on kernels. +# +# Copyright (c) 2023 Linaro Ltd. +# +# Author: +# Alex Benn=C3=A9e +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from qemu_test.tuxruntest import TuxRunBaselineTest + +class TuxRunMips64ELTest(TuxRunBaselineTest): + + ASSET_MIPS64EL_KERNEL =3D Asset( + 'https://storage.tuxboot.com/20230331/mips64el/vmlinux', + 'd4e08965e2155c4cccce7c5f34d18fe34c636cda2f2c9844387d614950155266') + ASSET_MIPS64EL_ROOTFS =3D Asset( + 'https://storage.tuxboot.com/20230331/mips64el/rootfs.ext4.zst', + 'fba585368f5915b1498ed081863474b2d7ec4e97cdd46d21bdcb2f9698f83de4') + + def test_mips64el(self): + self.set_machine('malta') + self.root=3D"sda" + self.wait_for_shutdown=3DFalse + self.common_tuxrun(kernel_asset=3Dself.ASSET_MIPS64EL_KERNEL, + rootfs_asset=3Dself.ASSET_MIPS64EL_ROOTFS, + drive=3D"driver=3Dide-hd,bus=3Dide.0,unit=3D0") + +if __name__ =3D=3D '__main__': + TuxRunBaselineTest.main() --=20 2.46.1 From nobody Sat Nov 23 22:50:46 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=1728667729; cv=none; d=zohomail.com; s=zohoarc; b=S4cQJqueYbiRR+cAiW0q2hu135sioiwGJIQqOFIEjIxYP85wW9R+vPyhiclkMjAGElZtZWKImTjSX+1x7Ut7/cF2lUd+ekPEI8DP9wmcPmCC7z6KKq6i2esmptGJAuTxyamQaAYp8yAZnBrpu2sMyZt/rp+2/nZHfxZfRYrq+Hg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728667729; 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=PDg0vyitJ62VONBC0A96zp3mijsQBxH/c04ECt3WkC4=; b=Cx0qcVIKo5LipGPbzCfaZkF/eBbnE0cYqtEZfMUd8d3RIgWLAiF8UUqcU6IMuMPzBuC/Wusvx9XR9bi0N3W+/EbITjyj7rU48bhecd535HHjhm7IKcTKYw+g6AcOB7d7atYEKMm88KsdhaQQ+y6xZfEU90eQTyIn2DtbWEHsW5w= 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 17286677290375.06027848067356; Fri, 11 Oct 2024 10:28:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szJCc-0006ub-RP; Fri, 11 Oct 2024 13:13:23 -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 1szJ77-0003Vx-HS for qemu-devel@nongnu.org; Fri, 11 Oct 2024 13:07:42 -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 1szFZl-0004UB-St for qemu-devel@nongnu.org; Fri, 11 Oct 2024 09:21:03 -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-402-G9cPMQ_5MCup-BXHkjGH_Q-1; Fri, 11 Oct 2024 09:20:57 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 9837B1955F45; Fri, 11 Oct 2024 13:20:55 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.77]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 88F4D1956052; Fri, 11 Oct 2024 13:20:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728652861; 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=PDg0vyitJ62VONBC0A96zp3mijsQBxH/c04ECt3WkC4=; b=Qo4q3Bup96hzXs+AYoTSCYFKraPo8R8HfS/rz8UgG357NBqSmooI7Jdu0aalOCWKrnAdHw 34S4q7A/JinDrB/2rZhcCru4hVqPhfmog/XOSMEloz0v8Y7apFjdOsRo5eTK+EIIeddilL rJ8ZkhDxAii7GClzIk7I8x6E/Ar7nAU= X-MC-Unique: G9cPMQ_5MCup-BXHkjGH_Q-1 From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Cc: Guenter Roeck , Yoshinori Sato , Magnus Damm , qemu-arm@nongnu.org, Thomas Huth Subject: [PATCH 15/17] tests/functional: Convert the Avocado ppc32 tuxrun test Date: Fri, 11 Oct 2024 15:19:32 +0200 Message-ID: <20241011131937.377223-16-thuth@redhat.com> In-Reply-To: <20241011131937.377223-1-thuth@redhat.com> References: <20241011131937.377223-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.17 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: -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.15, 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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1728667731019116600 Move the test into a new file so that it can be run via qemu-system-ppc in the functional framework. Signed-off-by: Thomas Huth --- tests/avocado/tuxrun_baselines.py | 16 ------------- tests/functional/meson.build | 1 + tests/functional/test_ppc_tuxrun.py | 35 +++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 16 deletions(-) create mode 100755 tests/functional/test_ppc_tuxrun.py diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_basel= ines.py index 18dc7ddaab..c358095e1f 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -192,22 +192,6 @@ def common_tuxrun(self, # --kernel https://storage.tuxboot.com/{TUXBOOT}/{IMAGE} # =20 - def test_ppc32(self): - """ - :avocado: tags=3Darch:ppc - :avocado: tags=3Dmachine:ppce500 - :avocado: tags=3Dcpu:e500mc - :avocado: tags=3Dtuxboot:ppc32 - :avocado: tags=3Dimage:uImage - :avocado: tags=3Dshutdown:nowait - """ - sums =3D { "rootfs.ext4.zst" : - "8885b9d999cc24d679542a02e9b6aaf48f718f2050ece6b8347074b6= ee41dd09", - "uImage" : - "1a68f74b860fda022fb12e03c5efece8c2b8b590d96cca37a8481a3a= e0b3f81f" } - - self.common_tuxrun(csums=3Dsums, drive=3D"virtio-blk-pci") - # Note: some segfaults caused by unaligned userspace access @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on G= itLab') def test_sh4(self): diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 48445edfab..c17c9b0700 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -126,6 +126,7 @@ tests_ppc_system_thorough =3D [ 'ppc_bamboo', 'ppc_mac', 'ppc_mpc8544ds', + 'ppc_tuxrun', 'ppc_virtex_ml507', ] =20 diff --git a/tests/functional/test_ppc_tuxrun.py b/tests/functional/test_pp= c_tuxrun.py new file mode 100755 index 0000000000..50b76946c4 --- /dev/null +++ b/tests/functional/test_ppc_tuxrun.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 +# +# Functional test that boots known good tuxboot images the same way +# that tuxrun (www.tuxrun.org) does. This tool is used by things like +# the LKFT project to run regression tests on kernels. +# +# Copyright (c) 2023 Linaro Ltd. +# +# Author: +# Alex Benn=C3=A9e +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from qemu_test.tuxruntest import TuxRunBaselineTest + +class TuxRunPPC32Test(TuxRunBaselineTest): + + ASSET_PPC32_KERNEL =3D Asset( + 'https://storage.tuxboot.com/20230331/ppc32/uImage', + '1a68f74b860fda022fb12e03c5efece8c2b8b590d96cca37a8481a3ae0b3f81f') + ASSET_PPC32_ROOTFS =3D Asset( + 'https://storage.tuxboot.com/20230331/ppc32/rootfs.ext4.zst', + '8885b9d999cc24d679542a02e9b6aaf48f718f2050ece6b8347074b6ee41dd09') + + def test_ppc32(self): + self.set_machine('ppce500') + self.cpu=3D'e500mc' + self.wait_for_shutdown=3DFalse + self.common_tuxrun(kernel_asset=3Dself.ASSET_PPC32_KERNEL, + rootfs_asset=3Dself.ASSET_PPC32_ROOTFS, + drive=3D"virtio-blk-pci") + +if __name__ =3D=3D '__main__': + TuxRunBaselineTest.main() --=20 2.46.1 From nobody Sat Nov 23 22:50:46 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=1728667414; cv=none; d=zohomail.com; s=zohoarc; b=cPQ387GBcB2Fmd2rq6byCotI1YuECS0fc6QfWdtCVIXz04Mpg24t9tj40aHep29UdMssTdI73leckqTMz+FW8TjH4hS2BnOrvBPV5HNXvNanpWi84cg56Uyzy95d7DGm1WTwEC4QHMChOIBYeJ8zvmhJ08BWC1RrfbTpKZdoKQw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728667414; 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=JREXIIvl302nrjZLS5RAoHzWxTFKuXAGwAHQ6gMR2Hg=; b=Za6rIz8MtBV7K4LnYbYhWbKtS2ucFcsK6riPnuow6IxwImNxSrvVeyIkIHxDHE5KDHrHN569zOH5sKiTWWW94adQtmG0vok35tn3gHmAjB0c9m6Ib+aE+GPU9rAqgwCrzgSnf68H5rrp0MmMaKf9bDyZ4K3ThXEk6Aaafi2jjvI= 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 1728667414447568.8138937190022; Fri, 11 Oct 2024 10:23:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szJCV-0006I2-1Q; Fri, 11 Oct 2024 13:13:15 -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 1szJ76-0000wP-2U for qemu-devel@nongnu.org; Fri, 11 Oct 2024 13:07:41 -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 1szFZp-0004V8-6A for qemu-devel@nongnu.org; Fri, 11 Oct 2024 09:21:06 -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-638-DufTexF8MpaGj1B6Ka8pYQ-1; Fri, 11 Oct 2024 09:21:01 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 D19411955D5F; Fri, 11 Oct 2024 13:20:59 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.77]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5D1951955E8F; Fri, 11 Oct 2024 13:20:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728652864; 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=JREXIIvl302nrjZLS5RAoHzWxTFKuXAGwAHQ6gMR2Hg=; b=WRyfxEXkPK1ibg3y6QZieL3Jg3wrvmh1pzLK3FIeo7ZInoMtp6tyPAxxxajZhKpb/X0noy LryTY0eWGZUiMQuUn9ulKLugg/1fTpGY/+7wgsCcbNYtJKK+3Wwc2+SIntMJlCYLmYudRe OwWv84z/1+yXGgb7rwwb0NiuphFRkGU= X-MC-Unique: DufTexF8MpaGj1B6Ka8pYQ-1 From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Cc: Guenter Roeck , Yoshinori Sato , Magnus Damm , qemu-arm@nongnu.org, Thomas Huth Subject: [PATCH 16/17] Revert "hw/sh4/r2d: Realize IDE controller before accessing it" Date: Fri, 11 Oct 2024 15:19:33 +0200 Message-ID: <20241011131937.377223-17-thuth@redhat.com> In-Reply-To: <20241011131937.377223-1-thuth@redhat.com> References: <20241011131937.377223-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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: -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.15, 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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1728667415443116600 Content-Type: text/plain; charset="utf-8" This reverts commit 3c5f86a22686ef475a8259c0d8ee714f61c770c9. Changing the order here caused a regression with the "tuxrun" kernels (from https://storage.tuxboot.com/20230331/) - ATA commands fail with a "ata1: lost interrupt (Status 0x58)" message. Apparently we need to wire the interrupt here first before realizing the device, so revert the change to the original behavior. Reported-by: Guenter Roeck Signed-off-by: Thomas Huth Acked-by: Philippe Mathieu-Daud=C3=A9 --- hw/sh4/r2d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c index e5ac6751bd..7eecd79fcc 100644 --- a/hw/sh4/r2d.c +++ b/hw/sh4/r2d.c @@ -286,9 +286,9 @@ static void r2d_init(MachineState *machine) dinfo =3D drive_get(IF_IDE, 0, 0); dev =3D qdev_new("mmio-ide"); busdev =3D SYS_BUS_DEVICE(dev); + sysbus_connect_irq(busdev, 0, irq[CF_IDE]); qdev_prop_set_uint32(dev, "shift", 1); sysbus_realize_and_unref(busdev, &error_fatal); - sysbus_connect_irq(busdev, 0, irq[CF_IDE]); sysbus_mmio_map(busdev, 0, 0x14001000); sysbus_mmio_map(busdev, 1, 0x1400080c); mmio_ide_init_drives(dev, dinfo, NULL); --=20 2.46.1 From nobody Sat Nov 23 22:50:46 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=1728668072; cv=none; d=zohomail.com; s=zohoarc; b=Znn/rw4iIIo0PfdcG/M9jMytdZQnFChDITKcAMe3jU80aud04zRiPyWgzSYntq5+EuRnQ1YJs7ZCEtHR7XM0hF97XJFz4cSUAcRrCyZ3gX8WEa7tZu32Zb74I6FwdVNKQyehjNkuzn9uwDhpFuTrgMk/QVyn42t7Wg7zFX8i0jA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728668072; 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=x+ggIoBaMj2R6F9eH6cEtv4h0m1WXCB4RfcKG4Zja5M=; b=RaWLVrSAP+pY5Jb8oijDDA/8CPW/SsKL24I/IcmRhL+UFb30PNCABVdsBnQBShvdkKkzVKNA4EviVi+VTxGCbV9UogWp2uciW252TwBannJWXKMjt3z4GDnHcmvSi+yRW6F1hMDowHtib1hU9AgsP2YlKF6Nqqas7w6BTGcb5sg= 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 1728668072618537.9836101252195; Fri, 11 Oct 2024 10:34:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szJDD-00082T-MJ; Fri, 11 Oct 2024 13:13:59 -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 1szJ76-0000hD-06 for qemu-devel@nongnu.org; Fri, 11 Oct 2024 13:07: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 1szFZs-0004Wo-30 for qemu-devel@nongnu.org; Fri, 11 Oct 2024 09:21:11 -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-689-WDFvBM_9P4SiXyplw4dIzQ-1; Fri, 11 Oct 2024 09:21:04 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 10EEC1955F41; Fri, 11 Oct 2024 13:21:03 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.193.77]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 39B841956052; Fri, 11 Oct 2024 13:20:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728652867; 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=x+ggIoBaMj2R6F9eH6cEtv4h0m1WXCB4RfcKG4Zja5M=; b=gNSrQ+5jUOsUQuYGq0NsBmWNdoyvsFUV0YlJJOZOmNEIpg/Dz2PXedWPp2ZtMb9CbN9JnY qykjqFOPUzwCxjdpr7tDiCOAt8MZcI6EvR6IAp2UdMSHhjDcCuDE/LMakEkZ6Lu9KwD0Lg uYOnsT7d0t+xXhmUMLumJWmLPmOe7PI= X-MC-Unique: WDFvBM_9P4SiXyplw4dIzQ-1 From: Thomas Huth To: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Cc: Guenter Roeck , Yoshinori Sato , Magnus Damm , qemu-arm@nongnu.org, Thomas Huth Subject: [PATCH 17/17] tests/functional: Convert the Avocado sh4 tuxrun test Date: Fri, 11 Oct 2024 15:19:34 +0200 Message-ID: <20241011131937.377223-18-thuth@redhat.com> In-Reply-To: <20241011131937.377223-1-thuth@redhat.com> References: <20241011131937.377223-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.17 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.15, 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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1728668074834116600 Move the test into a new file so that it can be run via qemu-system-sh4 in the functional framework. Since this was the last test in tests/avocado/tuxrun_baselines.py, we can now delete that file completely. Signed-off-by: Thomas Huth --- tests/avocado/tuxrun_baselines.py | 228 ---------------------------- tests/functional/meson.build | 2 + tests/functional/test_sh4_tuxrun.py | 57 +++++++ 3 files changed, 59 insertions(+), 228 deletions(-) delete mode 100644 tests/avocado/tuxrun_baselines.py create mode 100755 tests/functional/test_sh4_tuxrun.py diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_basel= ines.py deleted file mode 100644 index c358095e1f..0000000000 --- a/tests/avocado/tuxrun_baselines.py +++ /dev/null @@ -1,228 +0,0 @@ -# Functional test that boots known good tuxboot images the same way -# that tuxrun (www.tuxrun.org) does. This tool is used by things like -# the LKFT project to run regression tests on kernels. -# -# Copyright (c) 2023 Linaro Ltd. -# -# Author: -# Alex Benn=C3=A9e -# -# SPDX-License-Identifier: GPL-2.0-or-later - -import os -import time -import tempfile - -from avocado import skip, skipUnless -from avocado_qemu import QemuSystemTest -from avocado_qemu import exec_command, exec_command_and_wait_for_pattern -from avocado_qemu import wait_for_console_pattern -from avocado.utils import process -from avocado.utils.path import find_command - -class TuxRunBaselineTest(QemuSystemTest): - """ - :avocado: tags=3Daccel:tcg - """ - - KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0' - # Tests are ~10-40s, allow for --debug/--enable-gcov overhead - timeout =3D 100 - - def get_tag(self, tagname, default=3DNone): - """ - Get the metadata tag or return the default. - """ - utag =3D self._get_unique_tag_val(tagname) - print(f"{tagname}/{default} -> {utag}") - if utag: - return utag - - return default - - def setUp(self): - super().setUp() - - # We need zstd for all the tuxrun tests - # See https://github.com/avocado-framework/avocado/issues/5609 - zstd =3D find_command('zstd', False) - if zstd is False: - self.cancel('Could not find "zstd", which is required to ' - 'decompress rootfs') - self.zstd =3D zstd - - # Process the TuxRun specific tags, most machines work with - # reasonable defaults but we sometimes need to tweak the - # config. To avoid open coding everything we store all these - # details in the metadata for each test. - - # The tuxboot tag matches the root directory - self.tuxboot =3D self.get_tag('tuxboot') - - # Most Linux's use ttyS0 for their serial port - self.console =3D self.get_tag('console', "ttyS0") - - # Does the machine shutdown QEMU nicely on "halt" - self.shutdown =3D self.get_tag('shutdown') - - # The name of the kernel Image file - self.image =3D self.get_tag('image', "Image") - - self.root =3D self.get_tag('root', "vda") - - # Occasionally we need extra devices to hook things up - self.extradev =3D self.get_tag('extradev') - - self.qemu_img =3D super().get_qemu_img() - - def wait_for_console_pattern(self, success_message, vm=3DNone): - wait_for_console_pattern(self, success_message, - failure_message=3D'Kernel panic - not syn= cing', - vm=3Dvm) - - def fetch_tuxrun_assets(self, csums=3DNone, dt=3DNone): - """ - Fetch the TuxBoot assets. They are stored in a standard way so we - use the per-test tags to fetch details. - """ - base_url =3D f"https://storage.tuxboot.com/20230331/{self.tuxboot}= /" - - # empty hash if we weren't passed one - csums =3D {} if csums is None else csums - ksum =3D csums.get(self.image, None) - isum =3D csums.get("rootfs.ext4.zst", None) - - kernel_image =3D self.fetch_asset(base_url + self.image, - asset_hash =3D ksum, - algorithm =3D "sha256") - disk_image_zst =3D self.fetch_asset(base_url + "rootfs.ext4.zst", - asset_hash =3D isum, - algorithm =3D "sha256") - - cmd =3D f"{self.zstd} -d {disk_image_zst} -o {self.workdir}/rootfs= .ext4" - process.run(cmd) - - if dt: - dsum =3D csums.get(dt, None) - dtb =3D self.fetch_asset(base_url + dt, - asset_hash =3D dsum, - algorithm =3D "sha256") - else: - dtb =3D None - - return (kernel_image, self.workdir + "/rootfs.ext4", dtb) - - def prepare_run(self, kernel, disk, drive, dtb=3DNone, console_index= =3D0): - """ - Setup to run and add the common parameters to the system - """ - self.vm.set_console(console_index=3Dconsole_index) - - # all block devices are raw ext4's - blockdev =3D "driver=3Draw,file.driver=3Dfile," \ - + f"file.filename=3D{disk},node-name=3Dhd0" - - kcmd_line =3D self.KERNEL_COMMON_COMMAND_LINE - kcmd_line +=3D f" root=3D/dev/{self.root}" - kcmd_line +=3D f" console=3D{self.console}" - - self.vm.add_args('-kernel', kernel, - '-append', kcmd_line, - '-blockdev', blockdev) - - # Sometimes we need extra devices attached - if self.extradev: - self.vm.add_args('-device', self.extradev) - - self.vm.add_args('-device', - f"{drive},drive=3Dhd0") - - # Some machines need an explicit DTB - if dtb: - self.vm.add_args('-dtb', dtb) - - def run_tuxtest_tests(self, haltmsg): - """ - Wait for the system to boot up, wait for the login prompt and - then do a few things on the console. Trigger a shutdown and - wait to exit cleanly. - """ - self.wait_for_console_pattern("Welcome to TuxTest") - time.sleep(0.2) - exec_command(self, 'root') - time.sleep(0.2) - exec_command(self, 'cat /proc/interrupts') - time.sleep(0.1) - exec_command(self, 'cat /proc/self/maps') - time.sleep(0.1) - exec_command(self, 'uname -a') - time.sleep(0.1) - exec_command_and_wait_for_pattern(self, 'halt', haltmsg) - - # Wait for VM to shut down gracefully if it can - if self.shutdown =3D=3D "nowait": - self.vm.shutdown() - else: - self.vm.wait() - - def common_tuxrun(self, - csums=3DNone, - dt=3DNone, - drive=3D"virtio-blk-device", - haltmsg=3D"reboot: System halted", - console_index=3D0): - """ - Common path for LKFT tests. Unless we need to do something - special with the command line we can process most things using - the tag metadata. - """ - (kernel, disk, dtb) =3D self.fetch_tuxrun_assets(csums, dt) - - self.prepare_run(kernel, disk, drive, dtb, console_index) - self.vm.launch() - self.run_tuxtest_tests(haltmsg) - - - # - # The tests themselves. The configuration is derived from how - # tuxrun invokes qemu (with minor tweaks like using -blockdev - # consistently). The tuxrun equivalent is something like: - # - # tuxrun --device qemu-{ARCH} \ - # --kernel https://storage.tuxboot.com/{TUXBOOT}/{IMAGE} - # - - # Note: some segfaults caused by unaligned userspace access - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on G= itLab') - def test_sh4(self): - """ - :avocado: tags=3Darch:sh4 - :avocado: tags=3Dmachine:r2d - :avocado: tags=3Dcpu:sh7785 - :avocado: tags=3Dtuxboot:sh4 - :avocado: tags=3Dimage:zImage - :avocado: tags=3Droot:sda - :avocado: tags=3Dconsole:ttySC1 - :avocado: tags=3Dflaky - """ - sums =3D { "rootfs.ext4.zst" : - "3592a7a3d5a641e8b9821449e77bc43c9904a56c30d45da0694349cf= d86743fd", - "zImage" : - "29d9b2aba604a0f53a5dc3b5d0f2b8e35d497de1129f8ee5139eb6fd= f0db692f" } - - # The test is currently too unstable to do much in userspace - # so we skip common_tuxrun and do a minimal boot and shutdown. - (kernel, disk, dtb) =3D self.fetch_tuxrun_assets(csums=3Dsums) - - # the console comes on the second serial port - self.prepare_run(kernel, disk, - "driver=3Dide-hd,bus=3Dide.0,unit=3D0", - console_index=3D1) - self.vm.launch() - - self.wait_for_console_pattern("Welcome to TuxTest") - time.sleep(0.1) - exec_command(self, 'root') - time.sleep(0.1) - exec_command_and_wait_for_pattern(self, 'halt', - "reboot: System halted") diff --git a/tests/functional/meson.build b/tests/functional/meson.build index c17c9b0700..51d1037d96 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -156,8 +156,10 @@ tests_s390x_system_thorough =3D [ =20 tests_sh4_system_thorough =3D [ 'sh4_r2d', + 'sh4_tuxrun', ] =20 + tests_sparc_system_thorough =3D [ 'sparc_sun4m', ] diff --git a/tests/functional/test_sh4_tuxrun.py b/tests/functional/test_sh= 4_tuxrun.py new file mode 100755 index 0000000000..352cb360ef --- /dev/null +++ b/tests/functional/test_sh4_tuxrun.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python3 +# +# Functional test that boots known good tuxboot images the same way +# that tuxrun (www.tuxrun.org) does. This tool is used by things like +# the LKFT project to run regression tests on kernels. +# +# Copyright (c) 2023 Linaro Ltd. +# +# Author: +# Alex Benn=C3=A9e +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os +import time + +from unittest import skipUnless +from qemu_test import Asset, exec_command_and_wait_for_pattern, exec_comma= nd +from qemu_test.tuxruntest import TuxRunBaselineTest + +class TuxRunSh4Test(TuxRunBaselineTest): + + ASSET_SH4_KERNEL =3D Asset( + 'https://storage.tuxboot.com/20230331/sh4/zImage', + '29d9b2aba604a0f53a5dc3b5d0f2b8e35d497de1129f8ee5139eb6fdf0db692f') + ASSET_SH4_ROOTFS =3D Asset( + 'https://storage.tuxboot.com/20230331/sh4/rootfs.ext4.zst', + '3592a7a3d5a641e8b9821449e77bc43c9904a56c30d45da0694349cfd86743fd') + + # Note: some segfaults caused by unaligned userspace access + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable') + def test_sh4(self): + self.set_machine('r2d') + self.cpu=3D'sh7785' + self.root=3D'sda' + self.console=3D'ttySC1' + + # The test is currently too unstable to do much in userspace + # so we skip common_tuxrun and do a minimal boot and shutdown. + (kernel, disk, dtb) =3D self.fetch_tuxrun_assets(self.ASSET_SH4_KE= RNEL, + self.ASSET_SH4_ROOT= FS) + + # the console comes on the second serial port + self.prepare_run(kernel, disk, + "driver=3Dide-hd,bus=3Dide.0,unit=3D0", + console_index=3D1) + self.vm.launch() + + self.wait_for_console_pattern("Welcome to TuxTest") + time.sleep(0.1) + exec_command(self, 'root') + time.sleep(0.1) + exec_command_and_wait_for_pattern(self, 'halt', + "reboot: System halted") + +if __name__ =3D=3D '__main__': + TuxRunBaselineTest.main() --=20 2.46.1