summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-10-08 19:57:21 +0200
committerJim Meyering <meyering@redhat.com>2011-10-08 19:57:21 +0200
commitbb1c6912f23edcd77ccb18043b2b83db8754f8d9 (patch)
tree8c5992b91709da8fe34df647d700d64b73f50e53
parent11cb50ee6d20966abeed32cf61b5f26a984b7e7d (diff)
downloadcoreutils-bb1c6912f23edcd77ccb18043b2b83db8754f8d9.tar.xz
tests: avoid tail-2/F-vs-missing failure on NFS
* tests/tail-2/F-vs-missing: This test would fail about 80% of the time on linux/powerpc when run in an NFS-mounted directory. Reported by Bruno Haible in http://thread.gmane.org/gmane.comp.gnu.coreutils.general/1726/focus=1727
-rwxr-xr-xtests/tail-2/F-vs-missing15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/tail-2/F-vs-missing b/tests/tail-2/F-vs-missing
index 35b103b99..d46a624a2 100755
--- a/tests/tail-2/F-vs-missing
+++ b/tests/tail-2/F-vs-missing
@@ -46,4 +46,19 @@ tail_re='has appeared' retry_delay_ check_tail_output .1 7 ||
kill -HUP $pid
+cleanup()
+{
+ local delay="$1"
+ rm -rf missing ||
+ { sleep $delay; return 1; }
+}
+
+# Try repeatedly to remove the temporary directory.
+# This is normally unnecessary, because the containing directory will
+# be removed by code from init.sh. However, when this particular test
+# is run on an NFS-mounted volume, sometimes init.sh's cleanup code
+# fails because the directory is not yet really empty, perhaps because
+# the tail process (reading missing/file) is not yet killed.
+retry_delay_ cleanup .1 6
+
Exit $fail