From: Otto Moerbeek Date: Tue, 23 Jul 2024 14:26:08 +0000 (+0200) Subject: Adapt test to not use repeating records X-Git-Tag: dnsdist-2.0.0-alpha1~182^2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4136f5d08d693459323a640e5a9c373e32c18818;p=thirdparty%2Fpdns.git Adapt test to not use repeating records --- diff --git a/regression-tests.recursor-dnssec/test_EDNSBufferSize.py b/regression-tests.recursor-dnssec/test_EDNSBufferSize.py index e9b4ccb4aa..34c31d4b45 100644 --- a/regression-tests.recursor-dnssec/test_EDNSBufferSize.py +++ b/regression-tests.recursor-dnssec/test_EDNSBufferSize.py @@ -253,17 +253,19 @@ class UDPLargeResponder(DatagramProtocol): # We pretend to do EDNS with a 4096 buffer size response.use_edns(payload=4096) - # What we use to fill the TXT records - # Test number + 64, so 01 = 'A', 02 = 'B' etc... - value = chr(testnum + 64) - # Each pre-RDATA answer RR is 12 bytes # NAME: 2 (ptr to begin of packet, 0xC00C) # TYPE: 2 # CLASS: 2 # TTL: 4 # RDLEN: 2 + loop = 0 while packet_size > 0: + # What we use to fill the TXT records + # Test number + 64 + loop iteration, so 01 = 'A', 02 = 'B' etc... + # We take the loop iteration to not generate duplicate records + value = chr(testnum + 64 + loop) + loop += 1 # Remove the pre-RDATA length packet_size -= 12 # And the TXT size indicator (first byte in the TXT record)