]> 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 08:24:49 +0000 (09:24 +0100)
(cherry picked from commit ce86721bc3e96344a78fe8bfafb42d9e07839868)

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 aab555fc2da15d8de88ed7dc1f3b7a5d9fbbcfee..a804be79ee3551a3b1fff1bb2dcf128f806af8dd 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 a51338361653368433304ae8b41fd3016d59300b..8a61b012646788b68bf32257be3961bb52b9a2a4 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 a1cf6145c162c9a9f2a27704967fee57385131a8..fdec324d77311cd171fa439fec911da581d9b27d 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 f36c1fd3df6c1d06688c29244f857f92af54304f..6c729492d4e1d8cce2b299ccfd5f6157088c4a0d 100644 (file)
@@ -12,7 +12,7 @@
 options {
        directory "./nope";
        port @PORT@;
-       pid-file "../named.pid";
+       pid-file "named.pid";
        listen-on { 127.0.0.1; };
        listen-on-v6 { none; };
        recursion no;
index ede08ab7d310bab27dabf03cc2bbdc9683831a44..c5735353a8b6a3178cf91a6dc6f1b48e02602f84 100644 (file)
@@ -12,7 +12,7 @@
 options {
        managed-keys-directory "./nope";
        port @PORT@;
-       pid-file "../named.pid";
+       pid-file "named.pid";
        listen-on { 127.0.0.1; };
        listen-on-v6 { none; };
        recursion no;
index 543ca007eed7323a4b81fc2a84e4d6f581900874..7409e95e95a4fe2638c227fef3eb5eca616aebea 100644 (file)
@@ -12,7 +12,7 @@
 options {
        new-zones-directory "./nope";
        port @PORT@;
-       pid-file "../named.pid";
+       pid-file "named.pid";
        listen-on { 127.0.0.1; };
        listen-on-v6 { none; };
        recursion no;
index 22b04321066ba9fb6a6a4db5627a3fc978e3dd35..e0137509e626c4a9e465e0d5b58c6c76beeca014 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
@@ -59,7 +59,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`
 
@@ -69,7 +68,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`
 
@@ -103,6 +102,7 @@ $RNDCCMD 10.53.0.2 reconfig > rndc.out.$n 2>&1
 grep "failed: permission denied" rndc.out.$n > /dev/null 2>&1 || ret=1
 sleep 1
 grep "new-zones-directory './nope' is not writable" ns2/named.run > /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`