Skip to content

Conversation

@mattsu2020
Copy link
Contributor

Summary

Remove the extra leading rm: from the rm-error-preserve-root-all locale strings so the message matches expected test output.
Keep wording otherwise unchanged across en-US and fr-FR locales.

#9127

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/rm/one-file-system is no longer failing!

rm-error-dangerous-recursive-operation = it is dangerous to operate recursively on '/'
rm-error-use-no-preserve-root = use --no-preserve-root to override this failsafe
rm-error-refusing-to-remove-directory = refusing to remove '.' or '..' directory: skipping '{$path}'
rm-error-skipping-directory-on-different-device = skipping '{$path}', since it's on a different device
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't in the french file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

at.mkdir_all(a_b);
at.mkdir_all(t_y);

#[cfg(any(target_os = "linux", target_os = "macos"))]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you do one function for linux
and another for macos ?
it is too hard to understand correctly

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improved readability

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/rm/one-file-system is no longer failing!


// Recursive case: this is a directory.
let mut error = false;
#[cfg(unix)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dup code from line 665

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix is

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/rm/one-file-system is no longer failing!

@github-actions
Copy link

github-actions bot commented Dec 1, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/rm/one-file-system is no longer failing!

1 similar comment
@github-actions
Copy link

github-actions bot commented Dec 2, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/rm/one-file-system is no longer failing!

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 15, 2025

CodSpeed Performance Report

Merging #9428 will not alter performance

Comparing mattsu2020:rm_compatibility (71cc702) with main (d97bc73)

Summary

✅ 136 untouched
⏩ 6 skipped1

Footnotes

  1. 6 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/rm/one-file-system is no longer failing!

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/rm/one-file-system is no longer failing!

},
one_fs: matches.get_flag(OPT_ONE_FILE_SYSTEM),
preserve_root: !matches.get_flag(OPT_NO_PRESERVE_ROOT),
preserve_root_all: matches
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix clippy here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix

_parent_dev_id: Option<u64>,
) -> bool {
#[cfg(unix)]
let parent_dev_id = _parent_dev_id;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am not a fan of the _parent_dev_id usage
please make it optional instead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix

#[cfg(unix)]
let parent_dev_id = _parent_dev_id;

let metadata = match path.symlink_metadata() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use unwrap_or_else instead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix


if is_dir {
if check_device {
if let Some(parent_dev_id) = parent_dev_id {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quite duplicated from line 649

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix

@sylvestre
Copy link
Contributor

i see 3 conflicts

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/rm/one-file-system is no longer failing!

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/rm/one-file-system is no longer failing!
Congrats! The gnu test tests/tail/follow-name is no longer failing!

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/rm/one-file-system is no longer failing!

3 similar comments
@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/rm/one-file-system is no longer failing!

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/rm/one-file-system is no longer failing!

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/rm/one-file-system is no longer failing!

cfg_langinfo! {
use super::*;

fn has_date_component(format: &str) -> bool {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it is unrelated to the rm change no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry fix

use crate::error::{UError, UResult};
use crate::translate;
use chrono::Local;
use fluent::FluentArgs;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same, unrelated ?

@mattsu2020 mattsu2020 marked this pull request as draft December 31, 2025 00:35
@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/rm/one-file-system is no longer failing!
Congrats! The gnu test tests/tty/tty-eof is no longer failing!

Add "tmpfs" to the spell-checker ignore comment in test_rm.rs to suppress warnings for this filesystem type term used in the tests.
@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/tty/tty-eof is no longer failing!

…e_root_all

- Changed preserve_root_all to retrieve device ID from parent directory's symlink metadata instead of file's metadata
- Maintains one_fs option using file's metadata
- Improves accuracy for preserving root directory across filesystems on Unix systems
@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/rm/one-file-system is no longer failing!

@mattsu2020 mattsu2020 marked this pull request as ready for review December 31, 2025 03:22
}

#[cfg(unix)]
fn should_skip_different_device(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this function should be removed
should_skip_different_device_with_dev should be called directly

progress_bar: Option<&ProgressBar>,
parent_dev_id: Option<u64>,
) -> bool {
remove_dir_recursive_impl(path, options, progress_bar, parent_dev_id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same, not a very interesting function

options: &Options,
progress_bar: Option<&ProgressBar>,
) -> bool {
remove_dir_recursive_impl(path, options, progress_bar, None)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

progress_bar: Option<&ProgressBar>,
parent_dev_id: Option<u64>,
) -> bool {
remove_dir_recursive(path, options, progress_bar, parent_dev_id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants