Skip to content

env: drop the ... after --debug in --help, and fix the flaky usage_vs_getopt - #16534

Merged
sylvestre merged 2 commits into
mainfrom
usage-vs-getopt-fixes
Nov 16, 2026
Merged

sylvestre merged 2 commits into
mainfrom
usage-vs-getopt-fixes

Conversation

@sylvestre

Copy link
Copy Markdown
Contributor

env --help showed -v, --debug... (clap's rendering of a Count flag), so usage_vs_getopt ran env --debug... and got an unknown-argument error. The occurrences of -v/--debug are now counted by hand.

The failure was only seen from time to time because build-gnu.sh dedups the test's patterns with cat pat | sort -u > pat, which can truncate the file before it is read and leave no pattern to check. It now uses sort -u -o pat pat.

Should make test tests/misc/usage_vs_getopt pass (and stop it from being reported as intermittent).

clap renders a Count flag as "--debug..."; count the occurrences of a
zero-value flag instead.

Should make test tests/misc/usage_vs_getopt pass
"cat pat | sort -u > pat" could truncate pat before reading it, leaving no
pattern and hiding failures, which made the test pass intermittently. Drop
it from the intermittent list.
Copilot AI balanced review requested due to automatic review settings November 15, 2026 21:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

GNU testsuite comparison:

Congrats! The gnu test tests/misc/usage_vs_getopt is no longer failing!

@sylvestre
sylvestre force-pushed the usage-vs-getopt-fixes branch from 9d8975e to 69fb57f Compare November 16, 2026 07:29
Copilot AI balanced review requested due to automatic review settings November 16, 2026 07:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@sylvestre
sylvestre merged commit ffc7463 into main Nov 16, 2026
193 of 196 checks passed
@sylvestre
sylvestre deleted the usage-vs-getopt-fixes branch November 16, 2026 19:00
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