summaryrefslogtreecommitdiff
path: root/tests/tail-2/f-vs-rename.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tail-2/f-vs-rename.sh')
-rwxr-xr-xtests/tail-2/f-vs-rename.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/tail-2/f-vs-rename.sh b/tests/tail-2/f-vs-rename.sh
index bfd0949b4..083d71449 100755
--- a/tests/tail-2/f-vs-rename.sh
+++ b/tests/tail-2/f-vs-rename.sh
@@ -28,6 +28,9 @@ check_tail_output()
{ sleep $delay; return 1; }
}
+# Terminate any background tail process
+cleanup_() { kill $pid 2>/dev/null && wait $pid; }
+
# Speedup the non inotify case
fastpoll='-s.1 --max-unchanged-stats=1'
@@ -47,9 +50,7 @@ for mode in '' '---disable-inotify'; do
# Wait up to 12.7s for "y" to appear in the output:
tail_re='^y$' retry_delay_ check_tail_output .1 7 || { cat out; fail=1; }
- kill $pid
-
- wait $pid
+ cleanup_
done
Exit $fail