Commit 9bf941d
committed
ci: replace global RUST_TEST_THREADS=1 with per-crate --test-threads=1
On musl, fork() is unsafe when other threads exist — even threads
sleeping on a futex leave musl internal state that the child inherits
in an inconsistent form, causing SIGSEGV between fork and exec.
A process-wide mutex (PTY_LOCK) cannot fix this because the test
harness still spawns multiple threads (one per test). The real fix
is --test-threads=1 for PTY test binaries, which ensures only one
thread exists during fork.
Split `cargo test` into:
- Non-PTY tests: run in parallel (default thread count)
- PTY tests (pty_terminal, pty_terminal_test, vite_task_bin):
run with --test-threads=1
This removes the global RUST_TEST_THREADS=1 that forced ALL tests
to run sequentially, improving CI speed for non-PTY tests.
https://claude.ai/code/session_011H8UR3gS6hoyQAf2x7Dfw81 parent ef64d0f commit 9bf941d
1 file changed
+9
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | 152 | | |
156 | 153 | | |
157 | 154 | | |
| |||
175 | 172 | | |
176 | 173 | | |
177 | 174 | | |
178 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
179 | 184 | | |
180 | 185 | | |
181 | 186 | | |
| |||
0 commit comments