From: Aram Sargsyan Date: Tue, 4 Jan 2022 17:22:32 +0000 (+0000) Subject: Fix invalid control port number in the catz system test X-Git-Tag: v9.19.0~146^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5f9d4b5db41f074699647cfc3033c6ebba61b72e;p=thirdparty%2Fbind9.git Fix invalid control port number in the catz system test When failure is expected, the `rndc` command in the catz system test is being called directly instead of using a function, i.e.: $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reconfig \ > /dev/null 2>&1 && ret=1 ... instead of: rndccmd 10.53.0.2 reconfig && ret=1 This is done to suppress messages like "lt-rndc: 'reconfig' failed: failure" appearing in the message log of the test, because failure is actually expected, and the appearance of that message can be confusing. The port value used in this case is not correct, making the `rndc reload` command to fail. This error was not detected earlier only because the failure of the command is actually expected, but the failure happens for a "wrong" reason, and the test still passes. Fix the error by using the existing variable instead of the fixed number. --- diff --git a/bin/tests/system/catz/tests.sh b/bin/tests/system/catz/tests.sh index 9dd2ec33b1c..469acdcdb9a 100644 --- a/bin/tests/system/catz/tests.sh +++ b/bin/tests/system/catz/tests.sh @@ -1237,7 +1237,7 @@ echo_i "reconfiguring secondary - removing catalog4 catalog zone, adding non-exi ret=0 sed -e "s/^#T2//" < ns2/named1.conf.in > ns2/named.conf.tmp copy_setports ns2/named.conf.tmp ns2/named.conf -$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reconfig > /dev/null 2>&1 && ret=1 +$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p "${CONTROLPORT}" reconfig > /dev/null 2>&1 && ret=1 if [ $ret -ne 0 ]; then echo_i "failed"; fi status=$((status+ret))