It was unlinking the target even though it uses rename(2) which already
effectively does that. -S is intended to not unlink(2) the target first.
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
Differential D7452
Fix -S with -l not being atomic. bdrewery on Aug 9 2016, 7:29 PM. Authored by Tags None Referenced Files
Subscribers
Details
It was unlinking the target even though it uses rename(2) which already MFC after: 1 week Truss and: /usr/tests/usr.bin/xinstall # kyua test install_test:copy_self -> passed [0.036s] install_test:copy_self_comparing -> passed [0.035s] install_test:copy_self_safe -> passed [0.035s] install_test:copy_self_safe_comparing -> passed [0.035s] install_test:copy_to_nonexistent -> passed [0.035s] install_test:copy_to_nonexistent_backup -> passed [0.035s] install_test:copy_to_nonexistent_backup_safe -> passed [0.035s] install_test:copy_to_nonexistent_comparing -> passed [0.035s] install_test:copy_to_nonexistent_preserving -> passed [0.035s] install_test:copy_to_nonexistent_safe -> passed [0.035s] install_test:copy_to_nonexistent_safe_comparing -> passed [0.035s] install_test:hard_link -> passed [0.033s] install_test:mkdir_simple -> passed [0.052s] install_test:overwrite -> passed [0.035s] install_test:overwrite_backup -> passed [0.036s] install_test:overwrite_backup_comparing -> passed [0.037s] install_test:overwrite_backup_safe -> passed [0.036s] install_test:overwrite_backup_safe_comparing -> passed [0.037s] install_test:overwrite_comparing -> passed [0.035s] install_test:overwrite_eq -> passed [0.035s] install_test:overwrite_eq_comparing -> passed [0.035s] install_test:overwrite_eq_safe -> passed [0.035s] install_test:overwrite_eq_safe_comparing -> passed [0.035s] install_test:overwrite_safe -> passed [0.035s] install_test:overwrite_safe_comparing -> passed [0.035s] install_test:strip_changing -> passed [0.045s] install_test:strip_changing_comparing -> passed [0.045s] install_test:strip_changing_overwrite -> passed [0.045s] install_test:strip_changing_overwrite_comparing -> passed [0.045s] install_test:strip_changing_overwrite_eq -> passed [0.045s] install_test:strip_changing_overwrite_eq_comparing -> passed [0.045s] install_test:strip_noop -> passed [0.038s] install_test:symbolic_link -> passed [0.035s] install_test:symbolic_link_absolute -> passed [0.036s] install_test:symbolic_link_relative -> passed [0.036s] Results file id is usr_tests_usr.bin_xinstall.20160809-192916-083663 Results saved to /root/.kyua/store/results.usr_tests_usr.bin_xinstall.20160809-192916-083663.db 35/35 passed (0 failed)
Diff Detail
Event TimelineComment Actions These came in with the initial import of -l from NetBSD, but NetBSD never had these unlinks. The unlink is kept for the default (no -S) case. |