test: make all gnu test pass and fix access issue - #14966
Open
anastygnome wants to merge 3 commits into
Open
anastygnome wants to merge 3 commits into
anastygnome wants to merge 3 commits into
Conversation
anastygnome
force-pushed
the
test-util
branch
2 times, most recently
from
September 29, 2026 19:29
3e9defe to
ec367ff
Compare
|
Binary size comparison: |
|
GNU testsuite comparison: |
anastygnome
force-pushed
the
test-util
branch
2 times, most recently
from
September 29, 2026 20:45
559b9a1 to
f004f3d
Compare
anastygnome
marked this pull request as ready for review
September 29, 2026 20:45
anastygnome
force-pushed
the
test-util
branch
3 times, most recently
from
September 30, 2026 05:41
9271b01 to
8d6deae
Compare
Contributor
Author
|
@sylvestre looking good to me! |
anastygnome
force-pushed
the
test-util
branch
2 times, most recently
from
September 30, 2026 11:05
7317cff to
7a0bbc4
Compare
Contributor
Author
|
@cakebaker can you review? |
anastygnome
force-pushed
the
test-util
branch
3 times, most recently
from
October 1, 2026 08:34
4beb8cf to
9b41762
Compare
anastygnome
force-pushed
the
test-util
branch
7 times, most recently
from
October 1, 2026 09:15
68c46dc to
e1fe84f
Compare
`test` has special rules for expressions with one through four arguments. Keeping a postfix `Symbol` stack makes those cases harder to follow and clones `OsString`s while looking ahead. Evaluate directly from the argument slice instead. Keep the short forms explicit, then use the usual `!`, `-a`, `-o` precedence for longer expressions. This also fills in GNU-compatible `-l` integer operands, locale ordering for `<` and `>`, and the `-t` overflow case. This matches GNU logic, and makes the test pass.
This branch has not been deployed
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.
The implementation of test parsing was not all encompassing and missed a lot of cases from GNU. Notably test would process short expressions in a special way, which was absent in uutils. One test went against coreutils, probably because by default test uses a shell builtin.
This PR fixes all of the issues, at the expense of a comprehensive rewrite of the parser (sorry!). But it is at least a sane base to work upon.
closes #13197