From 3d40bc4e1acdcb85eac6bab5bfed91dacf5a1f9f Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 12 Jul 2018 12:39:49 +1000 Subject: [PATCH] test mdig '+ednsopt=:' handling (cherry picked from commit 2e688488f73989c72876a550d2c0ddd39125e1f9) --- bin/tests/system/digdelv/tests.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/bin/tests/system/digdelv/tests.sh b/bin/tests/system/digdelv/tests.sh index 25898b2276..95faea0e15 100644 --- a/bin/tests/system/digdelv/tests.sh +++ b/bin/tests/system/digdelv/tests.sh @@ -12,8 +12,7 @@ SYSTEMTESTTOP=.. status=0 n=0 -# using dig insecure mode as not testing dnssec here -DIGOPTS="-i -p ${PORT}" +DIGOPTS="-p ${PORT}" SENDCMD="$PERL $SYSTEMTESTTOP/send.pl 10.53.0.4 ${EXTRAPORT1}" if [ -x ${DIG} ] ; then @@ -481,6 +480,19 @@ else echo_i "$DIG is needed, so skipping these dig tests" fi +MDIGOPTS="-p ${PORT}" +if [ -x ${MDIG} ] ; then + n=`expr $n + 1` + echo_i "check that mdig handles malformed option '+ednsopt=:' gracefully ($n)" + ret=0 + $MDIG $MDIGOPTS @10.53.0.3 +ednsopt=: a.example > dig.out.test$n 2>&1 && ret=1 + grep "ednsopt no code point specified" dig.out.test$n > /dev/null || ret=1 + if [ $ret != 0 ]; then echo_i "failed"; fi + status=`expr $status + $ret` +else + echo_i "$MDIG is needed, so skipping these mdig tests" +fi + # using delv insecure mode as not testing dnssec here DELVOPTS="-i -p ${PORT}"