From: Mark Andrews Date: Thu, 19 Mar 2026 04:18:46 +0000 (+1100) Subject: Check exit status of dig and nsupdate in nsupdate system test X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f768082d4b9df7ab6ecd4f3e7bb2ab3f199f3fa9;p=thirdparty%2Fbind9.git Check exit status of dig and nsupdate in nsupdate system test Add missing `|| ret=1` to six dig and nsupdate invocations in tests.sh so that command failures are properly caught instead of silently ignored. (cherry picked from commit 9ba03a1848904b605f64fbfe3dab00b551828e4b) --- diff --git a/bin/tests/system/nsupdate/tests.sh b/bin/tests/system/nsupdate/tests.sh index be0df8aaad9..04cb7369ebd 100755 --- a/bin/tests/system/nsupdate/tests.sh +++ b/bin/tests/system/nsupdate/tests.sh @@ -797,7 +797,7 @@ END grep REFUSED nsupdate.out.$n >/dev/null 2>&1 || ret=1 $DIG $DIGOPTS @10.53.0.6 \ +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \ - -x 127.0.0.1 >dig.out.ns6.$n + -x 127.0.0.1 >dig.out.ns6.$n || ret=1 grep localhost. dig.out.ns6.$n >/dev/null 2>&1 && ret=1 if test $ret -ne 0; then echo_i "failed" @@ -835,7 +835,7 @@ END grep REFUSED nsupdate.out.$n >/dev/null 2>&1 || ret=1 $DIG $DIGOPTS @10.53.0.6 \ +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \ - -x 192.168.0.1 >dig.out.ns6.$n + -x 192.168.0.1 >dig.out.ns6.$n || ret=1 grep localhost. dig.out.ns6.$n >/dev/null 2>&1 && ret=1 if test $ret -ne 0; then echo_i "failed" @@ -856,7 +856,7 @@ END grep REFUSED nsupdate.out.$n >/dev/null 2>&1 || ret=1 $DIG $DIGOPTS @10.53.0.6 \ +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \ - $REVERSE_NAME NS >dig.out.ns6.$n + $REVERSE_NAME NS >dig.out.ns6.$n || ret=1 grep localhost. dig.out.ns6.$n >/dev/null 2>&1 && ret=1 if test $ret -ne 0; then echo_i "failed" @@ -898,7 +898,7 @@ END grep REFUSED nsupdate.out.$n >/dev/null 2>&1 || ret=1 $DIG $DIGOPTS @fd92:7065:b8e:ffff::6 \ +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \ - $REVERSE_NAME NS >dig.out.ns6.$n + $REVERSE_NAME NS >dig.out.ns6.$n || ret=1 grep localhost. dig.out.ns6.$n >/dev/null 2>&1 && ret=1 if test $ret -ne 0; then echo_i "failed" @@ -1675,7 +1675,7 @@ n=$((n + 1)) ret=0 echo_i "check that max records is enforced ($n)" nextpart ns6/named.run >/dev/null -$NSUPDATE -v >nsupdate.out.$n 2>&1 <nsupdate.out.$n 2>&1 </dev/null -$NSUPDATE -v >nsupdate.out.$n 2>&1 <nsupdate.out.$n 2>&1 <