From: Gustavo Romero <gustavo.romero@linaro.org>
To: qemu-devel@nongnu.org, alex.bennee@linaro.org, thuth@redhat.com,
	berrange@redhat.com
Cc: qemu-arm@nongnu.org, gustavo.romero@linaro.org
Subject: [PATCH v5 9/9] tests/functional: Adapt arches to reverse_debugging w/o Avocado
Date: Thu,  2 Oct 2025 02:04:32 +0000	[thread overview]
Message-ID: <20251002020432.54443-10-gustavo.romero@linaro.org> (raw)
In-Reply-To: <20251002020432.54443-1-gustavo.romero@linaro.org>
reverse_debugging no longer depends on Avocado, so remove the import
checks for Avocado, the per-arch endianness tweaks, and the per-arch
register settings. All of these are now handled in the ReverseDebugging
class, automatically.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
---
 tests/functional/aarch64/test_reverse_debug.py | 11 +++++------
 tests/functional/ppc64/test_reverse_debug.py   | 15 ++++++---------
 tests/functional/x86_64/test_reverse_debug.py  | 15 +++++----------
 3 files changed, 16 insertions(+), 25 deletions(-)
diff --git a/tests/functional/aarch64/test_reverse_debug.py b/tests/functional/aarch64/test_reverse_debug.py
index 8bc91ccfde..906f10aec5 100755
--- a/tests/functional/aarch64/test_reverse_debug.py
+++ b/tests/functional/aarch64/test_reverse_debug.py
@@ -2,25 +2,24 @@
 #
 # SPDX-License-Identifier: GPL-2.0-or-later
 #
-# Reverse debugging test
+# Reverse debugging test for aarch64
 #
 # Copyright (c) 2020 ISP RAS
+# Copyright (c) 2025 Linaro Limited
 #
 # Author:
 #  Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
+#  Gustavo Romero <gustavo.romero@linaro.org> (Run without Avocado)
 #
 # This work is licensed under the terms of the GNU GPL, version 2 or
 # later.  See the COPYING file in the top-level directory.
 
-from qemu_test import Asset, skipIfMissingImports, skipFlakyTest
+from qemu_test import Asset, skipFlakyTest
 from reverse_debugging import ReverseDebugging
 
 
-@skipIfMissingImports('avocado.utils')
 class ReverseDebugging_AArch64(ReverseDebugging):
 
-    REG_PC = 32
-
     ASSET_KERNEL = Asset(
         ('https://archives.fedoraproject.org/pub/archive/fedora/linux/'
          'releases/29/Everything/aarch64/os/images/pxeboot/vmlinuz'),
@@ -31,7 +30,7 @@ def test_aarch64_virt(self):
         self.set_machine('virt')
         self.cpu = 'cortex-a53'
         kernel_path = self.ASSET_KERNEL.fetch()
-        self.reverse_debugging(args=('-kernel', kernel_path))
+        self.reverse_debugging(gdb_arch='aarch64', args=('-kernel', kernel_path))
 
 
 if __name__ == '__main__':
diff --git a/tests/functional/ppc64/test_reverse_debug.py b/tests/functional/ppc64/test_reverse_debug.py
index 5931adef5a..69551fb84d 100755
--- a/tests/functional/ppc64/test_reverse_debug.py
+++ b/tests/functional/ppc64/test_reverse_debug.py
@@ -2,39 +2,36 @@
 #
 # SPDX-License-Identifier: GPL-2.0-or-later
 #
-# Reverse debugging test
+# Reverse debugging test for ppc64
 #
 # Copyright (c) 2020 ISP RAS
+# Copyright (c) 2025 Linaro Limited
 #
 # Author:
 #  Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
+#  Gustavo Romero <gustavo.romero@linaro.org> (Run without Avocado)
 #
 # This work is licensed under the terms of the GNU GPL, version 2 or
 # later.  See the COPYING file in the top-level directory.
 
-from qemu_test import skipIfMissingImports, skipFlakyTest
+from qemu_test import skipFlakyTest
 from reverse_debugging import ReverseDebugging
 
 
-@skipIfMissingImports('avocado.utils')
 class ReverseDebugging_ppc64(ReverseDebugging):
 
-    REG_PC = 0x40
-
     @skipFlakyTest("https://gitlab.com/qemu-project/qemu/-/issues/1992")
     def test_ppc64_pseries(self):
         self.set_machine('pseries')
         # SLOF branches back to its entry point, which causes this test
         # to take the 'hit a breakpoint again' path. That's not a problem,
         # just slightly different than the other machines.
-        self.endian_is_le = False
-        self.reverse_debugging()
+        self.reverse_debugging(gdb_arch='powerpc:common64')
 
     @skipFlakyTest("https://gitlab.com/qemu-project/qemu/-/issues/1992")
     def test_ppc64_powernv(self):
         self.set_machine('powernv')
-        self.endian_is_le = False
-        self.reverse_debugging()
+        self.reverse_debugging(gdb_arch='powerpc:common64')
 
 
 if __name__ == '__main__':
diff --git a/tests/functional/x86_64/test_reverse_debug.py b/tests/functional/x86_64/test_reverse_debug.py
index d713e91e14..2b31ae8724 100755
--- a/tests/functional/x86_64/test_reverse_debug.py
+++ b/tests/functional/x86_64/test_reverse_debug.py
@@ -2,34 +2,29 @@
 #
 # SPDX-License-Identifier: GPL-2.0-or-later
 #
-# Reverse debugging test
+# Reverse debugging test for x86_64
 #
 # Copyright (c) 2020 ISP RAS
+# Copyright (c) 2025 Linaro Limited
 #
 # Author:
 #  Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
+#  Gustavo Romero <gustavo.romero@linaro.org> (Run without Avocado)
 #
 # This work is licensed under the terms of the GNU GPL, version 2 or
 # later.  See the COPYING file in the top-level directory.
 
-from qemu_test import skipIfMissingImports, skipFlakyTest
+from qemu_test import skipFlakyTest
 from reverse_debugging import ReverseDebugging
 
 
-@skipIfMissingImports('avocado.utils')
 class ReverseDebugging_X86_64(ReverseDebugging):
 
-    REG_PC = 0x10
-    REG_CS = 0x12
-    def get_pc(self, g):
-        return self.get_reg_le(g, self.REG_PC) \
-            + self.get_reg_le(g, self.REG_CS) * 0x10
-
     @skipFlakyTest("https://gitlab.com/qemu-project/qemu/-/issues/2922")
     def test_x86_64_pc(self):
         self.set_machine('pc')
         # start with BIOS only
-        self.reverse_debugging()
+        self.reverse_debugging(gdb_arch='x86-64')
 
 
 if __name__ == '__main__':
-- 
2.34.1
next prev parent reply	other threads:[~2025-10-02  2:09 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-02  2:04 [PATCH v5 0/9] tests/functional: Adapt reverse_debugging to run w/o Avocado Gustavo Romero
2025-10-02  2:04 ` [PATCH v5 1/9] tests/functional: Re-activate the check-venv target Gustavo Romero
2025-10-02 13:06   ` Daniel P. Berrangé
2025-10-02 16:08   ` Thomas Huth
2025-10-02  2:04 ` [PATCH v5 2/9] python: Install pygdbmi in meson's venv Gustavo Romero
2025-10-02 13:06   ` Daniel P. Berrangé
2025-10-14 17:39   ` John Snow
2025-10-14 18:21     ` Thomas Huth
2025-10-14 18:55       ` John Snow
2025-10-14 18:59         ` Thomas Huth
2025-10-14 19:05           ` John Snow
2025-10-14 19:19             ` Thomas Huth
2025-10-02  2:04 ` [PATCH v5 3/9] tests/functional: Provide GDB to the functional tests Gustavo Romero
2025-10-02 13:08   ` Daniel P. Berrangé
2025-10-02  2:04 ` [PATCH v5 4/9] tests/functional: Add GDB class Gustavo Romero
2025-10-02 13:11   ` Daniel P. Berrangé
2025-10-02 16:24     ` Alex Bennée
2025-10-02  2:04 ` [PATCH v5 5/9] tests/functional: replace avocado process with subprocess Gustavo Romero
2025-10-02  2:04 ` [PATCH v5 6/9] tests/functional: drop datadrainer class in reverse debugging Gustavo Romero
2025-10-02  2:04 ` [PATCH v5 7/9] tests/functional: Add decorator to skip test on missing env vars Gustavo Romero
2025-10-02 13:12   ` Daniel P. Berrangé
2025-10-02  2:04 ` [PATCH v5 8/9] tests/functional: Adapt reverse_debugging to run w/o Avocado Gustavo Romero
2025-10-02 13:13   ` Daniel P. Berrangé
2025-10-02  2:04 ` Gustavo Romero [this message]
2025-10-02 13:14   ` [PATCH v5 9/9] tests/functional: Adapt arches to reverse_debugging " Daniel P. Berrangé
2025-10-02 16:53 ` [PATCH v5 0/9] tests/functional: Adapt reverse_debugging to run " Thomas Huth
2025-10-02 17:52   ` Thomas Huth
2025-10-03 13:30     ` Gustavo Romero
2025-10-03 14:38       ` Gustavo Romero
2025-10-03 15:07         ` Gustavo Romero
2025-10-06  7:24           ` Thomas Huth
2025-10-06  9:58             ` Alex Bennée
2025-10-06 10:07               ` Thomas Huth
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=20251002020432.54443-10-gustavo.romero@linaro.org \
    --to=gustavo.romero@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@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).