Skip to content

mv: improve the hardlink support - #8296

Merged
cakebaker merged 3 commits into
uutils:mainfrom
sylvestre:mv-part-hardlink
Jul 3, 2025
Merged

cakebaker merged 3 commits into
uutils:mainfrom
sylvestre:mv-part-hardlink

Conversation

@sylvestre

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

github-actions Bot commented Jul 1, 2025

Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/mv/dup-source. tests/mv/dup-source is passing on 'main'. Maybe you have to rebase?
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/mv/hard-link-1 is no longer failing!
Congrats! The gnu test tests/mv/part-fail is no longer failing!
Congrats! The gnu test tests/mv/part-hardlink is no longer failing!

@cakebaker

Copy link
Copy Markdown
Contributor

Congrats! The gnu test tests/mv/hard-link-1 is no longer failing!
Congrats! The gnu test tests/mv/part-fail is no longer failing!
Congrats! The gnu test tests/mv/part-hardlink is no longer failing!

Kudos, three passing GNU tests :) Unfortunately, there is also a regression:

GNU test failed: tests/mv/dup-source. tests/mv/dup-source is passing on 'main'. Maybe you have to rebase?

Comment thread tests/by-util/test_mv.rs Outdated
Comment on lines 2086 to 2087

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You already test moving a file and a hard link in test_mv_preserves_hardlinks_across_partitions and thus I wouldn't do it again in this test function.

Comment thread tests/by-util/test_mv.rs Outdated
Comment on lines 2146 to 2149

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The naming with "a_file" and "second_file" feels a bit odd. Maybe it would be better to use names that contain "a1" and "b1", similar to the naming on lines 2096/2097?

Comment thread tests/by-util/test_mv.rs Resolved
Comment thread tests/by-util/test_mv.rs Resolved
Comment thread tests/by-util/test_mv.rs Resolved
Comment thread tests/by-util/test_mv.rs Resolved
Comment thread tests/by-util/test_mv.rs Outdated
Comment on lines 2362 to 2375

@cakebaker cakebaker Jul 2, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't know what the purpose of this test is: the function name and the comment indicate the test is related to some error handling, but there is no error. Currently, it looks like the test function is a duplicate of test_mv_move_file_into_dir.

Comment thread tests/by-util/test_mv.rs Outdated
Comment on lines 2377 to 2393

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This test function also looks like a duplicate of test_mv_move_file_into_dir.

Comment thread tests/by-util/test_mv.rs Outdated
Comment on lines 2421 to 2439

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This test function also looks like a duplicate of test_mv_move_file_into_dir.

Comment thread src/uu/mv/src/mv.rs Outdated
Comment on lines 364 to 396

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you could use a similar approach as on lines 659 - 662 and use the same call of rename for both unix and non-unix.

Comment thread src/uu/mv/src/mv.rs Outdated
Comment on lines 425 to 442

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same here.

@github-actions

github-actions Bot commented Jul 3, 2025

Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/mv/dup-source. tests/mv/dup-source is passing on 'main'. Maybe you have to rebase?
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/mv/hard-link-1 is no longer failing!
Congrats! The gnu test tests/mv/part-fail is no longer failing!
Congrats! The gnu test tests/mv/part-hardlink is no longer failing!

sylvestre and others added 3 commits July 3, 2025 15:31
Should fix GNU tests/mv/part-hardlink.sh tests/mv/hard-link-1.sh

Co-authored-by: Daniel Hofstetter <[email protected]>
@github-actions

github-actions Bot commented Jul 3, 2025

Copy link
Copy Markdown

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/mv/hard-link-1 is no longer failing!
Congrats! The gnu test tests/mv/part-fail is no longer failing!
Congrats! The gnu test tests/mv/part-hardlink is no longer failing!

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