Repository navigation
test: make all gnu test pass and fix access issue - #14966
Merged
Merged
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
8 times, most recently
from
October 1, 2026 09:15
e1fe84f to
7b71279
Compare
Contributor
Author
|
@xtqqczze what do you think of this? |
xtqqczze
reviewed
Oct 2, 2026
xtqqczze
reviewed
Oct 2, 2026
cakebaker
reviewed
Oct 2, 2026
cakebaker
reviewed
Oct 2, 2026
cakebaker
approved these changes
Oct 2, 2026
This comment was marked as resolved.
This comment was marked as resolved.
anastygnome
force-pushed
the
test-util
branch
3 times, most recently
from
October 2, 2026 16:39
2e94284 to
840b514
Compare
Contributor
Author
|
@cakebaker @xtqqczze I've rebased this. should be good to merge now :) |
xtqqczze
reviewed
Oct 2, 2026
xtqqczze
left a comment
Collaborator
There was a problem hiding this comment.
needs review from @sylvestre
`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. Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
Contributor
Kudos, good work, thanks! |
30 of 87 tasks
Collaborator
|
This broke the Redox targets: $ RUSTC_BOOTSTRAP=1 cargo check -q -Zbuild-std --all-targets --features feat_os_unix_redox --target i586-unknown-redox --target x86_64-unknown-redox
error[E0432]: unresolved imports `rustix::fs::AtFlags`, `rustix::fs::accessat`
--> src/uu/test/src/faccessat.rs:20:22
|
20 | use rustix::fs::{AtFlags, CWD, accessat};
| ^^^^^^^ ^^^^^^^^ no `accessat` in `fs`
| |
| no `AtFlags` in `fs`
|
help: a similar name exists in the module
|
20 - use rustix::fs::{AtFlags, CWD, accessat};
20 + use rustix::fs::{OFlags, CWD, accessat};
|
help: a similar name exists in the module
|
20 - use rustix::fs::{AtFlags, CWD, accessat};
20 + use rustix::fs::{AtFlags, CWD, access};
|Unfortunately, the PR to add |
Contributor
Author
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
closes #9147
closes #8960