Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fuchsia status code match arm #127594

Merged
merged 2 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update name of Windows abort constant to match platform documentation
  • Loading branch information
c6c7 committed Jul 15, 2024
commit deb8ebb39b1fa8ab1436bf224df434273a6c58c6
4 changes: 2 additions & 2 deletions library/test/src/test_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub const TR_OK: i32 = 50;
// On Windows we use __fastfail to abort, which is documented to use this
// exception code.
#[cfg(windows)]
const STATUS_ABORTED: i32 = 0xC0000409u32 as i32;
const STATUS_FAIL_FAST_EXCEPTION: i32 = 0xC0000409u32 as i32;

// On Zircon (the Fuchsia kernel), an abort from userspace calls the
// LLVM implementation of __builtin_trap(), e.g., ud2 on x86, which
Expand Down Expand Up @@ -104,7 +104,7 @@ pub fn get_result_from_exit_code(
let result = match status.code() {
Some(TR_OK) => TestResult::TrOk,
#[cfg(windows)]
Some(STATUS_ABORTED) => TestResult::TrFailed,
Some(STATUS_FAIL_FAST_EXCEPTION) => TestResult::TrFailed,
#[cfg(unix)]
None => match status.signal() {
Some(libc::SIGABRT) => TestResult::TrFailed,
Expand Down
1 change: 0 additions & 1 deletion tests/ui/test-attrs/test-panic-abort-nocapture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
//@ ignore-wasm no panic or subprocess support
//@ ignore-emscripten no panic or subprocess support
//@ ignore-sgx no subprocess support
//@ ignore-fuchsia code returned as ZX_TASK_RETCODE_EXCEPTION_KILL, FIXME (#127539)

#![cfg(test)]

Expand Down
1 change: 0 additions & 1 deletion tests/ui/test-attrs/test-panic-abort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
//@ ignore-wasm no panic or subprocess support
//@ ignore-emscripten no panic or subprocess support
//@ ignore-sgx no subprocess support
//@ ignore-fuchsia code returned as ZX_TASK_RETCODE_EXCEPTION_KILL, FIXME (#127539)

#![cfg(test)]
#![feature(test)]
Expand Down
Loading