coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

cp: fix copy from stream

Open Luv-Ray opened this issue 5 months ago • 8 comments

fixes #7885 copy_stream doesn't clear the dest file, if dest is not a stream, clear it manually.

Luv-Ray avatar Jun 11 '25 02:06 Luv-Ray

I'm not familiar with FreeBSD's permissions, how could I debug FreeBSD's behavior without a FreeBSD machine?

edit: oh I find I can use forked repo's github action to debug.

Luv-Ray avatar Jun 11 '25 03:06 Luv-Ray

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/tee (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)

github-actions[bot] avatar Jun 11 '25 03:06 github-actions[bot]

I try to debug FreeBSD and find /dev/fd/0's permission was set to mode: 0o010000 (p---------), can't understand why.

Luv-Ray avatar Jun 11 '25 07:06 Luv-Ray

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/tee (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)

github-actions[bot] avatar Jun 11 '25 08:06 github-actions[bot]

Is there any description for this line? https://github.com/uutils/coreutils/blob/f111113c975c756c32d6a24e28cfcfb21a99e6d5/src/uu/cp/src/platform/other_unix.rs#L54-L56

edit: According to my tests, GNU cp doesn't reset target's permission just because the source is fifo, so I just remove these lines.

Luv-Ray avatar Jun 11 '25 13:06 Luv-Ray

GNU testsuite comparison:

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

github-actions[bot] avatar Jun 11 '25 15:06 github-actions[bot]

GNU testsuite comparison:

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

github-actions[bot] avatar Jun 12 '25 04:06 github-actions[bot]

GNU testsuite comparison:

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

github-actions[bot] avatar Jun 15 '25 01:06 github-actions[bot]

GNU testsuite comparison:

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

github-actions[bot] avatar Jun 27 '25 03:06 github-actions[bot]

GNU testsuite comparison:

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

github-actions[bot] avatar Jun 27 '25 09:06 github-actions[bot]

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)

github-actions[bot] avatar Jul 06 '25 14:07 github-actions[bot]

Thanks!

cakebaker avatar Jul 06 '25 14:07 cakebaker