]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Replace the obsolescent fgrep with grep -F in tests. 968/head
authorYorgos Thessalonikefs <yorgos@nlnetlabs.nl>
Fri, 24 Nov 2023 14:51:17 +0000 (15:51 +0100)
committerYorgos Thessalonikefs <yorgos@nlnetlabs.nl>
Fri, 24 Nov 2023 14:51:17 +0000 (15:51 +0100)
testdata/01-doc.tdir/01-doc.test
testdata/common.sh
testdata/fwd_ancil.tdir/fwd_ancil.post
testdata/fwd_ancil.tdir/fwd_ancil.pre
testdata/fwd_ancil.tdir/fwd_ancil.test
testdata/fwd_oneport.tdir/fwd_oneport.post
testdata/fwd_three.tdir/fwd_three.post
testdata/fwd_three_service.tdir/fwd_three_service.post
testdata/fwd_udptmout.tdir/fwd_udptmout.post
testdata/fwd_waitudp.tdir/fwd_waitudp.post

index 484b0be42e43ce8cdfea63f90002a09674792b0a..904672bd02de93ab25d99cecd783dcb519f47736 100644 (file)
@@ -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."
index b0e66f8dfa7f12806ff084ab966f0a1208b52a48..8c0ba0d8d50f239376d6ae4ec108708be9e9b8ab 100644 (file)
@@ -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
index c11bd44cd8a06205fe6fc45a48ad8a91bbb01e66..6bb5f2ecc6fb8c961d7a0359bb8ef8ba400208c9 100644 (file)
@@ -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
index 6c0fb7a0b23486f8370a0b3873239c2f72795e82..ceede1afed99e51b2375c286daf736b519e9caf8 100644 (file)
@@ -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
 
index 8da4754ce0ac5549bbf800e0a86fd20677379c04..b5d063aa0184019304cbad8755c6d0b7595dc83d 100644 (file)
@@ -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
index 8aafab7ca9bda36e86cf384e049f26730595e7e9..11c96dbae68319fa16515bef67c8add788b8479b 100644 (file)
@@ -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
index 7b2971d625f647e51bd99dacf2c1b36140a2b692..00a92103cc6259214f405aafa9d8c578783f805a 100644 (file)
@@ -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
index 1d7a8daaebe048f8edb1563dafe71d54b9df08c4..d4dec9bcd56659bebfb6bd901aca7631900ce0da 100644 (file)
@@ -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
index f2138b9ec8acf1566d0995a3183cfb05b472187f..b8d3cc8a308c00282fac10600a00abdd0b91e3b5 100644 (file)
@@ -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
index fedf97a41641740d675813f55ed83a711e5bde1c..384418c56f10dd22da0cdea09dd1a7d095d9188b 100644 (file)
@@ -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