From 04a5a8233335b06251eede52294c910646cbfc01 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 2 Dec 2015 13:00:42 +1100 Subject: [PATCH] 4267. [test] Check sdlz error handling. [RT #41142] (cherry picked from commit 26177be2946c99a34096b7d8c202139dfc0e9760) --- CHANGES | 4 ++++ .../dns-root/com/broken/dns.d/@/DNAME=10=example.net.= | 5 +++++ .../ns1/dns-root/com/broken/dns.d/@/NS=10=example.com.= | 5 +++++ ...ample.com.=root.example.com.=None=None=None=None=None= | 5 +++++ bin/tests/system/dlz/tests.sh | 8 ++++++++ 5 files changed, 27 insertions(+) create mode 100644 bin/tests/system/dlz/ns1/dns-root/com/broken/dns.d/@/DNAME=10=example.net.= create mode 100644 bin/tests/system/dlz/ns1/dns-root/com/broken/dns.d/@/NS=10=example.com.= create mode 100644 bin/tests/system/dlz/ns1/dns-root/com/broken/dns.d/@/SOA=10=ns.example.com.=root.example.com.=None=None=None=None=None= diff --git a/CHANGES b/CHANGES index 970f73362e..d7aad1fa82 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +4267. [test] Check sdlz error handling. [RT #41142] + +4266. [placeholder] + 4265. [bug] Address unchecked isc_mem_get calls. [RT #41187] 4264. [bug] Check const of strchr/strrchr assignments match diff --git a/bin/tests/system/dlz/ns1/dns-root/com/broken/dns.d/@/DNAME=10=example.net.= b/bin/tests/system/dlz/ns1/dns-root/com/broken/dns.d/@/DNAME=10=example.net.= new file mode 100644 index 0000000000..953a89dc5a --- /dev/null +++ b/bin/tests/system/dlz/ns1/dns-root/com/broken/dns.d/@/DNAME=10=example.net.= @@ -0,0 +1,5 @@ +Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC") +See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. + +The contents of this file is not read by the filesystem driver. +This is the file for "DNAME 10 example.net.". diff --git a/bin/tests/system/dlz/ns1/dns-root/com/broken/dns.d/@/NS=10=example.com.= b/bin/tests/system/dlz/ns1/dns-root/com/broken/dns.d/@/NS=10=example.com.= new file mode 100644 index 0000000000..89be0fbfd3 --- /dev/null +++ b/bin/tests/system/dlz/ns1/dns-root/com/broken/dns.d/@/NS=10=example.com.= @@ -0,0 +1,5 @@ +Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC") +See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. + +The contents of this file is not read by the filesystem driver. +This is the file for "NS 10 example.com.". diff --git a/bin/tests/system/dlz/ns1/dns-root/com/broken/dns.d/@/SOA=10=ns.example.com.=root.example.com.=None=None=None=None=None= b/bin/tests/system/dlz/ns1/dns-root/com/broken/dns.d/@/SOA=10=ns.example.com.=root.example.com.=None=None=None=None=None= new file mode 100644 index 0000000000..8b95397cdf --- /dev/null +++ b/bin/tests/system/dlz/ns1/dns-root/com/broken/dns.d/@/SOA=10=ns.example.com.=root.example.com.=None=None=None=None=None= @@ -0,0 +1,5 @@ +Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC") +See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. + +The contents of this file is not read by the filesystem driver. +This is the file for "SOA 10 ns.example.com. root.example.com. 2010062900 None None None None" which is a malformed SOA record. diff --git a/bin/tests/system/dlz/tests.sh b/bin/tests/system/dlz/tests.sh index ce0a36a621..242bc52fd3 100644 --- a/bin/tests/system/dlz/tests.sh +++ b/bin/tests/system/dlz/tests.sh @@ -70,5 +70,13 @@ n=`expr $n + 1` if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` +echo "I:checking DLZ with a malformed SOA record" +ret=0 +$DIG $DIGOPTS broken.com type600 @10.53.0.1 > dig.out.ns1.test$n +grep status: dig.out.ns1.test$n > /dev/null || ret=1 +n=`expr $n + 1` +if [ $ret != 0 ]; then echo "I:failed"; fi +status=`expr $status + $ret` + echo "I:exit status: $status" exit $status