coreutils
coreutils copied to clipboard
date: fix interaction of flags, fix issues around --set
This PR fixes multiple issues around multi-flags:
- Many repeated flags used to be handled incorrectly; this is work toward #5998
- We used to accept the
--referenceargument, but completely ignored it. Yikes! - Input, parsing, and output of
--setwas completely broken. This fixes it largely. - Input options (
-d,-f,-r), formatting options (-I,-R,--rfc-3339), and--setare often mutually-exclusive, with the exception that input options override themselves (but not each other), and also--setcan be combined with formatting options.
Some things are unfixable, in particular the order-sensitive behavior; see #4254#issuecomment-2026446634 and https://github.com/uutils/uutils-args/pull/113
GNU testsuite comparison:
Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
"CICD / Build (macos-latest, x86_64-apple-darwin, feat_os_macos)" flaked:
---- test_stat::test_stdin_pipe_fifo1 stdout ----
run: /Users/runner/work/coreutils/coreutils/target/x86_64-apple-darwin/debug/coreutils stat -
run: /Users/runner/work/coreutils/coreutils/target/x86_64-apple-darwin/debug/coreutils stat -L -
thread 'test_stat::test_stdin_pipe_fifo1' panicked at '' File: -
Size: 0 Blocks: 0 IO Block: 512 weird file
Device: 25d29ea1h/634560161d Inode: 2178033826 Links: 0
Access: (0660/?rw-rw----) Uid: ( 501/ runner) Gid: ( 20/ staff)
Access: 2024-03-29 16:28:42.942290340 +0000
Modify: 2024-03-29 16:28:42.942290340 +0000
Change: 2024-03-29 16:28:42.942290340 +0000
Birth: 1970-01-01 00:00:00.000000000 +0000
' does not contain 'fifo'', tests/by-util/test_stat.rs:286:10
All other failures appear to be known issues, too.
Changes since last push:
- Rebased on current main
- Resolved trivial conflict in
test_date.rswith #4657
Changes since last push:
- While resolving the conflict, I accidentally dropped the
#[test]marker for a test. Whoops! Added it back in.
Changes since last push:
- Rebased to new main, due to conflict with #6160
GNU testsuite comparison:
Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)
Changes since last push: Nothing, just a rebase to show that it's still a good idea to do this.
GNU testsuite comparison:
Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
CI failures seem to be only flakes:
- #6331
- #6275
- Plus some stuff that looks like #3155?
Example:
---- test_pinky::test_short_format_q stdout ----
run: /Users/runner/work/coreutils/coreutils/target/x86_64-apple-darwin/debug/coreutils pinky -q
thread 'test_pinky::test_short_format_q' panicked at 'Command was expected to succeed. code: 101
stdout = Login TTY When
runner *console
stderr = thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: IndeterminateOffset', src/uucore/src/lib/features/utmpx.rs:192:62
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
', tests/by-util/test_pinky.rs:97:40
Changes since last push:
- Rebased to new main
- Nothing more, I just want to remind that this PR exists and is still a good idea.
~~What else needs to be done?~~ EDIT: Those CI failures look suspicious, I'll have a look.
Changes since last push:
- Rebase on current main (that's around 100 commits!)
- Split the gargantuan
uumainfunction into four separate functions, as requested, and remove the corresponding clippy lint.
The only CI failure is #6534, as usual.
GNU testsuite comparison:
Congrats! The gnu test tests/timeout/timeout is no longer failing!