rust/library/std/tests
Stuart Cook d0fa5c7af7
Rollup merge of #144960 - raoulstrackx:raoul/rte-513-disable_sleep_tests_on_sgx, r=Mark-Simulacrum
[RTE-513] Ignore sleep_until test on SGX

rust-lang/rust#141829 added a test for `sleep_until`: it checks whether its specification holds:
> Puts the current thread to sleep until the specified deadline has passed.

but in SGX there's no secure time source. There's only the ability to request the `insecure_time` from outside of the enclave through a [usercall](https://github.com/fortanix/rust-sgx/blob/master/intel-sgx/fortanix-sgx-abi/src/lib.rs#L590-L592) and the ability to [wait](https://github.com/rust-lang/rust/blob/master/library/std/src/sys/pal/sgx/abi/usercalls/mod.rs#L173-L179) for a certain event or timeout. But both are under the control of an attacker; users should not depend on the accuracy nor correctness of this time. We try to even enforce this by adding a +/-10% time interval to wait usercalls.

The current `thread::sleep_until` implementation uses this `wait` usercall. When a negative randomization interval is added to the timeout passed in `wait`, the test fails. As users should not rely on the correctness of any time inside the enclave, it should be considered an incorrect test on SGX. This PR ignores this test.
2025-08-19 14:18:21 +10:00
..
common std: get rid of sys_common::io 2025-02-07 16:54:07 +01:00
floats Revert "Rollup merge of #143906 - LorrensP-2158466:miri-float-nondet-foreign-items, r=RalfJung" 2025-08-08 19:16:48 +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 Remove unnecessary parentheses in assert!s 2025-08-10 21:59:04 +00:00
env_modify.rs library: Migrate from cfg_if to cfg_select 2025-08-16 05:28:31 -07: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 remove gate 2025-08-04 02:18:18 +05: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 Ignore sleep_until test on SGX 2025-08-05 14:51:39 +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