From 81609dc1ea66b97e6aaf373538deddc283cbd6c6 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Thu, 5 Feb 2015 16:32:49 +0000 Subject: tests: fix recent regression in tail inotify test * tests/tail-2/inotify-rotate.sh (cleanup_fail_): Set fail=1 so that failures are identified. Regression in v8.23-63-g111a2b9 Also use print_ver_ rather than open coding --verbose support. Also check for more than a single 'b' which seems brittle. --- tests/tail-2/inotify-rotate.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tests/tail-2/inotify-rotate.sh b/tests/tail-2/inotify-rotate.sh index 63ab2f1d2..913bf992c 100755 --- a/tests/tail-2/inotify-rotate.sh +++ b/tests/tail-2/inotify-rotate.sh @@ -16,12 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if test "$VERBOSE" = yes; then - set -x - tail --version -fi - . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src +print_ver_ tail grep '^#define HAVE_INOTIFY 1' "$CONFIG_HEADER" >/dev/null \ || expensive_ @@ -44,6 +40,7 @@ cleanup_fail() cat out warn_ $1 kill $pid + fail=1 } # Perform at least this many iterations, because on multi-core systems @@ -59,9 +56,9 @@ for i in $(seq 50); do timeout 60 tail -s.1 --max-unchanged-stats=1 -F k > out 2>&1 & pid=$! - echo b > k; - # wait for b to appear in out - grep_timeout 'b' || { cleanup_fail 'failed to find b in out'; break; } + echo 'tailed' > k; + # wait for 'tailed' to appear in out + grep_timeout 'tailed' || { cleanup_fail 'failed to find "tailed"'; break; } mv x k # wait for tail to detect the rename -- cgit v1.2.3-70-g09d2