chiark / gitweb /
regress: New test bogus-sortlist
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 19 Jul 2014 18:55:39 +0000 (19:55 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 13 Oct 2014 00:27:18 +0000 (01:27 +0100)
Exercise the code which checks the sortlist for invalid address/mask
pairs.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
regress/case-bogus-sortlist.err [new file with mode: 0644]
regress/case-bogus-sortlist.out [new file with mode: 0644]
regress/case-bogus-sortlist.sys [new file with mode: 0644]
regress/init-bogus-sortlist.text [new file with mode: 0644]

diff --git a/regress/case-bogus-sortlist.err b/regress/case-bogus-sortlist.err
new file mode 100644 (file)
index 0000000..31d3eab
--- /dev/null
@@ -0,0 +1 @@
+adns failure: init: errno=EINVAL
diff --git a/regress/case-bogus-sortlist.out b/regress/case-bogus-sortlist.out
new file mode 100644 (file)
index 0000000..1e01772
--- /dev/null
@@ -0,0 +1,7 @@
+adns debug: using nameserver 172.18.45.6
+adns: <supplied configuration text>:2: prefix length 24 in sortlist overlaps address `198.51.100.1'
+adns: <supplied configuration text>:2: prefix length 10 in sortlist overlaps address `2001:db8:2::'
+adns: <supplied configuration text>:2: network address `255.0.0.0' in sortlist is not in classed ranges, must specify mask explicitly
+adns: <supplied configuration text>:2: mask length `33' invalid
+adns: <supplied configuration text>:2: mask length `129' invalid
+rc=2
diff --git a/regress/case-bogus-sortlist.sys b/regress/case-bogus-sortlist.sys
new file mode 100644 (file)
index 0000000..bc39fa8
--- /dev/null
@@ -0,0 +1,2 @@
+./adnstest bogus-sortlist
+:1 chiark.greenend.org.uk
diff --git a/regress/init-bogus-sortlist.text b/regress/init-bogus-sortlist.text
new file mode 100644 (file)
index 0000000..eea7114
--- /dev/null
@@ -0,0 +1,3 @@
+nameserver 172.18.45.6
+sortlist 198.51.100.1/24 2001:db8:2::/10 0/32 ::/128 255.0.0.0 2/33 ::/129
+search dnserr.distorted.org.uk distorted.org.uk