fix(e2e): stop stdin drain in scenario-runner pre-actions - #703
Merged
Conversation
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.
pazlavi
approved these changes
Aug 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
run_phase_command'seval "$command" 2>&1had no stdin redirection. Called from thepre_actionswhile 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'sreadhits EOF before reaching the next pre_action line (e.g. thesleep 1after backgrounding), so that step silently never runs or logs.Fix
Scoped
</dev/nullredirect on that one eval call, with a comment explaining why.Verification
bash -n scripts/af-scenario-runner.sh— syntax OK</dev/nulladded