Skip to content
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

cp: gnu "same-file" test case compatibility #6190

Merged
merged 2 commits into from
Apr 21, 2024
Merged

Conversation

matrixhead
Copy link
Contributor

@matrixhead matrixhead commented Apr 4, 2024

This pr tries to fix #6158

  • changed the behavior of how -b worked. Now, VERSION_CONTROL env is considered before resorting to --backup=existing
  • added more checks to is_forbidden_to_copy_to_same_file
  • added some more cases in copy_file so that it's okay to return without an error in some cases
  • fixes the issue of cp not dereferencing the destination symlink when -d is given without -b, by only removing destination files that are only part of a hard link
  • fixed the error caused by trying to remove a file that's already been removed

@matrixhead matrixhead marked this pull request as draft April 4, 2024 18:29
@matrixhead matrixhead changed the title cp: backup, hardlink fixes cp: gnu "same-file" test case compaitablity Apr 4, 2024
@cakebaker cakebaker changed the title cp: gnu "same-file" test case compaitablity cp: gnu "same-file" test case compatibility Apr 5, 2024
Copy link

github-actions bot commented Apr 7, 2024

GNU testsuite comparison:

Skipping an intermittent issue tests/rm/rm1 (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/cp/cross-dev-symlink is no longer failing!

src/uu/cp/src/cp.rs Outdated Show resolved Hide resolved
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/cp/cross-dev-symlink is no longer failing!

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/cp/same-file is no longer failing!

Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/cp/same-file is no longer failing!
Congrats! The gnu test tests/cp/cross-dev-symlink is no longer failing!

@matrixhead matrixhead marked this pull request as draft April 15, 2024 17:15
@matrixhead matrixhead marked this pull request as ready for review April 15, 2024 17:38
@sylvestre
Copy link
Contributor

well done, just a small last request :)

@matrixhead
Copy link
Contributor Author

thanks 😃 will do that

Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/timeout/timeout is no longer failing!

@sylvestre
Copy link
Contributor

looks great
I am wondering why it isn't displayed that same-file.sh passes now
2024-04-17T11:36:56.7867661Z PASS: tests/cp/same-file.sh

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/cp/same-file is no longer failing!
Congrats! The gnu test tests/cp/cross-dev-symlink is no longer failing!

@matrixhead
Copy link
Contributor Author

matrixhead commented Apr 19, 2024

@sylvestre just to clarify we are talking about github-actions not commenting "Congrats!" message right?
edit: my initial thoughts are maybe it's comparing wrong test logs.

@sylvestre sylvestre merged commit a171743 into uutils:main Apr 21, 2024
68 checks passed
@sylvestre
Copy link
Contributor

well done :)

sylvestre pushed a commit to sylvestre/coreutils that referenced this pull request Apr 21, 2024
* cp: -b doesn't ignore "version control" env

* cp: gnu "same-file" test compatibility fix
sylvestre pushed a commit to sylvestre/coreutils that referenced this pull request Apr 21, 2024
* cp: -b doesn't ignore "version control" env

* cp: gnu "same-file" test compatibility fix
sylvestre pushed a commit to sylvestre/coreutils that referenced this pull request Apr 21, 2024
* cp: -b doesn't ignore "version control" env

* cp: gnu "same-file" test compatibility fix
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.

cp: making cp compatible with "same-file" gnu test case
2 participants