Skip to content

Commit 9388900

Browse files
stephanosiogalak
authored andcommitted
sanitycheck: Fix incorrect QEMUHandler status reporting.
The current QEMUHandler implementation in sanitycheck does not check for the process exit code and reports "PASS" even when either the QEMU executable cannot be launched or exited immediately due to an error (e.g. unsupported machine type, missing file, ...). This commit adds QEMU process exit code check and error reporting when the exit code is a non-zero value. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent fadeb3e commit 9388900

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/sanitycheck

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2003,7 +2003,7 @@ class ProjectBuilder(FilterBuilder):
20032003
"test": self.instance,
20042004
"state": "executed",
20052005
"status": self.instance.status,
2006-
"reason": self.instance.status}
2006+
"reason": self.instance.reason}
20072007
)
20082008

20092009
# Report results and output progress to screen
@@ -2126,6 +2126,10 @@ class ProjectBuilder(FilterBuilder):
21262126
proc.wait()
21272127
self.returncode = proc.returncode
21282128

2129+
if self.returncode != 0:
2130+
instance.handler.set_state("failed", 0)
2131+
instance.reason = "Exited with {}".format(self.returncode)
2132+
21292133
sys.stdout.flush()
21302134

21312135

0 commit comments

Comments
 (0)