Skip to content

fix(tests): unique helper dirs for parallel fd_redirects tests (#667) - #676

Merged
caomengxuan666 merged 1 commit into
masterfrom
fix/issue667-fd-parallel-race
Oct 16, 2026
Merged

caomengxuan666 merged 1 commit into
masterfrom
fix/issue667-fd-parallel-race

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

fix(tests): unique helper dirs for parallel fd_redirects tests (#667)

What

6 fd_redirects tests failed under parallel runs but passed serially
(19/19). Root cause: external_fd_copy_bin_dir() returned one fixed
target/rubash-cli-external-fd-copy-bin path for ~10 tests, which raced
remove_dir_all/create_dir_all/helper-script writes against each
other.

Fix (test-only)

Unique dir per call (pid + ThreadId + atomic counter). No executor
changes; no leftover dirs (tests clean up their own).

Verification

  • cargo test --test cli_tests fd_redirects -- --test-threads=8:
    10/19 → 19/19, 3x consecutive.
  • Serial: 19/19.
  • CI runs the standard checks (test-only change; full serial gate not
    separately run — nothing outside tests/ is touched).

external_fd_copy_bin_dir returned one fixed path for ~10 tests;
parallel runs raced remove_dir_all/create_dir_all/helper writes.
Now pid + ThreadId + atomic counter per call. 8-thread file run 10/19
-> 19/19 (3x); serial 19/19. Test-only, no executor changes.
@caomengxuan666
caomengxuan666 merged commit ea7e2b8 into master Oct 16, 2026
8 checks passed
@caomengxuan666
caomengxuan666 deleted the fix/issue667-fd-parallel-race branch October 16, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant