rust/tests/ui/runtime
joboet 9f91c5099f
std: fix stdout-before-main
Fixes #130210.

Since #124881, `ReentrantLock` uses `ThreadId` to identify threads. This has the unfortunate consequence of breaking uses of `Stdout` before main: Locking the `ReentrantLock` that synchronizes the output will initialize the thread ID before the handle for the main thread is set in `rt::init`. But since that would overwrite the current thread ID, `thread::set_current` triggers an abort.

This PR fixes the problem by using the already initialized thread ID for constructing the main thread handle and allowing `set_current` calls that do not change the thread's ID.
2024-10-12 13:01:36 +02:00
..
on-broken-pipe Add only-unix to sigpipe tests 2024-05-20 11:13:10 -04:00
atomic-print.rs Update test directives for wasm32-wasip1 2024-03-11 09:36:35 -07:00
backtrace-debuginfo-aux.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
backtrace-debuginfo.rs Update test directives for wasm32-wasip1 2024-03-11 09:36:35 -07:00
native-print-no-runtime.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
out-of-stack.rs Disable stack overflow handler tests on iOS-like platforms 2024-05-28 12:31:12 +02:00
rt-explody-panic-payloads.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
running-with-no-runtime.rs Update test directives for wasm32-wasip1 2024-03-11 09:36:35 -07:00
signal-alternate-stack-cleanup.rs Update test directives for wasm32-wasip1 2024-03-11 09:36:35 -07:00
stdout-before-main.rs std: fix stdout-before-main 2024-10-12 13:01:36 +02:00
stdout-before-main.run.stdout std: fix stdout-before-main 2024-10-12 13:01:36 +02:00
stdout-during-shutdown-unix.rs Port stdout-during-shutdown 2024-05-20 11:13:10 -04:00
stdout-during-shutdown-unix.run.stdout Port stdout-during-shutdown 2024-05-20 11:13:10 -04:00
stdout-during-shutdown-windows.rs Port stdout-during-shutdown 2024-05-20 11:13:10 -04:00
stdout-during-shutdown-windows.run.stdout Port stdout-during-shutdown 2024-05-20 11:13:10 -04:00