Commit Graph

4924 Commits

Author SHA1 Message Date
Josh French 0366d3c657 cksum: fix parsing error with tagged cheksum files (#11704)
* cksum: fix parsing error with tagged cheksum files

When passed the '-c'/'--check' flag, and parsing a checksum file in
the "tagged" format, cksum (symlinked to sha256sum, etc...) expects a
line that looks like this:

ShA256 (file.bin) = da39a3ee5e6b4b0d3255bfef95601890afd80709

If the hash algorithm at the beginning of the line (in the above case
SHA256) is missing, then cksum panics because it is attempts to use the
value of an array at index -1. This fix causes cksum to instead consider
the line a syntax error and ignore it, just as GNU cksum does. I also
added unit and integration tests to check for the above behaviour.

---------

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2026-04-20 23:51:01 +02:00
can1357 98f6b0187b tr: fix test to assert rejection of -ct with complemented class 2026-04-20 23:28:28 +02:00
can1357 85af4e8159 tr: fix complemented class truncation ordering 2026-04-20 23:28:28 +02:00
Ibrahim Burak Yorulmaz e5a6b519ad tests/dd: test supplying non-positive bs/ibs/cbs/obs 2026-04-20 23:12:56 +02:00
oech3 36265cb9ee coreutils: --help args is same with --help 2026-04-20 23:05:29 +02:00
Devel08 e4987f0dbd pr: exit with code 1 if --column argument is zero (#11750) 2026-04-20 22:41:53 +02:00
Aleksandar Janicijevic 6133ef5176 du: Allow command-line argument that appears more than once (#11897)
---------

Co-authored-by: Aleksandar Janicijevic <aleks@vogonsoft.com>
2026-04-20 22:34:11 +02:00
oech3 e50ddecd08 du: make du -a -s error 2026-04-20 15:05:13 +02:00
oech3 ec1fcdb4ac ls, stty: reduce cfg by target_vendor (#11910) 2026-04-20 08:36:32 +02:00
Lorenzo Rossi fbefc2bd99 tail: fix panic on write error in bounded_tail (#11886)
* tail: fix panic on write error in bounded_tail

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* tail: increase test file size to ensure bounded_tail path

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-04-19 13:39:40 +02:00
Darren Schroeder ceb09c7014 ls: allow crate users to call ls without having to print everything to stdout (#9851)
* refactor uu_ls so that crate users can call the command without having
the internal print stdout output

* redo changes

* clippy

* help cspell understand dired

* rebase

* try and optimize for memory and speed performance.

update output handling to add streaming mode.

* work on ci issues, optimize uid and gid cache handling, improve dired output calculations

* test fx: change read_dir parameter to mutable reference in collect_directory_entries and enter_directory functions

* update documentation

* more perf tweaks

* fmt

* tweak perf

* Add back (and shorten) comment for 31_556_952

* Update src/uu/ls/src/ls.rs

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

* Update src/uu/ls/src/ls.rs

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

---------

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2026-04-17 14:26:23 +02:00
Sylvestre Ledru 3194190535 tests: timeout: increase delay on macOS for forward_sigint_to_child 2026-04-17 13:37:41 +02:00
xtqqczze e88a3063a6 clippy: fix unnecessary_trailing_comma lint
https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_trailing_comma
2026-04-17 07:24:13 +02:00
xtqqczze 0626a4d103 clippy: fix map_unwrap_or lint
https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or
2026-04-17 07:24:13 +02:00
xtqqczze 4e68e67416 Remove authors from Cargo metadata (per RFC 3052) 2026-04-16 09:55:50 +02:00
Eyüp Can Akman 2d5e77deb2 expr: avoid panic on regex retry-limit
Treat onig retry-limit-in-match errors as no match. GNU expr returns exit 1 for the same input.

Fixes #11612
2026-04-15 16:11:18 +02:00
Sylvestre Ledru a3ac3badb8 tests(env): increase signal delivery delay on macOS to fix flaky CI
The test_env_arg_ignore_signal_valid_signals test was failing on macOS
CI because 100ms was not always enough for the process to terminate
after receiving a fatal signal. Increase the delay to 500ms on macOS
only, keeping 100ms on other platforms.

Fixes flaky failure seen in: https://github.com/uutils/coreutils/actions/runs/24442074142/job/71409227191
2026-04-15 15:11:44 +02:00
Sylvestre Ledru 50f8d0bcc1 touch: add regression test for pre-epoch date on 32-bit 2026-04-15 10:55:34 +02:00
Sylvestre Ledru 6b044bb0d5 ls: fix link-count column inflating per ACL file
The `+1` accounting for the ACL/context indicator was applied once per
item inside the padding loop, so N files with ACLs inflated the
link-count column width by N. Apply it a single time after the loop.

Fixes #10980
2026-04-14 22:15:23 +02:00
Sylvestre Ledru cc8785e0ae mv: add tests for cross-device move ownership preservation (#9714) 2026-04-14 22:13:47 +02:00
Daniel Hofstetter 36db2e62ca du: fix error from needless_borrow lint on FreeBSD 2026-04-13 10:44:13 +02:00
Sylvestre Ledru 4fa689af89 tests/cut: ignore stdin write error on fast-exit delimiter test
test_single_quote_pair_as_delimiter_is_invalid is intermittent on
i686: the parent writes "a''b\n" to cut's stdin while cut validates
args and exits immediately with "delimiter must be a single
character". On a fast child exit, the kernel closes the pipe
read-end before the parent's write() runs, so write() returns
EPIPE and the pipe_in thread panics.

The race is inherent: draining stdin in cut before exiting on an
arg error would hang on terminals and read unbounded data from
long pipes, contradicting GNU behavior. Use the test framework's
ignore_stdin_write_error() flag, which exists for exactly this
"parent writes to child that exits fast" pattern.
2026-04-13 09:04:28 +02:00
Kevin Burke b17025b663 tee: add short-read regression test
Upstream commit 9f50c8b42 ("tee: fix input with sleep") already
contains the functional fix for short reads from a paused writer.
Keep the regression coverage so we do not reintroduce the bug.

The test writes one small chunk, waits long enough for a buggy tee to
exit, then writes a second chunk and asserts both stdout and the output
file receive both writes.
2026-04-13 07:37:50 +02:00
oech3 1d3dba8261 remove seekable from local cspell conf and use it (#11773) 2026-04-12 16:22:34 +02:00
Ivan Shanygin 9a2ee94226 who: fixed panic in who > /dev/full (#11767)
* Fixed panic in who > /dev/full

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* More sctrictly test

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-04-12 15:34:38 +02:00