diff options
| author | eunhhu <[email protected]> | 2026-10-19 02:48:58 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-10-19 02:48:58 +0100 |
| commit | 7d41626b1c8f343b5b59a35ea3bce6570b996213 (patch) | |
| tree | 3f006bc4fdaeeb63be6a27996a86d464689caec2 /tests/specs | |
| parent | 46935dc0cc4711ef58fcc5129020f75c5e4e098e (diff) | |
| download | pure-7d41626b1c8f343b5b59a35ea3bce6570b996213.tar.gz pure-7d41626b1c8f343b5b59a35ea3bce6570b996213.zip | |
140's 1, DNS messages (RFC 1035), written in aup with no new opcode (aup's examples/dns.aup: a message read by a handler into its header and records, names uncompressed in their wire form, those in NS, CNAME, PTR, MX, SOA and SRV data too, each pointer pointing before the last; written back by the view wire, the owners compressed): 400 messages dnspython made (148,582 bytes, 3,466 records: A, AAAA, NS, CNAME, PTR, MX, SOA, TXT, SRV, EDNS, shared suffixes, 63-byte labels, bytes above 0x7f, 245-byte names) read on the three paths as dnspython reads them (each section's records as a set) and written back to bytes dnspython reads as the same message, the paths' outputs the same bytes; 300 damaged messages as dns_message.py (the Python reference) reads them, 185 refused by both and 115 the same records and bytes; module_specs in make check: 200 of those messages (tests/specs/dns, no dnspython at check time) read on the three paths, written back and read again to the same state and bytes, 23 cut ones failing; dnspython shuffles a set's records unless want_shuffle is off, and merges a set's differing TTLs to the least; bars: written, two workarounds both the core's (bytes have no ==: TEXT_COMPARE takes text alone; a view calls no block fn: CALL is in handlers and functions alone), 115 lines against Python's 72, 244 ns a message byte read and written against the same algorithm in C 3.65 (67x), glibc's resolver reading alone 4.4, pure Python 131 (Pure 1.9x slower), 218 compiled; 63.6 instructions a byte, reading 42%, writing 58%; CHECKPOINT's direction row
Diffstat (limited to 'tests/specs')
| -rw-r--r-- | tests/specs/dns/README.md | 8 | ||||
| -rw-r--r-- | tests/specs/dns/messages.bin | bin | 0 -> 78578 bytes |
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/specs/dns/README.md b/tests/specs/dns/README.md new file mode 100644 index 0000000..873dc02 --- /dev/null +++ b/tests/specs/dns/README.md @@ -0,0 +1,8 @@ +# DNS messages dnspython made + +`messages.bin` is the first 200 of the 400 messages `research/experiments/044-specs/dns_check.py` makes with dnspython +2.7.0 (its seed 140, records unshuffled): queries and responses with A, AAAA, NS, CNAME, PTR, MX, SOA, TXT and SRV records, EDNS, names +sharing suffixes (so compression points back), labels of 63 bytes and of bytes above 0x7f, and names of 245 bytes. Each +is a u16 big-endian length, then its bytes, as over TCP. `tests/check.py`'s `module_specs` reads them with aup's +`examples/dns.aup` on Pure's three paths, then reads what its view `wire` writes back; the research check compares the +records with dnspython's reading. diff --git a/tests/specs/dns/messages.bin b/tests/specs/dns/messages.bin Binary files differnew file mode 100644 index 0000000..3fb520a --- /dev/null +++ b/tests/specs/dns/messages.bin |
