bind9/bin/tests
Nicki Křížek dcc78517be Rewrite xfer/ans11/ans.py to use AsyncDnsServer
Replace the hand-rolled threaded socket server with the standard
AsyncDnsServer framework used by other ans.py servers in the test suite.

The DNS wire-format message builders (IXFR diff, AXFR, SOA, SERVFAIL)
are retained unchanged since they produce carefully crafted messages
needed to trigger the IXFR->AXFR race condition. The server
infrastructure is replaced:

- Manual TCP/UDP socket management and threading replaced by
  AsyncDnsServer, which handles both protocols, pidfile lifecycle,
  and signal handling.
- Query parsing replaced by the framework's dns.message-based parser;
  query dispatch moved into IxfrRaceHandler.get_responses().
- The axfr_done_event threading.Event replaced by a boolean instance
  variable on IxfrRaceHandler, safe within the single asyncio event
  loop.
- For IXFR over TCP, the handler yields two BytesResponseSend actions
  (msg1 then msg2) so the framework sends both with TCP length prefixes,
  preserving the race-triggering sequence.
- For IXFR over UDP, the TC flag is set on the response to force TCP
  retry.
- Unused encode_name_compressed() and parse_dns_query() removed.

Also fix a timing issue that might result in the initial transfer not
being done by the time the test is executed -- since ns11 is started
after ns6. Ensure the initial transfer has happened before running the
ixfr_race test.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit 187e571f4d)
2026-04-03 12:05:44 +00:00
..
startperf Reformat shell scripts with shfmt 2023-10-26 10:23:50 +02:00
system Rewrite xfer/ans11/ans.py to use AsyncDnsServer 2026-04-03 12:05:44 +00:00
testdata/wire move all optional tests from bin/tests to bin/tests/optional 2018-03-09 14:12:47 -08:00
.gitignore Move environment variables from conf.sh to pytest 2024-05-09 17:08:08 +02:00
convert_trs_to_junit.py Remove superfluous 'pylint: disable' directives 2026-02-25 13:33:25 +01:00
Makefile.am Fix pylint's 'invalid-name' errors 2026-02-25 13:15:05 +01:00
test_client.c TLS SNI - add low level support for SNI to the networking code 2024-12-26 18:31:03 +02:00
test_server.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
wire_test.c Finalize removal of memory debug flags size and mctx 2024-12-06 03:13:14 +00:00