Skip to content

Commit

Permalink
Print a debug message when QEMU was terminated by a signal on Unix
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-opp committed Nov 2, 2019
1 parent 329e8a9 commit fc43139
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/subcommand/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ pub(crate) fn runner(args: RunnerArgs) -> Result<i32, ErrorMessage> {
return Err(ErrorMessage::from("Timed Out"));
}
Some(exit_status) => {
#[cfg(unix)]
if exit_status.code().is_none() {
use std::os::unix::process::ExitStatusExt;
if let Some(signal) = exit_status.signal() {
eprintln!("QEMU process was terminated by signal {}", signal);
}
}
let qemu_exit_code = exit_status.code().ok_or("Failed to read QEMU exit code")?;
match config.test_success_exit_code {
Some(code) if qemu_exit_code == code => 0,
Expand Down

0 comments on commit fc43139

Please sign in to comment.