From nobody Sun Sep 28 16:34:06 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1756281528; cv=none; d=zohomail.com; s=zohoarc; b=fhJUmeZbE8sY0klcK7zwHnhRvfx9YGeZKsxMRHzS8wWtTCQIobSEbytzg7SiiMzkHWWmq8TNalIyJ5cUSCqGTfxJ7yqcjpc3DNcuBLSoniFJ5sXL5DxdXj9g5cUbEf3ExEDhXv8gKwMWMkCgBLMVifQUmt50dslhJv92JK+H/cQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756281528; 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=fD6p6FuwejerTbMnItV2fZXtiO9qwbNbPm64OA1+ZrM=; b=KqVE/Z+uliP7hakPjO79UE66jGEJU+VUkF60QCh+XiQG4q7p/OilLu60Ti2eSL7t35C25r3nAInIxifMWvkDOWuj0mBWvDJCWFuPkpuqKnOlm+rvKmIOAF8vbjQxuy1Y8Fr1rY88IudcG6NSVGFgbhweQEzWQ0o3gX9Efzn6EsA= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756281528794726.5539293544841; Wed, 27 Aug 2025 00:58:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1urB0D-0005Lk-13; Wed, 27 Aug 2025 03:55: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 1urB0B-0005LA-Of for qemu-devel@nongnu.org; Wed, 27 Aug 2025 03:55:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1urB06-0001xo-0F for qemu-devel@nongnu.org; Wed, 27 Aug 2025 03:55:27 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-296-IbpqDRtRM6C3HIMDykP1CA-1; Wed, 27 Aug 2025 03:55:16 -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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9E9F21800347; Wed, 27 Aug 2025 07:55:15 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.45.224.40]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 62A1A1955F24; Wed, 27 Aug 2025 07:55:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1756281320; 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=fD6p6FuwejerTbMnItV2fZXtiO9qwbNbPm64OA1+ZrM=; b=iUbNlHBByYIMyxaewU4/DTF6q6jCg3h5OVZIplHr70C+AabSGgZ8X+gUXqWpYse+Tiovuz V9Rjvwq9tVgKjJJ3JqifWCJKSXT//BGHf2dFeFyleslvu/SOZjy+hv0nz0Etj4HI8i7jo5 m0KHdPGUqegc9NXxbgjrKGVS+N7CWr0= X-MC-Unique: IbpqDRtRM6C3HIMDykP1CA-1 X-Mimecast-MFC-AGG-ID: IbpqDRtRM6C3HIMDykP1CA_1756281315 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Maydell , Richard Henderson , Pierrick Bouvier Subject: [PULL 07/31] tests/functional: Rework the multiprocess test to have target-specific files Date: Wed, 27 Aug 2025 09:54:17 +0200 Message-ID: <20250827075443.559712-8-thuth@redhat.com> In-Reply-To: <20250827075443.559712-1-thuth@redhat.com> References: <20250827075443.559712-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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: 1756281531858124100 Content-Type: text/plain; charset="utf-8" From: Thomas Huth We are going to move the tests for each target into separate subdirectories. The multiprocess test currently contains code for both, x86 and aarch64, so it does not quite fit into this scheme. Rework the test to have a common test class, and target specific files with a target specific class, so that this will fit better into the new scheme. Reviewed-by: Pierrick Bouvier Signed-off-by: Thomas Huth Message-ID: <20250819112403.432587-3-thuth@redhat.com> --- MAINTAINERS | 2 +- tests/functional/meson.build | 4 +- .../{test_multiprocess.py =3D> multiprocess.py} | 40 +------------------ tests/functional/test_aarch64_multiprocess.py | 31 ++++++++++++++ tests/functional/test_x86_64_multiprocess.py | 31 ++++++++++++++ 5 files changed, 67 insertions(+), 41 deletions(-) rename tests/functional/{test_multiprocess.py =3D> multiprocess.py} (58%) mode change 100755 =3D> 100644 create mode 100755 tests/functional/test_aarch64_multiprocess.py create mode 100755 tests/functional/test_x86_64_multiprocess.py diff --git a/MAINTAINERS b/MAINTAINERS index 56c1fe67690..adbed9df2fc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4286,7 +4286,7 @@ F: hw/remote/vfio-user-obj.c F: include/hw/remote/vfio-user-obj.h F: hw/remote/iommu.c F: include/hw/remote/iommu.h -F: tests/functional/test_multiprocess.py +F: tests/functional/*multiprocess.py =20 VFIO-USER: M: John Levon diff --git a/tests/functional/meson.build b/tests/functional/meson.build index c32436d99ad..38ae0d6cd3b 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -90,6 +90,7 @@ tests_aarch64_system_thorough =3D [ 'aarch64_hotplug_pci', 'aarch64_imx8mp_evk', 'aarch64_kvm', + 'aarch64_multiprocess', 'aarch64_raspi3', 'aarch64_raspi4', 'aarch64_replay', @@ -106,7 +107,6 @@ tests_aarch64_system_thorough =3D [ 'aarch64_virt_gpu', 'aarch64_xen', 'aarch64_xlnx_versal', - 'multiprocess', ] =20 tests_alpha_system_quick =3D [ @@ -332,7 +332,7 @@ tests_x86_64_system_thorough =3D [ 'acpi_bits', 'intel_iommu', 'linux_initrd', - 'multiprocess', + 'x86_64_multiprocess', 'netdev_ethtool', 'virtio_balloon', 'virtio_gpu', diff --git a/tests/functional/test_multiprocess.py b/tests/functional/multi= process.py old mode 100755 new mode 100644 similarity index 58% rename from tests/functional/test_multiprocess.py rename to tests/functional/multiprocess.py index 92d5207b0eb..6a06c1eda19 --- a/tests/functional/test_multiprocess.py +++ b/tests/functional/multiprocess.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +# SPDX-License-Identifier: GPL-2.0-or-later # # Test for multiprocess qemu # @@ -9,33 +9,13 @@ import os import socket =20 -from qemu_test import QemuSystemTest, Asset, wait_for_console_pattern +from qemu_test import QemuSystemTest, wait_for_console_pattern from qemu_test import exec_command, exec_command_and_wait_for_pattern =20 class Multiprocess(QemuSystemTest): =20 KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 ' =20 - ASSET_KERNEL_X86 =3D Asset( - ('https://archives.fedoraproject.org/pub/archive/fedora/linux' - '/releases/31/Everything/x86_64/os/images/pxeboot/vmlinuz'), - 'd4738d03dbbe083ca610d0821d0a8f1488bebbdccef54ce33e3adb35fda00129') - - ASSET_INITRD_X86 =3D Asset( - ('https://archives.fedoraproject.org/pub/archive/fedora/linux' - '/releases/31/Everything/x86_64/os/images/pxeboot/initrd.img'), - '3b6cb5c91a14c42e2f61520f1689264d865e772a1f0069e660a800d31dd61fb9') - - ASSET_KERNEL_AARCH64 =3D Asset( - ('https://archives.fedoraproject.org/pub/archive/fedora/linux' - '/releases/31/Everything/aarch64/os/images/pxeboot/vmlinuz'), - '3ae07fcafbfc8e4abeb693035a74fe10698faae15e9ccd48882a9167800c1527') - - ASSET_INITRD_AARCH64 =3D Asset( - ('https://archives.fedoraproject.org/pub/archive/fedora/linux' - '/releases/31/Everything/aarch64/os/images/pxeboot/initrd.img'), - '9fd230cab10b1dafea41cf00150e6669d37051fad133bd618d2130284e16d526') - def do_test(self, kernel_asset, initrd_asset, kernel_command_line, machine_type): """Main test method""" @@ -85,19 +65,3 @@ def do_test(self, kernel_asset, initrd_asset, =20 proxy_sock.close() remote_sock.close() - - def test_multiprocess(self): - kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE - if self.arch =3D=3D 'x86_64': - kernel_command_line +=3D 'console=3DttyS0 rdinit=3D/bin/bash' - self.do_test(self.ASSET_KERNEL_X86, self.ASSET_INITRD_X86, - kernel_command_line, 'pc') - elif self.arch =3D=3D 'aarch64': - kernel_command_line +=3D 'rdinit=3D/bin/bash console=3DttyAMA0' - self.do_test(self.ASSET_KERNEL_AARCH64, self.ASSET_INITRD_AARC= H64, - kernel_command_line, 'virt,gic-version=3D3') - else: - assert False - -if __name__ =3D=3D '__main__': - QemuSystemTest.main() diff --git a/tests/functional/test_aarch64_multiprocess.py b/tests/function= al/test_aarch64_multiprocess.py new file mode 100755 index 00000000000..1c6e45ecb67 --- /dev/null +++ b/tests/functional/test_aarch64_multiprocess.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 +# +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Test for multiprocess qemu on aarch64 + +from multiprocess import Multiprocess +from qemu_test import Asset + + +class Aarch64Multiprocess(Multiprocess): + + ASSET_KERNEL_AARCH64 =3D Asset( + ('https://archives.fedoraproject.org/pub/archive/fedora/linux' + '/releases/31/Everything/aarch64/os/images/pxeboot/vmlinuz'), + '3ae07fcafbfc8e4abeb693035a74fe10698faae15e9ccd48882a9167800c1527') + + ASSET_INITRD_AARCH64 =3D Asset( + ('https://archives.fedoraproject.org/pub/archive/fedora/linux' + '/releases/31/Everything/aarch64/os/images/pxeboot/initrd.img'), + '9fd230cab10b1dafea41cf00150e6669d37051fad133bd618d2130284e16d526') + + def test_multiprocess(self): + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'rdinit=3D/bin/bash console=3DttyAMA0') + self.do_test(self.ASSET_KERNEL_AARCH64, self.ASSET_INITRD_AARCH64, + kernel_command_line, 'virt,gic-version=3D3') + + +if __name__ =3D=3D '__main__': + Multiprocess.main() diff --git a/tests/functional/test_x86_64_multiprocess.py b/tests/functiona= l/test_x86_64_multiprocess.py new file mode 100755 index 00000000000..756629dd446 --- /dev/null +++ b/tests/functional/test_x86_64_multiprocess.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 +# +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Test for multiprocess qemu on x86 + +from multiprocess import Multiprocess +from qemu_test import Asset + + +class X86Multiprocess(Multiprocess): + + ASSET_KERNEL_X86 =3D Asset( + ('https://archives.fedoraproject.org/pub/archive/fedora/linux' + '/releases/31/Everything/x86_64/os/images/pxeboot/vmlinuz'), + 'd4738d03dbbe083ca610d0821d0a8f1488bebbdccef54ce33e3adb35fda00129') + + ASSET_INITRD_X86 =3D Asset( + ('https://archives.fedoraproject.org/pub/archive/fedora/linux' + '/releases/31/Everything/x86_64/os/images/pxeboot/initrd.img'), + '3b6cb5c91a14c42e2f61520f1689264d865e772a1f0069e660a800d31dd61fb9') + + def test_multiprocess(self): + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'console=3DttyS0 rdinit=3D/bin/bash') + self.do_test(self.ASSET_KERNEL_X86, self.ASSET_INITRD_X86, + kernel_command_line, 'pc') + + +if __name__ =3D=3D '__main__': + Multiprocess.main() --=20 2.50.1