From 923d6895e7fd110a67c558f49072f613ff772c5e Mon Sep 17 00:00:00 2001 From: Grez Lu Date: Wed, 28 Aug 2024 11:24:18 +0800 Subject: [PATCH] Convert libc::SIGABRT to i32 --- library/test/src/test_result.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/test/src/test_result.rs b/library/test/src/test_result.rs index bb32c70d66311..38de4dcdd99ae 100644 --- a/library/test/src/test_result.rs +++ b/library/test/src/test_result.rs @@ -93,13 +93,14 @@ pub fn get_result_from_exit_code( time_opts: &Option, exec_time: &Option, ) -> TestResult { + let _sigabrt = libc::SIGABRT as i32; let result = match status.code() { Some(TR_OK) => TestResult::TrOk, #[cfg(windows)] Some(STATUS_ABORTED) => TestResult::TrFailed, #[cfg(unix)] None => match status.signal() { - Some(libc::SIGABRT) => TestResult::TrFailed, + Some(_sigabrt) => TestResult::TrFailed, Some(signal) => { TestResult::TrFailedMsg(format!("child process exited with signal {signal}")) }