From fc431394ee4ea16fc8130eb6d4725be09fc24314 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sat, 2 Nov 2019 16:51:24 +0100 Subject: [PATCH] Print a debug message when QEMU was terminated by a signal on Unix --- src/subcommand/runner.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/subcommand/runner.rs b/src/subcommand/runner.rs index f63004d..7d2176f 100644 --- a/src/subcommand/runner.rs +++ b/src/subcommand/runner.rs @@ -73,6 +73,13 @@ pub(crate) fn runner(args: RunnerArgs) -> Result { 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,