]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Make calls to the stop.pl always use the test name instead of '.'
authorOndřej Surý <ondrej@sury.org>
Mon, 3 Dec 2018 12:14:32 +0000 (13:14 +0100)
committerOndřej Surý <ondrej@sury.org>
Mon, 3 Dec 2018 19:39:14 +0000 (20:39 +0100)
(cherry picked from commit e227815af51c0656e22e5aebfe99e2399106b31c)
(cherry picked from commit 73e26ec1d66fc1bbc0b0aae9002a81ff6c05f971)

17 files changed:
bin/tests/system/addzone/tests.sh
bin/tests/system/forward/tests.sh
bin/tests/system/inline/tests.sh
bin/tests/system/legacy/tests.sh
bin/tests/system/logfileconfig/tests.sh
bin/tests/system/lwresd/tests.sh
bin/tests/system/mkeys/tests.sh
bin/tests/system/notify/tests.sh
bin/tests/system/nsupdate/tests.sh
bin/tests/system/nzd2nzf/tests.sh
bin/tests/system/rpz/tests.sh
bin/tests/system/rpzrecurse/tests.sh
bin/tests/system/sfcache/tests.sh
bin/tests/system/stop.sh [changed mode: 0644->0755]
bin/tests/system/stub/tests.sh
bin/tests/system/unknown/tests.sh
bin/tests/system/xfer/tests.sh

index be7c9a2806a08838f30db25d119486fdec145754..1592dd0137ddfe97bebfcb28a1bb5881ab2a3b3d 100755 (executable)
@@ -527,7 +527,7 @@ echo_i "check that named restarts with multiple added zones ($n)"
 ret=0
 $RNDCCMD 10.53.0.3 addzone "test4.baz" '{ type master; file "e.db"; };' > /dev/null 2>&1 || ret=1
 $RNDCCMD 10.53.0.3 addzone "test5.baz" '{ type master; file "e.db"; };' > /dev/null 2>&1 || ret=1
-$PERL $SYSTEMTESTTOP/stop.pl . ns3
+$PERL $SYSTEMTESTTOP/stop.pl addzone ns3
 $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} addzone ns3 || ret=1
 $DIG $DIGOPTS @10.53.0.3 version.bind txt ch > dig.out.test$n || ret=1
 grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
index abb3fd56284b99eaecf2ab81856b0886b7674dec..aa80f189e6a82c572532e3333c28e2ff20f6edfa 100644 (file)
@@ -88,7 +88,7 @@ echo_i "checking for negative caching of forwarder response"
 ret=0
 $DIG $DIGOPTS nonexist. txt @10.53.0.5 > dig.out.f2 || ret=1
 grep "status: NXDOMAIN" dig.out.f2 > /dev/null || ret=1
-$PERL ../stop.pl . ns4 || ret=1
+$PERL ../stop.pl forward ns4 || ret=1
 $DIG $DIGOPTS nonexist. txt @10.53.0.5 > dig.out.f2 || ret=1
 grep "status: NXDOMAIN" dig.out.f2 > /dev/null || ret=1
 $PERL ../start.pl --restart --noclean --port ${PORT} forward ns4 || ret=1
index 50900f472453e8bf3a556bf92fd8912614bc5c22..1c51996c23f283a5ab484ed68f6c868c5363e28d 100755 (executable)
@@ -455,7 +455,7 @@ status=`expr $status + $ret`
 n=`expr $n + 1`
 echo_i "stop bump in the wire signer server ($n)"
 ret=0
-$PERL ../stop.pl . ns3 || ret=1
+$PERL ../stop.pl inline ns3 || ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
@@ -870,7 +870,7 @@ status=`expr $status + $ret`
 n=`expr $n + 1`
 echo_i "stop bump in the wire signer server ($n)"
 ret=0
-$PERL ../stop.pl . ns3 || ret=1
+$PERL ../stop.pl inline ns3 || ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
@@ -1328,7 +1328,7 @@ done
 if [ $ans != 0 ]; then ret=1; fi
 # Halt rather than stopping the server to prevent the master file from being
 # flushed upon shutdown since we specifically want to avoid it.
-$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --halt --port ${CONTROLPORT} . ns3
+$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --halt --port ${CONTROLPORT} inline ns3
 ensure_sigs_only_in_journal delayedkeys ns3/delayedkeys.db.signed
 $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} inline ns3
 # At this point, the raw zone journal will not have a source serial set.  Upon
@@ -1337,7 +1337,7 @@ $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} inline ns3
 # return delayedkeys/SOA as the next node to resign, so we restart the server
 # once again; with the raw zone journal now having a source serial set,
 # receive_secure_serial() should refrain from introducing any zone changes.
-$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --halt --port ${CONTROLPORT} . ns3
+$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --halt --port ${CONTROLPORT} inline ns3
 ensure_sigs_only_in_journal delayedkeys ns3/delayedkeys.db.signed
 $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} inline ns3
 # We can now test whether the secure zone journal was correctly processed:
index bc25bfe8cad7a348f526b637dd259df4d111b696..9e39c4f52543a8d45d130ca79c17e717d236cc53 100755 (executable)
@@ -144,7 +144,7 @@ status=`expr $status + $ret`
 
 if $SHELL ../testcrypto.sh > /dev/null 2>&1
 then
-    $PERL $SYSTEMTESTTOP/stop.pl . ns1
+    $PERL $SYSTEMTESTTOP/stop.pl legacy ns1
 
     copy_setports ns1/named2.conf.in ns1/named.conf
 
index ad63bdd4f91797a7944aea3bb5ee49a0a55979dc..69914215d72db24e325af20099d32240e300b60c 100644 (file)
@@ -73,7 +73,7 @@ then
 else
        echo_i "testing plain file failed (unexpected)"
        echo_i "exit status: 1"
-       exit 1 
+       exit 1
 fi
 
 # Now try directory, expect failure
@@ -124,7 +124,7 @@ else
        echo_i "skipping pipe test (unable to create pipe)"
 fi
 
-# Now try symlink file to plain file, expect success 
+# Now try symlink file to plain file, expect success
 n=`expr $n + 1`
 echo_i "testing symlink to plain file as log file (named -g) ($n)"
 # Assume success
@@ -153,7 +153,7 @@ fi
 # files while controlling the stop/start of the server.
 # Have to stop the stock server because it uses "-g"
 #
-$PERL ../../stop.pl .. ns1
+$PERL ../../stop.pl logfileconfig ns1
 
 $myNAMED > /dev/null 2>&1
 
@@ -181,7 +181,7 @@ then
 else
        echo_i "testing plain file failed (unexpected)"
        echo_i "exit status: 1"
-       exit 1 
+       exit 1
 fi
 
 # Now try directory, expect failure
@@ -232,7 +232,7 @@ else
        echo_i "skipping pipe test (unable to create pipe)"
 fi
 
-# Now try symlink file to plain file, expect success 
+# Now try symlink file to plain file, expect success
 n=`expr $n + 1`
 echo_i "testing symlink to plain file as log file ($n)"
 # Assume success
@@ -265,7 +265,7 @@ n=`expr $n + 1`
 echo_i "testing default logfile using named -L file ($n)"
 # Now stop the server again and test the -L option
 rm -f $DLFILE
-$PERL ../../stop.pl .. ns1
+$PERL ../../stop.pl logfileconfig ns1
 if ! test -f $PIDFILE; then
        copy_setports $PLAINCONF named.conf
        $myNAMED -L $DLFILE > /dev/null 2>&1
@@ -307,7 +307,7 @@ if test ${t:-1000} -gt 5
 then
         echo_i "testing explicit versions failed: cleanup of old entries took too long ($t secs)"
        status=`expr $status + 1`
-fi 
+fi
 if ! grep "status: NOERROR" dig.out.test$n > /dev/null
 then
        echo_i "testing explicit versions failed: DiG lookup failed"
@@ -343,7 +343,7 @@ if test ${t:-1000} -gt 5
 then
         echo_i "testing unlimited versions failed: took too long ($t secs)"
        status=`expr $status + 1`
-fi 
+fi
 if ! grep "status: NOERROR" dig.out.test$n > /dev/null
 then
        echo_i "testing unlimited versions failed: DiG lookup failed"
index f36fc611c294b18c3da1a51e762ee1f924f88ede..df20ee9d3f0b7a4cae9200120c9c369f01156acb 100644 (file)
@@ -45,7 +45,7 @@ if [ $ret != 0 ]; then
 fi
 status=`expr $status + $ret`
 
-$PERL $SYSTEMTESTTOP/stop.pl . lwresd1
+$PERL $SYSTEMTESTTOP/stop.pl lwresd lwresd1
 
 mv lwresd1/lwresd.run lwresd1/lwresd.run.resolv
 
@@ -64,7 +64,7 @@ if [ $ret != 0 ]; then
 fi
 status=`expr $status + $ret`
 
-$PERL $SYSTEMTESTTOP/stop.pl . lwresd1
+$PERL $SYSTEMTESTTOP/stop.pl lwresd lwresd1
 
 mv lwresd1/lwresd.run lwresd1/lwresd.run.lwresd
 
index 3d9d7ac682225fbd0e69913ea3b40fff255990aa..1e9097a5de88f4226f0ac8ba60ed14ad706eb7db 100644 (file)
@@ -454,7 +454,7 @@ rm -f ns1/root.db.signed.jnl
 mkeys_reconfig_on 1
 
 echo_i "reinitialize trust anchors"
-$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} . ns2
+$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} mkeys ns2
 rm -f ns2/managed-keys.bind*
 nextpart ns2/named.run > /dev/null
 $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} mkeys ns2
@@ -553,7 +553,7 @@ ret=0
 mkeys_refresh_on 2
 mkeys_status_on 2 > rndc.out.$n 2>&1
 t1=`grep 'next refresh:' rndc.out.$n`
-$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} . ns1
+$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} mkeys ns1
 rm -f ns1/root.db.signed.jnl
 cp ns1/root.db ns1/root.db.signed
 nextpart ns1/named.run > /dev/null
@@ -587,7 +587,7 @@ ret=0
 mkeys_refresh_on 2
 mkeys_status_on 2 > rndc.out.$n 2>&1
 t1=`grep 'next refresh:' rndc.out.$n`
-$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} . ns1
+$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} mkeys ns1
 rm -f ns1/root.db.signed.jnl
 cat ns1/K*.key >> ns1/root.db.signed
 nextpart ns1/named.run > /dev/null
@@ -667,7 +667,7 @@ ret=0
 # ensure key refresh retry will be scheduled to one actual hour after the first
 # key refresh failure instead of just a few seconds, in order to prevent races
 # between the next scheduled key refresh time and startup time of restarted ns5.
-$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} . ns5
+$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} mkeys ns5
 nextpart ns5/named.run > /dev/null
 $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} mkeys ns5
 wait_for_log "Returned from key fetch in keyfetch_done()" ns5/named.run
@@ -681,7 +681,7 @@ status=`expr $status + $ret`
 n=`expr $n + 1`
 echo_i "check key refreshes are resumed after root servers become available ($n)"
 ret=0
-$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} . ns5
+$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} mkeys ns5
 # Prevent previous check from affecting this one
 rm -f ns5/managed-keys.bind*
 # named2.args adds "-T mkeytimers=2/20/40" to named1.args as we need to wait for
index 9c104bdde177833ad182f90cd1e852a8570fd6b0..c3032d033add4d73542841d635c4a456e4679fbb 100644 (file)
@@ -115,7 +115,7 @@ digcomp dig.out.ns2.test$n dig.out.ns3.test$n || ret=1
 status=`expr $ret + $status`
 
 echo_i "stopping master and restarting with example4 then waiting up to 45 seconds"
-$PERL $SYSTEMTESTTOP/stop.pl . ns2
+$PERL $SYSTEMTESTTOP/stop.pl notify ns2
 
 rm -f ns2/example.db
 cp -f ns2/example4.db ns2/example.db
index a5bee33eea7a18fb33ec3ea1f2450839967826a3..901cd22f57043cf9eaa3b1bb1d882567d375ae4a 100755 (executable)
@@ -506,7 +506,7 @@ server 10.53.0.1 ${PORT}
 update add updated4.example.nil. 600 A 10.10.10.3
 send
 END
-$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} . ns1
+$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} nsupdate ns1
 # Removing the journal file and restarting the server means
 # that the data served by the new server process are exactly
 # those dumped to the master file by "rndc stop".
index 879233a82c5f3ac748ed3f05302bb8442b2998e0..2a43b8e535abce18bd708becb8a1cdf3e7243307 100644 (file)
@@ -39,7 +39,7 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 echo_i "stopping ns1"
-$PERL $SYSTEMTESTTOP/stop.pl . ns1
+$PERL $SYSTEMTESTTOP/stop.pl nzd2nzf ns1
 
 n=`expr $n + 1`
 echo_i "dumping _default.nzd to _default.nzf ($n)"
index 9a0fe6213fcb52bde4625e92a53c38a1320edaf6..4ed7841ae607fcf5f45d92914f04474809a57f19 100644 (file)
@@ -590,7 +590,7 @@ fi
 
 # restart the main test RPZ server to see if that creates a core file
 if test -z "$HAVE_CORE"; then
-    $PERL $SYSTEMTESTTOP/stop.pl . ns3
+    $PERL $SYSTEMTESTTOP/stop.pl rpz ns3
     restart 3
     HAVE_CORE=`find ns* -name '*core*' -print`
     test -z "$HAVE_CORE" || setret "found $HAVE_CORE; memory leak?"
index eadfc0e7ad319ff4fd8a72af791760c84947a0be..6a69356d5a0b50a8d273cce33060a470dd9fddea 100644 (file)
@@ -20,7 +20,7 @@ run_server() {
     TESTNAME=$1
 
     echo_i "stopping resolver"
-    $PERL $SYSTEMTESTTOP/stop.pl . ns2
+    $PERL $SYSTEMTESTTOP/stop.pl rpzrecurse ns2
 
     sleep 1
 
index 6e4583092238853aa2097999b388e2423194eb15..45669fb6a1060cb79285c7afc7093fbaeec06c68 100644 (file)
@@ -51,8 +51,7 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 echo_i "disabling server to force non-dnssec SERVFAIL"
-$RNDCCMD 10.53.0.2 stop 2>&1 | sed 's/^/I:ns2 /'
-
+$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} sfcache ns2
 awk '/SERVFAIL/ { next; out=1 } /Zone/ { out=0 } { if (out) print }' ns5/named_dump.db
 echo_i "checking SERVFAIL is cached ($n)"
 ret=0
old mode 100644 (file)
new mode 100755 (executable)
index a2ae614..878f6ab
@@ -9,6 +9,9 @@
 # See the COPYRIGHT file distributed with this work for additional
 # information regarding copyright ownership.
 
-. ./conf.sh
-$PERL ./stop.pl "$@"
+SYSTEMTESTTOP="$(realpath "$(dirname "$0")")"
+# shellcheck source=conf.sh
+. "$SYSTEMTESTTOP/conf.sh"
+export SYSTEMTESTTOP
 
+$PERL "$SYSTEMTESTTOP/stop.pl" "$@"
index ed3d62e492170171093b002e4a57e028809214a3..730cd40603f999a17dee78c8ee70c03d55c22943 100644 (file)
@@ -53,7 +53,7 @@ digcomp knowngood.dig.out.rec dig.out.ns3 || ret=1
 
 [ $pass = 1 ] && {
        echo_i "stopping stub server"
-       $PERL $SYSTEMTESTTOP/stop.pl . ns3
+       $PERL $SYSTEMTESTTOP/stop.pl stub ns3
 
        echo_i "re-starting stub server"
        $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} stub ns3
index 7c3a244da2a01f9cece4617ac7ede0c91d844dc4..190b84020d30dbe7cd57b53939e214148e1d72af 100644 (file)
@@ -136,7 +136,7 @@ $DIFF -s large.out dig.out > /dev/null || { ret=1 ; echo_i "$DIFF failed"; }
 status=`expr $status + $ret`
 
 echo_i "stop and restart slave"
-$PERL $SYSTEMTESTTOP/stop.pl . ns2
+$PERL $SYSTEMTESTTOP/stop.pl unknown ns2
 $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} unknown ns2
 
 echo_i "checking large unknown record loading on slave"
@@ -154,7 +154,7 @@ $DIFF large.out dig.out > /dev/null || { ret=1 ; echo_i "$DIFF failed"; }
 status=`expr $status + $ret`
 
 echo_i "stop and restart inline slave"
-$PERL $SYSTEMTESTTOP/stop.pl . ns3
+$PERL $SYSTEMTESTTOP/stop.pl unknown ns3
 $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} unknown ns3
 
 echo_i "checking large unknown record loading on inline slave"
index cb1cd3ea0069df338a90743006c85e74f4b7e2ad..12e761f6a525cedfa9070d9271d678969a8a5ecf 100755 (executable)
@@ -429,7 +429,7 @@ echo_i "test mapped zone with out of zone data ($n)"
 tmp=0
 $DIG -p ${PORT} txt mapped @10.53.0.3 > dig.out.1.$n
 grep "status: NOERROR," dig.out.1.$n > /dev/null || tmp=1
-$PERL $SYSTEMTESTTOP/stop.pl . ns3
+$PERL $SYSTEMTESTTOP/stop.pl xfer ns3
 $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} xfer ns3
 $DIG -p ${PORT} txt mapped @10.53.0.3 > dig.out.2.$n
 grep "status: NOERROR," dig.out.2.$n > /dev/null || tmp=1