From 98b6d5b430d4326235c108afcc8a4e4ee36559f4 Mon Sep 17 00:00:00 2001 From: ian Date: Sat, 5 Dec 1998 20:16:26 +0000 Subject: [PATCH] timeval handing better, change filenames --- regress/.cvsignore | 2 +- regress/{case-manya.stderr => case-manya.err} | 0 regress/case-manya.out | 7 + regress/case-manya.stdout | 39 -- regress/case-manya.sys | 291 +---------- regress/{case-norm.stderr => case-norm.err} | 0 regress/{case-norm.stdout => case-norm.out} | 0 regress/case-norm.sys | 17 +- regress/{case-trunc.stderr => case-trunc.err} | 0 regress/case-trunc.out | 3 + regress/case-trunc.stdout | 62 --- regress/case-trunc.sys | 480 +----------------- regress/harness.h.m4 | 2 + regress/hcommon.c.m4 | 7 + regress/hmacros.i4 | 5 - regress/hplayback.c.m4 | 80 +-- regress/hrecord.c.m4 | 51 +- regress/hsyscalls.i4 | 7 - regress/m1test | 12 +- regress/r1test | 11 +- 20 files changed, 137 insertions(+), 939 deletions(-) rename regress/{case-manya.stderr => case-manya.err} (100%) create mode 100644 regress/case-manya.out delete mode 100644 regress/case-manya.stdout rename regress/{case-norm.stderr => case-norm.err} (100%) rename regress/{case-norm.stdout => case-norm.out} (100%) rename regress/{case-trunc.stderr => case-trunc.err} (100%) create mode 100644 regress/case-trunc.out delete mode 100644 regress/case-trunc.stdout diff --git a/regress/.cvsignore b/regress/.cvsignore index 1b09e08..4c446f9 100644 --- a/regress/.cvsignore +++ b/regress/.cvsignore @@ -4,4 +4,4 @@ hrecord hrecord.c hplayback hplayback.c -case-*.*-o +output-*.* diff --git a/regress/case-manya.stderr b/regress/case-manya.err similarity index 100% rename from regress/case-manya.stderr rename to regress/case-manya.err diff --git a/regress/case-manya.out b/regress/case-manya.out new file mode 100644 index 0000000..f21068c --- /dev/null +++ b/regress/case-manya.out @@ -0,0 +1,7 @@ +adns debug: using nameserver 172.18.45.6 +manyaddrs.test.iwj.relativity.greenend.org.uk type 1 A(-) submitted +manyaddrs.test.iwj.relativity.greenend.org.uk type A(-): OK; nrrs=4; cname=$ + 127.0.0.1 + 172.18.45.6 + 172.18.45.1 + 172.18.45.35 diff --git a/regress/case-manya.stdout b/regress/case-manya.stdout deleted file mode 100644 index 52031ad..0000000 --- a/regress/case-manya.stdout +++ /dev/null @@ -1,39 +0,0 @@ -adns debug: using nameserver 172.18.45.6 -manyaddrs.test.iwj.relativity.greenend.org.uk type 1 A(-) submitted -manyaddrs.test.iwj.relativity.greenend.org.uk type 2 NS(raw) submitted -manyaddrs.test.iwj.relativity.greenend.org.uk type 5 CNAME(-) submitted -manyaddrs.test.iwj.relativity.greenend.org.uk type 6 SOA(raw) submitted -manyaddrs.test.iwj.relativity.greenend.org.uk type 12 PTR(raw) submitted -manyaddrs.test.iwj.relativity.greenend.org.uk type 13 HINFO(-) submitted -manyaddrs.test.iwj.relativity.greenend.org.uk type 15 MX(raw) submitted -manyaddrs.test.iwj.relativity.greenend.org.uk type 16 TXT(-) submitted -manyaddrs.test.iwj.relativity.greenend.org.uk type 17 RP(raw) submitted -manyaddrs.test.iwj.relativity.greenend.org.uk type 65537 A(addr) submitted -manyaddrs.test.iwj.relativity.greenend.org.uk type 65538 NS(+addr) submitted -manyaddrs.test.iwj.relativity.greenend.org.uk type 65548 PTR(checked) submitted -manyaddrs.test.iwj.relativity.greenend.org.uk type 65551 MX(+addr) submitted -manyaddrs.test.iwj.relativity.greenend.org.uk type 131078 SOA(822) submitted -manyaddrs.test.iwj.relativity.greenend.org.uk type 131089 RP(822) submitted -manyaddrs.test.iwj.relativity.greenend.org.uk type A(-): OK; nrrs=4; cname=$ - 127.0.0.1 - 172.18.45.6 - 172.18.45.1 - 172.18.45.35 -manyaddrs.test.iwj.relativity.greenend.org.uk type NS(raw): No such data; nrrs=0; cname=$ -manyaddrs.test.iwj.relativity.greenend.org.uk type CNAME(-): No such data; nrrs=0; cname=$ -manyaddrs.test.iwj.relativity.greenend.org.uk type SOA(raw): No such data; nrrs=0; cname=$ -manyaddrs.test.iwj.relativity.greenend.org.uk type PTR(raw): No such data; nrrs=0; cname=$ -manyaddrs.test.iwj.relativity.greenend.org.uk type HINFO(-): No such data; nrrs=0; cname=$ -manyaddrs.test.iwj.relativity.greenend.org.uk type MX(raw): No such data; nrrs=0; cname=$ -manyaddrs.test.iwj.relativity.greenend.org.uk type TXT(-): No such data; nrrs=0; cname=$ -manyaddrs.test.iwj.relativity.greenend.org.uk type RP(raw): No such data; nrrs=0; cname=$ -manyaddrs.test.iwj.relativity.greenend.org.uk type A(addr): OK; nrrs=4; cname=$ - AF_INET 127.0.0.1 - AF_INET 172.18.45.6 - AF_INET 172.18.45.1 - AF_INET 172.18.45.35 -manyaddrs.test.iwj.relativity.greenend.org.uk type NS(+addr): No such data; nrrs=0; cname=$ -manyaddrs.test.iwj.relativity.greenend.org.uk type PTR(checked): No such data; nrrs=0; cname=$ -manyaddrs.test.iwj.relativity.greenend.org.uk type MX(+addr): No such data; nrrs=0; cname=$ -manyaddrs.test.iwj.relativity.greenend.org.uk type SOA(822): No such data; nrrs=0; cname=$ -manyaddrs.test.iwj.relativity.greenend.org.uk type RP(822): No such data; nrrs=0; cname=$ diff --git a/regress/case-manya.sys b/regress/case-manya.sys index 0f97998..73523b2 100644 --- a/regress/case-manya.sys +++ b/regress/case-manya.sys @@ -1,305 +1,36 @@ default -manyaddrs.test.iwj.relativity.greenend.org.uk +:1 manyaddrs.test.iwj.relativity.greenend.org.uk + start 912888920.123769 socket type=SOCK_DGRAM socket=4 + +0.000245 fcntl fd=4 cmd=F_GETFL fcntl=2 + +0.000705 fcntl fd=4 cmd=F_SETFL 2050 fcntl=0 - gettimeofday - gettimeofday=OK tv=912366719.805997 + +0.000073 sendto fd=4 addr=172.18.45.6:53 311f0100 00010000 00000000 096d616e 79616464 72730474 65737403 69776a0a 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 010001. sendto=63 - gettimeofday - gettimeofday=OK tv=+0.001430 - sendto fd=4 addr=172.18.45.6:53 - 31200100 00010000 00000000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 020001. - sendto=63 - gettimeofday - gettimeofday=OK tv=+0.002624 - sendto fd=4 addr=172.18.45.6:53 - 31210100 00010000 00000000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 050001. - sendto=63 - gettimeofday - gettimeofday=OK tv=+0.003890 - sendto fd=4 addr=172.18.45.6:53 - 31220100 00010000 00000000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 060001. - sendto=63 - gettimeofday - gettimeofday=OK tv=+0.005157 - sendto fd=4 addr=172.18.45.6:53 - 31230100 00010000 00000000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 0c0001. - sendto=63 - gettimeofday - gettimeofday=OK tv=+0.006361 - sendto fd=4 addr=172.18.45.6:53 - 31240100 00010000 00000000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 0d0001. - sendto=63 - gettimeofday - gettimeofday=OK tv=+0.008223 - sendto fd=4 addr=172.18.45.6:53 - 31250100 00010000 00000000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 0f0001. - sendto=63 - gettimeofday - gettimeofday=OK tv=+0.009408 - sendto fd=4 addr=172.18.45.6:53 - 31260100 00010000 00000000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 100001. - sendto=63 - gettimeofday - gettimeofday=OK tv=+0.011042 - sendto fd=4 addr=172.18.45.6:53 - 31270100 00010000 00000000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 110001. - sendto=63 - gettimeofday - gettimeofday=OK tv=+0.012289 - sendto fd=4 addr=172.18.45.6:53 - 31280100 00010000 00000000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 010001. - sendto=63 - gettimeofday - gettimeofday=OK tv=+0.013515 - sendto fd=4 addr=172.18.45.6:53 - 31290100 00010000 00000000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 020001. - sendto=63 - gettimeofday - gettimeofday=OK tv=+0.014735 - sendto fd=4 addr=172.18.45.6:53 - 312a0100 00010000 00000000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 0c0001. - sendto=63 - gettimeofday - gettimeofday=OK tv=+0.016275 - sendto fd=4 addr=172.18.45.6:53 - 312b0100 00010000 00000000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 0f0001. - sendto=63 - gettimeofday - gettimeofday=OK tv=+0.017488 - sendto fd=4 addr=172.18.45.6:53 - 312c0100 00010000 00000000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 060001. - sendto=63 - gettimeofday - gettimeofday=OK tv=+0.018732 - sendto fd=4 addr=172.18.45.6:53 - 312d0100 00010000 00000000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 110001. - sendto=63 - gettimeofday - gettimeofday=OK tv=+0.019946 - select max=5 rfds=[4] wfds=[] efds=[] to=1.980054 + +0.000698 + select max=5 rfds=[4] wfds=[] efds=[] to=1.999302 select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.021259 + +0.006236 recvfrom fd=4 buflen=512 *addrlen=16 recvfrom=OK addr=172.18.45.6:53 311f8580 00010004 00010001 096d616e 79616464 72730474 65737403 69776a0a 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 010001c0 - 0c000100 01000000 3c00047f 000001c0 0c000100 01000000 3c0004ac 122d23c0 - 0c000100 01000000 3c0004ac 122d06c0 0c000100 01000000 3c0004ac 122d0104 - 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 - 02756b00 00020001 0000003c 0006036e 7330c088 c0ae0001 00010001 51800004 - ac122d06. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 31208580 00010000 00010000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 02000104 - 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 - 02756b00 00060001 0000003c 0027036e 7330c048 0a686f73 746d6173 746572c0 - 48000000 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 31218580 00010000 00010000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 05000104 - 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 - 02756b00 00060001 0000003c 0027036e 7330c048 0a686f73 746d6173 746572c0 - 48000000 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 31228580 00010000 00010000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 06000104 - 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 - 02756b00 00060001 0000003c 0027036e 7330c048 0a686f73 746d6173 746572c0 - 48000000 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.027397 - select max=5 rfds=[4] wfds=[] efds=[] to=1.977760 - select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.029038 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 31238580 00010000 00010000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 0c000104 - 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 - 02756b00 00060001 0000003c 0027036e 7330c048 0a686f73 746d6173 746572c0 - 48000000 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.030871 - select max=5 rfds=[4] wfds=[] efds=[] to=1.975490 - select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.032854 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 31248580 00010000 00010000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 0d000104 - 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 - 02756b00 00060001 0000003c 0027036e 7330c048 0a686f73 746d6173 746572c0 - 48000000 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.034796 - select max=5 rfds=[4] wfds=[] efds=[] to=1.973427 - select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.036790 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 31258580 00010000 00010000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 0f000104 - 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 - 02756b00 00060001 0000003c 0027036e 7330c048 0a686f73 746d6173 746572c0 - 48000000 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.038545 - select max=5 rfds=[4] wfds=[] efds=[] to=1.970863 - select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.040786 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 31268580 00010000 00010000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 10000104 - 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 - 02756b00 00060001 0000003c 0027036e 7330c048 0a686f73 746d6173 746572c0 - 48000000 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.042628 - select max=5 rfds=[4] wfds=[] efds=[] to=1.968414 - select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.044653 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 31278580 00010000 00010000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 11000104 - 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 - 02756b00 00060001 0000003c 0027036e 7330c048 0a686f73 746d6173 746572c0 - 48000000 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.046451 - select max=5 rfds=[4] wfds=[] efds=[] to=1.965838 - select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.049972 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 31288580 00010004 00010001 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 010001c0 0c000100 01000000 3c0004ac 122d23c0 0c000100 01000000 3c0004ac 122d06c0 0c000100 01000000 3c0004ac 122d01c0 0c000100 01000000 3c00047f 00000104 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 02756b00 00020001 0000003c 0006036e 7330c088 c0ae0001 00010001 51800004 ac122d06. + +0.001078 recvfrom fd=4 buflen=512 *addrlen=16 recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.052342 - select max=5 rfds=[4] wfds=[] efds=[] to=1.961173 - select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.053705 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 31298580 00010000 00010000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 02000104 - 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 - 02756b00 00060001 0000003c 0027036e 7330c048 0a686f73 746d6173 746572c0 - 48000000 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.055527 - select max=5 rfds=[4] wfds=[] efds=[] to=1.959208 - select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.057559 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 312a8580 00010000 00010000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 0c000104 - 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 - 02756b00 00060001 0000003c 0027036e 7330c048 0a686f73 746d6173 746572c0 - 48000000 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.059388 - select max=5 rfds=[4] wfds=[] efds=[] to=1.956887 - select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.061551 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 312b8580 00010000 00010000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 0f000104 - 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 - 02756b00 00060001 0000003c 0027036e 7330c048 0a686f73 746d6173 746572c0 - 48000000 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.063340 - select max=5 rfds=[4] wfds=[] efds=[] to=1.954148 - select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.065374 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 312c8580 00010000 00010000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 06000104 - 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 - 02756b00 00060001 0000003c 0027036e 7330c048 0a686f73 746d6173 746572c0 - 48000000 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.067239 - select max=5 rfds=[4] wfds=[] efds=[] to=1.951493 - select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.069391 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 312d8580 00010000 00010000 096d616e 79616464 72730474 65737403 69776a0a - 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 11000104 - 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 - 02756b00 00060001 0000003c 0027036e 7330c048 0a686f73 746d6173 746572c0 - 48000000 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=EAGAIN + +0.000329 close fd=4 close=OK + +0.000240 diff --git a/regress/case-norm.stderr b/regress/case-norm.err similarity index 100% rename from regress/case-norm.stderr rename to regress/case-norm.err diff --git a/regress/case-norm.stdout b/regress/case-norm.out similarity index 100% rename from regress/case-norm.stdout rename to regress/case-norm.out diff --git a/regress/case-norm.sys b/regress/case-norm.sys index 925352d..7342fde 100644 --- a/regress/case-norm.sys +++ b/regress/case-norm.sys @@ -1,23 +1,23 @@ default :1 chiark.greenend.org.uk + start 912888966.802483 socket type=SOCK_DGRAM socket=4 + +0.000204 fcntl fd=4 cmd=F_GETFL fcntl=2 + +0.000670 fcntl fd=4 cmd=F_SETFL 2050 fcntl=0 - gettimeofday - gettimeofday=OK tv=912366196.835269 + +0.000072 sendto fd=4 addr=172.18.45.6:53 311f0100 00010000 00000000 06636869 61726b08 67726565 6e656e64 036f7267 02756b00 00010001. sendto=40 - gettimeofday - gettimeofday=OK tv=+0.001166 - select max=5 rfds=[4] wfds=[] efds=[] to=1.998834 + +0.000579 + select max=5 rfds=[4] wfds=[] efds=[] to=1.999421 select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.007822 + +0.006414 recvfrom fd=4 buflen=512 *addrlen=16 recvfrom=OK addr=172.18.45.6:53 311f8580 00010001 00020002 06636869 61726b08 67726565 6e656e64 036f7267 @@ -25,7 +25,10 @@ default 64036f72 6702756b 00000200 01000151 80001103 6e73300a 72656c61 74697669 7479c038 c0380002 00010001 51800006 036e7331 c057c053 00010001 00015180 0004ac12 2d06c070 00010001 00015180 0004ac12 2d41. + +0.000874 recvfrom fd=4 buflen=512 *addrlen=16 recvfrom=EAGAIN + +0.000179 close fd=4 close=OK + +0.000184 diff --git a/regress/case-trunc.stderr b/regress/case-trunc.err similarity index 100% rename from regress/case-trunc.stderr rename to regress/case-trunc.err diff --git a/regress/case-trunc.out b/regress/case-trunc.out new file mode 100644 index 0000000..dbd0c4a --- /dev/null +++ b/regress/case-trunc.out @@ -0,0 +1,3 @@ +adns debug: using nameserver 172.18.45.6 +trunc.test.iwj.relativity.greenend.org.uk type 1 A(-) submitted +trunc.test.iwj.relativity.greenend.org.uk type A(-): No such data; nrrs=0; cname=$ diff --git a/regress/case-trunc.stdout b/regress/case-trunc.stdout deleted file mode 100644 index 5f2fb23..0000000 --- a/regress/case-trunc.stdout +++ /dev/null @@ -1,62 +0,0 @@ -adns debug: using nameserver 172.18.45.6 -trunc.test.iwj.relativity.greenend.org.uk type 1 A(-) submitted -trunc.test.iwj.relativity.greenend.org.uk type 2 NS(raw) submitted -trunc.test.iwj.relativity.greenend.org.uk type 5 CNAME(-) submitted -trunc.test.iwj.relativity.greenend.org.uk type 6 SOA(raw) submitted -trunc.test.iwj.relativity.greenend.org.uk type 12 PTR(raw) submitted -trunc.test.iwj.relativity.greenend.org.uk type 13 HINFO(-) submitted -trunc.test.iwj.relativity.greenend.org.uk type 15 MX(raw) submitted -trunc.test.iwj.relativity.greenend.org.uk type 16 TXT(-) submitted -trunc.test.iwj.relativity.greenend.org.uk type 17 RP(raw) submitted -trunc.test.iwj.relativity.greenend.org.uk type 65537 A(addr) submitted -trunc.test.iwj.relativity.greenend.org.uk type 65538 NS(+addr) submitted -trunc.test.iwj.relativity.greenend.org.uk type 65548 PTR(checked) submitted -trunc.test.iwj.relativity.greenend.org.uk type 65551 MX(+addr) submitted -trunc.test.iwj.relativity.greenend.org.uk type 131078 SOA(822) submitted -trunc.test.iwj.relativity.greenend.org.uk type 131089 RP(822) submitted -trunc.test.iwj.relativity.greenend.org.uk type A(-): No such data; nrrs=0; cname=$ -trunc.test.iwj.relativity.greenend.org.uk type NS(raw): No such data; nrrs=0; cname=$ -trunc.test.iwj.relativity.greenend.org.uk type CNAME(-): No such data; nrrs=0; cname=$ -trunc.test.iwj.relativity.greenend.org.uk type SOA(raw): No such data; nrrs=0; cname=$ -adns debug: TCP connected (NS=172.18.45.6) -trunc.test.iwj.relativity.greenend.org.uk type PTR(raw): OK; nrrs=30; cname=$ - "long.domain.to.force.truncation.0.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.1.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.2.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.3.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.4.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.5.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.6.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.7.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.8.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.9.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.10.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.11.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.12.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.13.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.14.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.15.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.16.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.17.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.18.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.19.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.20.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.21.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.22.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.23.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.24.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.25.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.26.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.27.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.28.test.iwj.relativity.greenend.org.uk" - "long.domain.to.force.truncation.29.test.iwj.relativity.greenend.org.uk" -trunc.test.iwj.relativity.greenend.org.uk type HINFO(-): No such data; nrrs=0; cname=$ -trunc.test.iwj.relativity.greenend.org.uk type MX(raw): No such data; nrrs=0; cname=$ -trunc.test.iwj.relativity.greenend.org.uk type TXT(-): No such data; nrrs=0; cname=$ -trunc.test.iwj.relativity.greenend.org.uk type RP(raw): No such data; nrrs=0; cname=$ -trunc.test.iwj.relativity.greenend.org.uk type A(addr): No such data; nrrs=0; cname=$ -trunc.test.iwj.relativity.greenend.org.uk type NS(+addr): No such data; nrrs=0; cname=$ -trunc.test.iwj.relativity.greenend.org.uk type PTR(checked): Domain invalid for particular DNS query type; nrrs=0; cname=$ -trunc.test.iwj.relativity.greenend.org.uk type MX(+addr): No such data; nrrs=0; cname=$ -trunc.test.iwj.relativity.greenend.org.uk type SOA(822): No such data; nrrs=0; cname=$ -trunc.test.iwj.relativity.greenend.org.uk type RP(822): No such data; nrrs=0; cname=$ diff --git a/regress/case-trunc.sys b/regress/case-trunc.sys index 0d06a57..6702009 100644 --- a/regress/case-trunc.sys +++ b/regress/case-trunc.sys @@ -1,107 +1,23 @@ default -trunc.test.iwj.relativity.greenend.org.uk +:1 trunc.test.iwj.relativity.greenend.org.uk + start 912888921.274801 socket type=SOCK_DGRAM socket=4 + +0.000207 fcntl fd=4 cmd=F_GETFL fcntl=2 + +0.000321 fcntl fd=4 cmd=F_SETFL 2050 fcntl=0 - gettimeofday - gettimeofday=OK tv=912366830.440647 + +0.000443 sendto fd=4 addr=172.18.45.6:53 311f0100 00010000 00000000 05747275 6e630474 65737403 69776a0a 72656c61 74697669 74790867 7265656e 656e6403 6f726702 756b0000 010001. sendto=59 - gettimeofday - gettimeofday=OK tv=+0.001285 - sendto fd=4 addr=172.18.45.6:53 - 31200100 00010000 00000000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 020001. - sendto=59 - gettimeofday - gettimeofday=OK tv=+0.002381 - sendto fd=4 addr=172.18.45.6:53 - 31210100 00010000 00000000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 050001. - sendto=59 - gettimeofday - gettimeofday=OK tv=+0.003584 - sendto fd=4 addr=172.18.45.6:53 - 31220100 00010000 00000000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 060001. - sendto=59 - gettimeofday - gettimeofday=OK tv=+0.005427 - sendto fd=4 addr=172.18.45.6:53 - 31230100 00010000 00000000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 0c0001. - sendto=59 - gettimeofday - gettimeofday=OK tv=+0.006672 - sendto fd=4 addr=172.18.45.6:53 - 31240100 00010000 00000000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 0d0001. - sendto=59 - gettimeofday - gettimeofday=OK tv=+0.007786 - sendto fd=4 addr=172.18.45.6:53 - 31250100 00010000 00000000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 0f0001. - sendto=59 - gettimeofday - gettimeofday=OK tv=+0.008911 - sendto fd=4 addr=172.18.45.6:53 - 31260100 00010000 00000000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 100001. - sendto=59 - gettimeofday - gettimeofday=OK tv=+0.010335 - sendto fd=4 addr=172.18.45.6:53 - 31270100 00010000 00000000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 110001. - sendto=59 - gettimeofday - gettimeofday=OK tv=+0.011635 - sendto fd=4 addr=172.18.45.6:53 - 31280100 00010000 00000000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 010001. - sendto=59 - gettimeofday - gettimeofday=OK tv=+0.012747 - sendto fd=4 addr=172.18.45.6:53 - 31290100 00010000 00000000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 020001. - sendto=59 - gettimeofday - gettimeofday=OK tv=+0.013874 - sendto fd=4 addr=172.18.45.6:53 - 312a0100 00010000 00000000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 0c0001. - sendto=59 - gettimeofday - gettimeofday=OK tv=+0.015028 - sendto fd=4 addr=172.18.45.6:53 - 312b0100 00010000 00000000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 0f0001. - sendto=59 - gettimeofday - gettimeofday=OK tv=+0.016411 - sendto fd=4 addr=172.18.45.6:53 - 312c0100 00010000 00000000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 060001. - sendto=59 - gettimeofday - gettimeofday=OK tv=+0.017642 - sendto fd=4 addr=172.18.45.6:53 - 312d0100 00010000 00000000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 110001. - sendto=59 - gettimeofday - gettimeofday=OK tv=+0.019086 - select max=5 rfds=[4] wfds=[] efds=[] to=1.980914 + +0.000682 + select max=5 rfds=[4] wfds=[] efds=[] to=1.999318 select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.019816 + +0.006406 recvfrom fd=4 buflen=512 *addrlen=16 recvfrom=OK addr=172.18.45.6:53 311f8580 00010000 00010000 05747275 6e630474 65737403 69776a0a 72656c61 @@ -109,384 +25,10 @@ trunc.test.iwj.relativity.greenend.org.uk 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 02756b00 00060001 0000003c 0027036e 7330c044 0a686f73 746d6173 746572c0 44000000 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 31208580 00010000 00010000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 02000104 74657374 - 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 02756b00 - 00060001 0000003c 0027036e 7330c044 0a686f73 746d6173 746572c0 44000000 - 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.022761 - select max=5 rfds=[4] wfds=[] efds=[] to=1.979620 - select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.023979 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 31218580 00010000 00010000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 05000104 74657374 - 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 02756b00 - 00060001 0000003c 0027036e 7330c044 0a686f73 746d6173 746572c0 44000000 - 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.025705 - select max=5 rfds=[4] wfds=[] efds=[] to=1.977879 - select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.029705 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 31228580 00010000 00010000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 06000104 74657374 - 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 02756b00 - 00060001 0000003c 0027036e 7330c044 0a686f73 746d6173 746572c0 44000000 - 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.031517 - select max=5 rfds=[4] wfds=[] efds=[] to=1.973910 - select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.049551 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 31238380 00010008 00000000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 0c0001c0 0c000c00 - 01000000 3c004704 6c6f6e67 06646f6d 61696e02 746f0566 6f726365 0a747275 - 6e636174 696f6e01 30047465 73740369 776a0a72 656c6174 69766974 79086772 - 65656e65 6e64036f 72670275 6b00c00c 000c0001 0000003c 0024046c 6f6e6706 - 646f6d61 696e0274 6f05666f 7263650a 7472756e 63617469 6f6e0131 c069c00c - 000c0001 0000003c 0024046c 6f6e6706 646f6d61 696e0274 6f05666f 7263650a - 7472756e 63617469 6f6e0132 c069c00c 000c0001 0000003c 0024046c 6f6e6706 - 646f6d61 696e0274 6f05666f 7263650a 7472756e 63617469 6f6e0133 c069c00c - 000c0001 0000003c 0024046c 6f6e6706 646f6d61 696e0274 6f05666f 7263650a - 7472756e 63617469 6f6e0134 c069c00c 000c0001 0000003c 0024046c 6f6e6706 - 646f6d61 696e0274 6f05666f 7263650a 7472756e 63617469 6f6e0135 c069c00c - 000c0001 0000003c 0024046c 6f6e6706 646f6d61 696e0274 6f05666f 7263650a - 7472756e 63617469 6f6e0136 c069c00c 000c0001 0000003c 0024046c 6f6e6706 - 646f6d61 696e0274 6f05666f 7263650a 7472756e 63617469 6f6e0137 c069. - socket type=SOCK_STREAM - socket=5 - fcntl fd=5 cmd=F_GETFL - fcntl=2 - fcntl fd=5 cmd=F_SETFL 2050 - fcntl=0 - connect fd=5 addr=172.18.45.6:53 - connect=EINPROGRESS - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 31248580 00010000 00010000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 0d000104 74657374 - 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 02756b00 - 00060001 0000003c 0027036e 7330c044 0a686f73 746d6173 746572c0 44000000 - 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.056459 - select max=6 rfds=[4] wfds=[5] efds=[] to=1.951327 - select=1 rfds=[] wfds=[5] efds=[] - gettimeofday - gettimeofday=OK tv=+0.057505 - read fd=5 buflen=1 - read=EAGAIN - write fd=5 - 003b3123 01000001 00000000 00000574 72756e63 04746573 74036977 6a0a7265 - 6c617469 76697479 08677265 656e656e 64036f72 6702756b 00000c00 01. - write=61 - gettimeofday - gettimeofday=OK tv=+0.059150 - select max=6 rfds=[4,5] wfds=[] efds=[5] to=1.948636 - select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.063913 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 31258580 00010000 00010000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 0f000104 74657374 - 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 02756b00 - 00060001 0000003c 0027036e 7330c044 0a686f73 746d6173 746572c0 44000000 - 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.065569 - select max=6 rfds=[4,5] wfds=[] efds=[5] to=1.943342 - select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.072627 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 31268580 00010000 00010000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 10000104 74657374 - 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 02756b00 - 00060001 0000003c 0027036e 7330c044 0a686f73 746d6173 746572c0 44000000 - 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.074300 - select max=6 rfds=[4,5] wfds=[] efds=[5] to=1.936035 - select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.080935 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 31278580 00010000 00010000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 11000104 74657374 - 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 02756b00 - 00060001 0000003c 0027036e 7330c044 0a686f73 746d6173 746572c0 44000000 - 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.082614 - select max=6 rfds=[4,5] wfds=[] efds=[5] to=1.929021 - select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.161168 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 31288580 00010000 00010000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 01000104 74657374 - 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 02756b00 - 00060001 0000003c 0027036e 7330c044 0a686f73 746d6173 746572c0 44000000 - 0e00000e 10000000 780064c8 00000000 3c. + +0.000839 recvfrom fd=4 buflen=512 *addrlen=16 recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.162908 - select max=6 rfds=[4,5] wfds=[] efds=[5] to=1.849839 - select=1 rfds=[5] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.165783 - read fd=5 buflen=2 - read=OK - 0638. - read fd=5 buflen=1592 - read=OK - 31238580 0001001e 00010001 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 0c0001c0 0c000c00 - 01000000 3c004704 6c6f6e67 06646f6d 61696e02 746f0566 6f726365 0a747275 - 6e636174 696f6e01 30047465 73740369 776a0a72 656c6174 69766974 79086772 - 65656e65 6e64036f 72670275 6b00c00c 000c0001 0000003c 0024046c 6f6e6706 - 646f6d61 696e0274 6f05666f 7263650a 7472756e 63617469 6f6e0131 c069c00c - 000c0001 0000003c 0024046c 6f6e6706 646f6d61 696e0274 6f05666f 7263650a - 7472756e 63617469 6f6e0132 c069c00c 000c0001 0000003c 0024046c 6f6e6706 - 646f6d61 696e0274 6f05666f 7263650a 7472756e 63617469 6f6e0133 c069c00c - 000c0001 0000003c 0024046c 6f6e6706 646f6d61 696e0274 6f05666f 7263650a - 7472756e 63617469 6f6e0134 c069c00c 000c0001 0000003c 0024046c 6f6e6706 - 646f6d61 696e0274 6f05666f 7263650a 7472756e 63617469 6f6e0135 c069c00c - 000c0001 0000003c 0024046c 6f6e6706 646f6d61 696e0274 6f05666f 7263650a - 7472756e 63617469 6f6e0136 c069c00c 000c0001 0000003c 0024046c 6f6e6706 - 646f6d61 696e0274 6f05666f 7263650a 7472756e 63617469 6f6e0137 c069c00c - 000c0001 0000003c 0024046c 6f6e6706 646f6d61 696e0274 6f05666f 7263650a - 7472756e 63617469 6f6e0138 c069c00c 000c0001 0000003c 0024046c 6f6e6706 - 646f6d61 696e0274 6f05666f 7263650a 7472756e 63617469 6f6e0139 c069c00c - 000c0001 0000003c 0025046c 6f6e6706 646f6d61 696e0274 6f05666f 7263650a - 7472756e 63617469 6f6e0231 30c069c0 0c000c00 01000000 3c002504 6c6f6e67 - 06646f6d 61696e02 746f0566 6f726365 0a747275 6e636174 696f6e02 3131c069 - c00c000c 00010000 003c0025 046c6f6e 6706646f 6d61696e 02746f05 666f7263 - 650a7472 756e6361 74696f6e 023132c0 69c00c00 0c000100 00003c00 25046c6f - 6e670664 6f6d6169 6e02746f 05666f72 63650a74 72756e63 6174696f 6e023133 - c069c00c 000c0001 0000003c 0025046c 6f6e6706 646f6d61 696e0274 6f05666f - 7263650a 7472756e 63617469 6f6e0231 34c069c0 0c000c00 01000000 3c002504 - 6c6f6e67 06646f6d 61696e02 746f0566 6f726365 0a747275 6e636174 696f6e02 - 3135c069 c00c000c 00010000 003c0025 046c6f6e 6706646f 6d61696e 02746f05 - 666f7263 650a7472 756e6361 74696f6e 023136c0 69c00c00 0c000100 00003c00 - 25046c6f 6e670664 6f6d6169 6e02746f 05666f72 63650a74 72756e63 6174696f - 6e023137 c069c00c 000c0001 0000003c 0025046c 6f6e6706 646f6d61 696e0274 - 6f05666f 7263650a 7472756e 63617469 6f6e0231 38c069c0 0c000c00 01000000 - 3c002504 6c6f6e67 06646f6d 61696e02 746f0566 6f726365 0a747275 6e636174 - 696f6e02 3139c069 c00c000c 00010000 003c0025 046c6f6e 6706646f 6d61696e - 02746f05 666f7263 650a7472 756e6361 74696f6e 023230c0 69c00c00 0c000100 - 00003c00 25046c6f 6e670664 6f6d6169 6e02746f 05666f72 63650a74 72756e63 - 6174696f 6e023231 c069c00c 000c0001 0000003c 0025046c 6f6e6706 646f6d61 - 696e0274 6f05666f 7263650a 7472756e 63617469 6f6e0232 32c069c0 0c000c00 - 01000000 3c002504 6c6f6e67 06646f6d 61696e02 746f0566 6f726365 0a747275 - 6e636174 696f6e02 3233c069 c00c000c 00010000 003c0025 046c6f6e 6706646f - 6d61696e 02746f05 666f7263 650a7472 756e6361 74696f6e 023234c0 69c00c00 - 0c000100 00003c00 25046c6f 6e670664 6f6d6169 6e02746f 05666f72 63650a74 - 72756e63 6174696f 6e023235 c069c00c 000c0001 0000003c 0025046c 6f6e6706 - 646f6d61 696e0274 6f05666f 7263650a 7472756e 63617469 6f6e0232 36c069c0 - 0c000c00 01000000 3c002504 6c6f6e67 06646f6d 61696e02 746f0566 6f726365 - 0a747275 6e636174 696f6e02 3237c069 c00c. - read fd=5 buflen=134 - read=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.174777 - select max=6 rfds=[4,5] wfds=[] efds=[5] to=1.837970 - select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.175456 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 31298580 00010000 00010000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 02000104 74657374 - 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 02756b00 - 00060001 0000003c 0027036e 7330c044 0a686f73 746d6173 746572c0 44000000 - 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.177225 - select max=6 rfds=[4,5] wfds=[] efds=[5] to=1.836649 - select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.188633 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 312a8380 00010008 00000000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 0c0001c0 0c000c00 - 01000000 3c004704 6c6f6e67 06646f6d 61696e02 746f0566 6f726365 0a747275 - 6e636174 696f6e01 30047465 73740369 776a0a72 656c6174 69766974 79086772 - 65656e65 6e64036f 72670275 6b00c00c 000c0001 0000003c 0024046c 6f6e6706 - 646f6d61 696e0274 6f05666f 7263650a 7472756e 63617469 6f6e0131 c069c00c - 000c0001 0000003c 0024046c 6f6e6706 646f6d61 696e0274 6f05666f 7263650a - 7472756e 63617469 6f6e0132 c069c00c 000c0001 0000003c 0024046c 6f6e6706 - 646f6d61 696e0274 6f05666f 7263650a 7472756e 63617469 6f6e0133 c069c00c - 000c0001 0000003c 0024046c 6f6e6706 646f6d61 696e0274 6f05666f 7263650a - 7472756e 63617469 6f6e0134 c069c00c 000c0001 0000003c 0024046c 6f6e6706 - 646f6d61 696e0274 6f05666f 7263650a 7472756e 63617469 6f6e0135 c069c00c - 000c0001 0000003c 0024046c 6f6e6706 646f6d61 696e0274 6f05666f 7263650a - 7472756e 63617469 6f6e0136 c069c00c 000c0001 0000003c 0024046c 6f6e6706 - 646f6d61 696e0274 6f05666f 7263650a 7472756e 63617469 6f6e0137 c069. - write fd=5 - 003b312a 01000001 00000000 00000574 72756e63 04746573 74036977 6a0a7265 - 6c617469 76697479 08677265 656e656e 64036f72 6702756b 00000c00 01. - write=61 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.192953 - select max=6 rfds=[4,5] wfds=[] efds=[5] to=1.822075 - select=1 rfds=[5] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.194059 - read fd=5 buflen=134 - read=OK - 000c0001 0000003c 0025046c 6f6e6706 646f6d61 696e0274 6f05666f 7263650a - 7472756e 63617469 6f6e0232 38c069c0 0c000c00 01000000 3c002504 6c6f6e67 - 06646f6d 61696e02 746f0566 6f726365 0a747275 6e636174 696f6e02 3239c069 - c0690002 00010000 003c0006 036e7330 c072036e 7330c072 00010001 00015180 - 0004ac12 2d06. - read fd=5 buflen=1594 - read=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.199200 - select max=6 rfds=[4,5] wfds=[] efds=[5] to=1.815828 - select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.199873 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 312b8580 00010000 00010000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 0f000104 74657374 - 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 02756b00 - 00060001 0000003c 0027036e 7330c044 0a686f73 746d6173 746572c0 44000000 - 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 312c8580 00010000 00010000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 06000104 74657374 - 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 02756b00 - 00060001 0000003c 0027036e 7330c044 0a686f73 746d6173 746572c0 44000000 - 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.202980 - select max=6 rfds=[4,5] wfds=[] efds=[5] to=1.814662 - select=1 rfds=[4] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.282344 - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=OK addr=172.18.45.6:53 - 312d8580 00010000 00010000 05747275 6e630474 65737403 69776a0a 72656c61 - 74697669 74790867 7265656e 656e6403 6f726702 756b0000 11000104 74657374 - 0369776a 0a72656c 61746976 69747908 67726565 6e656e64 036f7267 02756b00 - 00060001 0000003c 0027036e 7330c044 0a686f73 746d6173 746572c0 44000000 - 0e00000e 10000000 780064c8 00000000 3c. - recvfrom fd=4 buflen=512 *addrlen=16 - recvfrom=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.284085 - select max=6 rfds=[4,5] wfds=[] efds=[5] to=59.904548 - select=1 rfds=[5] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.286646 - read fd=5 buflen=1594 - read=OK - 0638312a 85800001 001e0001 00010574 72756e63 04746573 74036977 6a0a7265 - 6c617469 76697479 08677265 656e656e 64036f72 6702756b 00000c00 01c00c00 - 0c000100 00003c00 47046c6f 6e670664 6f6d6169 6e02746f 05666f72 63650a74 - 72756e63 6174696f 6e013004 74657374 0369776a 0a72656c 61746976 69747908 - 67726565 6e656e64 036f7267 02756b00 c00c000c 00010000 003c0024 046c6f6e - 6706646f 6d61696e 02746f05 666f7263 650a7472 756e6361 74696f6e 0131c069 - c00c000c 00010000 003c0024 046c6f6e 6706646f 6d61696e 02746f05 666f7263 - 650a7472 756e6361 74696f6e 0132c069 c00c000c 00010000 003c0024 046c6f6e - 6706646f 6d61696e 02746f05 666f7263 650a7472 756e6361 74696f6e 0133c069 - c00c000c 00010000 003c0024 046c6f6e 6706646f 6d61696e 02746f05 666f7263 - 650a7472 756e6361 74696f6e 0134c069 c00c000c 00010000 003c0024 046c6f6e - 6706646f 6d61696e 02746f05 666f7263 650a7472 756e6361 74696f6e 0135c069 - c00c000c 00010000 003c0024 046c6f6e 6706646f 6d61696e 02746f05 666f7263 - 650a7472 756e6361 74696f6e 0136c069 c00c000c 00010000 003c0024 046c6f6e - 6706646f 6d61696e 02746f05 666f7263 650a7472 756e6361 74696f6e 0137c069 - c00c000c 00010000 003c0024 046c6f6e 6706646f 6d61696e 02746f05 666f7263 - 650a7472 756e6361 74696f6e 0138c069 c00c000c 00010000 003c0024 046c6f6e - 6706646f 6d61696e 02746f05 666f7263 650a7472 756e6361 74696f6e 0139c069 - c00c000c 00010000 003c0025 046c6f6e 6706646f 6d61696e 02746f05 666f7263 - 650a7472 756e6361 74696f6e 023130c0 69c00c00 0c000100 00003c00 25046c6f - 6e670664 6f6d6169 6e02746f 05666f72 63650a74 72756e63 6174696f 6e023131 - c069c00c 000c0001 0000003c 0025046c 6f6e6706 646f6d61 696e0274 6f05666f - 7263650a 7472756e 63617469 6f6e0231 32c069c0 0c000c00 01000000 3c002504 - 6c6f6e67 06646f6d 61696e02 746f0566 6f726365 0a747275 6e636174 696f6e02 - 3133c069 c00c000c 00010000 003c0025 046c6f6e 6706646f 6d61696e 02746f05 - 666f7263 650a7472 756e6361 74696f6e 023134c0 69c00c00 0c000100 00003c00 - 25046c6f 6e670664 6f6d6169 6e02746f 05666f72 63650a74 72756e63 6174696f - 6e023135 c069c00c 000c0001 0000003c 0025046c 6f6e6706 646f6d61 696e0274 - 6f05666f 7263650a 7472756e 63617469 6f6e0231 36c069c0 0c000c00 01000000 - 3c002504 6c6f6e67 06646f6d 61696e02 746f0566 6f726365 0a747275 6e636174 - 696f6e02 3137c069 c00c000c 00010000 003c0025 046c6f6e 6706646f 6d61696e - 02746f05 666f7263 650a7472 756e6361 74696f6e 023138c0 69c00c00 0c000100 - 00003c00 25046c6f 6e670664 6f6d6169 6e02746f 05666f72 63650a74 72756e63 - 6174696f 6e023139 c069c00c 000c0001 0000003c 0025046c 6f6e6706 646f6d61 - 696e0274 6f05666f 7263650a 7472756e 63617469 6f6e0232 30c069c0 0c000c00 - 01000000 3c002504 6c6f6e67 06646f6d 61696e02 746f0566 6f726365 0a747275 - 6e636174 696f6e02 3231c069 c00c000c 00010000 003c0025 046c6f6e 6706646f - 6d61696e 02746f05 666f7263 650a7472 756e6361 74696f6e 023232c0 69c00c00 - 0c000100 00003c00 25046c6f 6e670664 6f6d6169 6e02746f 05666f72 63650a74 - 72756e63 6174696f 6e023233 c069c00c 000c0001 0000003c 0025046c 6f6e6706 - 646f6d61 696e0274 6f05666f 7263650a 7472756e 63617469 6f6e0232 34c069c0 - 0c000c00 01000000 3c002504 6c6f6e67 06646f6d 61696e02 746f0566 6f726365 - 0a747275 6e636174 696f6e02 3235c069 c00c000c 00010000 003c0025 046c6f6e - 6706646f 6d61696e 02746f05 666f7263 650a7472 756e6361 74696f6e 023236c0 - 69c00c00 0c000100 00003c00 25046c6f 6e670664 6f6d6169 6e02746f 05666f72 - 63650a74 72756e63 6174696f 6e023237 c069c00c. - read fd=5 buflen=134 - read=EAGAIN - gettimeofday - gettimeofday=OK tv=+0.294703 - select max=6 rfds=[4,5] wfds=[] efds=[5] to=59.893930 - select=1 rfds=[5] wfds=[] efds=[] - gettimeofday - gettimeofday=OK tv=+0.477645 - read fd=5 buflen=134 - read=OK - 000c0001 0000003c 0025046c 6f6e6706 646f6d61 696e0274 6f05666f 7263650a - 7472756e 63617469 6f6e0232 38c069c0 0c000c00 01000000 3c002504 6c6f6e67 - 06646f6d 61696e02 746f0566 6f726365 0a747275 6e636174 696f6e02 3239c069 - c0690002 00010000 003c0006 036e7330 c072036e 7330c072 00010001 00015180 - 0004ac12 2d06. - read fd=5 buflen=1594 - read=EAGAIN + +0.000141 close fd=4 close=OK - close fd=5 - close=OK + +0.000157 diff --git a/regress/harness.h.m4 b/regress/harness.h.m4 index 5f0c9f4..8f95b33 100644 --- a/regress/harness.h.m4 +++ b/regress/harness.h.m4 @@ -37,6 +37,7 @@ m4_define(`hm_syscall', `int H$1(hm_args_massage($3,void));') m4_include(`hsyscalls.i4') int Hwritev(int fd, const struct iovec *vector, size_t count); +int Hgettimeofday(struct timeval *tv, struct timezone *tz); /* There is a Q function (Q for Question) for each such syscall; * it constructs a string representing the call, and calls Q_str @@ -69,6 +70,7 @@ void Tvba(const char *str); /* Shared globals */ extern vbuf vb; +extern struct timeval currenttime; extern const struct Terrno { const char *n; int v; } Terrnos[]; #endif diff --git a/regress/hcommon.c.m4 b/regress/hcommon.c.m4 index 5d6f471..9610afc 100644 --- a/regress/hcommon.c.m4 +++ b/regress/hcommon.c.m4 @@ -33,6 +33,7 @@ m4_include(hmacros.i4) vbuf vb; FILE *Toutputfile= 0; +struct timeval currenttime; const struct Terrno Terrnos[]= { { "EAGAIN", EAGAIN }, @@ -50,6 +51,12 @@ const struct Terrno Terrnos[]= { static vbuf vbw; +int Hgettimeofday(struct timeval *tv, struct timezone *tz) { + Tmust("gettimeofday","tz",!tz); + *tv= currenttime; + return 0; +} + int Hwritev(int fd, const struct iovec *vector, size_t count) { size_t i; diff --git a/regress/hmacros.i4 b/regress/hmacros.i4 index 4e5123e..4e37310 100644 --- a/regress/hmacros.i4 +++ b/regress/hmacros.i4 @@ -35,7 +35,6 @@ m4_define(`hm_args_massage', m4_define(`hm_create_nothing', ` m4_define(`hm_na',`') - m4_define(`hm_arg_timeval_out_abs', `') m4_define(`hm_arg_nullptr', `') m4_define(`hm_arg_int', `') m4_define(`hm_arg_fdset_io', `') @@ -53,7 +52,6 @@ m4_define(`hm_create_nothing', ` m4_define(`hm_create_proto_h',` m4_define(`hm_na', `hm_comma') - m4_define(`hm_arg_timeval_out_abs', `struct timeval *$'`1') m4_define(`hm_arg_nullptr', `$'`1 $'`2') m4_define(`hm_arg_int', `int $'`1') m4_define(`hm_arg_fdset_io', `fd_set *$'`1') @@ -71,7 +69,6 @@ m4_define(`hm_create_proto_h',` m4_define(`hm_create_proto_q',` hm_create_proto_h - m4_define(`hm_arg_timeval_out_abs', `') m4_define(`hm_arg_nullptr', `') m4_define(`hm_arg_fdset_io', `const fd_set *$'`1') m4_define(`hm_arg_must', `') @@ -104,7 +101,6 @@ m4_define(`hm_create_hqcall_init',` m4_define(`hm_create_realcall_args',` m4_define(`hm_na',`hm_comma') - m4_define(`hm_arg_timeval_out_abs', `$'`1') m4_define(`hm_arg_nullptr', `0') m4_define(`hm_arg_int', `$'`1') m4_define(`hm_arg_fdset_io', `$'`1') @@ -122,7 +118,6 @@ m4_define(`hm_create_realcall_args',` m4_define(`hm_create_hqcall_args',` hm_create_realcall_args - m4_define(`hm_arg_timeval_out_abs', `') m4_define(`hm_arg_nullptr', `') m4_define(`hm_arg_must', `') m4_define(`hm_arg_ign', `') diff --git a/regress/hplayback.c.m4 b/regress/hplayback.c.m4 index 507354e..5da418a 100644 --- a/regress/hplayback.c.m4 +++ b/regress/hplayback.c.m4 @@ -45,16 +45,6 @@ static void Tensurereportfile(void) { Treportfile= fdopen(fd,"a"); if (!Treportfile) Tfailed("fdopen ADNS_TEST_REPORT_FD"); } -static void Tensureinputfile(void) { - const char *fdstr; - int fd; - - Tinputfile= stdin; - fdstr= getenv("ADNS_TEST_IN_FD"); if (!fdstr) return; - fd= atoi(fdstr); - Tinputfile= fdopen(fd,"r"); if (!Tinputfile) Tfailed("fdopen ADNS_TEST_IN_FD"); -} - static void Psyntax(const char *where) { fprintf(stderr,"adns test harness: syntax error in test log input file: %s\n",where); exit(-1); @@ -65,6 +55,30 @@ static void Pcheckinput(void) { if (feof(Tinputfile)) Psyntax("eof at syscall reply"); } +static void Tensureinputfile(void) { + const char *fdstr; + int fd; + int chars; + unsigned long sec, usec; + + if (Tinputfile) return; + Tinputfile= stdin; + fdstr= getenv("ADNS_TEST_IN_FD"); + if (fdstr) { + fd= atoi(fdstr); + Tinputfile= fdopen(fd,"r"); if (!Tinputfile) Tfailed("fdopen ADNS_TEST_IN_FD"); + } + + if (!adns__vbuf_ensure(&vb2,1000)) Tnomem(); + fgets(vb2.buf,vb2.avail,Tinputfile); Pcheckinput(); + chars= -1; + sscanf(vb2.buf," start %lu.%lu%n",&sec,&usec,&chars); + if (chars==-1) Psyntax("start time invalid"); + currenttime.tv_sec= sec; + currenttime.tv_usec= usec; + if (vb2.buf[chars] != hm_squote\nhm_squote) Psyntax("not newline after start time"); +} + static void Parg(const char *argname) { int l; @@ -87,35 +101,22 @@ static int Perrno(const char *stuff) { return r; } -static struct timeval begin; - -static void Ptimevalabs(struct timeval *tvr) { - int store, chars; +static void P_updatetime(void) { + int chars; unsigned long sec, usec; - struct timeval rv; - - if (vb2.buf[vb2.used]==hm_squote+hm_squote) { - vb2.used++; - rv= begin; - store= 0; - } else { - rv.tv_sec= 0; - rv.tv_usec= 0; - store= 1; - } + + if (!adns__vbuf_ensure(&vb2,1000)) Tnomem(); + fgets(vb2.buf,vb2.avail,Tinputfile); Pcheckinput(); chars= -1; - sscanf(vb2.buf+vb2.used,"%lu.%lu%n",&sec,&usec,&chars); - if (chars==-1) Psyntax("timeval syntax error"); - rv.tv_sec += sec; - rv.tv_usec += usec; - if (begin.tv_usec > 1000000) { - rv.tv_sec++; - rv.tv_usec -= 1000000; + sscanf(vb2.buf," +%lu.%lu%n",&sec,&usec,&chars); + if (chars==-1) Psyntax("update time invalid"); + currenttime.tv_sec+= sec; + currenttime.tv_usec+= usec; + if (currenttime.tv_usec > 1000000) { + currenttime.tv_sec++; + currenttime.tv_usec -= 1000000; } - *tvr= rv; - if (store) begin= rv; - - vb2.used += chars; + if (vb2.buf[chars] != hm_squote\nhm_squote) Psyntax("not newline after update time"); } static void Pfdset(fd_set *set, int max) { @@ -238,7 +239,10 @@ int H$1(hm_args_massage($3,void)) { if (memcmp(vb2.buf," $1=",hm_r_offset)) Psyntax("syscall reply mismatch"); if (vb2.buf[hm_r_offset] == hm_squoteEhm_squote) { - errno= Perrno(vb2.buf+hm_r_offset); + int e; + e= Perrno(vb2.buf+hm_r_offset); + P_updatetime(); + errno= e; return -1; } @@ -260,7 +264,6 @@ int H$1(hm_args_massage($3,void)) { hm_create_nothing m4_define(`hm_arg_fdset_io',`Parg("$'`1"); Pfdset($'`1,$'`2);') m4_define(`hm_arg_addr_out',`Parg("$'`1"); Paddr($'`1,$'`2);') - m4_define(`hm_arg_timeval_out_abs',`Parg("$'`1"); Ptimevalabs($'`1);') $3 if (vb2.used != vb2.avail) Psyntax("junk at end of line"); @@ -268,6 +271,7 @@ int H$1(hm_args_massage($3,void)) { m4_define(`hm_arg_bytes_out',`r= Pbytes($'`2,$'`4);') $3 + P_updatetime(); return r; } ') diff --git a/regress/hrecord.c.m4 b/regress/hrecord.c.m4 index d5ddf86..c3e38e2 100644 --- a/regress/hrecord.c.m4 +++ b/regress/hrecord.c.m4 @@ -28,20 +28,39 @@ m4_include(hmacros.i4) #include "harness.h" -static int begin_set; -static struct timeval begin; static FILE *Toutputfile; /* fixme: record syscall durations, rather than gettimeofday results */ +static void R_recordtime(void) { + int r; + struct timeval tv, tvrel; + + Tensureoutputfile(); + r= gettimeofday(&tv,0); if (r) Tfailed("gettimeofday syscallbegin"); + tvrel.tv_sec= tv.tv_sec - currenttime.tv_sec; + tvrel.tv_usec= tv.tv_usec - currenttime.tv_usec; + if (tv.tv_usec < 0) { tvrel.tv_usec += 1000000; tvrel.tv_sec--; } + Tvbf("\n +%ld.%06ld",(long)tvrel.tv_sec,(long)tvrel.tv_usec); + currenttime= tv; +} + void Tensureoutputfile(void) { const char *fdstr; - int fd; + int fd, r; + if (Toutputfile) return; + Toutputfile= stdout; - fdstr= getenv("ADNS_TEST_OUT_FD"); if (!fdstr) return; - fd= atoi(fdstr); - Toutputfile= fdopen(fd,"a"); if (!Toutputfile) Tfailed("fdopen ADNS_TEST_OUT_FD"); + fdstr= getenv("ADNS_TEST_OUT_FD"); + if (fdstr) { + fd= atoi(fdstr); + Toutputfile= fdopen(fd,"a"); if (!Toutputfile) Tfailed("fdopen ADNS_TEST_OUT_FD"); + } + + r= gettimeofday(¤ttime,0); if (r) Tfailed("gettimeofday syscallbegin"); + if (fprintf(Toutputfile," start %ld.%06ld\n", + (long)currenttime.tv_sec,(long)currenttime.tv_usec) == EOF) Toutputerr(); } void Q_vb(void) { @@ -54,7 +73,7 @@ void Q_vb(void) { static void R_vb(void) { Q_vb(); } - + m4_define(`hm_syscall', ` hm_create_proto_h int H$1(hm_args_massage($3,void)) { @@ -92,23 +111,6 @@ int H$1(hm_args_massage($3,void)) { hm_create_nothing m4_define(`hm_arg_fdset_io',`Tvba(" $'`1="); Tvbfdset($'`2,$'`1);') m4_define(`hm_arg_addr_out',`Tvba(" $'`1="); Tvbaddr($'`1,*$'`2);') - m4_define(`hm_arg_timeval_out_abs',` - if (!begin_set) { - Tvbf(" $'`1=%ld.%06ld",$'`1->tv_sec,$'`1->tv_usec); - begin= *$'`1; - begin_set= 1; - } else { - struct timeval diff; - diff.tv_sec= $'`1->tv_sec - begin.tv_sec; - diff.tv_usec= $'`1->tv_usec - begin.tv_usec; - if (diff.tv_usec < 0) { - diff.tv_sec -= 1; - diff.tv_usec += 1000000; - } - assert(diff.tv_sec >= 0); - assert(diff.tv_usec >= 0); - Tvbf(" $'`1=+%ld.%06ld",diff.tv_sec,diff.tv_usec); - }') $3 hm_create_nothing @@ -122,6 +124,7 @@ int H$1(hm_args_massage($3,void)) { m4_define(`hm_rv_must',`') $2 + R_recordtime(); R_vb(); errno= e; return r; diff --git a/regress/hsyscalls.i4 b/regress/hsyscalls.i4 index cf75329..ff59c1b 100644 --- a/regress/hsyscalls.i4 +++ b/regress/hsyscalls.i4 @@ -27,7 +27,6 @@ m4_dnl hm_rv_fd file descriptor is returned, -1 means see errno m4_dnl hm_rv_succfail returns 0 (ok) or -1 (see errno) m4_dnl hm_rv_len() returns length read/written, must be <=max, -1 => errno m4_dnl is list of macros for arguments, each followed by hm_na -m4_dnl hm_arg_timeval_out_abs() struct timeval, absolute time is returned m4_dnl hm_arg_nullptr(,) pointer of type type, must be null m4_dnl hm_arg_int() signed integer m4_dnl hm_arg_fdset_io(,) fd_set, max bit set is in max @@ -47,12 +46,6 @@ m4_dnl and points to at least bytes ( is of type ) m4_dnl return value from syscall is supposed to be returned length m4_dnl hm_arg_addr_out(,) struct sockaddr*, length io at (an int*) -hm_syscall( - gettimeofday, `hm_rv_must', ` - hm_arg_timeval_out_abs(tv) hm_na - hm_arg_nullptr(struct timezone*, tz) hm_na -') - hm_syscall( select, `hm_rv_any', ` hm_arg_int(max) hm_na diff --git a/regress/m1test b/regress/m1test index b70cde2..5a8bbed 100755 --- a/regress/m1test +++ b/regress/m1test @@ -1,7 +1,13 @@ #!/bin/sh -# usage: m1test set -e + +if [ $# -lt 3 ] +then + echo >&2 'usage: m1test ' + exit 1 +fi + case="case-$1"; shift initfile="$1"; shift queryargs="$*" @@ -13,12 +19,12 @@ echo "$queryargs" >>"$case.sys" echo running "hrecord /... $queryargs" set +e -ADNS_TEST_OUT_FD=3 3>>"$case.sys" >"$case.stdout" 2>"$case.stderr" >"$case.sys" >"$case.out" 2>"$case.err" >"$case.report-o" >"$case.stdout-o" 2>"$case.stderr-o" \ +ADNS_TEST_REPORT_FD=3 3>>"$ocase.report" >"$ocase.out" 2>"$ocase.err" \ ./hplayback "/$initstring" $queryargs rc=$? set -e if test $rc != 0 then - egrep . -- "$case.report-o" "$case.stdout-o" "$case.stderr-o" + egrep . -- "$ocase.report" "$ocase.out" "$ocase.err" echo >&2 "FAILED $case - EXIT STATUS $rc" exit 2 fi -for part in stdout stderr +for part in out err do - if diff -- "$case.$part" "$case.$part-o" + if diff -- "$case.$part" "$ocase.$part" then : else -- 2.30.2