]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: tests: fix comments about retry_delay_
authorPádraig Brady <P@draigBrady.com>
Wed, 29 Oct 2014 14:32:01 +0000 (14:32 +0000)
committerPádraig Brady <P@draigBrady.com>
Thu, 30 Oct 2014 00:06:11 +0000 (00:06 +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
tests/tail-2/F-vs-missing.sh
tests/tail-2/F-vs-rename.sh
tests/tail-2/flush-initial.sh
tests/tail-2/inotify-hash-abuse.sh
tests/tail-2/pipe-f2.sh

index 75f724a87e2701825d4eba3c451d7297cc5020be..29006e07f3ddb90f5c454c639ff6aeb639df3774 100755 (executable)
@@ -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("/")
index d47b30229e2ff14b9dcba18861743fc40426b268..5205d68b3a6da153d438ce91b86a1ddda1eefcf4 100755 (executable)
@@ -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; }
index 3e31ec8c3a6d3ec4c92bbe383a7769cdd112d26c..c0fc76c18744f6a5afc6aaed09bf015f9519400b 100755 (executable)
@@ -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 <==@y@$' > /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 <==@z@$' > /dev/null ||
index fd14eae90bf6c927ca2807169f88d1837a4afe38..29b94ac8dec41ce462649d6e563d3e2010c5efe6 100755 (executable)
@@ -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"
index 6492049dc19e1ffdd62be919040317d5e0cef544..b47440e20f536b892bb7085825fde487d15c51bf 100755 (executable)
@@ -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
 
index 13ccd0b39ce87d7c5e346b21adcbe48a711486c9..471e9763a504b5e74c2e07d1bc81a6e73659f70e 100755 (executable)
@@ -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