Commit graph

4277 commits

Author SHA1 Message Date
Elliot Wesoff
e109504086 tests/timeout: remove unnecessary stderr check 2025-10-08 00:07:44 -07:00
Daniel Hofstetter
cd2e64d48f
Merge pull request #8820 from Misakait/fix/reference-calculate
Some checks are pending
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 / 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
CICD / Build/SELinux-Stubs (Non-Linux) (push) Blocked by required conditions
CICD / Safe Traversal Security Check (push) Blocked by required conditions
CICD / Run benchmarks (CodSpeed) (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
Devcontainer / Verify devcontainer (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
fix(ptx): Align text wrapping behavior with GNU in traditional mode
2025-10-07 09:19:11 +02:00
Daniel Hofstetter
802e25cc62 unexpand: add support for non-utf8 filenames 2025-10-07 07:32:52 +02:00
Sylvestre Ledru
33ac2cf6e9 base58: it wasn't working properly with long input 2025-10-06 15:53:56 +02:00
Sylvestre Ledru
5551c6a7ec Fix the last rm tests + add tests 2025-10-06 13:58:00 +02:00
Misakait
4b1163890f fix(ptx): Align text wrapping behavior with GNU in traditional mode and add related test
In traditional mode (-G) with references enabled, `uutils/ptx` failed
to wrap long lines in the same way as the GNU `ptx` reference
implementation.

This was due to the layout algorithm operating on an incorrectly large
line width, as the space for the reference column was not being
subtracted from the total width budget.

This commit implements the correct line width adjustment by subtracting
the reference width. This aligns the wrapping behavior and
makes the output identical to GNU `ptx` for the tested cases.
2025-10-06 00:17:50 +08:00
AnarchistHoneybun
e16ce60a38
basenc: implement --base58 encoding option (#8751)
* basenc: implement --base58 encoding option

Add support for Base58 encoding to basenc as per GNU coreutils 9.8.
Base58 uses the alphabet '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
which excludes visually ambiguous characters (0, O, I, l).

Resolves issue #8744.

* basenc: fix clippy warnings and spelling issues

Fix explicit iteration clippy warnings. Add Base58 alphabet to spell-checker ignore list to resolve cspell errors.
2025-10-05 14:03:45 +02:00
Cả thế giới là Rust
f86061076b
tests(tee): Add GNU-compat write-error and broken-pipe tests (#4627) (#8797)
Some checks failed
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
Devcontainer / Verify devcontainer (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
CICD / Style/cargo-deny (push) Has been cancelled
CICD / Style/deps (push) Has been cancelled
CICD / Documentation/warnings (push) Has been cancelled
CICD / MinRustV (push) Has been cancelled
CICD / Dependencies (push) Has been cancelled
CICD / Code Coverage (push) Has been cancelled
CICD / Separate Builds (push) Has been cancelled
CICD / Test all features separately (push) Has been cancelled
CICD / Build/SELinux (push) Has been cancelled
CICD / Run benchmarks (CodSpeed) (push) Has been cancelled
CICD / Build (push) Has been cancelled
CICD / Tests/Toybox test suite (push) Has been cancelled
CICD / Build/Makefile (push) Has been cancelled
CICD / Build/stable (push) Has been cancelled
CICD / Build/nightly (push) Has been cancelled
CICD / Binary sizes (push) Has been cancelled
CICD / Tests/BusyBox test suite (push) Has been cancelled
Add comprehensive test coverage for tee --output-error and broken pipe behavior:

- test_output_error_flag_without_value_defaults_warn_nopipe: Verify default behavior
- test_output_error_presence_only_broken_pipe_unix: Non-crash on SIGPIPE
- test_broken_pipe_early_termination_stdout_only: Early termination robustness
- test_write_failure_reports_error_and_nonzero_exit: Error reporting validation

These tests address remaining gaps from GNU test suite tests/misc/tee.sh and
tests/misc/write-errors.sh highlighted in #4627. Platform-specific guards
(#[cfg(unix)], FreeBSD exclusion) ensure cross-platform compatibility.
2025-10-04 21:20:54 +02:00
Misakait
e131d31486 test(ptx): Add regression test for stdin reference format 2025-10-04 20:53:41 +08:00
Cả thế giới là Rust
0554a20474
tests(ls): Add GNU-compat TIME_STYLE tests (#8796)
* tests(ls): Add GNU-compat TIME_STYLE tests (#4627)

Add comprehensive test coverage for ls TIME_STYLE behavior to align with GNU coreutils:

- test_ls_time_style_env_full_iso: TIME_STYLE environment variable with full-iso format
- test_ls_time_style_iso_recent_and_older: --time-style=iso formatting for recent vs older files
- test_ls_time_style_posix_locale_override: Locale-based fallback with LC_ALL=POSIX
- test_ls_time_style_precedence_last_wins: Precedence between --full-time and --time-style
- test_ls_time_sort_without_long: Time-based sorting without -l flag

These tests directly address remaining gaps highlighted in #4627 for tests/ls/ls-time.sh
from the GNU test suite.

* tests(ls): use set_modified instead of touch; simplify assertions

- Replace #[cfg(feature = "touch")] with set_modified(UNIX_EPOCH) in test_ls_time_style_iso_recent_and_older
- Remove conditional blocks in test_ls_time_sort_without_long and set mtimes via set_modified
- Simplify assertion to assert_ne!(def, t) to compare full outputs

Rationale: Improves determinism, portability, and reduces branching as suggested by maintainer cakebaker in PR review comments.
2025-10-04 07:42:15 +02:00
Daniel Hofstetter
aa40a1179e
Merge pull request #8799 from naoNao89/test/df-total-whitespace-fix
tests(df): Fix test_total to avoid whitespace parsing issues
2025-10-03 14:59:48 +02:00
naoNao89
d1d5e7a5fa tests(df): Fix test_total to avoid whitespace parsing issues
Improve test_total robustness by using --output=size,used,avail to get
numeric-only columns, avoiding fragile whitespace parsing of Filesystem
and Mounted on columns which can contain spaces in mount point names.

This makes the test more reliable across different filesystem configurations
and mount point naming conventions.
2025-10-03 16:40:14 +07:00
Misakait
48b5439b3a test(ptx): Add regression tests for TeX and chunking bugs
Adds two fixture-based tests to verify GNU-compatible behavior:

- `test_tex_format_no_truncation_markers`: Ensures TeX format does not
  display truncation markers.
- `gnu_ext_disabled_chunk_no_over_reading`: Verifies that text chunks
  do not over-read at boundaries in traditional mode.
2025-10-03 10:53:16 +02:00
Misakait
9064619efd
fix(ptx): Remove extra space before truncation marker and add a related test (#8784)
Some checks are pending
Code Quality / Style/toml (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 / 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 / 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
CICD / Run benchmarks (CodSpeed) (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/Python (push) Waiting to run
Devcontainer / Verify devcontainer (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
* fix(ptx): Remove extra space before truncation marker and a regression test (`test_truncation_no_extra_space_in_after`) has been added. Close#8783

* fix(ptx): Remove extra space before truncation marker and a regression test (`test_truncation_no_extra_space_in_after`) has been added. Close#8783
2025-10-02 15:32:29 +02:00
Zhang Wen
c360af0315 id: add test for digital format username 2025-10-02 16:30:18 +08:00
Sylvestre Ledru
4cab890676
Merge pull request #8763 from bakanovskii/df-follow-symlinks
Some checks are pending
CICD / Style/deps (push) Waiting to run
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 / 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
CICD / Run benchmarks (CodSpeed) (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
Devcontainer / Verify devcontainer (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
df: follow symlinks
2025-09-28 23:28:48 +02:00
Sylvestre Ledru
bd7581fab2
Merge pull request #8671 from cakebaker/pinky_move_test
pinky: move unit test away from the integration tests
2025-09-28 22:47:46 +02:00
Alexander Bakanovskii
d6985039c9
tests/df: test follow symlinks
Signed-off-by: Alexander Bakanovskii <skotttt228@gmail.com>
2025-09-28 23:06:31 +03:00
Alen Antony
52c71dcac9
Merge pull request #8747 from Anonymous-AAA/fix-recursive-cp-backslash
cp: fix recursive cp fails on files with trailing backslashes
2025-09-28 19:20:10 +02:00
Sylvestre Ledru
cbccc9a456 realpath: implement -E 2025-09-28 10:34:56 +02:00
Sylvestre Ledru
32eef0687d
Merge pull request #8749 from cakebaker/wc_fix_files0_from
Some checks failed
CICD / Documentation/warnings (push) Has been cancelled
CICD / MinRustV (push) Has been cancelled
CICD / Dependencies (push) Has been cancelled
CICD / Code Coverage (push) Has been cancelled
CICD / Separate Builds (push) Has been cancelled
GnuTests / Run GNU tests (native) (push) Has been cancelled
GnuTests / Run GNU tests (SELinux) (push) Has been cancelled
Code Quality / Style/spelling (push) Has been cancelled
Android / Test builds (push) Has been cancelled
Code Quality / Style/format (push) Has been cancelled
Code Quality / Style/lint (push) Has been cancelled
Code Quality / Style/toml (push) Has been cancelled
Code Quality / Style/Python (push) Has been cancelled
Code Quality / Pre-commit hooks (push) Has been cancelled
Devcontainer / Verify devcontainer (push) Has been cancelled
Check uudoc Documentation Generation / Verify uudoc generates correct documentation (push) Has been cancelled
FreeBSD / Style and Lint (push) Has been cancelled
FreeBSD / Tests (push) Has been cancelled
WSL2 / Test (push) Has been cancelled
CICD / Build/Makefile (push) Has been cancelled
CICD / Build/stable (push) Has been cancelled
CICD / Binary sizes (push) Has been cancelled
CICD / Build (push) Has been cancelled
CICD / Tests/BusyBox test suite (push) Has been cancelled
CICD / Tests/Toybox test suite (push) Has been cancelled
CICD / Test all features separately (push) Has been cancelled
CICD / Build/SELinux (push) Has been cancelled
CICD / Run benchmarks (CodSpeed) (push) Has been cancelled
GnuTests / Aggregate GNU test results (push) Has been cancelled
CICD / Build/nightly (push) Has been cancelled
wc: adapt error message to pass `wc-files0-from`
2025-09-26 18:18:39 +02:00
Daniel Hofstetter
905714ca79 wc: adapt error message to pass wc-files0-from 2025-09-26 17:46:59 +02:00
Daniel Hofstetter
7739598980 sort: adapt error message to pass sort-files0-from 2025-09-26 17:28:55 +02:00
eram
1e149b0fa4
id: added '-a' argument (#8733)
Some checks failed
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 / 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
CICD / Run benchmarks (CodSpeed) (push) Blocked by required conditions
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
GnuTests / Run GNU tests (SELinux) (push) Waiting to run
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
Devcontainer / Verify devcontainer (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
WSL2 / Test (push) Waiting to run
Check uudoc Documentation Generation / Verify uudoc generates correct documentation (push) Has been cancelled
2025-09-24 21:14:51 +02:00
Ahmed hossam
12e875c0a2
Merge pull request #8538 from dekuu5/fix/stat-string-to-osstr
stat: fix mount point handling for non-UTF8 paths
2025-09-24 16:34:36 +02:00
Sylvestre Ledru
a27a124eeb
Merge pull request #8681 from cakebaker/seq_separator_non_utf8
seq: support non-utf8 for `--separator` & `--terminator`
2025-09-24 08:03:21 +02:00
Sylvestre Ledru
4a92c9b638
safe traversal: adjust chmod & chgrp to use it (#8632)
Some checks are pending
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 / Dependencies (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Build/SELinux (push) Blocked by required conditions
CICD / Run benchmarks (CodSpeed) (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/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
CICD / Build (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 / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Devcontainer / Verify devcontainer (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
* chown: implement safe traversal

* uucore/safe_traversal: add secure chmod functions

* safe traversal: adjust chmod & chgrp to use it

* chmod dedup some code

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

* address review comments

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2025-09-23 09:28:15 +02:00
Andrew Twigg
542e4762f3
date: implement --resolution flag (#8686)
Some checks are pending
CICD / Style/deps (push) Waiting to run
CICD / Documentation/warnings (push) Waiting to run
CICD / Build (push) Blocked by required conditions
CICD / MinRustV (push) Waiting to run
CICD / Dependencies (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Test all features separately (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
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
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
CICD / Run benchmarks (CodSpeed) (push) Blocked by required conditions
Android / Test builds (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
Devcontainer / Verify devcontainer (push) Waiting to run
Check uudoc Documentation Generation / Verify uudoc generates correct documentation (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
* date: implement --resolution flag

* date: add tests for --resolution flag

* date: add date source option conflicts

* fixup: fix type error on 32-bit platforms

* fixup: fix spelling issue in test

* fixup: use hardcoded resolution on redox os
2025-09-22 11:23:50 +02:00
AnarchistHoneybun
7bca02c38f
hashsum: fix help text to show actual utility name (#8650)
Some checks are pending
CICD / Documentation/warnings (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Dependencies (push) Waiting to run
CICD / Build/nightly (push) Blocked by required conditions
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (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
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
Devcontainer / Verify devcontainer (push) Waiting to run
CICD / Build/SELinux (push) Blocked by required conditions
CICD / Run benchmarks (CodSpeed) (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
Check uudoc Documentation Generation / Verify uudoc generates correct documentation (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
Fix all hashsum utilities (md5sum, b2sum, sha256sum, etc.) to display
their actual name in help output instead of generic 'hashsum --<digest>'.

Override help_template and usage for specific utilities while preserving
the original hashsum behavior for the generic multicall case.

Add test to verify help output shows correct utility names and prevent
future regression.

Fixes #8614
2025-09-21 17:25:39 +02:00
Daniel Hofstetter
001ab890d5 seq: support non-utf8 for --terminator 2025-09-20 17:50:47 +02:00
Daniel Hofstetter
0d621f0e07 seq: support non-utf8 for --separator 2025-09-20 17:49:42 +02:00
Daniel Hofstetter
d2125f5378 pinky: cleanup imports in test file 2025-09-19 17:26:22 +02:00
Daniel Hofstetter
5dc7b3d3f6 pinky: move unit test away from integration tests 2025-09-19 17:13:43 +02:00
Daniel Hofstetter
68a0369a45
Merge pull request #8669 from bakanovskii/add-pinky-lookup-flag
Some checks are pending
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
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
Devcontainer / Verify devcontainer (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
CICD / Build (push) Blocked by required conditions
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 / 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
Android / Test builds (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Check uudoc Documentation Generation / Verify uudoc generates correct documentation (push) Waiting to run
pinky: add --lookup flag
2025-09-19 16:57:42 +02:00
Alexander Bakanovskii
59bf18fd00
tests/pinky: add --lookup test 2025-09-19 16:21:09 +03:00
naoNao89
1afeb7a6e3 csplit: create final empty file with --suppress-matched to match GNU (fixes #7286)
Problem
- With , uutils csplit failed to create the final empty output file when the last split point consumed the trailing input.
- GNU csplit always creates a final segment after processing patterns; with , that empty final segment is elided.
- This broke the GNU test (tests/csplit/csplit-suppress-matched.pl) and the scenario:

Root cause
- Final-file creation was conditional on there being remaining input after pattern processing. If none remained, no final file was created, contrary to GNU semantics.

Fix (minimal, targeted)
- In , after :
  - If there is remaining input, always create a final split and copy the remainder, then finish.
  - Else, if all patterns were integer-based and  is set, create a final (possibly empty) split and finish;  elides it when  is set.

Tests (Rust integration)
- Added two Rust tests under  to lock down GNU-compatible behavior:
  -  (expects sizes 2,2,2,0 and a final empty )
  -  (final empty file is correctly elided)

Verification
- All  tests pass locally. The originally reported case now matches GNU.

Relation to PR #7806
- #7806 proposes a broader refactor to fix multiple issues, but remains a draft and notes remaining GNU suppress-matched differences.
- This PR provides a small, reviewable fix specifically for #7286, plus precise integration tests to safeguard behavior.

Fixes #7286
2025-09-18 00:29:55 +07:00
Sylvestre Ledru
80327e0dd0
Merge pull request #8602 from cakebaker/touch_simplify_some_tests
touch: simplify some tests by using `new_ucmd!()`
2025-09-15 11:56:32 +02:00
Daniel Hofstetter
aa42a02459
Merge pull request #8606 from sylvestre/expr-multibyte
Some checks are pending
Android / Test builds (push) Waiting to run
CICD / Style/cargo-deny (push) Waiting to run
CICD / Build (push) Blocked by required conditions
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 / 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
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
Devcontainer / Verify devcontainer (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
WSL2 / Test (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
expr: fix some multibyte issues
2025-09-14 15:30:12 +02:00
Sylvestre Ledru
091db2babc expr: fix some multibyte issues and refactor a bit
Should make tests/expr/expr-multibyte pass

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2025-09-14 01:12:57 +02:00
yuankunzhang
88a7fa7adf date: use --reference=file to display the file modification time 2025-09-13 22:23:33 +08:00
Alen Antony
83574316e7
od: fix options after filename issue (#8624)
Some checks failed
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 / Tests/BusyBox test suite (push) Blocked by required conditions
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
Devcontainer / Verify devcontainer (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
CICD / Test all features separately (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/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
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
CheckScripts / ShellScript/Check (push) Has been cancelled
CheckScripts / ShellScript/Format (push) Has been cancelled
* od: fix options after filename issue

* fix cspell issue
2025-09-12 17:37:13 +02:00
Sylvestre Ledru
a7a5126af5 Improve the tests 2025-09-12 14:23:03 +02:00
Sylvestre Ledru
1183529cd2 rm: port to use the safe io functions 2025-09-12 14:22:33 +02:00
Sylvestre Ledru
c890a3479a du: port to use the safe io functions 2025-09-12 14:22:33 +02:00
Daniel Hofstetter
9ff8273054
Merge pull request #8589 from yuankunzhang/mv-to-symlink-directory
mv: support moving source to a symlink directory
2025-09-10 16:09:07 +02:00
Daniel Hofstetter
086795d26e touch: simplify some tests by using new_ucmd!() 2025-09-10 11:28:23 +02:00
Daniel Hofstetter
74ee8fb1c1 touch: adapt expected error message in test 2025-09-10 10:20:04 +02:00
yuankunzhang
62ae994b55 mv: support moving source to a symlink directory 2025-09-09 20:06:44 +08:00
Etienne Cordonnier
e722250e7d link musl libc statically
In the context of musl, users are typically expecting statically-linked tools,
as this is one of musl's strong suits and one of the biggest reasons to use it
instead of glibc (that is not static-link-friendly for reasons).

- remove the build-flag which was causing musl libc to be linked dynamically
- re-add feat_os_unix_musl which was removed in 21d5cef153
- exclude stdbuf from feat_os_unix_musl, since libstdbuf.so can't be built with a statically linked musl libc
- add test_musl_no_dynamic_deps so that this does not regress in the future

Fixes https://github.com/uutils/coreutils/issues/8572

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
2025-09-09 12:53:32 +02:00
Daniel Hofstetter
2b78922dfa
Merge pull request #8565 from Vesal-J/fix-cp-dot-directory-copy
cp: fix copying current directory (.) to existing directory
2025-09-09 07:46:22 +02:00