Skip to content

fix(e2e): stop stdin drain in scenario-runner pre-actions - #703

Merged
al-af merged 1 commit into
masterfrom
fix/scenario-runner-stdin-drain
Aug 27, 2026
Merged

fix(e2e): stop stdin drain in scenario-runner pre-actions#703
al-af merged 1 commit into
masterfrom
fix/scenario-runner-stdin-drain

Conversation

@al-af

@al-af al-af commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Bug

run_phase_command's eval "$command" 2>&1 had no stdin redirection. Called from the pre_actions while IFS= read -r action; do ... done < <(jq -c ...) loop, a stdin-reading pre-action (e.g. adb shell am start ...) inherits the loop's fd0 and drains it — the loop's read hits EOF before reaching the next pre_action line (e.g. the sleep 1 after backgrounding), so that step silently never runs or logs.

Fix

Scoped </dev/null redirect on that one eval call, with a comment explaining why.

Verification

  • bash -n scripts/af-scenario-runner.sh — syntax OK
  • Minimal repro harness confirmed the drain with an unfixed eval and confirmed both loop steps run with </dev/null added

Commands executed inside the `pre_actions` loop in `af-scenario-runner.sh` could inherit and consume the parent loop's standard input. This would silently starve subsequent `read` commands, causing them to skip remaining `pre_action` lines.

Redirecting stdin to `/dev/null` for these commands ensures the parent loop's input stream remains intact.
@al-af
al-af merged commit 7023f8c into master Aug 27, 2026
13 checks passed
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.

2 participants