diff options
author | Pádraig Brady <P@draigBrady.com> | 2013-12-09 01:58:25 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2013-12-09 09:26:17 +0000 |
commit | 402e8ecbc4bf3b3fe866338e77e21feceac910f0 (patch) | |
tree | 9c5c044a7ce40819c646001d46514a7871f7165e /tests | |
parent | 4a6189a0ea0e49b542eb10ff3c9032145683ed63 (diff) | |
download | coreutils-402e8ecbc4bf3b3fe866338e77e21feceac910f0.tar.xz |
tail: use consistent diagnostics with and without inotify
* src/tail.c: With inotify, when a file is initially absent,
we fstat(-1) for that file spec, thus recording an errnum of EBADF,
which caused the "has become accessible" diagnostic to be issued,
when the file first appears. Instead we avoid the fstat(-1) and
thus emit the more natural and consistent "has appeared" diagnostic.
* tests/tail-2/retry.sh: Use the new diagnostic which also causes
this test to pass on systems without inotify.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/tail-2/retry.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/tail-2/retry.sh b/tests/tail-2/retry.sh index 7ba773475..ce67a4594 100755 --- a/tests/tail-2/retry.sh +++ b/tests/tail-2/retry.sh @@ -53,11 +53,11 @@ retry_delay_ wait4lines_ .1 6 3 || fail=1 # Wait for the expected output. kill $pid wait $pid # Expect 3 lines in the output file. -[ $( wc -l < out ) = 3 ] || { fail=1; cat out; } -grep -F 'cannot open' out || { fail=1; cat out; } -grep -F 'has become accessible' out || { fail=1; cat out; } -grep '^X$' out || { fail=1; cat out; } -rm -f missing out || framework_failure_ +[ $( wc -l < out ) = 3 ] || { fail=1; cat out; } +grep -F 'cannot open' out || { fail=1; cat out; } +grep -F 'has appeared' out || { fail=1; cat out; } +grep '^X$' out || { fail=1; cat out; } +rm -f missing out || framework_failure_ # === Test: # Ensure that "tail --retry --follow=descriptor" waits for the file to appear. |