rust/library/std/tests
Stuart Cook 71f04692c3
Rollup merge of #143906 - LorrensP-2158466:miri-float-nondet-foreign-items, r=RalfJung
Miri: non-deterministic floating point operations in `foreign_items`

Part of [rust-lang/miri/#3555](https://github.com/rust-lang/miri/issues/3555#issue-2278914000), this pr does the `foreign_items` work.

Some things have changed since rust-lang/rust#138062 and rust-lang/rust#142514. I moved the "helpers" used for creating fixed outputs and clamping operations to their defined ranges to `math.rs`. These are now also extended to handle the floating-point operations in `foreign_items`. Tests in `miri/tests/float.rs` were changed/added.

Failing tests in `std` were extracted, run under miri with `-Zmiri-many-seeds=0..1000` and changed accordingly. Double checked with `-Zmiri-many-seeds`.

I noticed that the C standard doesn't specify the output ranges for all of its mathematical operations; it just specifies them as:
```
Returns
The sinh functions return sinh x.
```
So I used [Wolfram|Alpha](https://www.wolframalpha.com/).
2025-08-07 20:49:41 +10:00
..
common std: get rid of sys_common::io 2025-02-07 16:54:07 +01:00
floats Change stdlib float tests to account for miri nondet floats. 2025-08-06 17:21:04 +02:00
sync add extra drop, panic, and unwind tests 2025-07-29 10:44:36 +02:00
thread_local setup CI and tidy to use typos for spellchecking and fix few typos 2025-07-03 10:51:06 +03:00
builtin-clone.rs Run tidy on tests 2024-04-28 18:04:25 -04:00
create_dir_all_bare.rs Fix std tests for wasm32-wasip2 target 2024-09-29 04:48:13 +02:00
env.rs Move env modifying tests to a separate integration test 2025-01-26 10:28:05 +00:00
env_modify.rs std: Apply deprecated_safe_2024 2025-02-13 13:10:28 -08:00
eq-multidispatch.rs Run tidy on tests 2024-04-28 18:04:25 -04:00
error.rs Move std::error unit tests to integration tests 2025-01-26 10:28:04 +00:00
istr.rs Remove some unnecessary parens in assert! conditions 2025-02-06 22:28:44 +00:00
log-knows-the-names-of-variants-in-std.rs Run tidy on tests 2024-04-28 18:04:25 -04:00
minmax-stability-issue-23687.rs Run tidy on tests 2024-04-28 18:04:25 -04:00
num.rs Move std::num unit tests to integration tests 2025-01-26 10:28:04 +00:00
panic.rs Move std::panic unit tests to integration tests 2025-01-26 10:28:04 +00:00
path.rs Handle win32 separator & prefixes for cygwin paths 2025-06-16 09:24:07 +08:00
pipe_subprocess.rs Stablize feature anonymous_pipe 2025-03-14 00:52:45 +11:00
process_spawning.rs Fix testing of the standard library with Emscripten 2025-01-24 09:25:34 +00:00
run-time-detect.rs make tidy-alphabetical use a natural sort 2025-06-25 22:52:38 +02:00
seq-compare.rs Remove some unnecessary parens in assert! conditions 2025-02-06 22:28:44 +00:00
slice-from-array-issue-113238.rs Move various stdlib tests to library/std/tests 2024-04-28 16:10:12 -04:00
switch-stdout.rs Mark extern blocks as unsafe 2025-02-09 17:11:13 +00:00
thread.rs sleep_until: use clock_nanosleep where possible 2025-07-06 17:36:49 +02:00
time.rs Move std::time unit tests to integration tests 2025-01-26 10:28:04 +00:00
type-name-unsized.rs Rename test for issue 21058 2024-05-05 10:47:12 -04:00
volatile-fat-ptr.rs Move various stdlib tests to library/std/tests 2024-04-28 16:10:12 -04:00
win_delete_self.rs ignore win_delete_self test in Miri 2025-02-10 08:08:32 +01:00
windows.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00