rust/tests/ui/contracts
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
..
internal_machinery tests: Require run-fail ui tests to have an exit code (SIGABRT not ok) 2025-07-19 18:44:07 +02:00
associated-item.rs Don't ICE when failing to lower contracts for associated impl items 2025-02-10 21:38:31 +00:00
associated-item.stderr Don't ICE when failing to lower contracts for associated impl items 2025-02-10 21:38:31 +00:00
contract-annotation-limitations.rs Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contract-annotation-limitations.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contract-attributes-generics.chk_const_fail.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contract-attributes-generics.chk_fail_post.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contract-attributes-generics.chk_fail_pre.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contract-attributes-generics.chk_pass.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contract-attributes-generics.rs tests: Require run-fail ui tests to have an exit code (SIGABRT not ok) 2025-07-19 18:44:07 +02:00
contract-attributes-generics.unchk_pass.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contract-attributes-nest.chk_fail_post.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contract-attributes-nest.chk_fail_pre.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contract-attributes-nest.chk_pass.stderr Fix unreachable expression warning 2025-04-08 10:46:31 -07:00
contract-attributes-nest.rs tests: Require run-fail ui tests to have an exit code (SIGABRT not ok) 2025-07-19 18:44:07 +02:00
contract-attributes-nest.unchk_fail_post.stderr Fix unreachable expression warning 2025-04-08 10:46:31 -07:00
contract-attributes-nest.unchk_fail_pre.stderr Fix unreachable expression warning 2025-04-08 10:46:31 -07:00
contract-attributes-nest.unchk_pass.stderr Fix unreachable expression warning 2025-04-08 10:46:31 -07:00
contract-attributes-tail.chk_fail_post.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contract-attributes-tail.chk_fail_pre.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contract-attributes-tail.chk_pass.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contract-attributes-tail.rs tests: Require run-fail ui tests to have an exit code (SIGABRT not ok) 2025-07-19 18:44:07 +02:00
contract-attributes-tail.unchk_fail_post.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contract-attributes-tail.unchk_fail_pre.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contract-attributes-tail.unchk_pass.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contract-captures-via-closure-copy.rs tests: Require run-fail ui tests to have an exit code (SIGABRT not ok) 2025-07-19 18:44:07 +02:00
contract-captures-via-closure-copy.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contract-captures-via-closure-noncopy.rs Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contract-captures-via-closure-noncopy.stderr Fix unreachable expression warning 2025-04-08 10:46:31 -07:00
contract-const-fn.all_pass.stderr Enable contracts for const functions 2025-04-07 11:17:33 -07:00
contract-const-fn.rs tests: Require run-fail ui tests to have an exit code (SIGABRT not ok) 2025-07-19 18:44:07 +02:00
contract-const-fn.runtime_fail_post.stderr Enable contracts for const functions 2025-04-07 11:17:33 -07:00
contract-const-fn.runtime_fail_pre.stderr Enable contracts for const functions 2025-04-07 11:17:33 -07:00
contracts-ensures-early-fn-exit.chk_fail_ret.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contracts-ensures-early-fn-exit.chk_fail_try.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contracts-ensures-early-fn-exit.chk_fail_yeet.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contracts-ensures-early-fn-exit.chk_pass.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contracts-ensures-early-fn-exit.rs tests: Require run-fail ui tests to have an exit code (SIGABRT not ok) 2025-07-19 18:44:07 +02:00
contracts-ensures-early-fn-exit.unchk_pass.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contracts-ensures-is-not-inherited-when-nesting.rs Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contracts-ensures-is-not-inherited-when-nesting.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contracts-requires-is-not-inherited-when-nesting.rs Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
contracts-requires-is-not-inherited-when-nesting.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
disallow-contract-annotation-on-non-fn.rs Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00
disallow-contract-annotation-on-non-fn.stderr Rename rustc_contract to contract 2025-02-03 13:55:15 -08:00