From: Nicholas Piggin <npiggin@gmail.com>
To: qemu-devel@nongnu.org
Cc: "Nicholas Piggin" <npiggin@gmail.com>,
qemu-ppc@nongnu.org,
"Daniel Henrique Barboza" <danielhb413@gmail.com>,
"Cédric Le Goater" <clg@kaod.org>,
"David Gibson" <david@gibson.dropbear.id.au>,
"Greg Kurz" <groug@kaod.org>,
"Harsh Prateek Bora" <harshpb@linux.ibm.com>,
"John Snow" <jsnow@redhat.com>, "Cleber Rosa" <crosa@redhat.com>,
"Pavel Dovgalyuk" <pavel.dovgaluk@ispras.ru>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
"Beraldo Leal" <bleal@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Richard Henderson" <richard.henderson@linaro.org>
Subject: [PATCH 7/7] tests/avocado: ppc64 pseries reverse debugging test
Date: Fri, 23 Jun 2023 22:57:07 +1000 [thread overview]
Message-ID: <20230623125707.323517-8-npiggin@gmail.com> (raw)
In-Reply-To: <20230623125707.323517-1-npiggin@gmail.com>
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.
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)
--
2.40.1
next prev parent reply other threads:[~2023-06-23 12:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-23 12:57 [PATCH 0/7] ppc: fix larx migration, fix record-replay Nicholas Piggin
2023-06-23 12:57 ` [PATCH 1/7] target/ppc: Fix CPU reservation migration for record-replay Nicholas Piggin
2023-06-26 7:49 ` Pavel Dovgalyuk
2023-07-07 9:23 ` Daniel Henrique Barboza
2023-06-23 12:57 ` [PATCH 2/7] scripts/replay_dump.sh: Update to current rr record format Nicholas Piggin
2023-06-23 12:57 ` [PATCH 3/7] spapr: Fix machine reset deadlock from replay-record Nicholas Piggin
2023-06-23 12:57 ` [PATCH 4/7] spapr: Fix record-replay machine reset consuming too many events Nicholas Piggin
2023-06-26 8:07 ` Pavel Dovgalyuk
2023-06-26 10:04 ` Nicholas Piggin
2023-06-23 12:57 ` [PATCH 5/7] target/ppc: Fix timebase reset with record-replay Nicholas Piggin
2023-06-26 7:52 ` Pavel Dovgalyuk
2023-06-23 12:57 ` [PATCH 6/7] tests/avocado: boot ppc64 pseries replay-record test to Linux VFS mount Nicholas Piggin
2023-06-23 12:57 ` Nicholas Piggin [this message]
2023-06-26 7:49 ` [PATCH 7/7] tests/avocado: ppc64 pseries reverse debugging test Pavel Dovgalyuk
2023-06-26 9:34 ` Nicholas Piggin
2023-07-21 13:55 ` Nicholas Piggin
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=20230623125707.323517-8-npiggin@gmail.com \
--to=npiggin@gmail.com \
--cc=bleal@redhat.com \
--cc=clg@kaod.org \
--cc=crosa@redhat.com \
--cc=danielhb413@gmail.com \
--cc=david@gibson.dropbear.id.au \
--cc=groug@kaod.org \
--cc=harshpb@linux.ibm.com \
--cc=jsnow@redhat.com \
--cc=pavel.dovgaluk@ispras.ru \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=wainersm@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).