* ls: restore WASI ".." metadata fallback in collect_directory_entries
The ls refactor in #9851 dropped the WASI guard added in #11633, so
`ls -al` at a preopened root once again fails with "Capabilities
insufficient" when stat'ing "..". Extract the logic into a small
`dotdot_path` helper and add a regression test covering `ls -al`.
* Update spell-checker ignore words in test_ls.rs
* 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>
* 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