From nobody Sun Dec 14 12:15:23 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1764749308255863.4617271979105; Wed, 3 Dec 2025 00:08:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vQhnA-0000NS-9T; Wed, 03 Dec 2025 03:00:52 -0500 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 1vQhmn-00005P-JX; Wed, 03 Dec 2025 03:00:30 -0500 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vQhml-0006qG-Ff; Wed, 03 Dec 2025 03:00:29 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id B36F517076A; Wed, 03 Dec 2025 10:59:22 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id 80A0D32B491; Wed, 03 Dec 2025 10:59:40 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Thomas Huth , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Michael Tokarev Subject: [Stable-10.0.7 093/116] tests/functional: Use the tuxrun kernel for the x86 replay test Date: Wed, 3 Dec 2025 10:59:13 +0300 Message-ID: <20251203075939.2366131-12-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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-ZM-MESSAGEID: 1764749309064019200 From: Thomas Huth 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=C3=A9 Message-ID: <20250414113031.151105-12-thuth@redhat.com> Signed-off-by: Thomas Huth (cherry picked from commit 7fecdb0acd99fa838bb461c67164f6119ec1a3bb) Signed-off-by: Michael Tokarev diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py index 5916922435..6ba283d3bf 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') =20 -@skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout') -class ReplayLinuxX8664(ReplayLinux): - """ - :avocado: tags=3Darch:x86_64 - :avocado: tags=3Daccel:tcg - """ - - chksum =3D 'e3c1b309d9203604922d6e255c2c5d098a309c2d46215d8fc026954f3c= 5c27a0' - - def test_pc_i440fx(self): - """ - :avocado: tags=3Dmachine:pc - """ - self.run_rr(shift=3D1) - - def test_pc_q35(self): - """ - :avocado: tags=3Dmachine:q35 - """ - self.run_rr(shift=3D3) - -@skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout') -class ReplayLinuxX8664Virtio(ReplayLinux): - """ - :avocado: tags=3Darch:x86_64 - :avocado: tags=3Dvirtio - :avocado: tags=3Daccel:tcg - """ - - hdd =3D 'virtio-blk-pci' - cd =3D 'virtio-blk-pci' - bus =3D None - - chksum =3D 'e3c1b309d9203604922d6e255c2c5d098a309c2d46215d8fc026954f3c= 5c27a0' - - def test_pc_i440fx(self): - """ - :avocado: tags=3Dmachine:pc - """ - self.run_rr(shift=3D1) - - def test_pc_q35(self): - """ - :avocado: tags=3Dmachine:q35 - """ - self.run_rr(shift=3D3) =20 @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 180f23a60c..27287d452d 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 =20 -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 =20 =20 class X86Replay(ReplayKernelBase): =20 ASSET_KERNEL =3D 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 =3D Asset( + 'https://storage.tuxboot.com/buildroot/20241119/x86_64/rootfs.ext4= .zst', + '4b8b2a99117519c5290e1202cb36eb6c7aaba92b357b5160f5970cf5fb78a751') =20 - def do_test_x86(self, machine): + def do_test_x86(self, machine, blkdevice, devroot): + self.require_netdev('user') self.set_machine(machine) + self.cpu=3D"Nehalem" kernel_path =3D self.ASSET_KERNEL.fetch() - kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' - console_pattern =3D 'VFS: Cannot open root device' - self.run_rr(kernel_path, kernel_command_line, console_pattern, shi= ft=3D5) + + raw_disk =3D self.uncompress(self.ASSET_ROOTFS) + disk =3D self.scratch_file('scratch.qcow2') + qemu_img =3D get_qemu_img(self) + check_call([qemu_img, 'create', '-f', 'qcow2', '-b', raw_disk, + '-F', 'raw', disk], stdout=3DDEVNULL, stderr=3DDEVNULL) + + args =3D ('-drive', 'file=3D%s,snapshot=3Don,id=3Dhd0,if=3Dnone' %= disk, + '-drive', 'driver=3Dblkreplay,id=3Dhd0-rr,if=3Dnone,image= =3Dhd0', + '-device', '%s,drive=3Dhd0-rr' % blkdevice, + '-netdev', 'user,id=3Dvnet,hostfwd=3D:127.0.0.1:0-:22', + '-device', 'virtio-net,netdev=3Dvnet', + '-object', 'filter-replay,id=3Dreplay,netdev=3Dvnet') + + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + f"console=3DttyS0 root=3D/dev/{devroot}") + console_pattern =3D 'Welcome to TuxTest' + self.run_rr(kernel_path, kernel_command_line, console_pattern, shi= ft=3D5, + args=3Dargs) =20 @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') =20 def test_q35(self): - self.do_test_x86('q35') + self.do_test_x86('q35', 'ide-hd', 'sda') =20 =20 if __name__ =3D=3D '__main__': --=20 2.47.3