2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00
Commit Graph

39882 Commits

Author SHA1 Message Date
Tom Krizek
295890a16b Modify custom-test-driver to interpret JUnit results
Pytest provides JUnit output and uses different exit codes from
Automake. Use the conversion script to interpret the JUnit test results
from python rather than relying on the status code.
2023-09-19 14:47:49 +02:00
Tom Krizek
b96c8e8062 Convert JUnit XML from pytest into Automake .trs files
It's important to parse the JUnit result file rather than relying on the
exit code from pytest, which has a different meaning. Include a .trs test
result for each test case and set an exit code which is most appropriate
as the aggregate result (e.g. it will be set to 77 (SKIP) if there's at
least one test case that was skipped).
2023-09-19 14:47:49 +02:00
Tom Krizek
15fa8f1506 Prioritize long-running system tests for legacy runner
Synchronize the test priority with the pytest runner (which handles the
prioritization in conftest.py).
2023-09-19 14:47:48 +02:00
Tom Krizek
0538b7e0da Use prereq.sh for rpzrecurse system test 2023-09-19 14:47:48 +02:00
Tom Krizek
c3abedc0a2 Use prereq.sh for serve-stale system test 2023-09-19 14:47:48 +02:00
Tom Krizek
5d9a09c086 Use prereq.sh for chain system test 2023-09-19 14:47:48 +02:00
Tom Krizek
00b92bd064 Use prereq.sh for digdelv, dnssec, forward system tests 2023-09-19 14:47:48 +02:00
Tom Krizek
78981cee77 Use prereq.sh for qmin, cookie system tests 2023-09-19 14:47:48 +02:00
Tom Krizek
2f962f7041 Use prereq.sh for reclimit system test 2023-09-19 14:47:48 +02:00
Tom Krizek
587129b4c0 Use prereq.sh for xfer system test 2023-09-19 14:47:48 +02:00
Tom Krizek
27281955af Use prereq.sh for statschannel system test 2023-09-19 14:47:48 +02:00
Tom Krizek
9cc821d42f Add prereq.sh scripts for system tests requiring perl mod DNS
prereq.sh mechanism for dependency detection is preferred since it works
for both legacy and pytest runner.
2023-09-19 14:47:47 +02:00
Tom Krizek
f0493890cc Use proper perl interpreter in xfer system test 2023-09-19 14:47:47 +02:00
Tom Krizek
807f67b1cd Remove redundant dependency checks for system tests
Dependencies for these tests are already checked in prereq.sh - if the
dependencies are missing, these tests will be skipped. The extra
dependency check in Makefile.am is extraneous and only applied for the
legacy test runner.
2023-09-19 14:47:47 +02:00
Tom Krizek
d4502206a1 Fix pytest module detection for run.sh
To allow concurrent invocations of pytest, it is necessary to assign
ports properly to avoid conflicts. In order to do that, pytest needs to
know a complete list of all test modules.

When pytest is invoked from run.sh, the current working directory is the
system test directory. To properly detect other tests, the conftest.py
has to look in the bin/tests/system directory, rather than the current
working directory.
2023-09-19 14:47:47 +02:00
Tom Krizek
56c1087304 Use pytest runner for make check
Make python & pytest required dependencies to run system tests and
invoke the pytest runner from the makefile.
2023-09-19 14:47:45 +02:00
Tom Krizek
9a1a10e84f Merge branch 'tkrizek/pytest-check-system-test-files-with-danger' into 'main'
enforce system test file and name conventions with danger CI

See merge request isc-projects/bind9!8254
2023-09-19 12:46:54 +00:00
Tom Krizek
d1371267c6 danger: check system test convetions for pytest runner
When adding a new system test, it might easy to forget to add the
required files for the pytest runner or break a naming convention. Add
danger checks to cover these cases.
2023-09-19 13:29:30 +02:00
Tom Krizek
546212b78b Add missing pytest glue for for host system test
Without this glue file, the test isn't picked up by the pytest runner
and therefore not executed.
2023-09-19 13:29:30 +02:00
Tom Krizek
c026a00696 Rename allow-query pytest glue file
To conform with the expected naming convention, the pytest glue file for
the `allow-query` test should use underscore as the word separator in
the python file name: allow-query/tests_sh_allow_query.py
2023-09-19 13:29:29 +02:00
Tom Krizek
9e13c3dbcb Treat bin/tests/system/_common as non-temp directory
The _common directory is a special case directory which contains shared
files for other system test directories. Make sure it's tracked in git
and not deleted during temporary directory cleanup.
2023-09-19 13:29:29 +02:00
Tom Krizek
168dba163c Rename system test directory with common files to _common
The old name "common" clashes with the convention of system test
directory naming. It appears as a system test directory, but it only
contains helper files.

To reduce confusion and to allow automatic detection of issues with
possibly missing test files, rename the helper directory to "_common".
The leading underscore indicates the directory is different and the its
name can no longer be confused with regular system test directories.
2023-09-19 13:29:27 +02:00
Ondřej Surý
7f91925dad Merge branch '4322-hashmap-iterator-can-iterate-twice-the-same-item-if-deleting-items-via-delcurrent_next' into 'main'
Resolve "hashmap iterator can iterate twice the same item if deleting items via delcurrent_next"

Closes #4322

See merge request isc-projects/bind9!8309
2023-09-19 09:51:24 +00:00
Mark Andrews
f467dbc182 Add CHANGES note for [GL #3422] 2023-09-19 11:18:04 +02:00
Ondřej Surý
45fb84076d Add assertion failure when adding to hashmap when iterating
When iterating the table, we can't add new nodes to the hashmap because
we can't assure that we are not adding the new node before the iterator.

This also applies to rehashing - which might be triggered by both
isc_hashmap_add() and isc_hashmap_delete(), but not
isc_hashmap_iter_delcurrent_next().
2023-09-19 11:18:04 +02:00
Mark Andrews
92a0d65a51 Fix hashmap iteration
When isc_hashmap_iter_delcurrent_next calls hashmap_delete_node
nodes from the front of the table could be added to the end of
the table resulting in them being returned twice.  Detect when
this is happening and prevent those nodes being returned twice
buy reducing the effective size of the table by one each time
it happens.
2023-09-19 11:18:03 +02:00
Mark Andrews
c2b6f4357d Merge branch '4314-dns_ncache_current-fails-to-set-covered-correctly' into 'main'
Resolve "dns_ncache_current fails to set covered correctly"

Closes #4314

See merge request isc-projects/bind9!8300
2023-09-18 05:42:05 +00:00
Mark Andrews
80298ade33 Add a CHANGES note for [GL #4314] 2023-09-18 13:39:17 +10:00
Mark Andrews
8ce359652a Check RRSIG covered type in negative cache entry
The covered type previously displayed as TYPE0 when it should
have reflected the records that was actually covered.
2023-09-18 13:38:27 +10:00
Mark Andrews
779980710c Correctly set the value of covered in dns_ncache_current
Fix the type and rdclass being passed to dns_rdata_tostruct so
that rrsig.covered is correctly set.
2023-09-18 13:38:27 +10:00
Ondřej Surý
b0b0aac505 Merge branch 'ondrej/use-cds_lfht-for-dns_dispatch' into 'main'
Rewrite the QID lookup table to cds_lfht

See merge request isc-projects/bind9!8304
2023-09-16 06:35:49 +00:00
Ondřej Surý
405860022f Add CHANGES note for [GL !8304] 2023-09-16 07:32:18 +02:00
Ondřej Surý
aa0971027c Cleanup unused .localport member of dns_dispatch_t and some macros
The .localport member of dns_dispatch_t structure was unused, clean it
up.  Cleanup unused and/or redundant macros.
2023-09-16 07:32:18 +02:00
Ondřej Surý
c9b4b45943 Replace the linked list of TCP dispatches with hash table
Reusing TCP connections with dns_dispatch_gettcp() used linear linked
list to lookup existing outgoing TCP connections that could be reused.
Replace the linked list with per-loop cds_lfht hashtable to speedup the
lookups.  We use cds_lfht because it allows non-unique node insertion
that we need to check for dispatches in different connection states.
2023-09-16 07:32:18 +02:00
Ondřej Surý
6fd06c461b Make dns_dispatch bound to threads
Instead of high number of dispatches (4 * named_g_udpdisp)[1], make the
dispatches bound to threads and make dns_dispatchset_t create a dispatch
for each thread (event loop).

This required couple of other changes:

1. The dns_dispatch_createudp() must be called on loop, so the isc_tid()
   is already initialized - changes to nsupdate and mdig were required.

2. The dns_requestmgr had only a single dispatch per v4 and v6.  Instead
   of using single dispatch, use dns_dispatchset_t for each protocol -
   this is same as dns_resolver.
2023-09-16 07:32:17 +02:00
Ondřej Surý
282c4709b8 Rewrite the QID lookup table to cds_lfht
Looking up unique message ID in the dns_dispatch has been using custom
hash tables.  Rewrite the custom hashtable to use cds_lfht API, removing
one extra lock in the cold-cache resolver hot path.
2023-09-16 07:32:17 +02:00
Ondřej Surý
7be52f1bad Merge branch 'ondrej-improve-isc_hashmap' into 'main'
Refactor isc_hashmap to accept custom match function

See merge request isc-projects/bind9!8289
2023-09-16 05:25:54 +00:00
Ondřej Surý
e270266627 Refactor isc_hashmap to accept custom match function
Refactor isc_hashmap to allow custom matching functions.  This allows us
to have better tailored keys that don't require fixed uint8_t arrays,
but can be composed of more fields from the stored data structure.
2023-09-16 07:20:48 +02:00
Arаm Sаrgsyаn
492a4fb671 Merge branch 'aram/danger-ignore-length-warn-for-fixups' into 'main'
Don't warn about subject line length for the fixup commits (CI)

See merge request isc-projects/bind9!8282
2023-09-14 10:37:51 +00:00
Aram Sargsyan
3db2beef9f Don't warn about subject line length for the fixup commits
The fixup commits' subject line has a prefix which has its own
length, so warning about the exceeding length is not accurate.
Given that the fixup commits can not be merged, because they
cause a danger failure, it's safe to ignore the length check
for them.
2023-09-14 09:31:32 +00:00
Mark Andrews
faeffce4eb Merge branch '608-add-option-to-apply-dns64-rules-to-address-being-used-for-lookups' into 'main'
Resolve "Add option to apply dns64 rules to address being used for lookups."

Closes #608

See merge request isc-projects/bind9!2166
2023-09-13 05:31:34 +00:00
Mark Andrews
18b7db2d3a Add CHANGES for [GL #608] 2023-09-13 14:33:05 +10:00
Mark Andrews
5a0cea31c4 Document resolver-use-dns64 2023-09-13 14:33:05 +10:00
Mark Andrews
d1983adc22 IO::Socket::INET6 has been replaced by IO::Socket::IP
IO::Socket::INET6 is no longer being maintained and its functionality
has been replaced by IO::Socket::IP.
2023-09-13 14:31:43 +10:00
Mark Andrews
3a87ff3dfe Test resolver-use-dns64
Test resolver-use-dns64 by simulating a connection to an IPv4-only
server through a NAT64.

This test uses EXTRAPORT1 rather than PORT for DNS traffic exchanged
between ns3 and ns4. Both servers also listen on PORT on their IPv4
addresses to support server startup testing in start.pl.
2023-09-13 14:31:43 +10:00
Mark Andrews
01b11c24ec Configure 'mapped' IPv4 address
Add a mapped IPv4 address, fd92:7065:b8e:fffe::10.53.0.4, to
ifconfig.sh for dns64 testing.
2023-09-13 14:31:43 +10:00
Mark Andrews
9f779c3996 Add the ability to use DNS64 internally
Add a configuration option, resolver-use-dns64, which when true
will cause named to map IPv4 address to IPv6 addresses using the
view's DNS64 mapping rules when making iterative queries.
2023-09-13 14:31:43 +10:00
Ondřej Surý
8805d989ec Merge branch '4306-add-incremental-isc_siphash' into 'main'
Implement incremental version of SipHash 2-4 and HalfSipHash 2-4

Closes #4306

See merge request isc-projects/bind9!8288
2023-09-12 14:21:40 +00:00
Ondřej Surý
9df9296b7a Merge branch 'ondrej/make-dns_name-mostly-header-only' into 'main'
Cleanup the dns_name macros

See merge request isc-projects/bind9!8297
2023-09-12 14:20:25 +00:00
Ondřej Surý
0f3155e0ef Add CHANGES note for [GL #4306] 2023-09-12 16:17:06 +02:00