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

Fix panic=abort tests on Fuchsia #127539

Closed
tmandry opened this issue Jul 9, 2024 · 1 comment
Closed

Fix panic=abort tests on Fuchsia #127539

tmandry opened this issue Jul 9, 2024 · 1 comment
Assignees
Labels
A-libtest Area: `#[test]` / the `test` library A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. E-help-wanted Call for participation: Help is requested to fix this issue. O-fuchsia Operating system: Fuchsia

Comments

@tmandry
Copy link
Member

tmandry commented Jul 9, 2024

#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.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 9, 2024
@tmandry tmandry added A-testsuite Area: The testsuite used to check the correctness of rustc A-libtest Area: `#[test]` / the `test` library C-bug Category: This is a bug. O-fuchsia Operating system: Fuchsia and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jul 9, 2024
@tmandry tmandry assigned tmandry and unassigned tmandry Jul 9, 2024
@tmandry tmandry added the E-help-wanted Call for participation: Help is requested to fix this issue. label Jul 9, 2024
@c6c7
Copy link
Contributor

c6c7 commented Jul 10, 2024

@rustbot claim

c6c7 added a commit to c6c7/rust that referenced this issue Jul 10, 2024
This change adds ZX_TASK_RETCODE_EXCEPTION_KILL as an expected status
code upon an abort in a test on Fuchsia. Tests

fixes rust-lang#127539
c6c7 added a commit to c6c7/rust that referenced this issue Jul 13, 2024
This change adds ZX_TASK_RETCODE_EXCEPTION_KILL as an expected status
code upon an abort in a test on Fuchsia. Tests

fixes rust-lang#127539
c6c7 added a commit to c6c7/rust that referenced this issue Jul 15, 2024
This change adds ZX_TASK_RETCODE_EXCEPTION_KILL as an expected status
code upon an abort in a test on Fuchsia. Tests

fixes rust-lang#127539
@bors bors closed this as completed in 1aad89d Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-libtest Area: `#[test]` / the `test` library A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. E-help-wanted Call for participation: Help is requested to fix this issue. O-fuchsia Operating system: Fuchsia
Projects
Development

No branches or pull requests

3 participants