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
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
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>
* 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.
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).
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>
* 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
* 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>