]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: mark test as skipped when QEMU crashes
authorLuca Boccassi <luca.boccassi@gmail.com>
Mon, 7 Oct 2024 15:48:55 +0000 (16:48 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 7 Oct 2024 22:58:38 +0000 (23:58 +0100)
On Ubuntu/Debian infrastructure QEMU crashes a lot, so mark the test
as skipped in that case as there's nothing we can do about it and
we shouldn't mark runs as failed

test/integration-test-wrapper.py

index 72bd89410cc50c24f4316fde4dca2e203d521320..a680ddee5351cfc9efa105b81fd53b36520dd4a6 100755 (executable)
@@ -175,6 +175,14 @@ def main():
 
     result = subprocess.run(cmd)
 
+    # On Debian/Ubuntu we get a lot of random QEMU crashes. Retry once, and then skip if it fails again.
+    if args.vm and result.returncode == 247 and args.exit_code != 247:
+        journal_file.unlink(missing_ok=True)
+        result = subprocess.run(cmd)
+        if args.vm and result.returncode == 247 and args.exit_code != 247:
+            print(f"Test {args.name} failed due to QEMU crash (error 247), ignoring", file=sys.stderr)
+            exit(77)
+
     if journal_file and (keep_journal == "0" or (result.returncode in (args.exit_code, 77) and keep_journal == "fail")):
         journal_file.unlink(missing_ok=True)