From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>,
Richard Henderson <richard.henderson@linaro.org>,
Pierrick Bouvier <pierrick.bouvier@linaro.org>
Subject: [PULL 07/31] tests/functional: Rework the multiprocess test to have target-specific files
Date: Wed, 27 Aug 2025 09:54:17 +0200 [thread overview]
Message-ID: <20250827075443.559712-8-thuth@redhat.com> (raw)
In-Reply-To: <20250827075443.559712-1-thuth@redhat.com>
From: Thomas Huth <thuth@redhat.com>
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 <pierrick.bouvier@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250819112403.432587-3-thuth@redhat.com>
---
MAINTAINERS | 2 +-
tests/functional/meson.build | 4 +-
.../{test_multiprocess.py => 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 => multiprocess.py} (58%)
mode change 100755 => 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
VFIO-USER:
M: John Levon <john.levon@nutanix.com>
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 = [
'aarch64_hotplug_pci',
'aarch64_imx8mp_evk',
'aarch64_kvm',
+ 'aarch64_multiprocess',
'aarch64_raspi3',
'aarch64_raspi4',
'aarch64_replay',
@@ -106,7 +107,6 @@ tests_aarch64_system_thorough = [
'aarch64_virt_gpu',
'aarch64_xen',
'aarch64_xlnx_versal',
- 'multiprocess',
]
tests_alpha_system_quick = [
@@ -332,7 +332,7 @@ tests_x86_64_system_thorough = [
'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/multiprocess.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
-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
class Multiprocess(QemuSystemTest):
KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 '
- ASSET_KERNEL_X86 = Asset(
- ('https://archives.fedoraproject.org/pub/archive/fedora/linux'
- '/releases/31/Everything/x86_64/os/images/pxeboot/vmlinuz'),
- 'd4738d03dbbe083ca610d0821d0a8f1488bebbdccef54ce33e3adb35fda00129')
-
- ASSET_INITRD_X86 = Asset(
- ('https://archives.fedoraproject.org/pub/archive/fedora/linux'
- '/releases/31/Everything/x86_64/os/images/pxeboot/initrd.img'),
- '3b6cb5c91a14c42e2f61520f1689264d865e772a1f0069e660a800d31dd61fb9')
-
- ASSET_KERNEL_AARCH64 = Asset(
- ('https://archives.fedoraproject.org/pub/archive/fedora/linux'
- '/releases/31/Everything/aarch64/os/images/pxeboot/vmlinuz'),
- '3ae07fcafbfc8e4abeb693035a74fe10698faae15e9ccd48882a9167800c1527')
-
- ASSET_INITRD_AARCH64 = 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,
proxy_sock.close()
remote_sock.close()
-
- def test_multiprocess(self):
- kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE
- if self.arch == 'x86_64':
- kernel_command_line += 'console=ttyS0 rdinit=/bin/bash'
- self.do_test(self.ASSET_KERNEL_X86, self.ASSET_INITRD_X86,
- kernel_command_line, 'pc')
- elif self.arch == 'aarch64':
- kernel_command_line += 'rdinit=/bin/bash console=ttyAMA0'
- self.do_test(self.ASSET_KERNEL_AARCH64, self.ASSET_INITRD_AARCH64,
- kernel_command_line, 'virt,gic-version=3')
- else:
- assert False
-
-if __name__ == '__main__':
- QemuSystemTest.main()
diff --git a/tests/functional/test_aarch64_multiprocess.py b/tests/functional/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 = Asset(
+ ('https://archives.fedoraproject.org/pub/archive/fedora/linux'
+ '/releases/31/Everything/aarch64/os/images/pxeboot/vmlinuz'),
+ '3ae07fcafbfc8e4abeb693035a74fe10698faae15e9ccd48882a9167800c1527')
+
+ ASSET_INITRD_AARCH64 = 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 = (self.KERNEL_COMMON_COMMAND_LINE +
+ 'rdinit=/bin/bash console=ttyAMA0')
+ self.do_test(self.ASSET_KERNEL_AARCH64, self.ASSET_INITRD_AARCH64,
+ kernel_command_line, 'virt,gic-version=3')
+
+
+if __name__ == '__main__':
+ Multiprocess.main()
diff --git a/tests/functional/test_x86_64_multiprocess.py b/tests/functional/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 = Asset(
+ ('https://archives.fedoraproject.org/pub/archive/fedora/linux'
+ '/releases/31/Everything/x86_64/os/images/pxeboot/vmlinuz'),
+ 'd4738d03dbbe083ca610d0821d0a8f1488bebbdccef54ce33e3adb35fda00129')
+
+ ASSET_INITRD_X86 = 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 = (self.KERNEL_COMMON_COMMAND_LINE +
+ 'console=ttyS0 rdinit=/bin/bash')
+ self.do_test(self.ASSET_KERNEL_X86, self.ASSET_INITRD_X86,
+ kernel_command_line, 'pc')
+
+
+if __name__ == '__main__':
+ Multiprocess.main()
--
2.50.1
next prev parent reply other threads:[~2025-08-27 7:58 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 7:54 [PULL 00/31] First pull request with functional tests patches for QEMU 10.2 Thomas Huth
2025-08-27 7:54 ` [PULL 01/31] hw: add compat machines for 10.2 Thomas Huth
2025-08-27 7:54 ` [PULL 02/31] CI: Use mingw-w64-x86_64-curl-winssl instead of mingw-w64-x86_64-curl for Windows build Thomas Huth
2025-08-27 7:54 ` [PULL 03/31] tests/functional/test_aarch64_virt_gpu: Skip test if EGL won't initialize Thomas Huth
2025-08-27 7:54 ` [PULL 04/31] tests/functional: Fix reverse_debugging asset precaching Thomas Huth
2025-08-27 7:54 ` [PULL 05/31] tests/functional: Use more fine-grained locking when looking for free ports Thomas Huth
2025-08-27 7:54 ` [PULL 06/31] tests/functional: Rework the migration test to have target-specific files Thomas Huth
2025-08-27 7:54 ` Thomas Huth [this message]
2025-08-27 7:54 ` [PULL 08/31] tests/functional/meson.build: Split timeout settings by target Thomas Huth
2025-08-27 7:54 ` [PULL 09/31] tests/functional/meson.build: Allow tests to reside in subfolders Thomas Huth
2025-08-27 7:54 ` [PULL 10/31] tests/functional: Move aarch64 tests into architecture specific folder Thomas Huth
2025-08-27 7:54 ` [PULL 11/31] tests/functional: Move alpha " Thomas Huth
2025-08-27 7:54 ` [PULL 12/31] tests/functional: Move arm " Thomas Huth
2025-08-27 7:54 ` [PULL 13/31] tests/functional: Move avr " Thomas Huth
2025-08-27 7:54 ` [PULL 14/31] tests/functional: Move hppa " Thomas Huth
2025-08-27 7:54 ` [PULL 15/31] tests/functional: Move i386 " Thomas Huth
2025-08-27 7:54 ` [PULL 16/31] tests/functional: Move loongarch64 " Thomas Huth
2025-08-27 7:54 ` [PULL 17/31] tests/functional: Move m68k " Thomas Huth
2025-08-27 7:54 ` [PULL 18/31] tests/functional: Move microblaze " Thomas Huth
2025-08-27 7:54 ` [PULL 19/31] tests/functional: Move mips tests into target-specific folders Thomas Huth
2025-08-27 7:54 ` [PULL 20/31] tests/functional: Move or1k " Thomas Huth
2025-08-27 7:54 ` [PULL 21/31] tests/functional: Move ppc/ppc64 " Thomas Huth
2025-08-27 7:54 ` [PULL 22/31] tests/functional: Move riscv32/riscv64 " Thomas Huth
2025-08-27 7:54 ` [PULL 23/31] tests/functional: Move rx test " Thomas Huth
2025-08-27 7:54 ` [PULL 24/31] tests/functional: Move s390x tests " Thomas Huth
2025-08-27 7:54 ` [PULL 25/31] tests/functional: Move sh4/sh4eb " Thomas Huth
2025-08-27 7:54 ` [PULL 26/31] tests/functional: Move sparc/sparc64 " Thomas Huth
2025-08-27 7:54 ` [PULL 27/31] tests/functional: Move x86_64 tests into target-specific folder Thomas Huth
2025-08-27 7:54 ` [PULL 28/31] tests/functional: Move xtensa " Thomas Huth
2025-08-27 7:54 ` [PULL 29/31] tests/functional: Move the generic tests to a subfolder Thomas Huth
2025-08-27 7:54 ` [PULL 30/31] MAINTAINERS: Adjust wildcards for the migration, multiprocess and replay tests Thomas Huth
2025-08-27 7:54 ` [PULL 31/31] tests/functional: Mark main in QemuBaseTest class as a static method Thomas Huth
2025-08-27 20:26 ` [PULL 00/31] First pull request with functional tests patches for QEMU 10.2 Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250827075443.559712-8-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.