From: Michał Kępień Date: Tue, 26 Feb 2019 11:33:19 +0000 (+0100) Subject: Fix IP regex used in the "resolver" system test X-Git-Tag: v9.15.0~131^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=70ae48e5cb56c7df23647bc511951d758e57ec88;p=thirdparty%2Fbind9.git Fix IP regex used in the "resolver" system test If dots are not escaped in the "1.2.3.4" regular expressions used for checking whether IP address 1.2.3.4 is present in the tested resolver's answers, a COOKIE that matches such a regular expression will trigger a false positive for the "resolver" system test. Properly escape dots in the aforementioned regular expressions to prevent that from happening. --- diff --git a/bin/tests/system/resolver/tests.sh b/bin/tests/system/resolver/tests.sh index 89e74cd1d0d..7b3c27531b0 100755 --- a/bin/tests/system/resolver/tests.sh +++ b/bin/tests/system/resolver/tests.sh @@ -773,7 +773,7 @@ ret=0 $DIG $DIGOPTS @10.53.0.5 truncated.no-questions. a > dig.ns5.out.${n} || ret=1 grep "status: NOERROR" dig.ns5.out.${n} > /dev/null || ret=1 grep "ANSWER: 1," dig.ns5.out.${n} > /dev/null || ret=1 -grep "1.2.3.4" dig.ns5.out.${n} > /dev/null || ret=1 +grep "1\.2\.3\.4" dig.ns5.out.${n} > /dev/null || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` @@ -783,7 +783,7 @@ ret=0 $DIG $DIGOPTS @10.53.0.5 not-truncated.no-questions. a > dig.ns5.out.${n} || ret=1 grep "status: NOERROR" dig.ns5.out.${n} > /dev/null && ret=1 grep "ANSWER: 1," dig.ns5.out.${n} > /dev/null && ret=1 -grep "1.2.3.4" dig.ns5.out.${n} > /dev/null && ret=1 +grep "1\.2\.3\.4" dig.ns5.out.${n} > /dev/null && ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret`