Commit graph

4429 commits

Author SHA1 Message Date
Daniel Hofstetter
eda7caec73
Merge pull request #9588 from oech3/patch-6
coreutils: Print utility not found to stderr
2025-12-07 13:29:36 +01:00
Mahdi Ali-Raihan
345f2ccd14
tests/mkfifo: added a test to check mkfifo permission denied error for code coverage (#9586)
* tests/mkfifo: added a test to check mkfifo permission denied error for code coverage

* fixed formatting
2025-12-07 13:05:45 +01:00
oech3
28576decc1 coreutils: Print utility not found to stderr 2025-12-07 18:02:20 +09:00
Sylvestre Ledru
7c62885c84
Merge pull request #9578 from martinkunkel2/mknod-multiple-modes
Some checks are pending
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Build (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Dependencies (push) Waiting to run
CICD / Build/nightly (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Build/SELinux (push) Blocked by required conditions
GnuTests / Run GNU tests (native) (push) Waiting to run
CICD / Build/SELinux-Stubs (Non-Linux) (push) Blocked by required conditions
CICD / Safe Traversal Security Check (push) Blocked by required conditions
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
Benchmarks / Run benchmarks (CodSpeed) (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (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
OpenBSD / Tests (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
OpenBSD / Style and Lint (push) Waiting to run
WSL2 / Test (push) Waiting to run
uucore: mode parsing: support comma-separated modes
2025-12-06 17:01:35 +01:00
Martin Kunkel
63dbffa7f3 Add tests for multiple mode specifications 2025-12-06 15:08:13 +00:00
Daniel Hofstetter
499f056972
Merge pull request #9573 from sylvestre/ptx
ptx: implement GNU mode with dumb terminal format
2025-12-06 15:19:36 +01:00
Daniel Hofstetter
a0c14aacbb
Merge pull request #9580 from Ecordonnier/eco/remove-fixme
timeout: remove FIXME in test
2025-12-06 14:48:02 +01:00
Etienne Cordonnier
8d590ca4cc
timeout: cleanup return values (#9576)
- remove "WaitingFailed" which is a duplicate of "CommandTimedOut"
- replace hard-coded values 126 and 127 with enum values, remove TODO
- fix misleading comment. we DO return CommandTimedOut even when preserve-status is not specified
- add tests for exit values 126 and 127

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
2025-12-06 14:37:41 +01:00
Etienne Cordonnier
38224017f9 timeout: remove FIXME in test
This FIXME comment was added in 2021 ( 5431e947bc ).

`timeout` is already in feat_require_unix_core, so having `true` and `false` on
the machine running the test is quite reasonable and does not warrant a FIXME.

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
2025-12-06 14:26:25 +01:00
Sylvestre Ledru
15b2df9d1e ptx: implement GNU mode with dumb terminal format 2025-12-05 23:15:59 +01:00
Daniel Hofstetter
5b261bc1af
du: handle --files0-from=- with piped in - (#8985)
Some checks failed
CheckScripts / ShellScript/Check (push) Has been cancelled
CheckScripts / ShellScript/Format (push) Has been cancelled
Check uudoc Documentation Generation / Verify uudoc generates correct documentation (push) Has been cancelled
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-Stubs (Non-Linux) (push) Blocked by required conditions
CICD / Build/SELinux (push) Blocked by required conditions
CICD / Safe Traversal Security Check (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
Benchmarks / Run benchmarks (CodSpeed) (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
OpenBSD / Style and Lint (push) Waiting to run
OpenBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
* du: handle --files0-from=- with piped in '-'

* build-gnu.sh: remove incorrect string replacement

in tests/du/files0-from.pl

---------

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2025-12-05 23:07:16 +01:00
mattsu
13ea1fc1d1
chmod:fix safe traversal/access (#9554)
* feat(chmod): use dirfd for recursive subdirectory traversal

- Update chmod recursive logic to use directory file descriptors instead of full paths for subdirectories
- Improves performance, avoids path length issues, and ensures dirfd-relative openat calls
- Add test to verify strace output shows no AT_FDCWD with multi-component paths

* test(chmod): add spell-check ignore for dirfd, subdirs, openat, FDCWD

Added a spell-checker ignore directive in the chmod test file to suppress false positives for legitimate technical terms used in Unix API calls.

* test(chmod): enforce strace requirement in recursive test, fail fast instead of skip

Previously, the test_chmod_recursive_uses_dirfd_for_subdirs test skipped gracefully if strace
was unavailable, without failing. This change enforces the strace dependency by failing the
test immediately if strace is not installed or runnable, ensuring the test runs reliably
in environments where it is expected to pass, and preventing silent skips.

* ci: install strace in Ubuntu CI jobs for debugging system calls

Add installation of strace tool on Ubuntu runners in both individual build/test and feature build/test jobs. This enables tracing system calls during execution, aiding in debugging and performance analysis within the CI/CD pipeline. Updated existing apt-get commands and added conditional steps for Linux-only installations.

* ci: Add strace installation to Ubuntu-based CI workflows

Install strace on ubuntu-latest runners across multiple jobs to enable system call tracing for testing purposes, ensuring compatibility with tests that require this debugging tool. This includes updating package lists in existing installation steps.

* chore(build): install strace and prevent apt prompts in Cross.toml pre-build

Modified the pre-build command to install strace utility for debugging and added -y flag to apt-get install to skip prompts, ensuring non-interactive builds.

* feat(build): support Alpine-based cross images in pre-build

Detect package manager (apt vs apk) to install tzdata and strace
in both Debian/Ubuntu and Alpine *-musl targets. Added fallback
warning for unsupported managers. This ensures strace is available
for targets using Alpine, which doesn't have apt-get.

* refactor(build): improve pre-build script readability by using multi-line strings

Replace escaped multi-line string with triple-quoted string for better readability in Cross.toml.

* feat(ci): install strace in WSL2 GitHub Actions workflow

Install strace utility in the WSL2 environment to support tracing system calls during testing. Minor update to Cross.toml spell-checker ignore list for consistency with change.

* ci(wsl2): install strace as root with non-interactive apt-get

Updated the WSL2 workflow step to use root shell (wsl-bash-root) for installing strace, removing sudo calls and adding DEBIAN_FRONTEND=noninteractive to prevent prompts. This improves CI reliability by ensuring direct root access and automated, interrupt-free package installation.

* ci: Move strace installation to user shell and update spell ignore

Fix WSL2 GitHub Actions workflow by installing strace as the user instead of root for better permission handling, and add "noninteractive" to the spell-checker ignore comment for consistency with the new apt-get command. This ensures the tool is available in the testing environment without unnecessary privilege escalation.

* chore: ci: remove unused strace installation from CI workflows

Remove strace package installation from multiple GitHub Actions workflow files (CICD.yml, l10n.yml, wsl2.yml). Strace was historically installed in Ubuntu jobs for debugging system calls, but it's no longer required for the tests and builds, reducing CI setup time and dependencies.

* ci: add strace installation and fix spell-checker comments in CI files

- Install strace package in CICD workflow to support safe traversal verification for utilities like rm, chmod, chown, chgrp, mv, and du, enabling syscall tracing for testing.
- Clean up spell-checker ignore comments in wsl2.yml and Cross.toml by removing misplaced flags.第二个测试产品**ci: add strace installation and fix spell-checker comments in CI files**

- Install strace package in CICD workflow to support safe traversal verification for utilities like rm, chmod, chown, chgrp, mv, and du, enabling syscall tracing for testing.
- Clean up spell-checker ignore comments in wsl2.yml and Cross.toml by removing misplaced flags.

* test: add regression guard for recursive chmod dirfd-relative traversal

Add a check in check-safe-traversal.sh to ensure recursive chmod operations use dirfd-relative openat calls instead of AT_FDCWD with multi-component paths, preventing potential race conditions. Ignore the corresponding Rust test as it is now covered by this shell script guard.
2025-12-05 19:50:34 +01:00
Daniel Hofstetter
4c4c59fdd4
Merge pull request #9532 from RenjiSann/cksum-improvements
Some checks are pending
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 / Build/SELinux-Stubs (Non-Linux) (push) Blocked by required conditions
CICD / Safe Traversal Security Check (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
Benchmarks / Run benchmarks (CodSpeed) (push) Waiting to run
Code Quality / Style/lint (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
Code Quality / Style/Python (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
OpenBSD / Style and Lint (push) Waiting to run
OpenBSD / Tests (push) Waiting to run
cksum: small improvements, l10n
2025-12-05 09:18:11 +01:00
Dorian Peron
88d1cf7384 test(cksum): Add test for ignore-missing standard input 2025-12-05 01:09:13 +01:00
Daniel Hofstetter
3b0f47d1fd
Merge pull request #9520 from mattsu2020/seq_fix
seq:fix test_broken_pipe_still_exits_success
2025-12-02 09:46:08 +01:00
Dorian Peron
a4273c6654 test(cksum): Add GNU 9.9 tests to mod gnu_cksum_c 2025-12-01 16:15:12 +01:00
mattsu
003f21aa58
fix(od):fix GNU coreutils test od float.sh (#9534)
Some checks are pending
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 / Test all features separately (push) Blocked by required conditions
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
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
Benchmarks / Run benchmarks (CodSpeed) (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
OpenBSD / Style and Lint (push) Waiting to run
OpenBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
* feat: add compact float formatting for half and bfloat16 in od

Implement trim_float_repr() to remove trailing zeros from float strings while preserving signs and exponents, and pad_float_repr() to align trimmed floats to fixed width. Update format_item_f16() and format_item_bf16() to produce compact output matching GNU od. Add regression tests for float16 and bfloat16 compact printing.

* refactor(od): format multiline format! in format_item_bf16 for readability

Reformat the format! macro call in the format_item_bf16 function in prn_float.rs
to span multiple lines, improving code readability without changing functionality.

* fix(od): preserve canonical precision for f16/bf16 float formats

Remove trimming of trailing zeros from f16 and bf16 float representations
in od output to maintain original precision and align behavior with
f32/f64 formatters, ensuring stable output across platforms. Update
corresponding tests to reflect the change in expected output.

* refactor(od): simplify float padding format and update tests

- Remove redundant `width = width` parameter from `format!` macro in `pad_float_repr`
- Add "bfloat" to spell-checker ignore list for better test coverage on bf16 format

* feat(od): trim trailing zeros in float outputs for GNU compatibility

Add `trim_trailing_zeros` function to remove trailing zeros and redundant decimal points from formatted floats, ensuring compact output matching GNU od for f16 and bf16 types. Update `format_item_f16` and `format_item_bf16` to apply trimming before padding.

* fix: preserve trailing zeros in F16 and BF16 float formats to match GNU od output

Remove the `trim_trailing_zeros` function and update `format_item_f16` and `format_item_bf16` to keep the raw formatted strings without trimming trailing zeros. This ensures consistent column widths and aligns with GNU od behavior for 16-bit float representations, preventing misalignment in output tables.

* refactor(od/prn_float): combine multiline format! into single line in format_item_f16

The format! macro call in format_item_f16 was split across multiple lines with newlines. This change consolidates it into a single line for improved code readability and consistency with similar patterns in the file, without altering the function's output or logic.

* feat(od): trim trailing zeros in half-precision and bfloat16 float outputs

- Add `trim_float_repr` function to remove unnecessary trailing zeros and padding from normalized float strings, leaving exponents unchanged.
- Update `format_item_f16` and `format_item_bf16` to apply trimming while maintaining column alignment via re-padding.
- Update test expectations to reflect the more compact float representations (e.g., "1" instead of "1.0000000").

* refactor: simplify float trimming condition in prn_float.rs

Replace `if let Some(_) = s.find('.')` with `s.find('.').is_some()` in the `trim_float_repr` function to improve code clarity and idiomatic Rust usage while maintaining the same logic for checking decimal presence=black.

* Update src/uu/od/src/prn_float.rs

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

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2025-12-01 14:09:16 +01:00
mattsu
099a5ddfc8 test: ensure seq test triggers broken pipe with infinite output
Use an infinite sequence in `test_broken_pipe_still_exits_success` instead of
finite range (1-5) to guarantee a burst of output immediately after spawn,
preventing the process from finishing before stdout closure and avoiding
missed broken pipe errors.
2025-11-29 20:34:42 +09:00
mattsu
43dd238fea
od: make GNU test od.pl pass (#9334)
* feat: Add support for long double floating-point numbers and refine general float formatting.

* feat: Enhance `od` error reporting for file I/O, width, and offset parsing, including overflow detection and input validation.

* feat: Improve long double parsing by converting f128 to f64, enhance overflow error reporting with `libc::ERANGE`, and prevent final offset printing on input errors.

* style: Apply minor formatting adjustments across the `od` module.

* refactor: simplify float formatting logic and update string handling syntax

* fix: Correct float formatting logic to use decimal for numbers within range and exponential otherwise.

* refactor(test): use helper function in test_calculate_alignment

Replace repetitive assert_eq! calls with a new assert_alignment helper
to improve test readability and reduce code duplication. The helper
encapsulates alignment checks for OutputInfo::calculate_alignment,
making tests clearer and easier to maintain.

* feat(cspell): add ERANGE to jargon wordlist

Added "ERANGE" to the dictionary to prevent spell checker flagging it as a misspelling, as it's a valid errno constant from C libraries.

* feat(od): improve width error handling and subnormal float output

Refactor width option parsing in OdOptions to use i18n-compatible error messages via translate! macro, consolidating redundant error branches for better maintainability. Enhance float formatting for f16 and bf16 by introducing format_binary16_like helper to properly display subnormal values with exponential notation, removing the obsolete format_float_simple function and adding subnormal detection functions for accurate representation in od's output.

* refactor(od): simplify format_item_bf16 by removing redundant variable

Remove unnecessary `value` variable in `format_item_bf16` function, eliminating
a redundant cast and inline `f` directly for clarity and minor efficiency gain.

* fix(od): standardize option names in error messages

Remove hardcoded "--" prefixes from localization strings in en-US.ftl and fr-FR.ftl, replacing with a computed display name that includes "--" and optionally the short form (e.g., "--option" or "--option, -s"). Update parse_bytes_option and read_bytes functions to pass an option_display_name, enabling consistent error message formatting across localizations. Add validation to reject zero width values as invalid arguments. Improves user experience by providing clearer, more consistent option references in error outputs.

* refactor: condense format! macro in format_item_bf16 for readability

Removed unnecessary line breaks in the format! expression, keeping the code more concise while maintaining functionality. This improves code style in the float printing module.

* fix(od): add external quoting for filenames in error messages

The MultifileReader now uses `fname.maybe_quote().external(true)` when displaying permission and I/O errors, ensuring filenames are properly quoted for user-facing output (e.g., handling special characters that might confuse shells). This prevents potential issues with filename display in error logs.

* refactor(od): Rename f128_to_f64 to u128_to_f64 for clarity

Renamed the function in input_decoder.rs from f128_to_f64 to u128_to_f64
to accurately reflect its purpose of converting u128 integer bits to f64,
improving code readability and reducing potential confusion over float types.

* refactor(od): simplify error handling in OdOptions using combinators

Use map_err and the try operator to replace a verbose match statement,
making the code more concise and idiomatic Rust. This improves readability
without altering functionality.

* Update src/uu/od/src/od.rs

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

* Update src/uu/od/src/od.rs

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

* Update src/uu/od/src/parse_inputs.rs

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

* Update src/uu/od/src/od.rs

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

* Update src/uu/od/src/parse_inputs.rs

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

* Update src/uu/od/src/parse_inputs.rs

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

* refactor(od): remove leaking from translated error messages in parse_offset_operand

Eliminated use of `.leak()` and unnecessary `.to_string()` calls on translated error strings in the `parse_offset_operand` function. This simplifies error handling, improves memory safety by avoiding intentional leaks, and makes the code cleaner without functional changes.

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2025-11-28 08:23:55 +01:00
mattsu
b9f97d4c7d
fix(seq): handle BrokenPipe like GNU (#9471)
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/nightly (push) Blocked by required conditions
CICD / Binary sizes (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 / Build/SELinux-Stubs (Non-Linux) (push) Blocked by required conditions
CICD / Safe Traversal Security Check (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
Benchmarks / Run benchmarks (CodSpeed) (push) Waiting to run
Code Quality / Style/Python (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 / 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
OpenBSD / Style and Lint (push) Waiting to run
OpenBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
* fix(seq): handle BrokenPipe like GNU

* test: add Unix-specific test for seq command broken pipe handling

- Ensures seq exits gracefully with code 0 and reports "Broken pipe" error on stderr when stdout pipe is prematurely closed
- Validates correct behavior for common scenario where output is piped to commands like head that terminate early

* refactor(test): translate Japanese comment to English in test_seq.rs

- Updated a comment in the test for broken pipe behavior to use English instead of Japanese, enhancing readability for non-Japanese speakers and aligning with project standards. No functional changes to the test logic.
2025-11-26 23:20:45 +01:00
Vikram Kangotra
df959b7e00
Merge pull request #9410 from vikram-kangotra/fix/ls-proc-self-fd-regression
ls: prevent ReadDir from closing before entries are processed
2025-11-26 23:15:04 +01:00
naoNao89
d655eed489 feat(cksum): improve debug output for single file operations
Some checks failed
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 / Test all features separately (push) Blocked by required conditions
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
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
Benchmarks / Run benchmarks (CodSpeed) (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
OpenBSD / Style and Lint (push) Waiting to run
OpenBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
CheckScripts / ShellScript/Check (push) Has been cancelled
CheckScripts / ShellScript/Format (push) Has been cancelled
Check uudoc Documentation Generation / Verify uudoc generates correct documentation (push) Has been cancelled
2025-11-26 12:30:44 +01:00
Chris Dryden
824c5c7c93
stty: Implemented saved state parser for stty (#9480)
* Implemented saved state parser for stty

* Add compatibility to macos flag type

* Added many example state parsing integration tests with GNU compatibility checks and documentation

* Spelling and formatting fixes

* Matching behaviour of adding the help command after invocations and spelling fixes

* GNU tests were being skipped because they were not at the sufficient version

* Fixed messaging error for invalid states to not show full path

* Normalizing the test output and reverting lib change

* Discovered that the limit depends on platform specific values derived from a LIBC value

* Spelling fixes and setting flags to 0 for cross platform compatibility

* Clippy fixes

* Disabling tests due to invalid printing of control chars and using GNU for printing

* Redisabling failing test as outside of the scope of this PR

* Adding g prefix support to normalize stderr

* Spell checker fixes

* Normalizing command for both gnu and uutils output

* removing single value from testing since it can be interpreted as Baud rate

* Fixing spelling mistake
2025-11-26 07:33:26 +01:00
Chris Dryden
6a2b97273e
stty: baud parsing integration tests and validation (#9454)
* Adding comprehensive gnu suite baud parsing rules

* Adding missing spellcheck words

* Fixed clippy errors and simplified rounding logic
2025-11-24 11:03:47 +01:00
Chris Dryden
b4423b9691
Adding integration tests for the braced variable parsing in env (#9459)
Some checks are pending
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 / Build/SELinux-Stubs (Non-Linux) (push) Blocked by required conditions
CICD / Safe Traversal Security Check (push) Blocked by required conditions
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
CheckScripts / ShellScript/Check (push) Waiting to run
CheckScripts / ShellScript/Format (push) Waiting to run
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
Benchmarks / Run benchmarks (CodSpeed) (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
OpenBSD / Style and Lint (push) Waiting to run
OpenBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
* Adding integration tests for the braced variable parsing in env

* Adding missing spell checker words
2025-11-23 21:21:53 +01:00
Daniel Hofstetter
a590bb3fb3
Merge pull request #9448 from ChrisDryden/patch-2
Reducing sleep times and timeout times in test_timeout
2025-11-23 16:18:42 +01:00
Chris Dryden
e094bddcc9 Reducing sleep times and timeout times in test_timeout 2025-11-22 20:52:15 +01:00
Christopher Dryden
a79c4bc6b4 Only using imports on unix since more integration tests only supported on unix 2025-11-21 23:39:21 +00:00
Christopher Dryden
10bcf65afa Using the pty helper function for the more bin testing 2025-11-21 23:24:53 +00:00
Chris Dryden
29adc24d0e
Adding TTY helper for unix to be able to create tests for stty and more (#9348)
Some checks are pending
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 / Code Coverage (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Build/SELinux (push) Blocked by required conditions
CICD / Build/SELinux-Stubs (Non-Linux) (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/spelling (push) Waiting to run
Code Quality / Style/toml (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
OpenBSD / Style and Lint (push) Waiting to run
OpenBSD / Tests (push) Waiting to run
CICD / Build (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Safe Traversal Security Check (push) Blocked by required conditions
GnuTests / Aggregate GNU test results (push) Blocked by required conditions
Benchmarks / Run benchmarks (CodSpeed) (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Pre-commit hooks (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
* Adding TTY helper for unix to be able to create tests for stty and more

* removing missing flag on github actions and spellcheck ignore
2025-11-21 23:40:00 +01:00
Daniel Hofstetter
b5561e7615
Merge pull request #9342 from FidelSch/ln-dir-hardlink
Some checks failed
CICD / Separate Builds (push) Waiting to run
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 / Test all features separately (push) Blocked by required conditions
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
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
Benchmarks / Run benchmarks (CodSpeed) (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
Devcontainer / Verify devcontainer (push) Waiting to run
OpenBSD / Style and Lint (push) Waiting to run
OpenBSD / Tests (push) Waiting to run
WSL2 / Test (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
CheckScripts / ShellScript/Check (push) Has been cancelled
CheckScripts / ShellScript/Format (push) Has been cancelled
Check uudoc Documentation Generation / Verify uudoc generates correct documentation (push) Has been cancelled
ln: add error handling for hard link creation on directories
2025-11-21 11:15:39 +01:00
Sylvestre Ledru
bbec8fea08
Merge pull request #9344 from RenjiSann/cksum-fix-base64-untagged
cksum: Fix GNU test cksum-base64-untagged
2025-11-21 06:43:42 +01:00
naoNao89
e0c7ef7b10 fix(stdbuf): remove unsafe unwrap() calls for proper error handling
- Replace get_many().unwrap() with ok_or_else() to handle missing command
- Replace next().unwrap() with pattern matching for safety
- Replace tempdir().unwrap() with map_err() to handle temp dir failures

All stdbuf internal errors now properly exit with code 125 per GNU specification:
https://www.gnu.org/s/coreutils/manual/html_node/stdbuf-invocation.html
2025-11-21 08:04:56 +07:00
Dorian Péron
b8cef3c2db test(cksum): Implement the GNU cksum-base64-untagged.sh test 2025-11-21 00:24:29 +01:00
FidelSch
0a5441fb06 ln: simplify hard link directory test assertion 2025-11-20 09:12:39 -03:00
Chris Dryden
2a314c7ff3
fold: Adding combining character support (#9328)
Some checks are pending
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 / Test all features separately (push) Blocked by required conditions
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
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
Benchmarks / Run benchmarks (CodSpeed) (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
OpenBSD / Style and Lint (push) Waiting to run
OpenBSD / Tests (push) Waiting to run
WSL2 / Test (push) Waiting to run
* Adding combining character support for fold

* add fullwidth to the spell ignore list

* addressing comments and cargo fmt fixes

* clippy fixes for test files

---------

Co-authored-by: Christopher Illarionova <drydench@amazon.com>
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2025-11-20 09:36:56 +01:00
Sylvestre Ledru
643a72c75d
Merge pull request #9135 from RenjiSann/cksum-reworks
cksum/hashsum: merge digest computation & various improvements
2025-11-20 06:18:56 +01:00
FidelSch
4b02a38be5 ln: add error handling for hard link creation on directories 2025-11-19 20:36:26 -03:00
Vikram Kangotra
15d22c285e
cp: allow directory merging when destination was just created (#9325)
Some checks failed
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 / Test all features separately (push) Blocked by required conditions
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
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
Benchmarks / Run benchmarks (CodSpeed) (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
OpenBSD / Style and Lint (push) Waiting to run
OpenBSD / 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
* cp: allow directory merging when destination was just created

Previously, when copying to a destination that was created in the same
cp call, the operation would fail with "will not overwrite just-created"
for both files and directories. This change allows directories to be
merged (matching GNU cp behavior) while still preventing file
overwrites.

The fix checks if both the source and destination are directories
before allowing the merge. If either is a file, the original error
behavior is preserved to prevent accidental file overwrites.

Fixes the case where copying multiple directories to the same
destination path would incorrectly error instead of merging their
contents.

fixes: #9318

* test_cp: Update with the suggestion

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

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2025-11-19 16:53:23 +01:00
Dorian Peron
6d6a9917ad checksum: fix binary flag on windows, ignore test 2025-11-19 14:13:36 +01:00
Dorian Peron
8c9bb16857 test(cksum): Add tests for BLAKE2b --length sanitization 2025-11-18 11:30:14 +01:00
Vesal Joolanejad
747874911a
Enhance mode parsing to support comma-separated mode strings in install command (#9298)
* Enhance mode parsing to support comma-separated mode strings in `parse` function. Add tests for comma-separated mode handling in file and directory creation.

* Add comprehensive tests for mode parsing in `parse` function, covering numeric, symbolic, and mixed modes, as well as handling of invalid inputs and umask considerations.

---------

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2025-11-17 10:14:22 +01:00
Daniel Hofstetter
58ebeaf006
Merge pull request #9280 from naoNao89/fix-numfmt-test-failures
Some checks failed
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 / Build/SELinux-Stubs (Non-Linux) (push) Blocked by required conditions
CICD / Safe Traversal Security Check (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
Benchmarks / Run benchmarks (CodSpeed) (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
OpenBSD / Style and Lint (push) Waiting to run
OpenBSD / 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
Check uudoc Documentation Generation / Verify uudoc generates correct documentation (push) Has been cancelled
numfmt: support quetta/ronna suffixes and fix error messages
2025-11-16 17:13:48 +01:00
Daniel Hofstetter
a15ee0927b
Merge pull request #9266 from sylvestre/sort-compress
sort: make compression program failures non-fatal, warn and fallback to plain files
2025-11-16 15:11:47 +01:00
Daniel Hofstetter
63ee6486d0
Merge pull request #9296 from sylvestre/divan
move the factor divan bench into the actual directory
2025-11-16 14:05:00 +01:00
Sylvestre Ledru
58c15d4d52
Merge pull request #9254 from akretz/install_ignore_umask
install: ignore umask
2025-11-15 22:27:45 +01:00
Sylvestre Ledru
ecc7f14e7e move the factor divan bench into the actual directory 2025-11-15 21:45:22 +01:00
Sylvestre Ledru
6580919238
Merge pull request #9247 from naoNao89/fix/criterion-html-reports
benches: Migrate factor benchmarks from Criterion to Divan
2025-11-15 20:38:34 +01:00
Sylvestre Ledru
8b499009ad
Merge pull request #9245 from cakebaker/test_ot_nt_with_non_existing_file
test: existing file is newer than non-existing file
2025-11-15 20:38:16 +01:00
Sylvestre Ledru
09e1aa18ab sort: make compression program failures non-fatal, warn and fallback to plain files
Should fix tests/sort/sort-compress.sh
2025-11-15 20:30:41 +01:00