]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
runtime test: make the pidfiles match the names of configuration files
authorOndřej Surý <ondrej@sury.org>
Sat, 16 Nov 2019 04:55:05 +0000 (12:55 +0800)
committerMichał Kępień <michal@isc.org>
Wed, 8 Jan 2020 11:51:04 +0000 (12:51 +0100)
(cherry picked from commit fe021299e0779b45f99afdb6924472682fc44af3)

bin/tests/system/runtime/ns2/named-alt1.conf.in
bin/tests/system/runtime/ns2/named-alt2.conf.in
bin/tests/system/runtime/ns2/named-alt3.conf.in
bin/tests/system/runtime/ns2/named-alt4.conf.in
bin/tests/system/runtime/ns2/named-alt5.conf.in
bin/tests/system/runtime/ns2/named-alt6.conf.in
bin/tests/system/runtime/tests.sh

index 87ff94c3098a28eb283903a6b22ac54209c03960..74724dc4df685f48e40e5a066c01b9f061b5fda2 100644 (file)
@@ -14,7 +14,7 @@
 options {
        query-source address 10.53.0.2;
        port @PORT@;
-       pid-file "named2.pid";
+       pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { fd92:7065:b8e:ffff::2; };
        recursion no;
index 9191e42b27b5dbdbb441e9564e729d72945ab39a..f22d737aee307f5a5b43f0d99e344405f774277a 100644 (file)
@@ -14,7 +14,7 @@
 options {
        query-source address 10.53.0.2;
        port @PORT@;
-       pid-file "named3.pid";
+       pid-file "named.pid";
        listen-on { 10.53.0.2; 10.53.0.3; };
        listen-on-v6 { fd92:7065:b8e:ffff::2; };
        recursion no;
index ce3eab40a272f1f36ba9d2f483e704d77ca4b8a8..e9ae6c94e04e2123c077f77bc2f55fff5cb81190 100644 (file)
@@ -14,7 +14,7 @@
 options {
        query-source address 10.53.0.2;
        port @PORT@;
-       pid-file "named4.pid";
+       pid-file "named-alt3.pid";
        lock-file none;
        listen-on { 10.53.0.2; 10.53.0.3; };
        listen-on-v6 { fd92:7065:b8e:ffff::2; };
index a0b79c3d4d7cc83f0d2454cd596332b6ae562ea4..49c9e675b1435c67820f4a64c309e99b8d06e213 100644 (file)
@@ -13,7 +13,7 @@ options {
        include "dir";
        include "nopemkd";
        port @PORT@;
-       pid-file "../named4.pid";
+       pid-file "named.pid";
        listen-on { 127.0.0.1; };
        listen-on-v6 { none; };
        recursion yes;
index 82e95b18d46755afe1be9e9d2233acd01f496f7d..7d413fdcf60e1f20123d6597e143f4dec2247c19 100644 (file)
@@ -12,7 +12,7 @@
 options {
        include "nopedir";
        port @PORT@;
-       pid-file "../named5.pid";
+       pid-file "../named.pid";
        listen-on { 127.0.0.1; };
        listen-on-v6 { none; };
        recursion no;
index 548f3c2f31d169b8b87d6e3a1c3189d74a9fdafb..4e35f26be402e4838d1cdeb60ab25a144ac0d58f 100644 (file)
@@ -13,7 +13,7 @@ options {
        include "../nopedir";
        include "../mkd";
        port @PORT@;
-       pid-file "../named6.pid";
+       pid-file "../named.pid";
        listen-on { 127.0.0.1; };
        listen-on-v6 { none; };
        recursion no;
index 3f6c838bd7afeff0cf6543e31dec67c30b69e1fb..409c7062a8f96ef31e6c1f15ced102a33685c004 100644 (file)
@@ -14,9 +14,6 @@ SYSTEMTESTTOP=..
 
 RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
 
-status=0
-n=0
-
 kill_named() {
        pidfile="${1}"
        if [ ! -r "${pidfile}" ]; then
@@ -44,6 +41,9 @@ kill_named() {
        return 0
 }
 
+status=0
+n=0
+
 n=`expr $n + 1`
 echo_i "verifying that named started normally ($n)"
 ret=0
@@ -69,7 +69,7 @@ if [ ! "$CYGWIN" ]; then
        grep "exiting (due to fatal error)" ns2/named2.run > /dev/null && break
        sleep 1
     done
-    kill_named named2.pid && ret=1
+    kill_named named.pid && ret=1
     if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
 fi
@@ -80,7 +80,6 @@ ret=0
 (cd ns2; $NAMED -c named-alt2.conf -D runtime-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
-kill_named ns2/named3.pid && ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
@@ -90,7 +89,7 @@ ret=0
 (cd ns2; $NAMED -c named-alt3.conf -D runtime-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
-kill_named ns2/named4.pid || ret=1
+kill_named ns2/named-alt3.pid || ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
@@ -124,13 +123,9 @@ then
     copy_setports ns2/named-alt6.conf.in ns2/named.conf
     $RNDCCMD 10.53.0.2 reconfig > rndc.out.$n 2>&1
     grep "failed:" rndc.out.$n > /dev/null 2>&1 && ret=1
+    kill_named ns2/named.pid || ret=1
     if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
-
-    echo_i "shutting down existing named"
-    kill_named named4.pid
-    kill_named named5.pid
-    kill_named named6.pid
 fi
 
 n=`expr $n + 1`
@@ -140,7 +135,7 @@ cd ns2
 $NAMED -c named-alt4.conf -D runtime-ns2-extra-4 -d 99 -g > named4.run 2>&1 &
 sleep 2
 grep "exiting (due to fatal error)" named4.run > /dev/null || ret=1
-kill_named named4.pid && ret=1
+kill_named named.pid && ret=1
 cd ..
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
@@ -152,7 +147,7 @@ cd ns2
 $NAMED -c named-alt5.conf -D runtime-ns2-extra-5 -d 99 -g > named5.run 2>&1 &
 sleep 2
 grep "exiting (due to fatal error)" named5.run > /dev/null || ret=1
-kill_named named5.pid && ret=1
+kill_named named.pid && ret=1
 cd ..
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
@@ -164,7 +159,7 @@ cd ns2
 $NAMED -c named-alt6.conf -D runtime-ns2-extra-6 -d 99 -g > named6.run 2>&1 &
 sleep 2
 grep "exiting (due to fatal error)" named6.run > /dev/null || ret=1
-kill_named named6.pid && ret=1
+kill_named named.pid && ret=1
 cd ..
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`