Repository navigation
Conversation
27b0ce0 to
6ec985d
Compare
|
Is your test really cross-filesystem? See discussion at #8605 (comment) too. |
|
GNU testsuite comparison: |
6ec985d to
f7ef980
Compare
|
okey
these ensures FIFO handling works in both scenarios |
|
Can we remove ignore and just skip on th system |
|
GNU testsuite comparison: |
f7ef980 to
24b49c3
Compare
|
GNU testsuite comparison: |
|
I guess non-cross FS test was added at #7241 . So we need |
|
Oh it has |
|
heh, you want proper test but that require root. something like: #[cfg(unix)]
#[ignore = "requires root for mount"]
#[test]
fn test_mv_dir_with_fifo_cross_filesystem() {
let mut ts = TestScenario::new(util_name!());
let at = &ts.fixtures;
at.mkdir("source");
at.mkfifo("source/pipe");
at.mkdir("mountpoint");
ts.mount_temp_fs(at.plus_as_string("mountpoint")).unwrap();
ts.ucmd()
.args(&["source", "mountpoint/dest"])
.timeout(Duration::from_secs(2))
.succeeds();
} |
d1455d6 to
24b49c3
Compare
|
Merging this might delay... But yeah. And I think we can use GNU >9.9 's test to block regression.
|
|
GNU testsuite comparison: |
|
I guess we can reuse |
|
But that's a big refactor, reusing cp's file type handling would touch many parts of mv. You should create a new issue as enhancement: "mv: share special file handling logic with cp" |
Fixes uutils#9656 When moving a directory containing FIFO files, copy_dir_contents_recursive() would call fs::copy() on the FIFO, causing an indefinite hang. This fix adds FIFO detection before the copy operation and uses make_fifo() instead, matching the behavior of rename_fifo_fallback(). - Add FIFO detection in copy_dir_contents_recursive() - Create new FIFO at destination using make_fifo() - Add test with timeout protection to prevent future regressions
24b49c3 to
1e5bf34
Compare
|
GNU testsuite comparison: |
Merging this PR will not alter performance
Comparing Footnotes
|
|
To simplify tests: #8605 (comment) |
- Add macOS mount_temp_fs() implementation using hdiutil ramdisk - Refactor test_mv_dir_containing_fifo to use TestScenario infrastructure - Replace platform-specific /dev/shm dependency with portable mount_temp_fs() - Consolidate separate cross-fs and same-fs tests into single test - Add root privilege requirement check - Implement automatic cleanup via Drop trait on all platforms This completes cross-platform test infrastructure: - Linux/FreeBSD/Android: tmpfs mounting (already existed) - macOS: ramdisk creation + HFS+ format + mount (new) Both implementations provide mount_temp_fs()/umount_temp_fs() for cross-device testing without relying on system-specific paths.
b9d9f2b to
68a35de
Compare
|
GNU testsuite comparison: |
Fixes compilation error on OpenBSD CI by extending platform-specific conditional compilation to include target_os = 'openbsd'. OpenBSD supports tmpfs mounting using the same mount -t tmpfs command as Linux and FreeBSD, so the existing implementation works without modification. This resolves the failing OpenBSD CI job for PR uutils#9665 which was failing with 'no method named mount_temp_fs found' errors.
3924c18 to
acfd80d
Compare
Fixes #9656
Adds FIFO detection in
copy_dir_contents_recursive()to prevent indefinite hang when moving directories containing FIFO files. Usesmake_fifo()instead offs::copy().Includes test with timeout protection