diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2010-12-03 11:08:48 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2010-12-03 11:09:27 -0800 |
commit | b6ef652e50f49e55871c5d08c43ee250950f1cbb (patch) | |
tree | 27b26d0e07c8935694f13180c18d40c7812a5c34 /tests/cp/cp-mv-backup | |
parent | b5a25a996da0ed80025e6ed94ca7fe4347704864 (diff) | |
download | coreutils-b6ef652e50f49e55871c5d08c43ee250950f1cbb.tar.xz |
tests: cleanup rm -rf fails under NFS
This problem was observed on RHEL 5.5 x86-64 when running as a
client of a NetApp FAS2050.
* tests/cp/cp-mv-backup: Don't leave a file descriptor open to
a file in a directory that will be cleaned up with "rm -rf".
Under NFS, when the rm unlinks that file, it is instead renamed
to .nfsXXXX and then rm cannot remove the parent directory,
and the test fails.
* tests/cp/same-file: Likewise.
Diffstat (limited to 'tests/cp/cp-mv-backup')
-rwxr-xr-x | tests/cp/cp-mv-backup | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/cp/cp-mv-backup b/tests/cp/cp-mv-backup index d77568575..a1b2efeb0 100755 --- a/tests/cp/cp-mv-backup +++ b/tests/cp/cp-mv-backup @@ -28,7 +28,7 @@ umask 022 actual=actual expected=expected -exec 1> $actual +exec 3>&1 1> $actual for prog in cp mv; do for initial_files in 'x' 'x y' 'x y y~' 'x y y.~1~' 'x y y~ y.~1~'; do @@ -85,6 +85,8 @@ EOF sed 's/: x/:/' $expected-tmp |cat $expected-tmp - > $expected +exec 1>&3 3>&- + compare $expected $actual || fail=1 Exit $fail |