rust/tests/ui/mir/enum
Martin Nordholts e1d4f2a0c2 tests: Require run-fail ui tests to have an exit code (SIGABRT not ok)
And introduce two new directives for ui tests:
* `run-crash`
* `run-fail-or-crash`

Normally a `run-fail` ui test like tests that panic shall not be
terminated by a signal like `SIGABRT`. So begin having that as a hard
requirement.

Some of our current tests do terminate by a signal/crash however.
Introduce and use `run-crash` for those tests. Note that Windows crashes
are not handled by signals but by certain high bits set on the process
exit code. Example exit code for crash on Windows: `0xc000001d`.
Because of this, we define "crash" on all platforms as "not exit with
success and not exit with a regular failure code in the range 1..=127".

Some tests behave differently on different targets:
* Targets without unwind support will abort (crash) instead of exit with
  failure code 101 after panicking. As a special case, allow crashes for
  `run-fail` tests for such targets.
* Different sanitizer implementations handle detected memory problems
  differently. Some abort (crash) the process while others exit with
  failure code 1. Introduce and use `run-fail-or-crash` for such tests.
2025-07-19 18:44:07 +02:00
..
convert_non_integer_break.rs tests: Require run-fail ui tests to have an exit code (SIGABRT not ok) 2025-07-19 18:44:07 +02:00
convert_non_integer_niche_break.rs tests: Require run-fail ui tests to have an exit code (SIGABRT not ok) 2025-07-19 18:44:07 +02:00
convert_non_integer_niche_ok.rs Respect endianness correctly in CheckEnums test suite 2025-07-07 17:58:44 +02:00
convert_non_integer_ok.rs Respect endianness correctly in CheckEnums test suite 2025-07-07 17:58:44 +02:00
negative_discr_break.rs tests: Require run-fail ui tests to have an exit code (SIGABRT not ok) 2025-07-19 18:44:07 +02:00
negative_discr_ok.rs Make the enum check work for negative discriminants 2025-07-02 20:02:27 +03:00
niche_option_tuple_break.rs tests: Require run-fail ui tests to have an exit code (SIGABRT not ok) 2025-07-19 18:44:07 +02:00
niche_option_tuple_ok.rs
numbered_variants_break.rs tests: Require run-fail ui tests to have an exit code (SIGABRT not ok) 2025-07-19 18:44:07 +02:00
numbered_variants_ok.rs
option_with_bigger_niche_break.rs tests: Require run-fail ui tests to have an exit code (SIGABRT not ok) 2025-07-19 18:44:07 +02:00
option_with_bigger_niche_ok.rs
plain_no_data_break.rs tests: Require run-fail ui tests to have an exit code (SIGABRT not ok) 2025-07-19 18:44:07 +02:00
plain_no_data_ok.rs
single_ok.rs
single_with_repr_break.rs tests: Require run-fail ui tests to have an exit code (SIGABRT not ok) 2025-07-19 18:44:07 +02:00
single_with_repr_ok.rs
with_niche_int_break.rs tests: Require run-fail ui tests to have an exit code (SIGABRT not ok) 2025-07-19 18:44:07 +02:00
with_niche_int_ok.rs
with_niche_ptr_ok.rs
wrap_break.rs tests: Require run-fail ui tests to have an exit code (SIGABRT not ok) 2025-07-19 18:44:07 +02:00
wrap_ok.rs