]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[rt42931] Use / instead of kill/diff in system tests
authorWitold Krecicki <wpk@isc.org>
Mon, 5 Sep 2016 19:23:30 +0000 (19:23 +0000)
committerWitold Krecicki <wpk@isc.org>
Mon, 5 Sep 2016 19:23:46 +0000 (19:23 +0000)
bin/tests/system/dnssec/tests.sh
bin/tests/system/masterfile/tests.sh
bin/tests/system/metadata/tests.sh
bin/tests/system/notify/tests.sh
bin/tests/system/nsupdate/tests.sh
bin/tests/system/rpz/tests.sh
bin/tests/system/rpzrecurse/tests.sh
bin/tests/system/rrl/tests.sh
bin/tests/system/runtime/tests.sh
bin/tests/system/xfer/tests.sh
bin/tests/system/xferquota/tests.sh

index 437246a0fc1e45d4eee5b5c9554c2e9b5d2d55af..90080e9b8e7f18dd8930f1b3f691664fbe1439d9 100644 (file)
@@ -1852,7 +1852,7 @@ ret=0
 
 echo "I:killing ns4 with SIGTERM"
 cd ns4
-kill -TERM `cat named.pid`
+$KILL -TERM `cat named.pid`
 rm -f named.pid
 cd ..
 
@@ -1915,7 +1915,7 @@ grep "flags:[^;]* ad[^;]*;" dig.out.ns4.test$n.2 > /dev/null || ret=1
 
 echo "I:killing ns4 with SIGTERM"
 cd ns4
-kill -TERM `cat named.pid`
+$KILL -TERM `cat named.pid`
 rm -f named.pid
 cd ..
 
@@ -1974,7 +1974,7 @@ grep "flags:[^;]* ad[^;]*;" dig.out.ns4.test$n.2 > /dev/null || ret=1
 
 echo "I:killing ns4 with SIGTERM"
 cd ns4
-kill -TERM `cat named.pid`
+$KILL -TERM `cat named.pid`
 rm -f named.pid
 cd ..
 
@@ -2023,7 +2023,7 @@ echo "I: testing loading out of bounds lifetime from NTA file ($n)"
 
 echo "I:killing ns4 with SIGTERM"
 cd ns4
-kill -TERM `cat named.pid`
+$KILL -TERM `cat named.pid`
 rm -f named.pid
 cd ..
 
@@ -2990,7 +2990,7 @@ else
                 +trusted-key=ns3/trusted-future.key > dig.out.ns3.test$n &
        pid=$!
        sleep 1
-       kill -9 $pid 2> /dev/null
+       $KILL -9 $pid 2> /dev/null
        wait $pid
        grep ";; No DNSKEY is valid to check the RRSIG of the RRset: FAILED" dig.out.ns3.test$n > /dev/null || ret=1
        if [ $ret != 0 ]; then echo "I:failed"; fi
index e4687390c77cdfa65a9c24b695b4bc41b9e42492..f0bfc8eb7836f19582d1a1f74794781a182d85f0 100644 (file)
@@ -25,7 +25,7 @@ $DIG +nostats +nocmd ttl2. axfr @10.53.0.1 -p 5300 >>dig.out.$n
 echo "I:test of master file RFC1035 TTL and \$TTL semantics ($n)"
 $DIG +nostats +nocmd ttl2. axfr @10.53.0.1 -p 5300 >>dig.out.$n
 
-diff dig.out.$n knowngood.dig.out || status=1
+$DIFF dig.out.$n knowngood.dig.out || status=1
 if [ $ret != 0 ]; then echo "I:failed"; fi
 status=`expr $status + $ret`
 
@@ -49,7 +49,7 @@ ret=0
 n=`expr $n + 1`
 echo "I:test owner inheritence after "'$INCLUDE'" ($n)"
 $CHECKZONE -Dq example zone/inheritownerafterinclude.db > checkzone.out$n
-diff checkzone.out$n zone/inheritownerafterinclude.good || ret=1
+$DIFF checkzone.out$n zone/inheritownerafterinclude.good || ret=1
 if [ $ret != 0 ]; then echo "I:failed"; fi
 status=`expr $status + $ret`
 
index 370602eaca78ef7a419fc4bcb6b528eac6b1fe88..4bcbede4c906cd5663b8f2eebb42c93d14423f8b 100644 (file)
@@ -28,7 +28,7 @@ rolling=`sed 's/^K'${czone}'.+005+0*\([0-9]\)/\1/' < rolling.key`
 standby=`sed 's/^K'${czone}'.+005+0*\([0-9]\)/\1/' < standby.key`
 zsk=`sed 's/^K'${czone}'.+005+0*\([0-9]\)/\1/' < zsk.key`
 
-../../../tools/genrandom 400 $RANDFILE
+$GENRANDOM 400 $RANDFILE
 
 echo "I:signing zones"
 $SIGNER -Sg -o $czone $cfile > /dev/null 2>&1
@@ -142,8 +142,10 @@ ret=0
 chmod 644 `cat oldstyle.key`.private
 $SETTIME -P none `cat oldstyle.key` > tmp.out 2>&1 || ret=1
 grep "warning" tmp.out > /dev/null 2>&1 || ret=1
+cat tmp.out
 $SETTIME -P none `cat oldstyle.key` > tmp.out 2>&1 || ret=1
 grep "warning" tmp.out > /dev/null 2>&1 && ret=1
+cat tmp.out
 n=`expr $n + 1`
 if [ $ret != 0 ]; then echo "I:failed"; fi
 status=`expr $status + $ret`
index 0c9dd68306af2cd3d3c7d4c2367b28acd1d147a5..ae3410eb8c75986d114630b5fcd4076955d95f04 100644 (file)
@@ -62,7 +62,7 @@ echo "I:reloading with example2 using HUP and waiting up to 45 seconds"
 sleep 1 # make sure filesystem time stamp is newer for reload.
 rm -f ns2/example.db
 cp -f ns2/example2.db ns2/example.db
-kill -HUP `cat ns2/named.pid`
+$KILL -HUP `cat ns2/named.pid`
 try=0
 while test $try -lt 45
 do
index 672a292fde8e8b00ece7e5d5b2b417769aeba717..209427869a830928a1676cd2b82eee5e5b3fac6e 100755 (executable)
@@ -268,7 +268,7 @@ $PERL ../digcomp.pl dig.out.ns1 dig.out.ns2 || ret=1
 
 echo "I:SIGKILL and restart server ns1"
 cd ns1
-kill -KILL `cat named.pid`
+$KILL -KILL `cat named.pid`
 rm named.pid
 cd ..
 sleep 10
@@ -309,7 +309,7 @@ END
 sleep 5
 
 echo "I:SIGHUP slave"
-kill -HUP `cat ns2/named.pid`
+$KILL -HUP `cat ns2/named.pid`
 
 sleep 5
 
@@ -327,7 +327,7 @@ END
 sleep 5
 
 echo "I:SIGHUP slave again"
-kill -HUP `cat ns2/named.pid`
+$KILL -HUP `cat ns2/named.pid`
 
 sleep 5
 
index 8100623806faae92ca25ed7e855dc2379f9cfe32..2335a2bc0953ab4b6e9c95ee65f0126aa63898e0 100644 (file)
@@ -106,7 +106,7 @@ restart () {
            PID=`cat ns$1/named.pid 2>/dev/null`
            if test -n "$PID"; then
                echo "I:killing ns$1 server $PID"
-               kill -9 $PID
+               $KILL -9 $PID
            fi
        fi
     fi
index 9738c4175d983f6c9a9c99bc01f1bd42b4615dec..362fdde69d6a97c47f1fd2f13c0a5e43cdc51a64 100644 (file)
@@ -165,7 +165,7 @@ echo "I:running dig to cache CNAME record (${t})"
 $DIG $DIGOPTS @10.53.0.2 -p 5300 www.test.example.org CNAME > dig.out.${t}
 sleep 1
 echo "I:suspending authority server"
-kill -TSTP `cat ns1/named.pid`
+$KILL -TSTP `cat ns1/named.pid`
 echo "I:adding an NSDNAME policy"
 cp ns2/db.6a.00.policy.local ns2/saved.policy.local
 cp ns2/db.6b.00.policy.local ns2/db.6a.00.policy.local
@@ -180,7 +180,7 @@ cp ns2/db.6c.00.policy.local ns2/db.6a.00.policy.local
 $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 6a.00.policy.local 2>&1 | sed 's/^/I:ns2 /'
 sleep 1
 echo "I:resuming authority server"
-kill -CONT `cat ns1/named.pid`
+$KILL -CONT `cat ns1/named.pid`
 for n in 1 2 3 4 5 6 7 8 9; do
     sleep 1
     [ -s dig.out.${t} ] || continue
@@ -199,7 +199,7 @@ echo "I:running dig to cache CNAME record (${t})"
 $DIG $DIGOPTS @10.53.0.2 -p 5300 www.test.example.org CNAME > dig.out.${t}
 sleep 1
 echo "I:suspending authority server"
-kill -TSTP `cat ns1/named.pid`
+$KILL -TSTP `cat ns1/named.pid`
 echo "I:adding an NSDNAME policy"
 cp ns2/db.6b.00.policy.local ns2/db.6a.00.policy.local
 $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 6a.00.policy.local 2>&1 | sed 's/^/I:ns2 /'
@@ -213,7 +213,7 @@ cp ns2/named.default.conf ns2/named.conf
 $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reconfig 2>&1 | sed 's/^/I:ns2 /'
 sleep 1
 echo "I:resuming authority server"
-kill -CONT `cat ns1/named.pid`
+$KILL -CONT `cat ns1/named.pid`
 for n in 1 2 3 4 5 6 7 8 9; do
     sleep 1
     [ -s dig.out.${t} ] || continue
index b8455da9e538037b14b5856adf2ffc0d93a87526..0d55c95ceac755f49a4868f9d0a6586fcb036b99 100644 (file)
@@ -271,7 +271,7 @@ sleep 2
 grep "min-table-size 1" broken.out > /dev/null || setret "I: min-table-size 0 was not changed to 1"
 
 if [ -f named.pid ]; then
-    kill `cat named.pid`
+    $KILL `cat named.pid`
     setret "I: named should not have started, but did"
 fi
 
index ff402158c6244861fb92a44a5fce78d3a208731e..65982f504401ce20e01318e7688383fc2ff97660 100644 (file)
@@ -25,7 +25,7 @@ ret=0
 (cd ns2; $NAMED -c named-alt1.conf -D ns2-extra-1 -X other.lock -m record,size,mctx -d 99 -g -U 4 >> named2.run 2>&1 & )
 sleep 2
 grep "unable to listen on any configured interface" ns2/named2.run > /dev/null || ret=1
-[ -s ns2/named2.pid ] && kill -15 `cat ns2/named2.pid`
+[ -s ns2/named2.pid ] && $KILL -15 `cat ns2/named2.pid`
 if [ $ret != 0 ]; then echo "I:failed"; fi
 status=`expr $status + $ret`
 
@@ -35,7 +35,7 @@ ret=0
 (cd ns2; $NAMED -c named-alt2.conf -D ns2-extra-2 -X named.lock -m record,size,mctx -d 99 -g -U 4 >> named3.run 2>&1 & )
 sleep 2
 grep "another named process" ns2/named3.run > /dev/null || ret=1
-[ -s ns2/named3.pid ] && kill -15 `cat ns2/named3.pid`
+[ -s ns2/named3.pid ] && $KILL -15 `cat ns2/named3.pid`
 if [ $ret != 0 ]; then echo "I:failed"; fi
 status=`expr $status + $ret`
 
@@ -45,7 +45,7 @@ ret=0
 (cd ns2; $NAMED -c named-alt3.conf -D ns2-extra-3 -m record,size,mctx -d 99 -g -U 4 >> named4.run 2>&1 & )
 sleep 2
 grep "another named process" ns2/named4.run > /dev/null && ret=1
-[ -s ns2/named4.pid ] && kill -15 `cat ns2/named4.pid`
+[ -s ns2/named4.pid ] && $KILL -15 `cat ns2/named4.pid`
 if [ $ret != 0 ]; then echo "I:failed"; fi
 status=`expr $status + $ret`
 
index 81157f66c478b42ad109f81b1a25a2eff4b7dd28..bb3ae83ac4c1f28a50c3c4ef80b832e87091eec0 100644 (file)
@@ -386,6 +386,8 @@ echo "I:test smaller transfer TCP message size ($n)"
 $DIG $DIGOPTS example. @10.53.0.8 axfr -p 5300 \
        -y key1.:1234abcd8765 > dig.out.msgsize || status=1
 
+$DOS2UNIX dig.out.msgsize >/dev/null
+
 bytes=`wc -c < dig.out.msgsize`
 if [ $bytes -ne 459357 ]; then
        echo "I:failed axfr size check"
index 9a37c6ace3493aca2daffcf2a90ce7e90b93f841..88f5989ab7a4a487d3d82ccca89e36856e771cf8 100644 (file)
@@ -21,7 +21,7 @@ while [ $count != 300 ]; do
         if [ $ticks = 1 ]; then
                echo "I:Changing test zone..."
                cp -f ns1/changing2.db ns1/changing.db
-               kill -HUP `cat ns1/named.pid`
+               $KILL -HUP `cat ns1/named.pid`
        fi
        sleep 1
        ticks=`expr $ticks + 1`