From a3c0837bc3c8592f5d3886ef13c1f55815a88a2c Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 7 Sep 1998 15:13:48 +0000 Subject: [PATCH] Upon failure, suggest how to rerun the test with longer delay, in case NFS clock skew was the cause of the failure. Reported by Kaveh Ghazi. --- tests/touch/empty-file | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/touch/empty-file b/tests/touch/empty-file index 52175dee79..3089ce4de6 100755 --- a/tests/touch/empty-file +++ b/tests/touch/empty-file @@ -12,6 +12,11 @@ if test "$VERBOSE" = yes; then $TOUCH --version fi +DEFAULT_SLEEP_SECONDS=2 +SLEEP_SECONDS=${SLEEP_SECONDS=$DEFAULT_SLEEP_SECONDS} + +fail=0 + # FIXME: find writable directories on other partitions # and run the test in those directories, too. @@ -32,14 +37,14 @@ if test $framework_failure = 1; then exit 1 fi -sleep 2 +sleep $SLEEP_SECONDS for d in $TOUCH_DIR_LIST; do $TOUCH $d/a || fail=1 set x `$LS -t $d/a $d/b` test "$*" = "x $d/a $d/b" || fail=1 done -sleep 2 +sleep $SLEEP_SECONDS for d in $TOUCH_DIR_LIST; do $TOUCH $d/b set x `$LS -t $d/a $d/b` @@ -48,4 +53,14 @@ for d in $TOUCH_DIR_LIST; do $RM -rf $d/a $d/b done +if test $fail != 0; then + cat 1>&2 <