tests: log when qemu crashed and the test is re-ran

Follow-up for 0d7f5a9ae6
This commit is contained in:
Luca Boccassi
2025-12-08 12:03:48 +00:00
parent 154c642e7b
commit e66f6d3b23

View File

@@ -622,6 +622,10 @@ def main() -> None:
if args.vm and result.returncode == 247 and args.exit_code != 247:
if journal_file:
journal_file.unlink(missing_ok=True)
print(
f'Test {args.name} failed due to QEMU crash (error 247), retrying...',
file=sys.stderr,
)
result = subprocess.run(cmd)
if args.vm and result.returncode == 247 and args.exit_code != 247:
print(
@@ -629,6 +633,10 @@ def main() -> None:
file=sys.stderr,
)
exit(77)
print(
f'Test {args.name} worked on re-run after QEMU crash (error 247)',
file=sys.stderr,
)
except KeyboardInterrupt:
result = subprocess.CompletedProcess(args=cmd, returncode=-signal.SIGINT)