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.
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
sed 's/: x/:/' $expected-tmp |cat $expected-tmp - > $expected
+exec 1>&3 3>&-
+
compare $expected $actual || fail=1
Exit $fail
actual=actual-$$
expected=expected-$$
-exec 1> $actual
+exec 3>&1 1> $actual
# FIXME: This should be bigger: like more than 8k
contents=XYZ
EOF
+exec 1>&3 3>&-
compare $expected $actual 1>&2 || fail=1