* 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>
* 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>
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
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
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.
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.
* 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>
* numfmt: fix --to=auto to return with exitcode=1
* numfmt: update direct variable use in format macro
* numfmt_test: remove extra test
* numfmt: replacing format in translate directly
* Update format.rs
* numfmt fix#11667
* numfmt --format fix
* remove ignore of test for #11667 in test_numfmt.rs
* Add space after slashes in a comment
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
* change is_precision with a more understandable name
* Leave an empty line between functions
---------
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
* forbid scientific notation arguments in numfmt
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Edit solution of #116555
* add scientific notation test
* change variable name
* use is_ascii_digit() instead of checking manually
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* Apply suggestion from @cakebaker
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* fix(numfmt):fix recision loss for large numbers in #11654
* numfmt: fix some tests in format.rs caused by importing numeric.rs
* add a file header and remove a redundant comment
* remove a redundant comment
* add a empty line between two functions
* refactor(numfmt): rename helper functions for accuracy; fix double negation logic