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>,
"Daniel P. Berrangé" <berrange@redhat.com>
Subject: [PULL 21/29] tests/functional: Use the tuxrun kernel for the x86 replay test
Date: Wed, 23 Apr 2025 09:36:01 +0200 [thread overview]
Message-ID: <20250423073610.271585-22-thuth@redhat.com> (raw)
In-Reply-To: <20250423073610.271585-1-thuth@redhat.com>
From: Thomas Huth <thuth@redhat.com>
This way we can do a full boot in record-replay mode and
should get a similar test coverage compared to the old
replay test from tests/avocado/replay_linux.py. Thus remove
the x86 avocado replay_linux test now.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20250414113031.151105-12-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/avocado/replay_linux.py | 46 --------------------------
tests/functional/test_x86_64_replay.py | 43 ++++++++++++++++++------
2 files changed, 33 insertions(+), 56 deletions(-)
diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py
index 59169224353..6ba283d3bf6 100644
--- a/tests/avocado/replay_linux.py
+++ b/tests/avocado/replay_linux.py
@@ -118,52 +118,6 @@ def run_replay_dump(self, replay_path):
except subprocess.CalledProcessError:
self.fail('replay-dump.py failed')
-@skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout')
-class ReplayLinuxX8664(ReplayLinux):
- """
- :avocado: tags=arch:x86_64
- :avocado: tags=accel:tcg
- """
-
- chksum = 'e3c1b309d9203604922d6e255c2c5d098a309c2d46215d8fc026954f3c5c27a0'
-
- def test_pc_i440fx(self):
- """
- :avocado: tags=machine:pc
- """
- self.run_rr(shift=1)
-
- def test_pc_q35(self):
- """
- :avocado: tags=machine:q35
- """
- self.run_rr(shift=3)
-
-@skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout')
-class ReplayLinuxX8664Virtio(ReplayLinux):
- """
- :avocado: tags=arch:x86_64
- :avocado: tags=virtio
- :avocado: tags=accel:tcg
- """
-
- hdd = 'virtio-blk-pci'
- cd = 'virtio-blk-pci'
- bus = None
-
- chksum = 'e3c1b309d9203604922d6e255c2c5d098a309c2d46215d8fc026954f3c5c27a0'
-
- def test_pc_i440fx(self):
- """
- :avocado: tags=machine:pc
- """
- self.run_rr(shift=1)
-
- def test_pc_q35(self):
- """
- :avocado: tags=machine:q35
- """
- self.run_rr(shift=3)
@skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout')
class ReplayLinuxAarch64(ReplayLinux):
diff --git a/tests/functional/test_x86_64_replay.py b/tests/functional/test_x86_64_replay.py
index 180f23a60c5..27287d452dc 100755
--- a/tests/functional/test_x86_64_replay.py
+++ b/tests/functional/test_x86_64_replay.py
@@ -5,30 +5,53 @@
#
# SPDX-License-Identifier: GPL-2.0-or-later
-from qemu_test import Asset, skipFlakyTest
+from subprocess import check_call, DEVNULL
+
+from qemu_test import Asset, skipFlakyTest, get_qemu_img
from replay_kernel import ReplayKernelBase
class X86Replay(ReplayKernelBase):
ASSET_KERNEL = Asset(
- ('https://archives.fedoraproject.org/pub/archive/fedora/linux'
- '/releases/29/Everything/x86_64/os/images/pxeboot/vmlinuz'),
- '8f237d84712b1b411baf3af2aeaaee10b9aae8e345ec265b87ab3a39639eb143')
+ 'https://storage.tuxboot.com/buildroot/20241119/x86_64/bzImage',
+ 'f57bfc6553bcd6e0a54aab86095bf642b33b5571d14e3af1731b18c87ed5aef8')
+
+ ASSET_ROOTFS = Asset(
+ 'https://storage.tuxboot.com/buildroot/20241119/x86_64/rootfs.ext4.zst',
+ '4b8b2a99117519c5290e1202cb36eb6c7aaba92b357b5160f5970cf5fb78a751')
- def do_test_x86(self, machine):
+ def do_test_x86(self, machine, blkdevice, devroot):
+ self.require_netdev('user')
self.set_machine(machine)
+ self.cpu="Nehalem"
kernel_path = self.ASSET_KERNEL.fetch()
- kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0'
- console_pattern = 'VFS: Cannot open root device'
- self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=5)
+
+ raw_disk = self.uncompress(self.ASSET_ROOTFS)
+ disk = self.scratch_file('scratch.qcow2')
+ qemu_img = get_qemu_img(self)
+ check_call([qemu_img, 'create', '-f', 'qcow2', '-b', raw_disk,
+ '-F', 'raw', disk], stdout=DEVNULL, stderr=DEVNULL)
+
+ args = ('-drive', 'file=%s,snapshot=on,id=hd0,if=none' % disk,
+ '-drive', 'driver=blkreplay,id=hd0-rr,if=none,image=hd0',
+ '-device', '%s,drive=hd0-rr' % blkdevice,
+ '-netdev', 'user,id=vnet,hostfwd=:127.0.0.1:0-:22',
+ '-device', 'virtio-net,netdev=vnet',
+ '-object', 'filter-replay,id=replay,netdev=vnet')
+
+ kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
+ f"console=ttyS0 root=/dev/{devroot}")
+ console_pattern = 'Welcome to TuxTest'
+ self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=5,
+ args=args)
@skipFlakyTest('https://gitlab.com/qemu-project/qemu/-/issues/2094')
def test_pc(self):
- self.do_test_x86('pc')
+ self.do_test_x86('pc', 'virtio-blk', 'vda')
def test_q35(self):
- self.do_test_x86('q35')
+ self.do_test_x86('q35', 'ide-hd', 'sda')
if __name__ == '__main__':
--
2.49.0
next prev parent reply other threads:[~2025-04-23 7:38 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 7:35 [PULL 00/29] Machine types, s390x, functional tests and Avocado removal Thomas Huth
2025-04-23 7:35 ` [PULL 01/29] hw/s390x/s390-virtio-ccw: Remove the deprecated 2.9 machine type Thomas Huth
2025-04-23 7:35 ` [PULL 02/29] hw/s390x/css: Remove the obsolete "css_migration_enabled" variable Thomas Huth
2025-04-23 7:35 ` [PULL 03/29] hw/s390x/s390-stattrib: Remove the old migration_enabled flag Thomas Huth
2025-04-23 7:35 ` [PULL 04/29] hw/intc/s390_flic: Remove the obsolete " Thomas Huth
2025-04-23 7:35 ` [PULL 05/29] hw/s390x/skeys: Declare QOM types using DEFINE_TYPES() macro Thomas Huth
2025-04-23 7:35 ` [PULL 06/29] hw/s390x/skeys: Introduce TYPE_DUMP_SKEYS_INTERFACE Thomas Huth
2025-04-23 7:35 ` [PULL 07/29] hw/s390x/ccw: Have CCW machine implement a qmp_dump_skeys() callback Thomas Huth
2025-04-23 7:35 ` [PULL 08/29] qapi/machine: Make @dump-skeys command generic Thomas Huth
2025-04-23 7:35 ` [PULL 09/29] hw: add compat machines for 10.1 Thomas Huth
2025-04-23 7:35 ` [PULL 10/29] tests/functional/test_vnc: skip test if no crypto backend available Thomas Huth
2025-04-23 7:35 ` [PULL 11/29] gitlab-ci: Remove the avocado tests from the CI pipelines Thomas Huth
2025-04-23 7:35 ` [PULL 12/29] tests/functional: Move the check for the parameters from avocado to functional Thomas Huth
2025-04-23 7:35 ` [PULL 13/29] tests/functional: Convert reverse_debugging tests to the functional framework Thomas Huth
2025-04-23 7:35 ` [PULL 14/29] tests/functional: Convert the i386 replay avocado test Thomas Huth
2025-04-23 7:35 ` [PULL 15/29] tests/avocado: Remove the LinuxKernelTest class Thomas Huth
2025-04-23 7:35 ` [PULL 16/29] tests/functional: Convert the 32-bit big endian Wheezy mips test Thomas Huth
2025-04-23 7:35 ` [PULL 17/29] tests/functional: Convert the 32-bit little " Thomas Huth
2025-04-23 7:35 ` [PULL 18/29] tests/functional: Convert the 64-bit " Thomas Huth
2025-04-23 7:35 ` [PULL 19/29] tests/functional: Convert the 64-bit big " Thomas Huth
2025-04-23 7:36 ` [PULL 20/29] tests/avocado: Remove the boot_linux.py tests Thomas Huth
2025-04-23 7:36 ` Thomas Huth [this message]
2025-04-23 7:36 ` [PULL 22/29] tests/functional: Use the tuxrun kernel for the aarch64 replay test Thomas Huth
2025-04-23 7:36 ` [PULL 23/29] tests/functional: Convert the SMMU test to the functional framework Thomas Huth
2025-04-23 7:36 ` [PULL 24/29] gitlab-ci: Update QEMU_JOB_AVOCADO and QEMU_CI_AVOCADO_TESTING Thomas Huth
2025-04-23 7:36 ` [PULL 25/29] docs/devel/testing: Dissolve the ci-definitions.rst.inc file Thomas Huth
2025-04-23 7:36 ` [PULL 26/29] Remove the remainders of the Avocado tests Thomas Huth
2025-04-23 7:36 ` [PULL 27/29] tests/functional: Remove semicolons at the end of lines Thomas Huth
2025-04-23 7:36 ` [PULL 28/29] tests/functional: Remove unnecessary import statements Thomas Huth
2025-04-23 7:36 ` [PULL 29/29] MAINTAINERS: Add functional tests that are not covered yet Thomas Huth
2025-04-23 17:57 ` [PULL 00/29] Machine types, s390x, functional tests and Avocado removal Stefan Hajnoczi
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=20250423073610.271585-22-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=berrange@redhat.com \
--cc=peter.maydell@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).