-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
install: fix error messages to align with GNU for cannot-stat and failed-to-remove. #9987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sgmarz
wants to merge
112
commits into
uutils:main
Choose a base branch
from
sgmarz:install_err_remove_nostat
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
|
lot of jobs failing |
…lity checks added and fixed.
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
Contributor
|
please add tests to verify the errors & messages |
…s#9136) * feat(dd): add comprehensive benchmark suite for O_DIRECT optimization - Create dd's first benchmark suite using divan framework - Benchmark various block sizes (4K, 8K, 64K, 1M) to measure performance - Test different dd scenarios: default, partial copy, skip, seek operations - Measure impact of separate input/output block sizes - All benchmarks use status=none to avoid output noise - Benchmarks verify the O_DIRECT buffer alignment optimization - Follows existing uutils benchmark patterns and conventions * bench(dd): increase dataset sizes for consistent timing Increase benchmark dataset sizes to achieve consistent 100-300ms timing: - dd_copy_default: 16 -> 32 MB - dd_copy_4k_blocks: 16 -> 24 MB - dd_copy_64k_blocks: 16 -> 64 MB - dd_copy_1m_blocks: 16 -> 128 MB - dd_copy_separate_blocks: 16 -> 48 MB - dd_copy_partial: 16 -> 32 MB - dd_copy_with_skip: 16 -> 48 MB - dd_copy_with_seek: 16 -> 48 MB - dd_copy_8k_blocks: 16 -> 32 MB This ensures stable, repeatable benchmark measurements across different systems. --------- Co-authored-by: Sylvestre Ledru <[email protected]>
No need to use the unsafe `libc::execvp()`, the standard rust library provides the functionality via the safe function `Command::exec()`. Signed-off-by: Etienne Cordonnier <[email protected]> Co-authored-by: Sylvestre Ledru <[email protected]>
…tils#9884) * du: fix -l/--count-links option not counting hardlinks separately * du: add test for -l/--count-links counting hardlinks separately --------- Co-authored-by: Sylvestre Ledru <[email protected]>
…nt dirs (uutils#9803) Co-authored-by: Sylvestre Ledru <[email protected]>
GnuTests.yml: Stop manpage generation to reduce size of log
* tac: fix error message * tac: Remove obsolete error messages from locales
* stty: use stdin for TTY operations instead of /dev/tty * Add tests for stty stdin behavior and fix platform-specific error messages --------- Co-authored-by: Sylvestre Ledru <[email protected]>
* Use libc::UTIME_NOW in touch when updating time to now * Explicit libc import to satisfy clippy * Fix location of cfg in touch * Add cfg gate to libc import to satisfy clippy on windows * Change cfg gates in touch near libc::UTIME_NOW from unix to linux --------- Co-authored-by: Sylvestre Ledru <[email protected]>
* csplit: detect and report write errors * Add Rust integration tests for csplit write error detection * csplit: fix doc comment for finish_split
…Y delay (uutils#9629) * test(more): Fix test_from_line_option race condition by increasing PTY delay Increased the delay in run_more_with_pty() from 100ms to 500ms to allow more time to fully render output before the test reads from the PTY. The test was failing because it was reading too early, before more could initialize the terminal and render the file content. The -F flag itself works correctly. * test_more: decrease the delay --------- Co-authored-by: Sylvestre Ledru <[email protected]>
* dd: fix nocache flag handling at EOF * Add tests for nocache EOF handling --------- Co-authored-by: Sylvestre Ledru <[email protected]>
…#9757) * cp: set exit code when encountering circular symbolic links error when copying directory * cp: add test to ensure that cp sets the status code when encountering circular symbolic links during directory copy * cp: check that the output of circular symbolic link test has the correct message * cp: update check for stderr message * cp: update circular symbolic link test to account for directory format in windows * cp: use std::path::MAIN_SEPARATOR_STR for test
…ve size of fetched crates
and adapt the code accordingly
Fixes uutils#9769 Changed error.print().unwrap() to let _ = error.print() to prevent panic when writing to /dev/full. Added regression test in test_cat.rs.
… -c PATH behavior
…heck to match GNU behaviour for test/nfs-removal-race (uutils#10086) * cp: use lstat for destination check to support LD_PRELOAD tests * fs: fix Windows is_symlink type mismatch and add explanatory comment * cp: use stat for dest existence check to support LD_PRELOAD
* chmod: Fix --preserve-root not being bypassed by path that resolves to root * chmod: Regression tests for --preserve-root not being bypassed by path that resolves to root
--------- Co-authored-by: Sylvestre Ledru <[email protected]>
…for failing to remove an existing file and one for trying to stat a file in /root.
…ms (e.g., (os error 13)) by using UIoError to print the error message.
|
GNU testsuite comparison: |
Contributor
|
i think the rebase went wrong |
…ted_loadavg Refactored the `get_formatted_loadavg` function to explicitly build a `FluentArgs` struct with load average values formatted to two decimal places, then pass it to `crate::locale::get_message_with_args` instead of using the `translate!` macro inline. This improves argument handling for fluent localization, enhancing code structure and maintainability without altering functionality.
|
GNU testsuite comparison: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #9934
This PR will update the failed-to-remove error message to better align with GNU coreutils. Furthermore, it adds "cannot stat" for when looking for a file to see if it exists fails. This can fail for myriad of reasons, including permission denied.
Test: original issue request
The original issue was due to the way Rust's standard library calculates
is_file. It only checks for regular files to be file, but on a UNIX configuration, the files could include block and character devices as well as a FIFO device. This patch now checks the metadata to check specifically for block, character, and FIFO devices on UNIX configurations. If the configuration is not UNIX, it reverts to the original behavior.Test: cannot stat due to permission error
The issue here was due to the way the
mainbranch doesremove_file. Since no checks are done before this function call, we get too granular of an error: was it due to not found or not? In this patch, there is an additional check using Rust's standardtry_exists. This will tell us if the actual calculation of a file existing failed.