From ad86878d61c78aa7a90a420783227a90d6c4222f Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 11 Jul 2018 13:49:26 +1000 Subject: [PATCH] add test for bad dig option '+ednsopt=:' being handled gracefully --- bin/tests/system/digdelv/tests.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/tests/system/digdelv/tests.sh b/bin/tests/system/digdelv/tests.sh index 080d38e037..fa80a91019 100644 --- a/bin/tests/system/digdelv/tests.sh +++ b/bin/tests/system/digdelv/tests.sh @@ -493,6 +493,14 @@ if [ -x ${DIG} ] ; then if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` + n=`expr $n + 1` + echo_i "check that dig handles malformed option '+ednsopt=:' gracefully ($n)" + ret=0 + $DIG $DIGOPTS @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` + n=`expr $n + 1` echo_i "check that dig gracefully handles bad escape in domain name ($n)" ret=0