-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
tests: GNU-compat coverage for write-errors and ls TIME_STYLE (#4627) #8684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
tests: GNU-compat coverage for write-errors and ls TIME_STYLE (#4627) #8684
Conversation
…n pipe, and --output-error; refs uutils#4627
CodSpeed Performance ReportMerging #8684 will not alter performanceComparing Summary
Footnotes
|
GNU testsuite comparison:
|
…h' in feature-split; fix spelling tokens; guard older-path with #[cfg(feature="touch")]
GNU testsuite comparison:
|
GNU testsuite comparison:
|
042f6a4
to
cdaf2be
Compare
cdaf2be
to
c72abe0
Compare
GNU testsuite comparison:
|
GNU testsuite comparison:
|
f502f9b
to
17d4da3
Compare
- chcon, runcon: replace crate-level cfg with entrypoint guard and add a no-op main on non-Linux to avoid build failures. - ls: enable SELinux support only when both feature="selinux" and target_os="linux"; default to false otherwise. - tests(by-util/test_cat.rs): correctly drop the read_end handle to ensure writers see EPIPE (rename _read_end -> read_end and drop it). Refs: uutils#4627
17d4da3
to
6ac5031
Compare
GNU testsuite comparison:
|
GNU testsuite comparison:
|
GNU testsuite comparison:
|
…id CI hangs (PR uutils#8684)\n\n- Guard test with #[cfg(all(unix, not(target_os = "freebsd")))]\n- Rationale: FreeBSD workflow repeatedly times out on this test in vmactions/freebsd-vm\n- Keeps coverage on other Unix platforms while unblocking FreeBSD CI
GNU testsuite comparison:
|
GNU testsuite comparison:
|
GNU testsuite comparison:
|
2cce039
to
e777d86
Compare
GNU testsuite comparison:
|
1 similar comment
GNU testsuite comparison:
|
9d4f820
to
30835b7
Compare
GNU testsuite comparison:
|
GNU testsuite comparison:
|
GNU testsuite comparison:
|
GNU testsuite comparison:
|
|
||
#[cfg(feature = "feat_external_libstdbuf")] | ||
#[test] | ||
fn test_permission_external_missing_lib() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ecordonnier wdyt ? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to be written differently long-term:
- one corner-case is that this will fail in case the user ran "make install" before running this test
- testing "Permission denied" while building with feat_external_libstdbuf adds more value than skipping "test_permission" and testing for the "missing libstdbuf" error message
- one way to fix this is by implementing the same logic than in GNU coreutils: stdbuf should search for libstdbuf.so first in the path where stdbuf is currently located, and then in LIBSTDBUF_DIR. that way it would be easy to provide a symlink to libstdbuf.so for testing purpose (without requiring make install / root access)
- if you need to merge it now please add a big TODO
GNU testsuite comparison:
|
…x gating for ls - chcon/runcon: add rationale comments for item-level cfg with stub main() on non-Linux to keep binary targets present across platforms (fixes reviewer request) - cat tests: remove top-of-file banner; add scoped comment and replace tautology with assert on process exit to ensure no hang/crash in broken pipe scenario - tee tests: replace tautological assertion with explicit exit presence check in broken pipe scenario (Unix, non-FreeBSD) - ls: gate SecurityContext lookup under all(feature=selinux, target_os=linux) to avoid unresolved symbols when building with all features; maintain String return path across cfg branches These changes address @sylvestre’s comments and improve cross-platform stability while preserving GNU-compat coverage for TIME_STYLE, broken pipes, and stdbuf.
GNU testsuite comparison:
|
EOPNOTSUPP | ||
EPERM | ||
EROFS | ||
EPIPE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't respect the existing alphabetical order
|
||
#[cfg(feature = "feat_external_libstdbuf")] | ||
#[test] | ||
fn test_permission_external_missing_lib() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to be written differently long-term:
- one corner-case is that this will fail in case the user ran "make install" before running this test
- testing "Permission denied" while building with feat_external_libstdbuf adds more value than skipping "test_permission" and testing for the "missing libstdbuf" error message
- one way to fix this is by implementing the same logic than in GNU coreutils: stdbuf should search for libstdbuf.so first in the path where stdbuf is currently located, and then in LIBSTDBUF_DIR. that way it would be easy to provide a symlink to libstdbuf.so for testing purpose (without requiring make install / root access)
- if you need to merge it now please add a big TODO
This PR adds test coverage to improve alignment with GNU coreutils for ls, tee, and cat as part of addressing regressions tracked in #4627.
Summary of changes
Issue linkage
Local validation
Implementation notes