Skip to content

Serialize shell snapshot stdin test#13878

Merged
aibrahim-oai merged 2 commits intomainfrom
dev/flaky-shell-snapshot-stdin-test
Mar 9, 2026
Merged

Serialize shell snapshot stdin test#13878
aibrahim-oai merged 2 commits intomainfrom
dev/flaky-shell-snapshot-stdin-test

Conversation

@aibrahim-oai
Copy link
Collaborator

@aibrahim-oai aibrahim-oai commented Mar 7, 2026

What changed

  • snapshot_shell_does_not_inherit_stdin now runs under its own serial key.
  • The change isolates it from other Unix shell-snapshot tests that also interact with stdin.

Why this fixes the flake

  • The failure was not a shell-snapshot logic bug. It was shared-stdin interference between concurrently executing tests.
  • When multiple tests compete for inherited stdin at the same time, one test can observe EOF or consumed input that actually belongs to a different test.
  • Running this specific test in a dedicated serial bucket guarantees exclusive ownership of stdin, which makes the assertion deterministic without weakening coverage.

Scope

  • Test-only change.

aibrahim-oai added a commit that referenced this pull request Mar 7, 2026
aibrahim-oai added a commit that referenced this pull request Mar 7, 2026
aibrahim-oai added a commit that referenced this pull request Mar 7, 2026
@aibrahim-oai aibrahim-oai force-pushed the dev/flaky-shell-snapshot-stdin-test branch from c9dceb4 to 8b68a19 Compare March 7, 2026 19:13
aibrahim-oai added a commit that referenced this pull request Mar 7, 2026
@aibrahim-oai aibrahim-oai force-pushed the dev/flaky-shell-snapshot-stdin-test branch from 1f7e05c to 77b0e27 Compare March 8, 2026 04:31
@aibrahim-oai aibrahim-oai requested review from dylan-hurd-oai, jif-oai and owenlin0 and removed request for dylan-hurd-oai and owenlin0 March 8, 2026 06:31
let read_status_path = home.join("stdin-read-status");
let read_status_display = read_status_path.display();
let bashrc =
format!("read -t 1 -r ignored\nprintf '%s' \"$?\" > \"{read_status_display}\"\n");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment in the code? I don't understand what the print here is for?

@aibrahim-oai aibrahim-oai merged commit 4a0e6dc into main Mar 9, 2026
29 of 30 checks passed
@aibrahim-oai aibrahim-oai deleted the dev/flaky-shell-snapshot-stdin-test branch March 9, 2026 17:44
@github-actions github-actions bot locked and limited conversation to collaborators Mar 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants