summaryrefslogtreecommitdiff
path: root/tests/tail-2/retry.sh
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2017-01-31 20:10:02 -0800
committerPádraig Brady <P@draigBrady.com>2017-02-08 14:40:22 -0800
commita520942efadbd0f86759f9bcb428ec0a83ed56e4 (patch)
treef0355afe1876e843ecd03340b2609859ca8eb3a6 /tests/tail-2/retry.sh
parent2c64bc87293bd8bf369b8dbd487a793ea9803775 (diff)
downloadcoreutils-a520942efadbd0f86759f9bcb428ec0a83ed56e4.tar.xz
tail: fix erroneous status about 'giving up' on file
* src/tail.c (recheck): Set f->ignore before we use it to show the appropriate error. * tests/tail-2/retry.sh: Ensure the "giving up" message is not presented.
Diffstat (limited to 'tests/tail-2/retry.sh')
-rwxr-xr-xtests/tail-2/retry.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/tail-2/retry.sh b/tests/tail-2/retry.sh
index b20deb5dc..40d66d60c 100755
--- a/tests/tail-2/retry.sh
+++ b/tests/tail-2/retry.sh
@@ -164,7 +164,7 @@ if ! cat . >/dev/null; then
mkdir untailable || framework_failure_
timeout 10 \
tail $mode $fastpoll -F untailable >out 2>&1 & pid=$!
-# Wait for "cannot open" error.
+# Wait for "cannot follow" error.
retry_delay_ wait4lines_ .1 6 2 || { cat out; fail=1; }
{ rmdir untailable; echo foo > untailable; } || framework_failure_
# Wait for the expected output.
@@ -173,6 +173,7 @@ cleanup_
[ "$(countlines_)" = 4 ] || { fail=1; cat out; }
grep -F 'cannot follow' out || { fail=1; cat out; }
grep -F 'has become accessible' out || { fail=1; cat out; }
+grep -F 'giving up' out && { fail=1; cat out; }
grep -F 'foo' out || { fail=1; cat out; }
rm -fd untailable out || framework_failure_
fi