Skip to content

Commit 8f42572

Browse files
committed
Print a debug message when QEMU was terminated by a signal on Unix
1 parent 329e8a9 commit 8f42572

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/subcommand/runner.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,15 @@ pub(crate) fn runner(args: RunnerArgs) -> Result<i32, ErrorMessage> {
7373
return Err(ErrorMessage::from("Timed Out"));
7474
}
7575
Some(exit_status) => {
76+
#[cfg(unix)]
77+
{
78+
if exit_status.code().is_none() {
79+
use std::os::unix::process::ExitStatusExt;
80+
if let Some(signal) = exit_status.signal() {
81+
eprintln!("QEMU process was terminated by signal {}", signal);
82+
}
83+
}
84+
}
7685
let qemu_exit_code = exit_status.code().ok_or("Failed to read QEMU exit code")?;
7786
match config.test_success_exit_code {
7887
Some(code) if qemu_exit_code == code => 0,

0 commit comments

Comments
 (0)