8000 mv: fix moving FIFO to a different filesystem by jfinkels · Pull Request #7241 · uutils/coreutils · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

mv: fix moving FIFO to a different filesystem #7241

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

Merged
merged 1 commit into from
Apr 21, 2025

Conversation

jfinkels
Copy link
Collaborator
@jfinkels jfinkels commented Jan 29, 2025

Fix a bug in mv where it would hang indefinitely while trying to copy
a FIFO across filesystems. The solution is to remove the old FIFO and
create a new one on the new filesystem.

The first commit factors out helper functions from the rename_with_fallback() function
so that there is one fallback helper per file type (symlink, directory,
or file). This doesn't change the functionality of mv, it is just a
re-organization of the code.
This was done in pull request #7774

Fixes #7076

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/misc/stdbuf (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

@jfinkels jfinkels force-pushed the mv-copy-across-filesystems branch from c9d7d0f to 5cbcfb0 Compare January 30, 2025 22:38
@jfinkels jfinkels marked this pull request as ready for review January 30, 2025 22:38
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/usage_vs_getopt (passes in this run but fails in the 'main' branch)

Copy link
github-actions bot commented Feb 1, 2025

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/usage_vs_getopt (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

#[ignore = "requires access to a different filesystem"]
#[test]
fn test_special_file_different_filesystem() {
let (at, mut ucmd) = at_and_ucmd!();
Copy link
Contributor

Choose a reason for hiding this comment

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

#7249
might be useful :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just now tried to use the new TestScenario::mount_temp_fs() but I couldn't figure out how to get this test working with it. I just left a TODO comment mentioning it.

Copy link
Contributor

Choose a reason for hiding this comment

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

@matrixhead any idea ? :)

Copy link
github-actions bot commented Feb 1, 2025

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/usage_vs_getopt (passes in this run but fails in the 'main' branch)

@sylvestre sylvestre force-pushed the mv-copy-across-filesystems branch from f018879 to 90465ac Compare February 14, 2025 13:27
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/misc/tee is no longer failing!

@sylvestre
Copy link
Contributor

@jfinkels sorry but could you please rebase it?

@jfinkels
Copy link
Collaborator Author

I'll do that, but I'll also break some of these changes out into smaller pull requests.

@jfinkels jfinkels marked this pull request as draft April 18, 2025 00:11
@jfinkels jfinkels force-pushed the mv-copy-across-filesystems branch from 90465ac to 3b224bc Compare April 19, 2025 14:47
@jfinkels jfinkels marked this pull request as ready for review April 19, 2025 14:48
Fix a bug in `mv` where it would hang indefinitely while trying to copy
a FIFO across filesystems. The solution is to remove the old FIFO and
create a new one on the new filesystem.

Fixes uutils#7076
@jfinkels jfinkels force-pushed the mv-copy-across-filesystems branch from 3b224bc to 2717f9c Compare April 19, 2025 15:13
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/misc/tee is no longer failing!

@sylvestre sylvestre merged commit 77c4ba5 into uutils:main Apr 21, 2025
70 checks passed
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.

mv: fails to copy special files across filesystems
2 participants
0