Repository navigation
Drain stdin in the keyboard test's gum stub - #209
Merged
Merged
Conversation
The prompt pipes the layout list into gum, and a stub that exits without reading it kills cut with SIGPIPE. Under pipefail the prompt reads that as a failed selection and returns before setting anything, so the assertions saw empty values -- 6 of 10 runs failed, on a different layout each time. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
malik-na
approved these changes
Aug 24, 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.
tests/test-keyboard-layouts.sh, added in #196, fails intermittently — 6 of 10 runs here, on a different layout each time, which reads like a bad mapping and isn't one.The prompt is
printf … | cut -d'|' -f1 | gum choose …. The test'sgumstub prints its answer and exits without reading stdin, socuttakes SIGPIPE; underpipefailthe prompt treats that as a failed selection and returns before settingkeyboard,keyboard_xkb_layoutorkeyboard_xkb_variant, leaving the assertions comparing empty strings. Whether it fires depends on whethercutfinishes writing 48 lines before the stub exits.Draining stdin in the stub fixes it: 12 of 12 runs clean before rebase, 8 of 8 after. Same trap as the one
brcmfmac-supplicant-test.shdocuments for omacom#6608.