On two machines (Linux/sparc64 and Linux/riscv64, real hardware, Gentoo)
I see reproducible test failures of tail/retry. See attached log files.

I do *not* see these failures with architectures in the same farm (matoro.tk).
I also do *not* see these failures in QEMU VMs with a local (surely ext4) file
system.
FAIL: tests/tail/retry
======================

++ initial_cwd_=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64
+++ testdir_prefix_
+++ printf gt
++ pfx_=gt
+++ mktempd_ /media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64 gt-retry.sh.XXXX
+++ case $# in
+++ destdir_=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64
+++ template_=gt-retry.sh.XXXX
+++ MAX_TRIES_=4
+++ case $destdir_ in
+++ destdir_slash_=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/
+++ case $template_ in
++++ unset TMPDIR
+++ d=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/gt-retry.sh.uk1M
+++ case $d in
+++ :
+++ test -d /media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/gt-retry.sh.uk1M
++++ ls -dgo /media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/gt-retry.sh.uk1M
+++ perms='drwx------ 2 0 Mar 26 21:50 /media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/gt-retry.sh.uk1M'
+++ case $perms in
+++ :
+++ echo /media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/gt-retry.sh.uk1M
+++ return
++ test_dir_=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/gt-retry.sh.uk1M
++ cd /media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/gt-retry.sh.uk1M
++ case $srcdir in
++ srcdir=../..
++ builddir=..
++ export srcdir builddir
++ gl_init_sh_nl_='
'
++ IFS=' 	
'
++ for sig_ in 1 2 3 13 15
+++ expr 1 + 128
++ eval 'trap '\''Exit 129'\'' 1'
+++ trap 'Exit 129' 1
++ for sig_ in 1 2 3 13 15
+++ expr 2 + 128
++ eval 'trap '\''Exit 130'\'' 2'
+++ trap 'Exit 130' 2
++ for sig_ in 1 2 3 13 15
+++ expr 3 + 128
++ eval 'trap '\''Exit 131'\'' 3'
+++ trap 'Exit 131' 3
++ for sig_ in 1 2 3 13 15
+++ expr 13 + 128
++ eval 'trap '\''Exit 141'\'' 13'
+++ trap 'Exit 141' 13
++ for sig_ in 1 2 3 13 15
+++ expr 15 + 128
++ eval 'trap '\''Exit 143'\'' 15'
+++ trap 'Exit 143' 15
++ saved_IFS=' 	
'
++ IFS=:
++ new_PATH=
++ sep_=
++ for dir in $PATH
++ case "$dir" in
++ test -d /media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/src/.
++ new_PATH=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/src
++ sep_=:
++ for dir in $PATH
++ case "$dir" in
++ test -d /usr/local/sbin/.
++ new_PATH=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/src:/usr/local/sbin
++ sep_=:
++ for dir in $PATH
++ case "$dir" in
++ test -d /usr/local/bin/.
++ new_PATH=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/src:/usr/local/sbin:/usr/local/bin
++ sep_=:
++ for dir in $PATH
++ case "$dir" in
++ test -d /usr/sbin/.
++ new_PATH=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/src:/usr/local/sbin:/usr/local/bin:/usr/sbin
++ sep_=:
++ for dir in $PATH
++ case "$dir" in
++ test -d /usr/bin/.
++ new_PATH=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/src:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
++ sep_=:
++ for dir in $PATH
++ case "$dir" in
++ test -d /sbin/.
++ new_PATH=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/src:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin
++ sep_=:
++ for dir in $PATH
++ case "$dir" in
++ test -d /bin/.
++ new_PATH=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/src:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ sep_=:
++ for dir in $PATH
++ case "$dir" in
++ test -d /usr/lib/llvm/18/bin/.
++ new_PATH=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/src:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/llvm/18/bin
++ sep_=:
++ for dir in $PATH
++ case "$dir" in
++ test -d /usr/lib/llvm/17/bin/.
++ new_PATH=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/src:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/llvm/18/bin:/usr/lib/llvm/17/bin
++ sep_=:
++ IFS=' 	
'
++ PATH=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/src:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/llvm/18/bin:/usr/lib/llvm/17/bin
++ export PATH
++ trap remove_tmp_ EXIT
+ path_prepend_ ./src
+ test 1 '!=' 0
+ path_dir_=./src
+ case $path_dir_ in
+ abs_path_dir_=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/./src
+ case $abs_path_dir_ in
+ PATH=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/./src:/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/src:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/llvm/18/bin:/usr/lib/llvm/17/bin
+ create_exe_shims_ /media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/./src
+ case $EXEEXT in
+ return 0
+ shift
+ test 0 '!=' 0
+ export PATH
+ print_ver_ tail
+ require_built_ tail
+ skip_=no
+ for i in "$@"
+ case " $built_programs " in
+ test no = yes
+ test yes = yes
+ local i
+ for i in $*
+ env tail --version
tail (GNU coreutils) 9.4.185-541b02
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Paul Rubin, David MacKenzie, Ian Lance Taylor,
and Jim Meyering.
+ fastpoll='-s.1 --max-unchanged-stats=1'
+ touch file
+ tail --retry file
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 1 = 1 ']'
+ grep -F 'tail: warning: --retry ignored' out
tail: warning: --retry ignored; --retry is useful only when following
+ returns_ 1 tail --retry missing
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 = 2 ']'
+ grep -F 'tail: warning: --retry ignored' out
tail: warning: --retry ignored; --retry is useful only when following
+ for mode in '' '---disable-inotify'
+ pid=522
+ retry_delay_ wait4lines_ .1 6 1
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ timeout 10 tail -s.1 --max-unchanged-stats=1 --follow=name --retry missing
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 1
+ local delay=0.1
+ local elc=1
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 1 -ge 1 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ echo X
+ retry_delay_ wait4lines_ .1 6 3
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 3
+ local delay=0.1
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 1 -ge 3 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 3
+ local delay=0.2
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 3 ']'
+ sleep 0.2
+ return 1
+ time_fail=1
++ expr 2 + 1
+ attempt=3
++ expr 2 '*' 2
+ num_sleeps=4
+ test 3 -le 6
++ gawk -v n=4 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.4
+ wait4lines_ 0.4 3
+ local delay=0.4
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 3 ']'
+ sleep 0.4
+ return 1
+ time_fail=1
++ expr 3 + 1
+ attempt=4
++ expr 4 '*' 2
+ num_sleeps=8
+ test 4 -le 6
++ gawk -v n=8 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.8
+ wait4lines_ 0.8 3
+ local delay=0.8
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 3 ']'
+ sleep 0.8
+ return 1
+ time_fail=1
++ expr 4 + 1
+ attempt=5
++ expr 8 '*' 2
+ num_sleeps=16
+ test 5 -le 6
++ gawk -v n=16 -v s=.1 'BEGIN { print s * n }'
+ local delay=1.6
+ wait4lines_ 1.6 3
+ local delay=1.6
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 3 ']'
+ sleep 1.6
+ return 1
+ time_fail=1
++ expr 5 + 1
+ attempt=6
++ expr 16 '*' 2
+ num_sleeps=32
+ test 6 -le 6
++ gawk -v n=32 -v s=.1 'BEGIN { print s * n }'
+ local delay=3.2
+ wait4lines_ 3.2 3
+ local delay=3.2
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 3 ']'
+ sleep 3.2
+ return 1
+ time_fail=1
++ expr 6 + 1
+ attempt=7
++ expr 32 '*' 2
+ num_sleeps=64
+ test 7 -le 6
+ test 1 = 0
+ cat out
tail: cannot open 'missing' for reading: No such file or directory
'missing' has appeared;  following new file
X
+ fail=1
+ cleanup_
+ kill 522
+ wait 522
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 = 3 ']'
+ fail=1
+ cat out
tail: cannot open 'missing' for reading: No such file or directory
'missing' has appeared;  following new file
X
+ grep -F 'cannot open' out
grep: out: binary file matches
+ grep -F 'has appeared' out
grep: out: binary file matches
+ grep '^X$' out
grep: out: binary file matches
+ rm -f missing out
+ pid=658
+ retry_delay_ wait4lines_ .1 6 2
+ local test_func=wait4lines_
+ timeout 10 tail -s.1 --max-unchanged-stats=1 --follow=descriptor --retry missing
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 2
+ local delay=0.1
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 1 -ge 2 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 2
+ local delay=0.2
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 2 ']'
+ sleep 0.2
+ return 1
+ time_fail=1
++ expr 2 + 1
+ attempt=3
++ expr 2 '*' 2
+ num_sleeps=4
+ test 3 -le 6
++ gawk -v n=4 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.4
+ wait4lines_ 0.4 2
+ local delay=0.4
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 2 ']'
+ sleep 0.4
+ return 1
+ time_fail=1
++ expr 3 + 1
+ attempt=4
++ expr 4 '*' 2
+ num_sleeps=8
+ test 4 -le 6
++ gawk -v n=8 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.8
+ wait4lines_ 0.8 2
+ local delay=0.8
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 2 ']'
+ sleep 0.8
+ return 1
+ time_fail=1
++ expr 4 + 1
+ attempt=5
++ expr 8 '*' 2
+ num_sleeps=16
+ test 5 -le 6
++ gawk -v n=16 -v s=.1 'BEGIN { print s * n }'
+ local delay=1.6
+ wait4lines_ 1.6 2
+ local delay=1.6
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 2 ']'
+ sleep 1.6
+ return 1
+ time_fail=1
++ expr 5 + 1
+ attempt=6
++ expr 16 '*' 2
+ num_sleeps=32
+ test 6 -le 6
++ gawk -v n=32 -v s=.1 'BEGIN { print s * n }'
+ local delay=3.2
+ wait4lines_ 3.2 2
+ local delay=3.2
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 2 ']'
+ sleep 3.2
+ return 1
+ time_fail=1
++ expr 6 + 1
+ attempt=7
++ expr 32 '*' 2
+ num_sleeps=64
+ test 7 -le 6
+ test 1 = 0
+ cat out
tail: warning: --retry only effective for the initial open
cannot open 'missing' for reading: No such file or directory
+ fail=1
+ echo X1
+ retry_delay_ wait4lines_ .1 6 4
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 4
+ local delay=0.1
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 4
+ local delay=0.2
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 0.2
+ return 1
+ time_fail=1
++ expr 2 + 1
+ attempt=3
++ expr 2 '*' 2
+ num_sleeps=4
+ test 3 -le 6
++ gawk -v n=4 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.4
+ wait4lines_ 0.4 4
+ local delay=0.4
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 0.4
+ return 1
+ time_fail=1
++ expr 3 + 1
+ attempt=4
++ expr 4 '*' 2
+ num_sleeps=8
+ test 4 -le 6
++ gawk -v n=8 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.8
+ wait4lines_ 0.8 4
+ local delay=0.8
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 0.8
+ return 1
+ time_fail=1
++ expr 4 + 1
+ attempt=5
++ expr 8 '*' 2
+ num_sleeps=16
+ test 5 -le 6
++ gawk -v n=16 -v s=.1 'BEGIN { print s * n }'
+ local delay=1.6
+ wait4lines_ 1.6 4
+ local delay=1.6
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 1.6
+ return 1
+ time_fail=1
++ expr 5 + 1
+ attempt=6
++ expr 16 '*' 2
+ num_sleeps=32
+ test 6 -le 6
++ gawk -v n=32 -v s=.1 'BEGIN { print s * n }'
+ local delay=3.2
+ wait4lines_ 3.2 4
+ local delay=3.2
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 3.2
+ return 1
+ time_fail=1
++ expr 6 + 1
+ attempt=7
++ expr 32 '*' 2
+ num_sleeps=64
+ test 7 -le 6
+ test 1 = 0
+ cat out
tail: warning: --retry only effective for the initial open
cannot open 'missing' for reading: No such file or directory
tail: 'missing' has appeared;  following new file
X1
+ fail=1
+ echo X
+ retry_delay_ wait4lines_ .1 6 6
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 6
+ local delay=0.1
+ local elc=6
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 6 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 6
+ local delay=0.2
+ local elc=6
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 6 ']'
+ sleep 0.2
+ return 1
+ time_fail=1
++ expr 2 + 1
+ attempt=3
++ expr 2 '*' 2
+ num_sleeps=4
+ test 3 -le 6
++ gawk -v n=4 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.4
+ wait4lines_ 0.4 6
+ local delay=0.4
+ local elc=6
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 6 ']'
+ sleep 0.4
+ return 1
+ time_fail=1
++ expr 3 + 1
+ attempt=4
++ expr 4 '*' 2
+ num_sleeps=8
+ test 4 -le 6
++ gawk -v n=8 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.8
+ wait4lines_ 0.8 6
+ local delay=0.8
+ local elc=6
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 6 ']'
+ sleep 0.8
+ return 1
+ time_fail=1
++ expr 4 + 1
+ attempt=5
++ expr 8 '*' 2
+ num_sleeps=16
+ test 5 -le 6
++ gawk -v n=16 -v s=.1 'BEGIN { print s * n }'
+ local delay=1.6
+ wait4lines_ 1.6 6
+ local delay=1.6
+ local elc=6
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 6 ']'
+ sleep 1.6
+ return 1
+ time_fail=1
++ expr 5 + 1
+ attempt=6
++ expr 16 '*' 2
+ num_sleeps=32
+ test 6 -le 6
++ gawk -v n=32 -v s=.1 'BEGIN { print s * n }'
+ local delay=3.2
+ wait4lines_ 3.2 6
+ local delay=3.2
+ local elc=6
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 6 ']'
+ sleep 3.2
+ return 1
+ time_fail=1
++ expr 6 + 1
+ attempt=7
++ expr 32 '*' 2
+ num_sleeps=64
+ test 7 -le 6
+ test 1 = 0
+ cat out
tail: warning: --retry only effective for the initial open
cannot open 'missing' for reading: No such file or directory
tail: 'missing' has appeared;  following new file
X1
+ fail=1
+ cleanup_
+ kill 658
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 = 6 ']'
+ fail=1
+ cat out
tail: warning: --retry only effective for the initial open
cannot open 'missing' for reading: No such file or directory
tail: 'missing' has appeared;  following new file
X1
+ grep -F 'retry only effective for the initial open' out
grep: out: binary file matches
+ grep -F 'cannot open' out
grep: out: binary file matches
+ grep -F 'has appeared' out
grep: out: binary file matches
+ grep '^X1$' out
grep: out: binary file matches
+ grep -F 'file truncated' out
+ fail=1
+ cat out
tail: warning: --retry only effective for the initial open
cannot open 'missing' for reading: No such file or directory
tail: 'missing' has appeared;  following new file
X1
+ grep '^X$' out
+ fail=1
+ cat out
tail: warning: --retry only effective for the initial open
cannot open 'missing' for reading: No such file or directory
tail: 'missing' has appeared;  following new file
X1
+ rm -f missing out
+ pid=1294
+ retry_delay_ wait4lines_ .1 6 2
+ timeout 10 tail -s.1 --max-unchanged-stats=1 --follow=descriptor --retry missing
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 2
+ local delay=0.1
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 2 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ mkdir missing
+ retry_delay_ wait4lines_ .1 6 4
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 4
+ local delay=0.1
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 4 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 4
+ local delay=0.2
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 0.2
+ return 1
+ time_fail=1
++ expr 2 + 1
+ attempt=3
++ expr 2 '*' 2
+ num_sleeps=4
+ test 3 -le 6
++ gawk -v n=4 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.4
+ wait4lines_ 0.4 4
+ local delay=0.4
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 0.4
+ return 1
+ time_fail=1
++ expr 3 + 1
+ attempt=4
++ expr 4 '*' 2
+ num_sleeps=8
+ test 4 -le 6
++ gawk -v n=8 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.8
+ wait4lines_ 0.8 4
+ local delay=0.8
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 0.8
+ return 1
+ time_fail=1
++ expr 4 + 1
+ attempt=5
++ expr 8 '*' 2
+ num_sleeps=16
+ test 5 -le 6
++ gawk -v n=16 -v s=.1 'BEGIN { print s * n }'
+ local delay=1.6
+ wait4lines_ 1.6 4
+ local delay=1.6
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 1.6
+ return 1
+ time_fail=1
++ expr 5 + 1
+ attempt=6
++ expr 16 '*' 2
+ num_sleeps=32
+ test 6 -le 6
++ gawk -v n=32 -v s=.1 'BEGIN { print s * n }'
+ local delay=3.2
+ wait4lines_ 3.2 4
+ local delay=3.2
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 3.2
+ return 1
+ time_fail=1
++ expr 6 + 1
+ attempt=7
++ expr 32 '*' 2
+ num_sleeps=64
+ test 7 -le 6
+ test 1 = 0
+ cat out
tail: warning: --retry only effective for the initial open
tail: cannot open 'missing' for reading: No such file or directory
'missing' has been replaced with an untailable file; giving up on this name
tail: no files remaining
+ fail=1
+ wait 1294
+ rc=1
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 = 4 ']'
+ fail=1
+ cat out
tail: warning: --retry only effective for the initial open
tail: cannot open 'missing' for reading: No such file or directory
'missing' has been replaced with an untailable file; giving up on this name
tail: no files remaining
+ grep -F 'retry only effective for the initial open' out
grep: out: binary file matches
+ grep -F 'cannot open' out
grep: out: binary file matches
+ grep -F 'replaced with an untailable file' out
grep: out: binary file matches
+ grep -F 'no files remaining' out
grep: out: binary file matches
+ '[' 1 = 1 ']'
+ rm -fd missing out
+ touch existing
+ pid=1706
+ retry_delay_ wait4lines_ .1 6 2
+ tail -s.1 --max-unchanged-stats=1 --follow=descriptor missing existing
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 2
+ local delay=0.1
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 2 ']'
+ time_fail=0
+ break
+ test 0 = 0
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 = 2 ']'
+ grep -F 'cannot open' out
tail: cannot open 'missing' for reading: No such file or directory
+ echo Y
+ echo X
+ retry_delay_ wait4lines_ .1 6 3
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 3
+ local delay=0.1
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 3 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 3
+ local delay=0.2
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 3 -ge 3 ']'
+ time_fail=0
+ break
+ test 0 = 0
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 3 = 3 ']'
+ grep '^X$' out
X
+ grep '^Y$' out
+ cleanup_
+ kill 1706
+ wait 1706
+ rm -f missing out existing
+ returns_ 1 tail --follow=descriptor missing
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 = 2 ']'
+ grep -F 'cannot open' out
tail: cannot open 'missing' for reading: No such file or directory
+ grep -F 'no files remaining' out
tail: no files remaining
+ rm -f out
+ returns_ 1 tail --follow=name missing
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 = 2 ']'
+ grep -F 'cannot open' out
tail: cannot open 'missing' for reading: No such file or directory
+ grep -F 'no files remaining' out
tail: no files remaining
+ rm -f out
+ cat .
cat: .: Is a directory
+ mkdir untailable
+ pid=1748
+ retry_delay_ wait4lines_ .1 6 2
+ timeout 10 tail -s.1 --max-unchanged-stats=1 -F untailable
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 2
+ local delay=0.1
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 2 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ rmdir untailable
+ echo foo
+ retry_delay_ wait4lines_ .1 6 4
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 4
+ local delay=0.1
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 4 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 4
+ local delay=0.2
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 3 -ge 4 ']'
+ sleep 0.2
+ return 1
+ time_fail=1
++ expr 2 + 1
+ attempt=3
++ expr 2 '*' 2
+ num_sleeps=4
+ test 3 -le 6
++ gawk -v n=4 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.4
+ wait4lines_ 0.4 4
+ local delay=0.4
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 4 -ge 4 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ cleanup_
+ kill 1748
+ wait 1748
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 4 = 4 ']'
+ grep -F 'cannot follow' out
tail: untailable: cannot follow end of this type of file
+ grep -E 'become accessible|has appeared' out
tail: 'untailable' has become accessible
+ grep -F 'giving up' out
+ grep -F foo out
foo
+ rm -fd untailable out
+ for mode in '' '---disable-inotify'
+ pid=1781
+ retry_delay_ wait4lines_ .1 6 1
+ local test_func=wait4lines_
+ timeout 10 tail ---disable-inotify -s.1 --max-unchanged-stats=1 --follow=name --retry missing
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 1
+ local delay=0.1
+ local elc=1
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 1 -ge 1 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ echo X
+ retry_delay_ wait4lines_ .1 6 3
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 3
+ local delay=0.1
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 1 -ge 3 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 3
+ local delay=0.2
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 3 ']'
+ sleep 0.2
+ return 1
+ time_fail=1
++ expr 2 + 1
+ attempt=3
++ expr 2 '*' 2
+ num_sleeps=4
+ test 3 -le 6
++ gawk -v n=4 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.4
+ wait4lines_ 0.4 3
+ local delay=0.4
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 3 ']'
+ sleep 0.4
+ return 1
+ time_fail=1
++ expr 3 + 1
+ attempt=4
++ expr 4 '*' 2
+ num_sleeps=8
+ test 4 -le 6
++ gawk -v n=8 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.8
+ wait4lines_ 0.8 3
+ local delay=0.8
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 3 ']'
+ sleep 0.8
+ return 1
+ time_fail=1
++ expr 4 + 1
+ attempt=5
++ expr 8 '*' 2
+ num_sleeps=16
+ test 5 -le 6
++ gawk -v n=16 -v s=.1 'BEGIN { print s * n }'
+ local delay=1.6
+ wait4lines_ 1.6 3
+ local delay=1.6
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 3 ']'
+ sleep 1.6
+ return 1
+ time_fail=1
++ expr 5 + 1
+ attempt=6
++ expr 16 '*' 2
+ num_sleeps=32
+ test 6 -le 6
++ gawk -v n=32 -v s=.1 'BEGIN { print s * n }'
+ local delay=3.2
+ wait4lines_ 3.2 3
+ local delay=3.2
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 3 ']'
+ sleep 3.2
+ return 1
+ time_fail=1
++ expr 6 + 1
+ attempt=7
++ expr 32 '*' 2
+ num_sleeps=64
+ test 7 -le 6
+ test 1 = 0
+ cat out
tail: cannot open 'missing' for reading: No such file or directory
'missing' has appeared;  following new file
X
+ fail=1
+ cleanup_
+ kill 1781
+ wait 1781
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 = 3 ']'
+ fail=1
+ cat out
tail: cannot open 'missing' for reading: No such file or directory
'missing' has appeared;  following new file
X
+ grep -F 'cannot open' out
grep: out: binary file matches
+ grep -F 'has appeared' out
grep: out: binary file matches
+ grep '^X$' out
grep: out: binary file matches
+ rm -f missing out
+ pid=1915
+ retry_delay_ wait4lines_ .1 6 2
+ timeout 10 tail ---disable-inotify -s.1 --max-unchanged-stats=1 --follow=descriptor --retry missing
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 2
+ local delay=0.1
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 2 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ echo X1
+ retry_delay_ wait4lines_ .1 6 4
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 4
+ local delay=0.1
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 4 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 4
+ local delay=0.2
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 0.2
+ return 1
+ time_fail=1
++ expr 2 + 1
+ attempt=3
++ expr 2 '*' 2
+ num_sleeps=4
+ test 3 -le 6
++ gawk -v n=4 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.4
+ wait4lines_ 0.4 4
+ local delay=0.4
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 0.4
+ return 1
+ time_fail=1
++ expr 3 + 1
+ attempt=4
++ expr 4 '*' 2
+ num_sleeps=8
+ test 4 -le 6
++ gawk -v n=8 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.8
+ wait4lines_ 0.8 4
+ local delay=0.8
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 0.8
+ return 1
+ time_fail=1
++ expr 4 + 1
+ attempt=5
++ expr 8 '*' 2
+ num_sleeps=16
+ test 5 -le 6
++ gawk -v n=16 -v s=.1 'BEGIN { print s * n }'
+ local delay=1.6
+ wait4lines_ 1.6 4
+ local delay=1.6
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 1.6
+ return 1
+ time_fail=1
++ expr 5 + 1
+ attempt=6
++ expr 16 '*' 2
+ num_sleeps=32
+ test 6 -le 6
++ gawk -v n=32 -v s=.1 'BEGIN { print s * n }'
+ local delay=3.2
+ wait4lines_ 3.2 4
+ local delay=3.2
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 3.2
+ return 1
+ time_fail=1
++ expr 6 + 1
+ attempt=7
++ expr 32 '*' 2
+ num_sleeps=64
+ test 7 -le 6
+ test 1 = 0
+ cat out
tail: warning: --retry only effective for the initial open
tail: cannot open 'missing' for reading: No such file or directory
'missing' has appeared;  following new file
X1
+ fail=1
+ echo X
+ retry_delay_ wait4lines_ .1 6 6
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 6
+ local delay=0.1
+ local elc=6
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 6 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 6
+ local delay=0.2
+ local elc=6
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 6 ']'
+ sleep 0.2
+ return 1
+ time_fail=1
++ expr 2 + 1
+ attempt=3
++ expr 2 '*' 2
+ num_sleeps=4
+ test 3 -le 6
++ gawk -v n=4 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.4
+ wait4lines_ 0.4 6
+ local delay=0.4
+ local elc=6
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 6 ']'
+ sleep 0.4
+ return 1
+ time_fail=1
++ expr 3 + 1
+ attempt=4
++ expr 4 '*' 2
+ num_sleeps=8
+ test 4 -le 6
++ gawk -v n=8 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.8
+ wait4lines_ 0.8 6
+ local delay=0.8
+ local elc=6
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 6 ']'
+ sleep 0.8
+ return 1
+ time_fail=1
++ expr 4 + 1
+ attempt=5
++ expr 8 '*' 2
+ num_sleeps=16
+ test 5 -le 6
++ gawk -v n=16 -v s=.1 'BEGIN { print s * n }'
+ local delay=1.6
+ wait4lines_ 1.6 6
+ local delay=1.6
+ local elc=6
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 6 ']'
+ sleep 1.6
+ return 1
+ time_fail=1
++ expr 5 + 1
+ attempt=6
++ expr 16 '*' 2
+ num_sleeps=32
+ test 6 -le 6
++ gawk -v n=32 -v s=.1 'BEGIN { print s * n }'
+ local delay=3.2
+ wait4lines_ 3.2 6
+ local delay=3.2
+ local elc=6
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 6 ']'
+ sleep 3.2
+ return 1
+ time_fail=1
++ expr 6 + 1
+ attempt=7
++ expr 32 '*' 2
+ num_sleeps=64
+ test 7 -le 6
+ test 1 = 0
+ cat out
tail: warning: --retry only effective for the initial open
tail: cannot open 'missing' for reading: No such file or directory
'missing' has appeared;  following new file
X1
tail: missing: file truncated
X
+ fail=1
+ cleanup_
+ kill 1915
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 = 6 ']'
+ fail=1
+ cat out
tail: warning: --retry only effective for the initial open
tail: cannot open 'missing' for reading: No such file or directory
'missing' has appeared;  following new file
X1
tail: missing: file truncated
X
+ grep -F 'retry only effective for the initial open' out
grep: out: binary file matches
+ grep -F 'cannot open' out
grep: out: binary file matches
+ grep -F 'has appeared' out
grep: out: binary file matches
+ grep '^X1$' out
grep: out: binary file matches
+ grep -F 'file truncated' out
grep: out: binary file matches
+ grep '^X$' out
grep: out: binary file matches
+ rm -f missing out
+ pid=2253
+ retry_delay_ wait4lines_ .1 6 2
+ timeout 10 tail ---disable-inotify -s.1 --max-unchanged-stats=1 --follow=descriptor --retry missing
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 2
+ local delay=0.1
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 2 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ mkdir missing
+ retry_delay_ wait4lines_ .1 6 4
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 4
+ local delay=0.1
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 4 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 4
+ local delay=0.2
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 0.2
+ return 1
+ time_fail=1
++ expr 2 + 1
+ attempt=3
++ expr 2 '*' 2
+ num_sleeps=4
+ test 3 -le 6
++ gawk -v n=4 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.4
+ wait4lines_ 0.4 4
+ local delay=0.4
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 0.4
+ return 1
+ time_fail=1
++ expr 3 + 1
+ attempt=4
++ expr 4 '*' 2
+ num_sleeps=8
+ test 4 -le 6
++ gawk -v n=8 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.8
+ wait4lines_ 0.8 4
+ local delay=0.8
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 0.8
+ return 1
+ time_fail=1
++ expr 4 + 1
+ attempt=5
++ expr 8 '*' 2
+ num_sleeps=16
+ test 5 -le 6
++ gawk -v n=16 -v s=.1 'BEGIN { print s * n }'
+ local delay=1.6
+ wait4lines_ 1.6 4
+ local delay=1.6
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 1.6
+ return 1
+ time_fail=1
++ expr 5 + 1
+ attempt=6
++ expr 16 '*' 2
+ num_sleeps=32
+ test 6 -le 6
++ gawk -v n=32 -v s=.1 'BEGIN { print s * n }'
+ local delay=3.2
+ wait4lines_ 3.2 4
+ local delay=3.2
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 3.2
+ return 1
+ time_fail=1
++ expr 6 + 1
+ attempt=7
++ expr 32 '*' 2
+ num_sleeps=64
+ test 7 -le 6
+ test 1 = 0
+ cat out
tail: warning: --retry only effective for the initial open
tail: cannot open 'missing' for reading: No such file or directory
'missing' has been replaced with an untailable file; giving up on this name
tail: no files remaining
+ fail=1
+ wait 2253
+ rc=1
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 = 4 ']'
+ fail=1
+ cat out
tail: warning: --retry only effective for the initial open
tail: cannot open 'missing' for reading: No such file or directory
'missing' has been replaced with an untailable file; giving up on this name
tail: no files remaining
+ grep -F 'retry only effective for the initial open' out
grep: out: binary file matches
+ grep -F 'cannot open' out
grep: out: binary file matches
+ grep -F 'replaced with an untailable file' out
grep: out: binary file matches
+ grep -F 'no files remaining' out
grep: out: binary file matches
+ '[' 1 = 1 ']'
+ rm -fd missing out
+ touch existing
+ pid=2467
+ retry_delay_ wait4lines_ .1 6 2
+ tail ---disable-inotify -s.1 --max-unchanged-stats=1 --follow=descriptor missing existing
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 2
+ local delay=0.1
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 2 ']'
+ time_fail=0
+ break
+ test 0 = 0
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 = 2 ']'
+ grep -F 'cannot open' out
tail: cannot open 'missing' for reading: No such file or directory
+ echo Y
+ echo X
+ retry_delay_ wait4lines_ .1 6 3
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 3
+ local delay=0.1
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 3 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 3
+ local delay=0.2
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 3 -ge 3 ']'
+ time_fail=0
+ break
+ test 0 = 0
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 3 = 3 ']'
+ grep '^X$' out
X
+ grep '^Y$' out
+ cleanup_
+ kill 2467
+ wait 2467
+ rm -f missing out existing
+ returns_ 1 tail ---disable-inotify --follow=descriptor missing
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 = 2 ']'
+ grep -F 'cannot open' out
tail: cannot open 'missing' for reading: No such file or directory
+ grep -F 'no files remaining' out
tail: no files remaining
+ rm -f out
+ returns_ 1 tail ---disable-inotify --follow=name missing
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 = 2 ']'
+ grep -F 'cannot open' out
tail: cannot open 'missing' for reading: No such file or directory
+ grep -F 'no files remaining' out
tail: no files remaining
+ rm -f out
+ cat .
cat: .: Is a directory
+ mkdir untailable
+ pid=2513
+ retry_delay_ wait4lines_ .1 6 2
+ timeout 10 tail ---disable-inotify -s.1 --max-unchanged-stats=1 -F untailable
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 2
+ local delay=0.1
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 2 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ rmdir untailable
+ echo foo
+ retry_delay_ wait4lines_ .1 6 4
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 4
+ local delay=0.1
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 4 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 4
+ local delay=0.2
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 3 -ge 4 ']'
+ sleep 0.2
+ return 1
+ time_fail=1
++ expr 2 + 1
+ attempt=3
++ expr 2 '*' 2
+ num_sleeps=4
+ test 3 -le 6
++ gawk -v n=4 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.4
+ wait4lines_ 0.4 4
+ local delay=0.4
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 4 -ge 4 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ cleanup_
+ kill 2513
+ wait 2513
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 4 = 4 ']'
+ grep -F 'cannot follow' out
tail: untailable: cannot follow end of this type of file
+ grep -E 'become accessible|has appeared' out
tail: 'untailable' has become accessible
+ grep -F 'giving up' out
+ grep -F foo out
foo
+ rm -fd untailable out
+ Exit 1
+ set +e
+ exit 1
+ exit 1
+ remove_tmp_
+ __st=1
+ cleanup_
+ kill 2513
+ test '' = yes
+ cd /media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64
+ chmod -R u+rwx /media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/gt-retry.sh.uk1M
+ rm -rf /media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-sparc64/gt-retry.sh.uk1M
+ exit 1
FAIL tests/tail/retry.sh (exit status: 1)
FAIL: tests/tail/retry
======================

++ initial_cwd_=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64
+++ testdir_prefix_
+++ printf gt
++ pfx_=gt
+++ mktempd_ /media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64 gt-retry.sh.XXXX
+++ case $# in
+++ destdir_=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64
+++ template_=gt-retry.sh.XXXX
+++ MAX_TRIES_=4
+++ case $destdir_ in
+++ destdir_slash_=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/
+++ case $template_ in
++++ unset TMPDIR
+++ d=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/gt-retry.sh.cnk4
+++ case $d in
+++ :
+++ test -d /media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/gt-retry.sh.cnk4
++++ ls -dgo /media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/gt-retry.sh.cnk4
+++ perms='drwx------ 2 0 Mar 26 22:22 /media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/gt-retry.sh.cnk4'
+++ case $perms in
+++ :
+++ echo /media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/gt-retry.sh.cnk4
+++ return
++ test_dir_=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/gt-retry.sh.cnk4
++ cd /media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/gt-retry.sh.cnk4
++ case $srcdir in
++ srcdir=../..
++ builddir=..
++ export srcdir builddir
++ gl_init_sh_nl_='
'
++ IFS=' 	
'
++ for sig_ in 1 2 3 13 15
+++ expr 1 + 128
++ eval 'trap '\''Exit 129'\'' 1'
+++ trap 'Exit 129' 1
++ for sig_ in 1 2 3 13 15
+++ expr 2 + 128
++ eval 'trap '\''Exit 130'\'' 2'
+++ trap 'Exit 130' 2
++ for sig_ in 1 2 3 13 15
+++ expr 3 + 128
++ eval 'trap '\''Exit 131'\'' 3'
+++ trap 'Exit 131' 3
++ for sig_ in 1 2 3 13 15
+++ expr 13 + 128
++ eval 'trap '\''Exit 141'\'' 13'
+++ trap 'Exit 141' 13
++ for sig_ in 1 2 3 13 15
+++ expr 15 + 128
++ eval 'trap '\''Exit 143'\'' 15'
+++ trap 'Exit 143' 15
++ saved_IFS=' 	
'
++ IFS=:
++ new_PATH=
++ sep_=
++ for dir in $PATH
++ case "$dir" in
++ test -d /media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/src/.
++ new_PATH=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/src
++ sep_=:
++ for dir in $PATH
++ case "$dir" in
++ test -d /usr/local/sbin/.
++ new_PATH=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/src:/usr/local/sbin
++ sep_=:
++ for dir in $PATH
++ case "$dir" in
++ test -d /usr/local/bin/.
++ new_PATH=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/src:/usr/local/sbin:/usr/local/bin
++ sep_=:
++ for dir in $PATH
++ case "$dir" in
++ test -d /usr/sbin/.
++ new_PATH=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/src:/usr/local/sbin:/usr/local/bin:/usr/sbin
++ sep_=:
++ for dir in $PATH
++ case "$dir" in
++ test -d /usr/bin/.
++ new_PATH=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/src:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
++ sep_=:
++ for dir in $PATH
++ case "$dir" in
++ test -d /sbin/.
++ new_PATH=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/src:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin
++ sep_=:
++ for dir in $PATH
++ case "$dir" in
++ test -d /bin/.
++ new_PATH=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/src:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ sep_=:
++ for dir in $PATH
++ case "$dir" in
++ test -d /usr/lib/llvm/18/bin/.
++ new_PATH=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/src:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/llvm/18/bin
++ sep_=:
++ for dir in $PATH
++ case "$dir" in
++ test -d /usr/lib/llvm/17/bin/.
++ new_PATH=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/src:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/llvm/18/bin:/usr/lib/llvm/17/bin
++ sep_=:
++ IFS=' 	
'
++ PATH=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/src:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/llvm/18/bin:/usr/lib/llvm/17/bin
++ export PATH
++ trap remove_tmp_ EXIT
+ path_prepend_ ./src
+ test 1 '!=' 0
+ path_dir_=./src
+ case $path_dir_ in
+ abs_path_dir_=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/./src
+ case $abs_path_dir_ in
+ PATH=/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/./src:/media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/src:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/llvm/18/bin:/usr/lib/llvm/17/bin
+ create_exe_shims_ /media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/./src
+ case $EXEEXT in
+ return 0
+ shift
+ test 0 '!=' 0
+ export PATH
+ print_ver_ tail
+ require_built_ tail
+ skip_=no
+ for i in "$@"
+ case " $built_programs " in
+ test no = yes
+ test yes = yes
+ local i
+ for i in $*
+ env tail --version
tail (GNU coreutils) 9.4.185-541b02
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Paul Rubin, David MacKenzie, Ian Lance Taylor,
and Jim Meyering.
+ fastpoll='-s.1 --max-unchanged-stats=1'
+ touch file
+ tail --retry file
++ countlines_
++ wc -l
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
+ '[' 1 = 1 ']'
+ grep -F 'tail: warning: --retry ignored' out
tail: warning: --retry ignored; --retry is useful only when following
+ returns_ 1 tail --retry missing
++ countlines_
++ wc -l
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
+ '[' 2 = 2 ']'
+ grep -F 'tail: warning: --retry ignored' out
tail: warning: --retry ignored; --retry is useful only when following
+ for mode in '' '---disable-inotify'
+ pid=3971
+ retry_delay_ wait4lines_ .1 6 1
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
+ timeout 10 tail -s.1 --max-unchanged-stats=1 --follow=name --retry missing
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 1
+ local delay=0.1
+ local elc=1
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 0 -ge 1 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 1
+ local delay=0.2
+ local elc=1
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 1 -ge 1 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ echo X
+ retry_delay_ wait4lines_ .1 6 3
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 3
+ local delay=0.1
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 1 -ge 3 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 3
+ local delay=0.2
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 3 -ge 3 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ cleanup_
+ kill 3971
+ wait 3971
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 3 = 3 ']'
+ grep -F 'cannot open' out
tail: cannot open 'missing' for reading: No such file or directory
+ grep -F 'has appeared' out
tail: 'missing' has appeared;  following new file
+ grep '^X$' out
X
+ rm -f missing out
+ pid=4003
+ retry_delay_ wait4lines_ .1 6 2
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
+ timeout 10 tail -s.1 --max-unchanged-stats=1 --follow=descriptor --retry missing
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 2
+ local delay=0.1
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 2 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ echo X1
+ retry_delay_ wait4lines_ .1 6 4
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 4
+ local delay=0.1
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 4 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 4
+ local delay=0.2
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 4 -ge 4 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ echo X
+ retry_delay_ wait4lines_ .1 6 6
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 6
+ local delay=0.1
+ local elc=6
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 4 -ge 6 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 6
+ local delay=0.2
+ local elc=6
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 6 -ge 6 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ cleanup_
+ kill 4003
+ wait 4003
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 6 = 6 ']'
+ grep -F 'retry only effective for the initial open' out
tail: warning: --retry only effective for the initial open
+ grep -F 'cannot open' out
tail: cannot open 'missing' for reading: No such file or directory
+ grep -F 'has appeared' out
tail: 'missing' has appeared;  following new file
+ grep '^X1$' out
X1
+ grep -F 'file truncated' out
tail: missing: file truncated
+ grep '^X$' out
X
+ rm -f missing out
+ pid=4044
+ retry_delay_ wait4lines_ .1 6 2
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
+ timeout 10 tail -s.1 --max-unchanged-stats=1 --follow=descriptor --retry missing
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 2
+ local delay=0.1
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 2 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ mkdir missing
+ retry_delay_ wait4lines_ .1 6 4
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 4
+ local delay=0.1
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 4 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 4
+ local delay=0.2
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 4 -ge 4 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ wait 4044
+ rc=1
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 4 = 4 ']'
+ grep -F 'retry only effective for the initial open' out
tail: warning: --retry only effective for the initial open
+ grep -F 'cannot open' out
tail: cannot open 'missing' for reading: No such file or directory
+ grep -F 'replaced with an untailable file' out
tail: 'missing' has been replaced with an untailable file; giving up on this name
+ grep -F 'no files remaining' out
tail: no files remaining
+ '[' 1 = 1 ']'
+ rm -fd missing out
+ touch existing
+ pid=4073
+ retry_delay_ wait4lines_ .1 6 2
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
+ tail -s.1 --max-unchanged-stats=1 --follow=descriptor missing existing
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 2
+ local delay=0.1
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 2 ']'
+ time_fail=0
+ break
+ test 0 = 0
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 = 2 ']'
+ grep -F 'cannot open' out
tail: cannot open 'missing' for reading: No such file or directory
+ echo Y
+ echo X
+ retry_delay_ wait4lines_ .1 6 3
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 3
+ local delay=0.1
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 3 -ge 3 ']'
+ time_fail=0
+ break
+ test 0 = 0
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 3 = 3 ']'
+ grep '^X$' out
X
+ grep '^Y$' out
+ cleanup_
+ kill 4073
+ wait 4073
+ rm -f missing out existing
+ returns_ 1 tail --follow=descriptor missing
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 = 2 ']'
+ grep -F 'cannot open' out
tail: cannot open 'missing' for reading: No such file or directory
+ grep -F 'no files remaining' out
tail: no files remaining
+ rm -f out
+ returns_ 1 tail --follow=name missing
++ countlines_
++ wc -l
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
+ '[' 2 = 2 ']'
+ grep -F 'cannot open' out
tail: cannot open 'missing' for reading: No such file or directory
+ grep -F 'no files remaining' out
tail: no files remaining
+ rm -f out
+ cat .
cat: .: Is a directory
+ mkdir untailable
+ pid=4108
+ retry_delay_ wait4lines_ .1 6 2
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
+ timeout 10 tail -s.1 --max-unchanged-stats=1 -F untailable
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 2
+ local delay=0.1
+ local elc=2
++ countlines_
++ wc -l
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
+ '[' 2 -ge 2 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ rmdir untailable
+ echo foo
+ retry_delay_ wait4lines_ .1 6 4
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 4
+ local delay=0.1
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 4 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 4
+ local delay=0.2
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 3 -ge 4 ']'
+ sleep 0.2
+ return 1
+ time_fail=1
++ expr 2 + 1
+ attempt=3
++ expr 2 '*' 2
+ num_sleeps=4
+ test 3 -le 6
++ gawk -v n=4 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.4
+ wait4lines_ 0.4 4
+ local delay=0.4
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 4 -ge 4 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ cleanup_
+ kill 4108
+ wait 4108
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 4 = 4 ']'
+ grep -F 'cannot follow' out
tail: untailable: cannot follow end of this type of file
+ grep -E 'become accessible|has appeared' out
tail: 'untailable' has become accessible
+ grep -F 'giving up' out
+ grep -F foo out
foo
+ rm -fd untailable out
+ for mode in '' '---disable-inotify'
+ pid=4142
+ timeout 10 tail ---disable-inotify -s.1 --max-unchanged-stats=1 --follow=name --retry missing
+ retry_delay_ wait4lines_ .1 6 1
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 1
+ local delay=0.1
+ local elc=1
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 0 -ge 1 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 1
+ local delay=0.2
+ local elc=1
++ countlines_
++ wc -l
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
+ '[' 1 -ge 1 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ echo X
+ retry_delay_ wait4lines_ .1 6 3
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 3
+ local delay=0.1
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 1 -ge 3 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 3
+ local delay=0.2
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 3 -ge 3 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ cleanup_
+ kill 4142
+ wait 4142
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 3 = 3 ']'
+ grep -F 'cannot open' out
tail: cannot open 'missing' for reading: No such file or directory
+ grep -F 'has appeared' out
tail: 'missing' has appeared;  following new file
+ grep '^X$' out
X
+ rm -f missing out
+ pid=4182
+ retry_delay_ wait4lines_ .1 6 2
+ timeout 10 tail ---disable-inotify -s.1 --max-unchanged-stats=1 --follow=descriptor --retry missing
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 2
+ local delay=0.1
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 1 -ge 2 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 2
+ local delay=0.2
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 2 ']'
+ sleep 0.2
+ return 1
+ time_fail=1
++ expr 2 + 1
+ attempt=3
++ expr 2 '*' 2
+ num_sleeps=4
+ test 3 -le 6
++ gawk -v n=4 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.4
+ wait4lines_ 0.4 2
+ local delay=0.4
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 2 ']'
+ sleep 0.4
+ return 1
+ time_fail=1
++ expr 3 + 1
+ attempt=4
++ expr 4 '*' 2
+ num_sleeps=8
+ test 4 -le 6
++ gawk -v n=8 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.8
+ wait4lines_ 0.8 2
+ local delay=0.8
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 2 ']'
+ sleep 0.8
+ return 1
+ time_fail=1
++ expr 4 + 1
+ attempt=5
++ expr 8 '*' 2
+ num_sleeps=16
+ test 5 -le 6
++ gawk -v n=16 -v s=.1 'BEGIN { print s * n }'
+ local delay=1.6
+ wait4lines_ 1.6 2
+ local delay=1.6
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 2 ']'
+ sleep 1.6
+ return 1
+ time_fail=1
++ expr 5 + 1
+ attempt=6
++ expr 16 '*' 2
+ num_sleeps=32
+ test 6 -le 6
++ gawk -v n=32 -v s=.1 'BEGIN { print s * n }'
+ local delay=3.2
+ wait4lines_ 3.2 2
+ local delay=3.2
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 2 ']'
+ sleep 3.2
+ return 1
+ time_fail=1
++ expr 6 + 1
+ attempt=7
++ expr 32 '*' 2
+ num_sleeps=64
+ test 7 -le 6
+ test 1 = 0
+ cat out
tail: warning: --retry only effective for the initial open
cannot open 'missing' for reading: No such file or directory
+ fail=1
+ echo X1
+ retry_delay_ wait4lines_ .1 6 4
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 4
+ local delay=0.1
+ local elc=4
++ countlines_
++ wc -l
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 4
+ local delay=0.2
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 0.2
+ return 1
+ time_fail=1
++ expr 2 + 1
+ attempt=3
++ expr 2 '*' 2
+ num_sleeps=4
+ test 3 -le 6
++ gawk -v n=4 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.4
+ wait4lines_ 0.4 4
+ local delay=0.4
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 0.4
+ return 1
+ time_fail=1
++ expr 3 + 1
+ attempt=4
++ expr 4 '*' 2
+ num_sleeps=8
+ test 4 -le 6
++ gawk -v n=8 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.8
+ wait4lines_ 0.8 4
+ local delay=0.8
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 0.8
+ return 1
+ time_fail=1
++ expr 4 + 1
+ attempt=5
++ expr 8 '*' 2
+ num_sleeps=16
+ test 5 -le 6
++ gawk -v n=16 -v s=.1 'BEGIN { print s * n }'
+ local delay=1.6
+ wait4lines_ 1.6 4
+ local delay=1.6
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 1.6
+ return 1
+ time_fail=1
++ expr 5 + 1
+ attempt=6
++ expr 16 '*' 2
+ num_sleeps=32
+ test 6 -le 6
++ gawk -v n=32 -v s=.1 'BEGIN { print s * n }'
+ local delay=3.2
+ wait4lines_ 3.2 4
+ local delay=3.2
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 4 ']'
+ sleep 3.2
+ return 1
+ time_fail=1
++ expr 6 + 1
+ attempt=7
++ expr 32 '*' 2
+ num_sleeps=64
+ test 7 -le 6
+ test 1 = 0
+ cat out
tail: warning: --retry only effective for the initial open
cannot open 'missing' for reading: No such file or directory
tail: 'missing' has appeared;  following new file
X1
+ fail=1
+ echo X
+ retry_delay_ wait4lines_ .1 6 6
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 6
+ local delay=0.1
+ local elc=6
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 6 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 6
+ local delay=0.2
+ local elc=6
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 6 ']'
+ sleep 0.2
+ return 1
+ time_fail=1
++ expr 2 + 1
+ attempt=3
++ expr 2 '*' 2
+ num_sleeps=4
+ test 3 -le 6
++ gawk -v n=4 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.4
+ wait4lines_ 0.4 6
+ local delay=0.4
+ local elc=6
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 6 ']'
+ sleep 0.4
+ return 1
+ time_fail=1
++ expr 3 + 1
+ attempt=4
++ expr 4 '*' 2
+ num_sleeps=8
+ test 4 -le 6
++ gawk -v n=8 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.8
+ wait4lines_ 0.8 6
+ local delay=0.8
+ local elc=6
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 6 ']'
+ sleep 0.8
+ return 1
+ time_fail=1
++ expr 4 + 1
+ attempt=5
++ expr 8 '*' 2
+ num_sleeps=16
+ test 5 -le 6
++ gawk -v n=16 -v s=.1 'BEGIN { print s * n }'
+ local delay=1.6
+ wait4lines_ 1.6 6
+ local delay=1.6
+ local elc=6
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 6 ']'
+ sleep 1.6
+ return 1
+ time_fail=1
++ expr 5 + 1
+ attempt=6
++ expr 16 '*' 2
+ num_sleeps=32
+ test 6 -le 6
++ gawk -v n=32 -v s=.1 'BEGIN { print s * n }'
+ local delay=3.2
+ wait4lines_ 3.2 6
+ local delay=3.2
+ local elc=6
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 -ge 6 ']'
+ sleep 3.2
+ return 1
+ time_fail=1
++ expr 6 + 1
+ attempt=7
++ expr 32 '*' 2
+ num_sleeps=64
+ test 7 -le 6
+ test 1 = 0
+ cat out
tail: warning: --retry only effective for the initial open
cannot open 'missing' for reading: No such file or directory
tail: 'missing' has appeared;  following new file
X1
+ fail=1
+ cleanup_
+ kill 4182
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
grep: out: binary file matches
+ '[' 0 = 6 ']'
+ fail=1
+ cat out
tail: warning: --retry only effective for the initial open
cannot open 'missing' for reading: No such file or directory
tail: 'missing' has appeared;  following new file
X1
+ grep -F 'retry only effective for the initial open' out
grep: out: binary file matches
+ grep -F 'cannot open' out
grep: out: binary file matches
+ grep -F 'has appeared' out
grep: out: binary file matches
+ grep '^X1$' out
grep: out: binary file matches
+ grep -F 'file truncated' out
+ fail=1
+ cat out
tail: warning: --retry only effective for the initial open
cannot open 'missing' for reading: No such file or directory
tail: 'missing' has appeared;  following new file
X1
+ grep '^X$' out
+ fail=1
+ cat out
tail: warning: --retry only effective for the initial open
cannot open 'missing' for reading: No such file or directory
tail: 'missing' has appeared;  following new file
X1
+ rm -f missing out
+ pid=4330
+ retry_delay_ wait4lines_ .1 6 2
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
+ timeout 10 tail ---disable-inotify -s.1 --max-unchanged-stats=1 --follow=descriptor --retry missing
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 2
+ local delay=0.1
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 2 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ mkdir missing
+ retry_delay_ wait4lines_ .1 6 4
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 4
+ local delay=0.1
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 4 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 4
+ local delay=0.2
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 4 -ge 4 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ wait 4330
+ rc=1
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 4 = 4 ']'
+ grep -F 'retry only effective for the initial open' out
tail: warning: --retry only effective for the initial open
+ grep -F 'cannot open' out
tail: cannot open 'missing' for reading: No such file or directory
+ grep -F 'replaced with an untailable file' out
tail: 'missing' has been replaced with an untailable file; giving up on this name
+ grep -F 'no files remaining' out
tail: no files remaining
+ '[' 1 = 1 ']'
+ rm -fd missing out
+ touch existing
+ pid=4357
+ retry_delay_ wait4lines_ .1 6 2
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
+ tail ---disable-inotify -s.1 --max-unchanged-stats=1 --follow=descriptor missing existing
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 2
+ local delay=0.1
+ local elc=2
++ countlines_
++ wc -l
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
+ '[' 2 -ge 2 ']'
+ time_fail=0
+ break
+ test 0 = 0
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 = 2 ']'
+ grep -F 'cannot open' out
tail: cannot open 'missing' for reading: No such file or directory
+ echo Y
+ echo X
+ retry_delay_ wait4lines_ .1 6 3
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 3
+ local delay=0.1
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 3 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 3
+ local delay=0.2
+ local elc=3
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 3 -ge 3 ']'
+ time_fail=0
+ break
+ test 0 = 0
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 3 = 3 ']'
+ grep '^X$' out
X
+ grep '^Y$' out
+ cleanup_
+ kill 4357
+ wait 4357
+ rm -f missing out existing
+ returns_ 1 tail ---disable-inotify --follow=descriptor missing
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 = 2 ']'
+ grep -F 'cannot open' out
tail: cannot open 'missing' for reading: No such file or directory
+ grep -F 'no files remaining' out
tail: no files remaining
+ rm -f out
+ returns_ 1 tail ---disable-inotify --follow=name missing
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 = 2 ']'
+ grep -F 'cannot open' out
tail: cannot open 'missing' for reading: No such file or directory
+ grep -F 'no files remaining' out
tail: no files remaining
+ rm -f out
+ cat .
cat: .: Is a directory
+ mkdir untailable
+ pid=4405
+ retry_delay_ wait4lines_ .1 6 2
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
+ timeout 10 tail ---disable-inotify -s.1 --max-unchanged-stats=1 -F untailable
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 2
+ local delay=0.1
+ local elc=2
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 2 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ rmdir untailable
+ echo foo
+ retry_delay_ wait4lines_ .1 6 4
+ local test_func=wait4lines_
+ local init_delay=.1
+ local max_n_tries=6
+ shift 3
+ local attempt=1
+ local num_sleeps=1
+ local time_fail
+ test 1 -le 6
++ gawk -v n=1 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.1
+ wait4lines_ 0.1 4
+ local delay=0.1
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 2 -ge 4 ']'
+ sleep 0.1
+ return 1
+ time_fail=1
++ expr 1 + 1
+ attempt=2
++ expr 1 '*' 2
+ num_sleeps=2
+ test 2 -le 6
++ gawk -v n=2 -v s=.1 'BEGIN { print s * n }'
+ local delay=0.2
+ wait4lines_ 0.2 4
+ local delay=0.2
+ local elc=4
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 4 -ge 4 ']'
+ time_fail=0
+ break
+ test 0 = 0
+ cleanup_
+ kill 4405
+ wait 4405
++ countlines_
++ grep -Ev 'inotify (resources exhausted|cannot be used)' out
++ wc -l
+ '[' 4 = 4 ']'
+ grep -F 'cannot follow' out
tail: untailable: cannot follow end of this type of file
+ grep -E 'become accessible|has appeared' out
tail: 'untailable' has become accessible
+ grep -F 'giving up' out
+ grep -F foo out
foo
+ rm -fd untailable out
+ Exit 1
+ set +e
+ exit 1
+ exit 1
+ remove_tmp_
+ __st=1
+ cleanup_
+ kill 4405
+ test '' = yes
+ cd /media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64
+ chmod -R u+rwx /media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/gt-retry.sh.cnk4
+ rm -rf /media/guest-homedirs/haible/coreutils-9.4.185-541b02/build-riscv64/gt-retry.sh.cnk4
+ exit 1
FAIL tests/tail/retry.sh (exit status: 1)

Reply via email to