From: Colin Vidal Date: Thu, 16 Oct 2025 15:15:50 +0000 (+0200) Subject: fix serve-stale system test after moving defconfig X-Git-Tag: v9.21.15~22^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2cd04e0bd0c27c9f33450c2f8f4418e96252a2f2;p=thirdparty%2Fbind9.git fix serve-stale system test after moving defconfig The serve-stale system test relies on sed accessing the source file that hard-codes the default configuration. Since it moved from bin/named/config.c into bin/include/defaultconfig.h, the test needs the path updated. --- diff --git a/bin/tests/system/serve-stale/tests.sh b/bin/tests/system/serve-stale/tests.sh index 7b72a615cbb..24603844127 100755 --- a/bin/tests/system/serve-stale/tests.sh +++ b/bin/tests/system/serve-stale/tests.sh @@ -18,8 +18,8 @@ set -e RNDCCMD="$RNDC -c ../_common/rndc.conf -p ${CONTROLPORT} -s" DIG="$DIG +time=12 +tries=1" -max_stale_ttl=$(sed -ne 's,^[[:space:]]*max-stale-ttl \([[:digit:]]*\).*,\1,p' $TOP_SRCDIR/bin/named/config.c) -stale_answer_ttl=$(sed -ne 's,^[[:space:]]*stale-answer-ttl \([[:digit:]]*\).*,\1,p' $TOP_SRCDIR/bin/named/config.c) +max_stale_ttl=$(sed -ne 's,^[[:space:]]*max-stale-ttl \([[:digit:]]*\).*,\1,p' $TOP_SRCDIR/bin/include/defaultconfig.h) +stale_answer_ttl=$(sed -ne 's,^[[:space:]]*stale-answer-ttl \([[:digit:]]*\).*,\1,p' $TOP_SRCDIR/bin/include/defaultconfig.h) status=0 n=0 @@ -997,7 +997,7 @@ status=$((status + ret)) echo_i "test server with no serve-stale options set" n=$((n + 1)) -echo_i "updating ns3/named.conf ($n)" +echo_i "updating ns3/named1.conf ($n)" ret=0 copy_setports ns3/named1.conf.in ns3/named.conf if [ $ret != 0 ]; then echo_i "failed"; fi @@ -1722,7 +1722,7 @@ if [ $ret != 0 ]; then echo_i "failed"; fi echo_i "test stale-answer-client-timeout (off)" n=$((n + 1)) -echo_i "updating ns3/named.conf ($n)" +echo_i "updating ns3/named3.conf ($n)" ret=0 copy_setports ns3/named3.conf.in ns3/named.conf if [ $ret != 0 ]; then echo_i "failed"; fi @@ -1849,7 +1849,7 @@ status=$((status + ret)) echo_i "test stale-answer-client-timeout (0)" n=$((n + 1)) -echo_i "updating ns3/named.conf ($n)" +echo_i "updating ns3/named4.conf ($n)" ret=0 copy_setports ns3/named4.conf.in ns3/named.conf if [ $ret != 0 ]; then echo_i "failed"; fi @@ -2170,7 +2170,7 @@ status=$((status + ret)) echo_i "test stale-answer-client-timeout (0) and stale-refresh-time (4)" n=$((n + 1)) -echo_i "updating ns3/named.conf ($n)" +echo_i "updating ns3/named5.conf ($n)" ret=0 copy_setports ns3/named5.conf.in ns3/named.conf if [ $ret != 0 ]; then echo_i "failed"; fi @@ -2355,7 +2355,7 @@ echo_i "test serve-stale's interaction with fetch-limits (cache only)" # are set to 1, which is ridiciously low, but that is because for this test we # want to reach the fetch-limits. n=$((n + 1)) -echo_i "updating ns3/named.conf ($n)" +echo_i "updating ns3/named6.conf ($n)" ret=0 copy_setports ns3/named6.conf.in ns3/named.conf if [ $ret != 0 ]; then echo_i "failed"; fi @@ -2465,7 +2465,7 @@ echo_i "test serve-stale's interaction with fetch limits (dual-mode)" # Update named configuration so that ns3 becomes a recursive resolver which is # also a secondary server for the root zone. n=$((n + 1)) -echo_i "updating ns3/named.conf ($n)" +echo_i "updating ns3/named7.conf ($n)" ret=0 copy_setports ns3/named7.conf.in ns3/named.conf if [ $ret != 0 ]; then echo_i "failed"; fi