coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] maint: tests: fix comments about retry_delay_


From: Pádraig Brady
Subject: [PATCH] maint: tests: fix comments about retry_delay_
Date: Wed, 29 Oct 2014 14:41:57 +0000

* tests/tail-2/F-vs-missing.sh: Comment with the correct total delay.
* tests/tail-2/F-vs-rename.shi: Likewise.
* tests/tail-2/flush-initial.sh: Likewise.
* tests/tail-2/inotify-hash-abuse.sh: Likewise.
* tests/tail-2/pipe-f2.sh: Likewise.
* tests/misc/chroot-fail.sh: Initialize can_chroot_root in all cases.
---
 tests/misc/chroot-fail.sh          |    3 ++-
 tests/tail-2/F-vs-missing.sh       |    4 ++--
 tests/tail-2/F-vs-rename.sh        |   10 +++++-----
 tests/tail-2/flush-initial.sh      |    2 +-
 tests/tail-2/inotify-hash-abuse.sh |    4 ++--
 tests/tail-2/pipe-f2.sh            |    2 +-
 6 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/tests/misc/chroot-fail.sh b/tests/misc/chroot-fail.sh
index 75f724a..29006e0 100755
--- a/tests/misc/chroot-fail.sh
+++ b/tests/misc/chroot-fail.sh
@@ -40,6 +40,7 @@ if chroot / true ; then
   test $? = 127 || fail=1
 else
   test $? = 125 || fail=1
+  can_chroot_root=0
 fi
 
 # Ensure that --skip-chdir fails with a non-"/" argument.
@@ -52,7 +53,7 @@ compare /dev/null out || fail=1
 compare exp err || fail=1
 
 # Ensure we chdir("/") appropriately when NEWROOT is old "/".
-if test "$can_chroot_root"; then
+if test $can_chroot_root = 1; then
   ln -s / isroot || framework_failure_
   for dir in '/' '/.' '/../' isroot; do
     # Verify that chroot(1) succeeds and performs chdir("/")
diff --git a/tests/tail-2/F-vs-missing.sh b/tests/tail-2/F-vs-missing.sh
index d47b302..5205d68 100755
--- a/tests/tail-2/F-vs-missing.sh
+++ b/tests/tail-2/F-vs-missing.sh
@@ -32,14 +32,14 @@ check_tail_output()
     { sleep $delay; return 1; }
 }
 
-# Wait up to 6.3s for tail to start with diagnostic:
+# Wait up to 12.7s for tail to start with diagnostic:
 # tail: cannot open 'missing/file' for reading: No such file or directory
 tail_re='cannot open' retry_delay_ check_tail_output .1 7 || fail=1
 
 mkdir missing || fail=1
 (cd missing && echo x > file)
 
-# Wait up to 6.3s for this to appear in the output:
+# Wait up to 12.7s for this to appear in the output:
 # "tail: '...' has appeared;  following end of new file"
 tail_re='has appeared' retry_delay_ check_tail_output .1 7 ||
   { echo "$0: file: unexpected delay?"; cat out; fail=1; }
diff --git a/tests/tail-2/F-vs-rename.sh b/tests/tail-2/F-vs-rename.sh
index 3e31ec8..c0fc76c 100755
--- a/tests/tail-2/F-vs-rename.sh
+++ b/tests/tail-2/F-vs-rename.sh
@@ -34,24 +34,24 @@ check_tail_output()
     { sleep $delay; return 1; }
 }
 
-# Wait up to 6.3s for tail to start
+# Wait up to 12.7s for tail to start
 echo x > a
 tail_re='^x$' retry_delay_ check_tail_output .1 7 || fail=1
 
 mv a b || fail=1
 
-# Wait 6.3s for this diagnostic:
+# Wait 12.7s for this diagnostic:
 # tail: 'a' has become inaccessible: No such file or directory
 tail_re='inaccessible' retry_delay_ check_tail_output .1 7 || fail=1
 
 echo x > a
-# Wait up to 6.3s for this to appear in the output:
+# Wait up to 12.7s for this to appear in the output:
 # "tail: '...' has appeared;  following end of new file"
 tail_re='has appeared' retry_delay_ check_tail_output .1 7 ||
   { echo "$0: a: unexpected delay?"; cat out; fail=1; }
 
 echo y >> b
-# Wait up to 6.3s for "y" to appear in the output:
+# Wait up to 12.7s for "y" to appear in the output:
 tail_f_vs_rename_2() {
   local delay="$1"
   tr '\n' @ < out | grep '@@==> b <address@hidden@$' > /dev/null ||
@@ -61,7 +61,7 @@ retry_delay_ tail_f_vs_rename_2 .1 7 ||
   { echo "$0: b: unexpected delay?"; cat out; fail=1; }
 
 echo z >> a
-# Wait up to 6.3s for "z" to appear in the output:
+# Wait up to 12.7s for "z" to appear in the output:
 tail_f_vs_rename_3() {
   local delay="$1"
   tr '\n' @ < out | grep '@@==> a <address@hidden@$' > /dev/null ||
diff --git a/tests/tail-2/flush-initial.sh b/tests/tail-2/flush-initial.sh
index fd14eae..29b94ac 100755
--- a/tests/tail-2/flush-initial.sh
+++ b/tests/tail-2/flush-initial.sh
@@ -25,7 +25,7 @@ echo line > in || fail=1
 tail -f in > out &
 tail_pid=$!
 
-# Wait for 1.5s for the file to be flushed.
+# Wait for 3.1s for the file to be flushed.
 tail_flush()
 {
   local delay="$1"
diff --git a/tests/tail-2/inotify-hash-abuse.sh 
b/tests/tail-2/inotify-hash-abuse.sh
index 6492049..b47440e 100755
--- a/tests/tail-2/inotify-hash-abuse.sh
+++ b/tests/tail-2/inotify-hash-abuse.sh
@@ -34,13 +34,13 @@ check_tail_output()
     { sleep $delay; return 1; }
 }
 
-# Wait up to 6.3s for tail to start
+# Wait up to 12.7s for tail to start
 echo x > $n
 tail_re='^x$' retry_delay_ check_tail_output .1 7 || fail=1
 
 mv 1 f || fail=1
 
-# Wait 6.3s for this diagnostic:
+# Wait 12.7s for this diagnostic:
 # tail: '1' has become inaccessible: No such file or directory
 tail_re='inaccessible' retry_delay_ check_tail_output .1 7 || fail=1
 
diff --git a/tests/tail-2/pipe-f2.sh b/tests/tail-2/pipe-f2.sh
index 13ccd0b..471e976 100755
--- a/tests/tail-2/pipe-f2.sh
+++ b/tests/tail-2/pipe-f2.sh
@@ -32,7 +32,7 @@ check_tail_output()
   test -s out || { sleep $n_sec; return 1; }
 }
 
-# Wait 6.3s for tail to write something.
+# Wait 12.7s for tail to write something.
 retry_delay_ check_tail_output .1 7 || fail=1
 
 compare exp out || fail=1
-- 
1.7.7.6




reply via email to

[Prev in Thread] Current Thread [Next in Thread]