qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 7/7] tests/avocado: ppc64 pseries reverse debugging test


From: Pavel Dovgalyuk
Subject: Re: [PATCH 7/7] tests/avocado: ppc64 pseries reverse debugging test
Date: Mon, 26 Jun 2023 10:49:06 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

On 23.06.2023 15:57, Nicholas Piggin wrote:
pseries can run reverse-debugging well enough to pass basic tests.

There is strangeness with reverse-continue possibly relating to a bp
being set on the first instruction or on a snapshot, that causes
the PC to be reported on the first instruction rather than last
breakpoint, so a workaround is added for that for now.

It means that the test reveals some kind of a bug in PPC debugging server implementation.
In this case it is better to fix that instead of adding workaround.


Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
  tests/avocado/reverse_debugging.py | 28 +++++++++++++++++++++++++++-
  1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/tests/avocado/reverse_debugging.py 
b/tests/avocado/reverse_debugging.py
index 680c314cfc..553c931994 100644
--- a/tests/avocado/reverse_debugging.py
+++ b/tests/avocado/reverse_debugging.py
@@ -94,7 +94,7 @@ def gdb_bstep(g):
      def vm_get_icount(vm):
          return vm.qmp('query-replay')['return']['icount']
- def reverse_debugging(self, shift=7, args=None):
+    def reverse_debugging(self, shift=7, args=None, initial_skip=False):
          logger = logging.getLogger('replay')
# create qcow2 for snapshots
@@ -135,6 +135,10 @@ def reverse_debugging(self, shift=7, args=None):
              self.fail('Reverse continue is not supported by QEMU')
logger.info('stepping forward')
+
+        if initial_skip:
+            self.gdb_step(g)
+
          steps = []
          # record first instruction addresses
          for _ in range(self.STEPS):
@@ -216,3 +220,25 @@ def test_aarch64_virt(self):
self.reverse_debugging(
              args=('-kernel', kernel_path))
+
+class ReverseDebugging_ppc64(ReverseDebugging):
+    """
+    :avocado: tags=accel:tcg
+    """
+
+    REG_PC = 0x40
+
+    # unidentified gitlab timeout problem
+    @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab')
+    def test_ppc64_pseries(self):
+        """
+        :avocado: tags=arch:ppc64
+        :avocado: tags=machine:pseries
+        """
+        # start with BIOS only
+        self.endian_is_le = False
+        # reverse-continue fails (seems to end up at the start) if a break
+        # is put on the first instruction. initial_skip skips one before the
+        # first bp, and it works. Could be due to break at the same icount
+        # as the snapshot?
+        self.reverse_debugging(initial_skip=True)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]