diff options
author | Pádraig Brady <P@draigBrady.com> | 2016-11-19 11:14:49 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2016-11-22 20:04:25 +0000 |
commit | b572a286d5d24cdb1669baa3f867317bdb534b1a (patch) | |
tree | 5a828183cafc25587fbcc5ad326f3c3e133e79ac /tests/tail-2/retry.sh | |
parent | 01971c0e3ff459b92d6faa2700a36c5bd45a329a (diff) | |
download | coreutils-b572a286d5d24cdb1669baa3f867317bdb534b1a.tar.xz |
tests: fix recent tail-2 test regressions
* tests/tail-2/pipe-f.sh: Avoid issue with readable
directories on BSD systems.
* tests/tail-2/retry.sh: Likewise.
Reported by Assaf Gordon
Diffstat (limited to 'tests/tail-2/retry.sh')
-rwxr-xr-x | tests/tail-2/retry.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/tail-2/retry.sh b/tests/tail-2/retry.sh index 782992356..1ab09ddac 100755 --- a/tests/tail-2/retry.sh +++ b/tests/tail-2/retry.sh @@ -148,6 +148,7 @@ returns_ 1 tail $mode --follow=descriptor missing >out 2>&1 || fail=1 [ "$(countlines_)" = 2 ] || { fail=1; cat out; } grep -F 'cannot open' out || { fail=1; cat out; } grep -F 'no files remaining' out || { fail=1; cat out; } +rm -f out || framework_failure_ # === Test: # Likewise for --follow=name (without --retry). @@ -155,10 +156,12 @@ returns_ 1 tail $mode --follow=name missing >out 2>&1 || fail=1 [ "$(countlines_)" = 2 ] || { fail=1; cat out; } grep -F 'cannot open' out || { fail=1; cat out; } grep -F 'no files remaining' out || { fail=1; cat out; } +rm -f out || framework_failure_ # === Test: # Ensure that tail -F retries when the file is initially untailable. -mkdir untailable +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. @@ -172,6 +175,7 @@ grep -F 'cannot follow' out || { fail=1; cat out; } grep -F 'has become accessible' out || { fail=1; cat out; } grep -F 'foo' out || { fail=1; cat out; } rm -fd untailable out || framework_failure_ +fi done |