Sylvestre Ledru
7fdc75eb33
Port printenv translation: fix tests/misc/invalid-opt
2025-08-12 10:10:49 +02:00
Sylvestre Ledru
afd6390b48
clap: override the usage section
2025-08-12 10:10:49 +02:00
Sylvestre Ledru
72f5683208
fix more
2025-08-12 10:10:49 +02:00
Sylvestre Ledru
45edcc4d3a
fix try
2025-08-12 10:10:49 +02:00
Sylvestre Ledru
a00f65c09e
add test (in sort) to verify that the clap error mgmt work (english and french)
2025-08-12 10:09:59 +02:00
Nicolas Boichat
95bbaaa552
tests/uutests/Cargo.toml: Pull ctor from workspace
2025-08-11 11:04:04 +08:00
Sylvestre Ledru
21c8e42c8f
chmod: fix recursive symlink handling for -H/-L/-P flags ( Closes : #8422 )
2025-08-09 17:34:52 +02:00
Nicolas Boichat
f8a864b15d
test_cp: On MacOS, ignore tests that use /dev/fd/0
...
For unclear reason, this is a source of test flakiness (#8453 ).
2025-08-09 14:20:22 +08:00
Nicolas Boichat
620360a1e1
Merge pull request #8449 from sylvestre/issue-8407
...
CICD / Build/stable (push) Blocked by required conditions
CICD / Build/nightly (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Build (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Test all features separately (push) Blocked by required conditions
CICD / Build/SELinux (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Android / Test builds (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
L10n (Localization) / L10n/Build and Test (push) Waiting to run
L10n (Localization) / L10n/Fluent Syntax Check (push) Waiting to run
L10n (Localization) / L10n/French Integration Test (push) Waiting to run
L10n (Localization) / L10n/Multi-call Binary Install Test (push) Waiting to run
L10n (Localization) / L10n/Installation Test (Make & Cargo) (push) Waiting to run
L10n (Localization) / L10n/Locale Support Verification (push) Waiting to run
L10n (Localization) / L10n/Locale Embedding Regression Test (push) Waiting to run
WSL2 / Test (push) Waiting to run
cp: fix directory permission preservation for sibling directories with -a (Closes : #8407 )
2025-08-09 12:33:56 +08:00
yuankunzhang
de77fc9296
mktemp: allow empty string arguments for -p/--tmpdir options
2025-08-08 14:30:06 +02:00
Sylvestre Ledru
302f08266a
cp: fix directory permission preservation for sibling directories with -a ( Closes : #8407 )
2025-08-07 22:50:50 +02:00
Daniel Hofstetter
30f300c52b
clippy: fix "hiding a lifetime" warnings
...
from mismatched_lifetime_syntaxes lint
2025-08-07 16:12:03 +02:00
yuankunzhang
5825e5e346
mkfifo: support symbolic mode
2025-08-06 22:19:01 +08:00
Nicolas Boichat
01819d021e
Merge pull request #8334 from cakebaker/ci_use_macos_latest
...
ci: use `macos-latest` instead of `macos-13`
2025-08-06 20:59:04 +08:00
Daniel Hofstetter
72a3ed4605
Merge pull request #8433 from drinkcat/od-f16-f32-width
...
CICD / Build/stable (push) Blocked by required conditions
CICD / Build/nightly (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Build (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Build/SELinux (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Android / Test builds (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
L10n (Localization) / L10n/Build and Test (push) Waiting to run
L10n (Localization) / L10n/Fluent Syntax Check (push) Waiting to run
L10n (Localization) / L10n/French Integration Test (push) Waiting to run
L10n (Localization) / L10n/Multi-call Binary Install Test (push) Waiting to run
L10n (Localization) / L10n/Installation Test (Make & Cargo) (push) Waiting to run
L10n (Localization) / L10n/Locale Support Verification (push) Waiting to run
L10n (Localization) / L10n/Locale Embedding Regression Test (push) Waiting to run
WSL2 / Test (push) Waiting to run
od: Switch f16 print to width=15/16, precision=8
2025-08-06 10:57:56 +02:00
Nicolas Boichat
991ba21510
od: Switch f16 print to width=15/16, precision=8
...
While I think precision=4 is enough to print f16 unambiguously,
being consistent with GNU implementation does not hurt.
Also, change width to 16 for f32 as well.
Fixes #8370 .
2025-08-06 15:14:56 +08:00
Martin Kunkel
ff001139ea
more: tests: cleanup processes in test_valid_arg
...
Added cleanup in test_alive to ensure all spawned processes are
terminated on successful test execution.
This also fixes a race condition that could occur: the check for
process is_alive might be executing while more is still parsing
the arguments.
2025-08-04 21:39:02 +02:00
Martin Kunkel
3b4b769976
tests: fix execution on WSL2, Ubuntu 24.04 ( #8235 )
...
* tests: fix execution on WSL2, Ubuntu 24.04
Skip incompatible parts of tests to ensure that
cargo nextest run --features unix
executes successfully in WSL2, Ubuntu 24.04 distribution.
Changes
* Skip tests that required sys/kernel/profiling which is not
available in WSL2 default configuration.
* Use timezones in tests that are part of the standard tzdata
list and not only available in backwards list. Backwards list is
not installed by default in Ubuntu 24.04 (package tzdata-legacy).
* check that /proc/modules is not empty when expecting content,
because it is empty in WSL2 default configuration.
* Skip logname test not only in WSL1, also in WSL2.
* Add workflow for WSL2
This will setup WSL2 on windows-latest runner, install
Ubuntu-24.04, and run the feat_os_unix tests.
* wsl2: implemented review findings
---------
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2025-08-03 14:38:49 +02:00
Daniel Hofstetter
d9af611a9f
install: disable two tests on macOS x86_64
...
they run in timeouts in the CI with macos-latest
2025-08-02 17:33:41 +02:00
Daniel Hofstetter
7dc20bbdb0
touch: adapt tests to changes in parse_datetime
2025-08-01 10:23:30 +02:00
Daniel Hofstetter
9938db39bc
Merge pull request #8333 from sylvestre/selinux-mv
...
CICD / Style/cargo-deny (push) Waiting to run
CICD / Dependencies (push) Waiting to run
CICD / Style/deps (push) Waiting to run
CICD / Documentation/warnings (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Build/nightly (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Build (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
CICD / Build/SELinux (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Android / Test builds (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
mv: add support for selinux and add minor refactor
2025-08-01 09:36:06 +02:00
Dorian Péron
d90f3a4ec3
Merge pull request #8416 from drinkcat/cp-attr
...
CICD / Build (push) Blocked by required conditions
CICD / Style/cargo-deny (push) Waiting to run
CICD / Style/deps (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Documentation/warnings (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Dependencies (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Build/nightly (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
CICD / Build/SELinux (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Android / Test builds (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
`cp`: Properly preserves fifos and symlink attributes
2025-07-31 18:04:17 +02:00
Sylvestre Ledru
6e930966fb
selinux: introduce get_getfattr_output to verify the output of getfatt
2025-07-31 17:45:34 +02:00
Sylvestre Ledru
ad8fdbdb77
mv: implement selinux options (-Z/--context)
2025-07-31 17:45:34 +02:00
Daniel Hofstetter
1e50dc4c33
pr: reduce nesting to improve readability
...
of file_last_modified_time_format()
2025-07-31 17:00:28 +02:00
Daniel Hofstetter
7003b1d3fc
Merge pull request #8418 from drinkcat/pr-time
...
pr: Add support for -D/--date-format parameter
2025-07-31 16:34:44 +02:00
Nicolas Boichat
82cb88ac0d
test_pr: Use new_ucmd!() directly
2025-07-31 22:08:56 +08:00
Daniel Hofstetter
b5f453a562
Merge pull request #8417 from drinkcat/du-ls-time-test
...
ls: -u/-c/--time control sorting when -l is not used
2025-07-31 15:55:40 +02:00
Daniel Hofstetter
f33244321a
rm: use clap to handle --interactive args
2025-07-31 09:49:05 +02:00
Nicolas Boichat
d35a60e5e2
pr: Add support for -D/--date-format parameter
2025-07-31 15:45:31 +08:00
Nicolas Boichat
4878e65ea7
pr: Set date format depending on environment.
...
Based on GNU manual.
2025-07-31 15:45:31 +08:00
Nicolas Boichat
ec11b68543
ls: -u/-c/--time control sorting when -l is not used
...
Fallback on those flags if --sort is not otherwise set.
2025-07-31 09:00:15 +02:00
Nicolas Boichat
f4bf8987cd
tests/by-util/test_cp.rs: Merge #[cfg]
...
Co-authored-by: Dorian Péron <72708393+RenjiSann@users.noreply.github.com>
2025-07-30 21:04:03 +08:00
Nicolas Boichat
4b11692db3
cp: Also copy attributes in copy_symlink
...
Most attributes can actually be applied to symlinks (mode and
xattr are exceptions), so try to copy them, if possible.
Fort those 2 exceptions, we don't need any special handling as:
- Mode errors would be ignored anyway.
- The source symlink cannot have any xattr anyway, so no
attribute is attempted to be set on the destination.
2025-07-30 20:03:22 +08:00
Nicolas Boichat
4d48626eeb
cp: File logic error when preserving attributes for fifos
...
There was a mismatch between the test, the comment, and the code.
The intention was to _preserve_ attributes if the source of a
fifo/pipe still exists. Perhaps the clearest way is to modify
the test (as that avoids code duplication).
Also add a basic test for that, if permissions are preserved, the
rest should also be preserved correctly.
Fixes the first part of #8402 .
2025-07-30 17:37:51 +08:00
Nicolas Boichat
2d63020cd9
du: Add support for reading time-style from environment
...
Similar as what ls does, but du has an extra compatibility layer
described in the GNU manual (and that upstream dev helped me
understand: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79113 ).
2025-07-30 17:27:22 +08:00
Nicolas Boichat
1272bfc222
du: Add support for +FORMAT time-style
...
Also add to error text, which... GNU coreutils doesn't do for
some reason.
2025-07-30 17:27:22 +08:00
Nicolas Boichat
fc08fa1d62
ls: Print dates in the future as "old" ones
...
ls has different time format for recent (< 6 months) and older files.
Files in the future (even by just a second), are considered old,
which makes sense as we probably want the date to be printed in
that case.
2025-07-30 17:27:22 +08:00
Nicolas Boichat
4901f370cb
ls: Add support for newline separated format for recent/older
...
Documented in GNU manual.
Also improve test_ls to test for both recent and older files.
2025-07-30 17:27:22 +08:00
Nicolas Boichat
e5f2f79ea1
ls: Allow reading time-style from TIME_STYLE environment variable
...
According to GNU manual.
2025-07-30 17:27:22 +08:00
Nicolas Boichat
a1519e1b74
ls: Add support for --time-style=posix-*
...
From GNU manual, if LC_TIME=POSIX, then the "locale" timestamp is
used. Else, `posix-` is stripped and the format is parsed as usual.
Also, just move the whole text to the locale file, instead
of trying to generate it manually.
2025-07-30 17:27:20 +08:00
Daniel Hofstetter
790852ff9a
Merge pull request #8403 from sylvestre/ls-others
...
ls: improve the test when running selinux
2025-07-29 12:51:54 +02:00
Julian Andres Klode
190ddd105c
install: Fix --no-target-directory with existing file
...
install should silently override existing target files, but it
inadvertently checked whether the target exists rather than
for the target being a directory, hence the overwrite failed,
saying it cannot overwrite the directory with non-directory.
Bug-Ubuntu: https://bugs.launchpad.net/bugs/2118785
2025-07-29 12:24:31 +02:00
Jonas Jelten
79bbf52a21
Merge pull request #8343 from TheJJ/fix-mknod-mode
...
mknod: set cli specified file mode even when it's 0o666
2025-07-29 11:53:21 +02:00
Sylvestre Ledru
7e320a75d9
ls: improve the test when running selinux
2025-07-28 21:17:09 +02:00
Sylvestre Ledru
582c619b7e
date: update deprecated TZ
...
See:
https://data.iana.org/time-zones/tzdb/backward
2025-07-28 21:13:54 +02:00
Nicolas Boichat
b8d81adcff
du/test_du: Fix ctime fallback on Windows, and test
2025-07-27 12:57:28 +08:00
Nicolas Boichat
96438f2086
test_du: Fix --time=ctime test
...
It turns out `du` used to test for the wrong thing, `ctime` is
the change timestamp, not creation time.
We have to rely on a regex again, as the change timestamp is the
current time.
2025-07-27 10:57:07 +08:00
Dorian Peron
27faee711b
test(sort): Fix fixtures
2025-07-25 13:51:53 +02:00
Dorian Peron
365f6a36fa
test_util_name: ignore sort tests
2025-07-25 13:51:53 +02:00