record/replay: fix race condition on test_aarch64_reverse_debug

Ensures EVENT_INSTRUCTION written to replay.bin before EVENT_SHUTDOWN_HOST_QMP

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2921
Signed-off-by: Vladimir Lukianov <1844144@gmail.com>
Message-ID: <20250603125459.17688-1-1844144@gmail.com>
[AJB: fix re-base file mode]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
This commit is contained in:
Vladimir Lukianov 2025-06-03 14:54:59 +02:00 committed by Alex Bennée
parent 4d3eb329cc
commit 41f8f2be27
2 changed files with 2 additions and 1 deletions

View file

@ -263,6 +263,8 @@ bool replay_has_interrupt(void)
void replay_shutdown_request(ShutdownCause cause)
{
replay_save_instructions();
if (replay_mode == REPLAY_MODE_RECORD) {
g_assert(replay_mutex_locked());
replay_put_event(EVENT_SHUTDOWN + cause);

View file

@ -25,7 +25,6 @@ class ReverseDebugging_AArch64(ReverseDebugging):
'releases/29/Everything/aarch64/os/images/pxeboot/vmlinuz'),
'7e1430b81c26bdd0da025eeb8fbd77b5dc961da4364af26e771bd39f379cbbf7')
@skipFlakyTest("https://gitlab.com/qemu-project/qemu/-/issues/2921")
def test_aarch64_virt(self):
self.set_machine('virt')
self.cpu = 'cortex-a53'