[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 17/24] tests/avocado: reverse_debugging.py stop VM before samp
From: |
Nicholas Piggin |
Subject: |
[PATCH v5 17/24] tests/avocado: reverse_debugging.py stop VM before sampling icount |
Date: |
Tue, 19 Mar 2024 01:46:14 +1000 |
Rather than sampling icount while the vm is running, stop it before
sampling icount. This allows the actual last recorded icount in the
trace to be found.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
tests/avocado/reverse_debugging.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tests/avocado/reverse_debugging.py
b/tests/avocado/reverse_debugging.py
index 8a9578ad5a..bdc9082c85 100644
--- a/tests/avocado/reverse_debugging.py
+++ b/tests/avocado/reverse_debugging.py
@@ -156,19 +156,20 @@ def reverse_debugging(self, shift=7, args=None):
if self.first_step_workaround and i == 0 and
self.vm_get_icount(vm) == 0:
logger.warn('failed to take first step, stepping again')
self.gdb_step(g)
- if self.vm_get_icount(vm) != self.STEPS:
+ self.gdb_step(g)
+ if self.vm_get_icount(vm) != self.STEPS + 1:
self.fail('icount (%d) does not match number of instructions
stepped' % self.vm_get_icount(vm))
logger.info('continue running')
self.gdb_cont_nowait(g)
- while self.vm_get_icount(vm) <= self.STEPS:
- pass
+ logger.info('stopping to read final icount')
+ vm.qmp('stop')
last_icount = self.vm_get_icount(vm)
logger.info('shutdown...')
vm.shutdown()
- logger.info("recorded log with %s+ steps" % last_icount)
+ logger.info("recorded log with %s steps" % last_icount)
# replay and run debug commands
vm = self.run_vm(False, shift, args, replay_path, image_path, port)
--
2.42.0
- [PATCH v5 06/24] tests/avocado: replay_kernel.py add x86-64 q35 machine test, (continued)
- [PATCH v5 06/24] tests/avocado: replay_kernel.py add x86-64 q35 machine test, Nicholas Piggin, 2024/03/18
- [PATCH v5 07/24] chardev: set record/replay on the base device of a muxed device, Nicholas Piggin, 2024/03/18
- [PATCH v5 08/24] replay: Fix migration use of clock, Nicholas Piggin, 2024/03/18
- [PATCH v5 10/24] virtio-net: Use replay_schedule_bh_event for bhs that affect machine state, Nicholas Piggin, 2024/03/18
- [PATCH v5 09/24] replay: Fix migration replay_mutex locking, Nicholas Piggin, 2024/03/18
- [PATCH v5 11/24] virtio-net: Use virtual time for RSC timers, Nicholas Piggin, 2024/03/18
- [PATCH v5 12/24] savevm: Fix load_snapshot error path crash, Nicholas Piggin, 2024/03/18
- [PATCH v5 13/24] tests/avocado: replay_linux.py remove the timeout expected guards, Nicholas Piggin, 2024/03/18
- [PATCH v5 15/24] tests/avocado: reverse_debugging.py add test for x86-64 q35 machine, Nicholas Piggin, 2024/03/18
- [PATCH v5 16/24] tests/avocado: reverse_debugging.py verify addresses between record and replay, Nicholas Piggin, 2024/03/18
- [PATCH v5 17/24] tests/avocado: reverse_debugging.py stop VM before sampling icount,
Nicholas Piggin <=
- [PATCH v5 14/24] tests/avocado: reverse_debugging.py mark aarch64 and pseries as not flaky, Nicholas Piggin, 2024/03/18
- [PATCH v5 18/24] tests/avocado: reverse_debugging reverse-step at the end of the trace, Nicholas Piggin, 2024/03/18
- [PATCH v5 19/24] tests/avocado: reverse_debugging.py add snapshot testing, Nicholas Piggin, 2024/03/18
- [PATCH v5 20/24] replay: simple auto-snapshot mode for record, Nicholas Piggin, 2024/03/18
- [PATCH v5 21/24] tests/avocado: reverse_debugging.py test auto-snapshot mode, Nicholas Piggin, 2024/03/18
- [PATCH v5 22/24] target/ppc: fix timebase register reset state, Nicholas Piggin, 2024/03/18
- [PATCH v5 23/24] spapr: Fix vpa dispatch count for record-replay, Nicholas Piggin, 2024/03/18
- [PATCH v5 24/24] tests/avocado: replay_linux.py add ppc64 pseries test, Nicholas Piggin, 2024/03/18