fix(mv): prevent hang when moving directories containing FIFO files
Fixes #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
1e5bf34
10 days ago
by naoNao89
-3.16%
test: add cross-platform mount infrastructure and refactor mv FIFO test
- 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.