* 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.
test $? = 127 || fail=1
else
test $? = 125 || fail=1
+ can_chroot_root=0
fi
# Ensure that --skip-chdir fails with a non-"/" argument.
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("/")
{ 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; }
{ 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 ||
{ 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 ||
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"
{ 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
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