Skip to content

Fix panic=abort tests on Fuchsia #127539

Closed
Closed
@tmandry

Description

@tmandry

#127461 disabled these tests on Fuchsia:

  • tests/ui/test-attrs/test-panic-abort-nocapture.rs
  • tests/ui/test-attrs/test-panic-abort.rs

They were disabled because they were failing due to a message printed to stderr about the exit code being -1028 (ZX_TASK_RETCODE_EXCEPTION_KILL), coming from this line in libtest (oops).

We can clean up this error message, because it's an expected result of a panic in any unit test, and re-enable the test-panic-abort tests. We just need to add a match arm with #[cfg(target_os = "fuchsia")] that detects the failure code used for fuchsia (-1028) and returns TestResult::TrFailed with no message.

Metadata

Metadata

Assignees

Labels

A-libtestArea: `#[test]` / the `test` libraryA-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.E-help-wantedCall for participation: Help is requested to fix this issue.O-fuchsiaOperating system: Fuchsia

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions