diff --git a/doc/Changelog b/doc/Changelog index 1bde6ebbb..dc82542be 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +27 November 2023: Yorgos + - Merge #968: Replace the obsolescent fgrep with grep -F in tests. + 27 November 2023: Wouter - Fix #964: config.h.in~ backup file in release tar balls. diff --git a/testdata/01-doc.tdir/01-doc.test b/testdata/01-doc.tdir/01-doc.test index 484b0be42..904672bd0 100644 --- a/testdata/01-doc.tdir/01-doc.test +++ b/testdata/01-doc.tdir/01-doc.test @@ -24,21 +24,21 @@ fi (cd $PRE; find . -name "*.h" -print) >hlist (cd $PRE; find . -name "*.c" -print) >>hlist # filter out config.h -fgrep -v -e "config.h" hlist > ilist; mv ilist hlist -fgrep -v -e "util/configparser" hlist > ilist; mv ilist hlist -fgrep -v -e "util/configlexer" hlist > ilist; mv ilist hlist -fgrep -v -e "util/configyyrename" hlist > ilist; mv ilist hlist -fgrep -v -e "util/locks.h" hlist > ilist; mv ilist hlist -fgrep -v -e "util/storage/lookup3.c" hlist > ilist; mv ilist hlist -fgrep -v -e "ldns-src/" hlist > ilist; mv ilist hlist -fgrep -v -e "libunbound/python/libunbound_wrap.c" hlist > ilist; mv ilist hlist -fgrep -v -e "pythonmod/interface.h" hlist > ilist; mv ilist hlist -fgrep -v -e "dnstap" hlist > ilist; mv ilist hlist -fgrep -v -e "util/siphash.c" hlist > ilist; mv ilist hlist +grep -F -v -e "config.h" hlist > ilist; mv ilist hlist +grep -F -v -e "util/configparser" hlist > ilist; mv ilist hlist +grep -F -v -e "util/configlexer" hlist > ilist; mv ilist hlist +grep -F -v -e "util/configyyrename" hlist > ilist; mv ilist hlist +grep -F -v -e "util/locks.h" hlist > ilist; mv ilist hlist +grep -F -v -e "util/storage/lookup3.c" hlist > ilist; mv ilist hlist +grep -F -v -e "ldns-src/" hlist > ilist; mv ilist hlist +grep -F -v -e "libunbound/python/libunbound_wrap.c" hlist > ilist; mv ilist hlist +grep -F -v -e "pythonmod/interface.h" hlist > ilist; mv ilist hlist +grep -F -v -e "dnstap" hlist > ilist; mv ilist hlist +grep -F -v -e "util/siphash.c" hlist > ilist; mv ilist hlist # filter out compat -fgrep -v -e "compat/" hlist > ilist; mv ilist hlist +grep -F -v -e "compat/" hlist > ilist; mv ilist hlist for h in `cat hlist`; do - if fgrep "`basename $h`" $PRE/doc/html/files.html >/dev/null; then + if grep -F "`basename $h`" $PRE/doc/html/files.html >/dev/null; then : # ok else echo "Warning: $h has no documentation." diff --git a/testdata/common.sh b/testdata/common.sh index b0e66f8df..8c0ba0d8d 100644 --- a/testdata/common.sh +++ b/testdata/common.sh @@ -169,7 +169,7 @@ wait_server_up () { local WAIT_THRES=30 local try for (( try=0 ; try <= $MAX_UP_TRY ; try++ )) ; do - if test -f $1 && fgrep "$2" $1 >/dev/null; then + if test -f $1 && grep -F "$2" $1 >/dev/null; then #echo "done on try $try" break; fi @@ -220,11 +220,11 @@ wait_server_up_or_fail () { local WAIT_THRES=30 local try for (( try=0 ; try <= $MAX_UP_TRY ; try++ )) ; do - if test -f $1 && fgrep "$2" $1 >/dev/null; then + if test -f $1 && grep -F "$2" $1 >/dev/null; then echo "done on try $try" break; fi - if test -f $1 && fgrep "$3" $1 >/dev/null; then + if test -f $1 && grep -F "$3" $1 >/dev/null; then echo "failed on try $try" break; fi diff --git a/testdata/fwd_ancil.tdir/fwd_ancil.post b/testdata/fwd_ancil.tdir/fwd_ancil.post index c11bd44cd..6bb5f2ecc 100644 --- a/testdata/fwd_ancil.tdir/fwd_ancil.post +++ b/testdata/fwd_ancil.tdir/fwd_ancil.post @@ -7,10 +7,10 @@ # do your teardown here . ../common.sh kill_pid $FWD_PID -if fgrep "service stopped" unbound.log; then +if grep -F "service stopped" unbound.log; then exit 0 fi -if fgrep "disable interface-automatic" unbound.log; then +if grep -F "disable interface-automatic" unbound.log; then echo "skip test" exit 0 fi diff --git a/testdata/fwd_ancil.tdir/fwd_ancil.pre b/testdata/fwd_ancil.tdir/fwd_ancil.pre index 6c0fb7a0b..ceede1afe 100644 --- a/testdata/fwd_ancil.tdir/fwd_ancil.pre +++ b/testdata/fwd_ancil.tdir/fwd_ancil.pre @@ -36,7 +36,7 @@ wait_ldns_testns_up fwd.log # wait for unbound to come up # string 'Start of service' in log. wait_server_up_or_fail unbound.log "start of service" "disable interface-automatic" -if fgrep "disable interface-automatic" unbound.log; then +if grep -F "disable interface-automatic" unbound.log; then skip_test "skip test" fi diff --git a/testdata/fwd_ancil.tdir/fwd_ancil.test b/testdata/fwd_ancil.tdir/fwd_ancil.test index 8da4754ce..b5d063aa0 100644 --- a/testdata/fwd_ancil.tdir/fwd_ancil.test +++ b/testdata/fwd_ancil.tdir/fwd_ancil.test @@ -7,7 +7,7 @@ PRE="../.." . ../common.sh -if fgrep "disable interface-automatic" unbound.log; then +if grep -F "disable interface-automatic" unbound.log; then echo "skip test" exit 0 fi diff --git a/testdata/fwd_oneport.tdir/fwd_oneport.post b/testdata/fwd_oneport.tdir/fwd_oneport.post index 8aafab7ca..11c96dbae 100644 --- a/testdata/fwd_oneport.tdir/fwd_oneport.post +++ b/testdata/fwd_oneport.tdir/fwd_oneport.post @@ -9,7 +9,7 @@ kill_pid $FWD_PID # find all extra forked testns and kill them. -pidlist=`fgrep "forked pid:" fwd.log | sed -e 's/forked pid: //'` +pidlist=`grep -F "forked pid:" fwd.log | sed -e 's/forked pid: //'` for p in $pidlist; do kill_pid $p done diff --git a/testdata/fwd_three.tdir/fwd_three.post b/testdata/fwd_three.tdir/fwd_three.post index 7b2971d62..00a92103c 100644 --- a/testdata/fwd_three.tdir/fwd_three.post +++ b/testdata/fwd_three.tdir/fwd_three.post @@ -11,7 +11,7 @@ kill_pid $FWD_PID # find all extra forked testns and kill them. -pidlist=`fgrep "forked pid:" fwd.log | sed -e 's/forked pid: //'` +pidlist=`grep -F "forked pid:" fwd.log | sed -e 's/forked pid: //'` for p in $pidlist; do kill_pid $p done diff --git a/testdata/fwd_three_service.tdir/fwd_three_service.post b/testdata/fwd_three_service.tdir/fwd_three_service.post index 1d7a8daae..d4dec9bcd 100644 --- a/testdata/fwd_three_service.tdir/fwd_three_service.post +++ b/testdata/fwd_three_service.tdir/fwd_three_service.post @@ -11,7 +11,7 @@ kill_pid $FWD_PID # find all extra forked testns and kill them. -pidlist=`fgrep "forked pid:" fwd.log | sed -e 's/forked pid: //'` +pidlist=`grep -F "forked pid:" fwd.log | sed -e 's/forked pid: //'` for p in $pidlist; do kill_pid $p done diff --git a/testdata/fwd_udptmout.tdir/fwd_udptmout.post b/testdata/fwd_udptmout.tdir/fwd_udptmout.post index f2138b9ec..b8d3cc8a3 100644 --- a/testdata/fwd_udptmout.tdir/fwd_udptmout.post +++ b/testdata/fwd_udptmout.tdir/fwd_udptmout.post @@ -10,7 +10,7 @@ kill_pid $FWD_PID # find all extra forked testns and kill them. -pidlist=`fgrep "forked pid:" fwd.log | sed -e 's/forked pid: //'` +pidlist=`grep -F "forked pid:" fwd.log | sed -e 's/forked pid: //'` for p in $pidlist; do kill_pid $p done diff --git a/testdata/fwd_waitudp.tdir/fwd_waitudp.post b/testdata/fwd_waitudp.tdir/fwd_waitudp.post index fedf97a41..384418c56 100644 --- a/testdata/fwd_waitudp.tdir/fwd_waitudp.post +++ b/testdata/fwd_waitudp.tdir/fwd_waitudp.post @@ -11,7 +11,7 @@ kill_pid $FWD_PID # find all extra forked testns and kill them. -pidlist=`fgrep "forked pid:" fwd.log | sed -e 's/forked pid: //'` +pidlist=`grep -F "forked pid:" fwd.log | sed -e 's/forked pid: //'` for p in $pidlist; do kill_pid $p done