Commit fa42ef9
authored
ci: replace global RUST_TEST_THREADS=1 with per-crate --test-threads=1 (#280)
## Summary
- Removes global `RUST_TEST_THREADS=1` from the musl CI job
- Splits `cargo test` into non-PTY tests (parallel) and PTY tests (`--test-threads=1`)
- Non-PTY tests now run in parallel on musl, improving CI speed
## Details
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. The real fix is `--test-threads=1` for PTY test binaries only (`pty_terminal`, `pty_terminal_test`, `vite_task_bin`), ensuring a single thread exists during fork.
## Test plan
- [ ] Verify musl CI job passes
- [ ] Run 10 musl test re-runs to confirm stability
- [ ] Verify all other CI jobs still pass
https://claude.ai/code/session_011H8UR3gS6hoyQAf2x7Dfw81 parent 7a8ad8b commit fa42ef9
1 file changed
+8
-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 | + | |
179 | 183 | | |
180 | 184 | | |
181 | 185 | | |
| |||
0 commit comments