diff options
author | Pádraig Brady <P@draigBrady.com> | 2014-12-30 01:25:17 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2014-12-30 02:43:18 +0000 |
commit | 1269bf58578615a8a5255d36582cb0736fd57227 (patch) | |
tree | cf4f3d52681b8c4714074046efe0061b4aa711df /tests/tail-2 | |
parent | 974c355c595598a219785b6661bb6b030aaef4df (diff) | |
download | coreutils-1269bf58578615a8a5255d36582cb0736fd57227.tar.xz |
tests: fix possible 8 minute running time of inotify-rotate.sh
Commit v8.23-63-g111a2b9 removed the expensive tag on this test,
as it runs quickly on systems with inotify. However without that
it would take about 8 minutes for the test to complete all iterations.
* tests/tail-2/inotify-rotate.sh: Tag as expensive without inotify.
Also adjust the polling parameters used on systems without inotify
so that the test completes within about 15 seconds.
Diffstat (limited to 'tests/tail-2')
-rwxr-xr-x | tests/tail-2/inotify-rotate.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/tail-2/inotify-rotate.sh b/tests/tail-2/inotify-rotate.sh index 6b539a6fa..58b7e03e7 100755 --- a/tests/tail-2/inotify-rotate.sh +++ b/tests/tail-2/inotify-rotate.sh @@ -23,6 +23,9 @@ fi . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src +grep '^#define HAVE_INOTIFY 1' "$CONFIG_HEADER" >/dev/null \ + || expensive_ + check_tail_output() { local delay="$1" @@ -53,7 +56,7 @@ for i in $(seq 50); do # and a lot of disk activity, even 20 seconds is insufficient, which # leads to this timeout killing tail before the "ok" is written below. >k && >x || framework_failure_ failed to initialize files - timeout 60 tail -F k > out 2>&1 & + timeout 60 tail -s.1 --max-unchanged-stats=1 -F k > out 2>&1 & pid=$! echo b > k; |