summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2015-02-05 16:32:49 +0000
committerPádraig Brady <P@draigBrady.com>2015-02-06 09:48:13 +0000
commit81609dc1ea66b97e6aaf373538deddc283cbd6c6 (patch)
treea1cbf5daafad2cc6306b734877b7d8d434bf01b3 /tests
parent1d0f1b7ce10807290715d0b7c4637ac9d4fc7821 (diff)
downloadcoreutils-81609dc1ea66b97e6aaf373538deddc283cbd6c6.tar.xz
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.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/tail-2/inotify-rotate.sh13
1 files 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 <http://www.gnu.org/licenses/>.
-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