chiark / gitweb /
regress: Add some tests with ~adns_if_noautosys
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 28 Jan 2015 23:48:58 +0000 (23:48 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 21 Feb 2015 11:33:47 +0000 (11:33 +0000)
The test harness provides adns_if_noautosys by default (to make the
test .sys files more readable and less noisy, mostly).

But adns behaves rather differently with noautosys.  We should have
some more tests without it.  (The invocations of adnstest implied by
these new test cases produce obviously-wrong behaviour with an adns
which is lacking the TCP async connect API fix.)

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

diff --git a/regress/case-tcpautosys.err b/regress/case-tcpautosys.err
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/regress/case-tcpautosys.out b/regress/case-tcpautosys.out
new file mode 100644 (file)
index 0000000..eec8895
--- /dev/null
@@ -0,0 +1,6 @@
+adns debug: using nameserver 172.18.45.6
+chiark.net flags 2 type 15 MX(raw) submitted
+adns debug: TCP connected (NS=172.18.45.6)
+chiark.net flags 2 type MX(raw): OK; nrrs=1; cname=$; owner=$; ttl=3600
+ 10 mx-relay.chiark.greenend.org.uk
+rc=0
diff --git a/regress/case-tcpautosys.sys b/regress/case-tcpautosys.sys
new file mode 100644 (file)
index 0000000..287f1ea
--- /dev/null
@@ -0,0 +1,69 @@
+./adnstest default -0x10
+:15 2/chiark.net
+ start 1422488885.111730
+ socket domain=AF_INET type=SOCK_DGRAM
+ socket=6
+ +0.000145
+ fcntl fd=6 cmd=F_GETFL
+ fcntl=~O_NONBLOCK&...
+ +0.000067
+ fcntl fd=6 cmd=F_SETFL O_NONBLOCK|...
+ fcntl=OK
+ +0.000058
+ socket domain=AF_INET type=SOCK_STREAM
+ socket=7
+ +0.000310
+ fcntl fd=7 cmd=F_GETFL
+ fcntl=~O_NONBLOCK&...
+ +0.000080
+ fcntl fd=7 cmd=F_SETFL O_NONBLOCK|...
+ fcntl=OK
+ +0.000086
+ connect fd=7 addr=172.18.45.6:53
+ connect=EINPROGRESS
+ +0.000509
+ recvfrom fd=6 buflen=512
+ recvfrom=EAGAIN
+ +0.000159
+ select max=8 rfds=null wfds=[7] efds=null to=0.000000
+ select=0 rfds=null wfds=[] efds=null
+ +0.000127
+ select max=8 rfds=[6] wfds=[7] efds=[] to=13.998729
+ select=1 rfds=[] wfds=[7] efds=[]
+ +0.003195
+ select max=8 rfds=null wfds=[7] efds=null to=0.000000
+ select=1 rfds=null wfds=[7] efds=null
+ +0.000101
+ read fd=7 buflen=1
+ read=EAGAIN
+ +0.000057
+ write fd=7
+     001c311f 01000001 00000000 00000663 68696172 6b036e65 7400000f 0001.
+ write=30
+ +0.000658
+ select max=8 rfds=[6,7] wfds=[] efds=[7] to=29.994718
+ select=1 rfds=[7] wfds=[] efds=[]
+ +0.085967
+ read fd=7 buflen=2
+ read=OK
+     00cc.
+ +0.000205
+ read fd=7 buflen=204
+ read=OK
+     311f8180 00010001 00030004 06636869 61726b03 6e657400 000f0001 c00c000f
+     00010000 0e100023 000a086d 782d7265 6c617906 63686961 726b0867 7265656e
+     656e6403 6f726702 756b00c0 0c000200 0100000e 10000c06 63686961 726b026e
+     73c00cc0 0c000200 0100000e 10000805 73746f72 6dc05ec0 0c000200 0100000e
+     10000906 70697761 7265c05e c02a0001 00010000 0e100004 d40dc5e5 c06f0001
+     00010000 0e100004 c2f29d2a c0570001 00010000 0e100004 d40dc5e5 c0830001
+     00010000 0e100004 d5095d46.
+ +0.000366
+ read fd=7 buflen=206
+ read=EAGAIN
+ +0.000116
+ close fd=6
+ close=OK
+ +0.000194
+ close fd=7
+ close=OK
+ +0.000382
diff --git a/regress/case-tcpautosysmissingserv.err b/regress/case-tcpautosysmissingserv.err
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/regress/case-tcpautosysmissingserv.out b/regress/case-tcpautosysmissingserv.out
new file mode 100644 (file)
index 0000000..da1c21c
--- /dev/null
@@ -0,0 +1,6 @@
+adns debug: using nameserver 172.18.45.10
+chiark.net flags 2 type 15 MX(raw) submitted
+adns warning: TCP connection failed: connect/read: No route to host (NS=172.18.45.10)
+adns warning: TCP connection failed: connect/read: No route to host (NS=172.18.45.10)
+chiark.net flags 2 type MX(raw): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604794
+rc=0
diff --git a/regress/case-tcpautosysmissingserv.sys b/regress/case-tcpautosysmissingserv.sys
new file mode 100644 (file)
index 0000000..7458fba
--- /dev/null
@@ -0,0 +1,75 @@
+./adnstest missingserver -0x10
+:15 2/chiark.net
+ start 1422489379.676732
+ socket domain=AF_INET type=SOCK_DGRAM
+ socket=6
+ +0.000107
+ fcntl fd=6 cmd=F_GETFL
+ fcntl=~O_NONBLOCK&...
+ +0.000049
+ fcntl fd=6 cmd=F_SETFL O_NONBLOCK|...
+ fcntl=OK
+ +0.000041
+ socket domain=AF_INET type=SOCK_STREAM
+ socket=7
+ +0.000190
+ fcntl fd=7 cmd=F_GETFL
+ fcntl=~O_NONBLOCK&...
+ +0.000041
+ fcntl fd=7 cmd=F_SETFL O_NONBLOCK|...
+ fcntl=OK
+ +0.000037
+ connect fd=7 addr=172.18.45.10:53
+ connect=EINPROGRESS
+ +0.000164
+ recvfrom fd=6 buflen=512
+ recvfrom=EAGAIN
+ +0.000087
+ select max=8 rfds=null wfds=[7] efds=null to=0.000000
+ select=0 rfds=null wfds=[] efds=null
+ +0.000094
+ select max=8 rfds=[6] wfds=[7] efds=[] to=13.999387
+ select=1 rfds=[] wfds=[7] efds=[]
+ +3.012183
+ select max=8 rfds=null wfds=[7] efds=null to=0.000000
+ select=1 rfds=null wfds=[7] efds=null
+ +0.000139
+ read fd=7 buflen=1
+ read=EHOSTUNREACH
+ +0.000129
+ close fd=7
+ close=OK
+ +0.000202
+ select max=7 rfds=[6] wfds=[] efds=[] to=0.000000
+ select=0 rfds=[] wfds=[] efds=[]
+ +0.000113
+ socket domain=AF_INET type=SOCK_STREAM
+ socket=7
+ +0.000359
+ fcntl fd=7 cmd=F_GETFL
+ fcntl=~O_NONBLOCK&...
+ +0.000084
+ fcntl fd=7 cmd=F_SETFL O_NONBLOCK|...
+ fcntl=OK
+ +0.000093
+ connect fd=7 addr=172.18.45.10:53
+ connect=EINPROGRESS
+ +0.000175
+ select max=8 rfds=[6] wfds=[7] efds=[] to=13.999289
+ select=1 rfds=[] wfds=[7] efds=[]
+ +3.006034
+ select max=8 rfds=null wfds=[7] efds=null to=0.000000
+ select=1 rfds=null wfds=[7] efds=null
+ +0.000150
+ read fd=7 buflen=1
+ read=EHOSTUNREACH
+ +0.000065
+ close fd=7
+ close=OK
+ +0.000179
+ select max=7 rfds=[6] wfds=[] efds=[] to=0.000000
+ select=0 rfds=[] wfds=[] efds=[]
+ +0.000122
+ close fd=6
+ close=OK
+ +0.000177
diff --git a/regress/init-missingserver.text b/regress/init-missingserver.text
new file mode 100644 (file)
index 0000000..5dc8e47
--- /dev/null
@@ -0,0 +1 @@
+nameserver 172.18.45.10