Commit Graph

4779 Commits

Author SHA1 Message Date
Karthik Vinayan cf3b6d45ae rm: report permission denied for unreadable subdirectories
When rm -rf encounters a subdirectory without read permission,
handle_permission_denied attempts unlink_at on it. If that fails
with ENOTEMPTY, force mode was silently swallowing the error,
causing the parent removal to fail with a misleading
"Directory not empty" message instead.

Now always reports permission denied when we cannot open a
subdirectory and cannot remove it directly.

Fixes #10966
2026-02-16 15:06:20 +01:00
cui e93361bab6 nproc: process space in OMP_NUM_THREADS (#10973)
* nproc: process space in OMP_NUM_THREADS

* feat: add unittest
2026-02-16 14:40:21 +01:00
hlsxx 7acacd0818 sort: fix debug message 2026-02-16 10:47:42 +01:00
Emilia Daelman 8eb77a08b6 uutests: preserve PATH in UCommand to fix NixOS test failures
This ensures that the PATH environment variable is preserved even when cleared, allowing tests to find system utilities on NixOS where they are not in standard locations like /bin.

Fixes #10756
2026-02-16 10:37:57 +01:00
Christopher Dryden 42b734bc42 Fix failing SELinux cp tests 2026-02-15 22:07:40 +01:00
Christopher Dryden 102c94fa78 cp: fix SELinux context handling for cp-a-selinux GNU test 2026-02-15 22:07:40 +01:00
Christopher Dryden 1e5eb7c942 numfmt: fix empty delimiter and whitespace handling 2026-02-15 22:05:40 +01:00
Sylvestre Ledru a7f55cbedc date: fix subfmt-up1, fill-1, pct-pct, and invalid-high-bit-set tests (#10940) 2026-02-15 09:14:29 -08:00
Cả thế giới là Rust 72c782fbfd date: fix double periods in Hungarian month abbreviations (#10945)
ICU's DateTimeFormatter with fieldsets::M::medium() returns month
abbreviations with trailing periods (e.g., "febr." for Hungarian).
When the Hungarian locale format string contains "%Y. %b. %d"
(with periods after year and month), the ICU output resulted in
double periods: "febr.."

This fix strips trailing periods from ICU month abbreviations to
match the standard C/POSIX locale behavior.

Also adds a new test case for abbreviated month names across
multiple locales to prevent regression.

Fixes #10921

Co-authored-by: naoNao89 <naoNao89@users.noreply.github.com>
2026-02-15 13:15:29 +01:00
Yuri Astrakhan e7f2fd9c80 chore: clippy::redundant_closure_for_method_calls (#10704) 2026-02-14 23:47:16 +01:00
Sylvestre Ledru 6d9af5ae77 date: add tests to match GNU's (#10939)
* date: add test for rel-2b GNU test

Test correct month arithmetic maintaining same day of month, and
month overflow when day doesn't exist in target month.

* date: add test for cross-TZ-mishandled GNU test

Test parsing dates with embedded timezone specifications.
2026-02-14 13:55:16 -08:00
Sylvestre Ledru c4e3ca658a date: bump parse_datetime & add test for leap-1 GNU test (#10933)
Rely on parse_datetime update

Test that adding years to Feb 29 overflows to March 1 when target
year is not a leap year (matching GNU behavior).
2026-02-14 21:53:17 +01:00
Jake Abendroth 0c41299975 fix(install): prevent symlink race condition in install -D (fixes #10013) (#10140) 2026-02-14 21:47:33 +01:00
Sylvestre Ledru 5dcdba102e date: fix RFC-822 format to always use English names (#10932)
fixed gnu rfc822-1

RFC-822/RFC-2822/RFC-5322 formats must use English day and month names
regardless of locale per RFC specification. Previously, these formats
were being localized (e.g., "So" instead of "Sun" with de_DE locale).
2026-02-14 11:39:45 -08:00
cerdelen 42e3ab6e49 pr: implement the -e flag (#10167)
* pr: new functionality: expand-tabs + tests

pr: rebase

* pr: pipe test input instead of using files

* pr: parameterize tests
2026-02-14 10:10:43 -08:00
Vincent JARDIN 764eef59cd tests/truncate: add regression tests for -s %SIZE round-up bug (#10901)
The old RoundUp formula `fsize + fsize % size` was incorrect. For
example, `truncate -s %128K` on a 24696-byte file produced 49392
bytes instead of the correct 131072 bytes.

This was incidentally fixed in commit fe9793331 ("truncate: eliminate
duplicate stat() syscall") by replacing the formula with
`fsize.checked_next_multiple_of(size)`. However, the existing test
`test_round_up` used values (fsize=10, size=4) where both the buggy
and correct formulas give the same result (12), so the bug was never
caught by the test suite.

Add unit and integration tests that would have caught this bug:
- File smaller than rounding unit (the reported scenario)
- File larger than rounding unit but not aligned
- File already aligned to the rounding unit
- Division by zero (RoundUp with size=0)

Link: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/48210

Signed-off-by: Vincent Jardin <vjardin@free.fr>
2026-02-14 06:02:24 -08:00
Sylvestre Ledru 54566dd9da sort: fix panic when collator not available in worker threads (#10915) 2026-02-14 06:33:22 -05:00
mattsu eea061db56 ls:fix ls dired reports (#10527)
* refactor: simplify DisplayItemName struct and improve dired position handling

This commit refactors the `display_item_name` function to return a `DisplayItemName` struct containing both the displayed name and its dired length, rather than just the OsString. This change simplifies the code by:

1. Eliminating the need to call `dired_name_len()` separately after getting the displayed name
2. Reducing redundant length calculations in the dired position handling
3. Making the code more maintainable by encapsulating related data together

The change also fixes an issue where dired positions were being calculated incorrectly for symlink names that required quoting, ensuring proper highlighting in dired mode.

Closes: #10248
2026-02-14 10:50:11 +01:00
cerdelen e4b3b5ca72 date: Fix format optional argument to capture all following parameters (#10914) 2026-02-13 16:13:01 -05:00
Christopher Dryden dec633c0bd fix: cargo fmt and restrict /dev/full tests to Linux 2026-02-12 20:48:05 +01:00
Christopher Dryden d15e762a90 date,comm,tty: add integration tests for write error handling 2026-02-12 20:48:05 +01:00
Chris Dryden 57043cbb63 ls: release directory fds before recursing to avoid EMFILE - 12x mem improv (#10894) 2026-02-12 20:46:47 +01:00
✿ Fleur de Blue caf7c44a9c ptx: fix panic when truncation string/keyword contain multibyte Unicode (#10836)
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2026-02-12 16:34:22 +01:00
oech3 8e5966300b cat: strip errno (#10885) 2026-02-12 03:27:17 -08:00
cerdelen 04e258f171 chroot: fix gid being set by uid with --userspec #10307 (#10465)
* chroot: fix gid being set by uid with --userspec

* chroot: check using sync user that has uid != gid

* chroot: correct Error response on failure case

* chroot: fix test

* chroot: test failure output

---------

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2026-02-12 02:54:14 -08:00