The check for the crash with an IPv4 source address and a server with
both IPv4 and IPv6 addresses relies on @localhost resolving to ::1 as
well as 127.0.0.1: without IPv6 the address-family mismatch under test
never happens and the test passes without exercising anything. Skip
it on hosts without IPv6 instead, like the other IPv6-dependent digdelv
tests. The remaining unmarked tests that mention IPv6 addresses only
parse them (the IPv4-mapped server refusal) or read them as record
data, so they work without IPv6.
Assisted-by: Claude:claude-fable-5
assert parse_yaml(result.out)[0]["type"] == "DIG_ERROR"
+@isctest.mark.with_ipv6
def test_source_address_both_families_no_crash(dig, ns1):
"""Check that dig with an IPv4 source address and a server with both
IPv4 and IPv6 addresses does not crash. @localhost is not really
expected to have an answer for the query; only a crash (termination
- by a signal) is an error. See GL #5609 for more information."""
+ by a signal) is an error. Without IPv6, @localhost resolves to the
+ IPv4 address only and the address-family mismatch under test never
+ happens. See GL #5609 for more information."""
result = dig(f"@localhost example -b {ns1.ip}", raise_on_exception=False)
assert result.rc >= 0