Commit Graph
6800 Commits
Author SHA1 Message Date
Evan Hunt 8da54db729 Merge branch 'clean-bin-tests' into 'v9_11'
clean up bin/tests, convert unit tests to ATF

Closes #115

See merge request isc-projects/bind9!93
2018-03-09 16:47:51 -08:00
Evan Hunt 442c1530a3 final cleanup
- update Kyuafiles to match Atffiles
- copyrights
- CHANGES note

(cherry picked from commit 86e00cbb71)
(cherry picked from commit 80834b5b90)
2018-03-09 16:17:56 -08:00
Evan Hunt 57a5820dcc migrate t_dst signature test to lib/dns/tests/dst_test
(cherry picked from commit a4ebe83cdb)
(cherry picked from commit 4439c471d1)
2018-03-09 15:46:53 -08:00
Evan Hunt d3518e57b1 migrate t_db to lib/dns/tests/db_test
(cherry picked from commit f58ac8ada3)
(cherry picked from commit 56da937399)
2018-03-09 15:42:07 -08:00
Evan Hunt b2fef3b438 migrate t_names to lib/dns/tests/name_test
(cherry picked from commit 8ecf69ef7b)
(cherry picked from commit aefad99e1e)
2018-03-09 15:40:21 -08:00
Evan Hunt 42fa3932ab migrate t_rbt to lib/dns/tests/rbt_test
(cherry picked from commit 109546cbda)
(cherry picked from commit c505afd183)
2018-03-09 15:39:42 -08:00
Evan Hunt 5dd25f2285 migrate t_resolver to lib/dns/tests/resolver_test
(cherry picked from commit d80825c40b)
(cherry picked from commit 30e157f6e4)
2018-03-09 15:38:30 -08:00
Evan Hunt fb076e0591 allow ATF tests to run in parallel
(cherry picked from commit ef0b4c91bc)
(cherry picked from commit 787c5d1394)
2018-03-09 14:37:46 -08:00
Evan Hunt 3b559cf7f0 Merge branch 'v9_11_3_patch' into v9_11 2018-03-08 14:29:24 -08:00
Tinderbox User c80e152862 prep 9.11.3rc2 2018-03-02 21:53:14 +00:00
Evan Hunt 8d1b3ceb4d temporarily revert change #4859 2018-03-02 12:16:31 -08:00
Evan Hunt 95c01ddde2 temporarily revert change #4859
(cherry picked from commit 84ec07999f)
2018-03-02 12:02:49 -08:00
Evan HuntandMark Andrews 0be726b440 minor cleanup and addressed a sprintf format warning
(cherry picked from commit ab0fe63f07)
2018-02-26 10:45:13 +11:00
Mark Andrews 2c53a82644 update the sscanf format strings so they match the pointer types
(cherry picked from commit 70d192eb97)
2018-02-26 10:40:10 +11:00
Mark Andrews 77819f7d75 redefine CHECK so cppcheck see the definition
(cherry picked from commit a4186b1867)
2018-02-26 10:40:10 +11:00
Mark Andrews 82b109bf5d adjust goto target and conditional compilation so that cleanup_spillattimer and cleanup_alglock labels match the element to be cleanup and so that they are always used
(cherry picked from commit 7b27be54ee)
2018-02-26 10:40:09 +11:00
Petr MenšíkandEvan Hunt 6d9b38e9fe unit/unittest.sh is generated by configure. It will always be
generated into builddir. If out-of-tree build is used, make unit
will always fail. Kyuafiles and testdata still have to be copied
manually into the builddir.

(cherry picked from commit 95cde3608a)
2018-02-23 15:50:33 -08:00
Petr MenšíkandEvan Hunt 6876501605 Reuse new function from rt46864 for similar block elsewhere.
(cherry picked from commit e7a93321f0)
(cherry picked from commit cb98ce8e67)
2018-02-23 13:52:43 -08:00
Michał Kępień 5c080dfe73 Do not recheck DNS_ZONEFLG_LOADPENDING in zone_asyncload()
Remove a block of code which dates back to commit 8a2ab2b920, when
dns_zone_asyncload() did not yet check DNS_ZONEFLG_LOADPENDING.
Currently, no race in accessing DNS_ZONEFLG_LOADPENDING is possible any
more, because:

  - dns_zone_asyncload() is still the only function which may queue
    zone_asyncload(),

  - dns_zone_asyncload() accesses DNS_ZONEFLG_LOADPENDING under a lock
    (and potentially queues an event under the same lock),

  - DNS_ZONEFLG_LOADPENDING is not cleared until the load actually
    completes.

Thus, the rechecking code can be safely removed from zone_asyncload().

Note that this also brings zone_asyncload() to a state in which the
completion callback is always invoked.  This is required to prevent
leaking memory in case something goes wrong in zone_asyncload() and a
zone table the zone belongs to is indefinitely left with a positive
reference count.
2018-02-16 08:58:24 +01:00
Michał Kępień 4d391101a4 Asynchronous zone load events have no way of getting canceled
Code handling cancellation of asynchronous zone load events was likely
copied over from other functions when asynchronous zone loading was
first implemented in commit 8a2ab2b920.  However, unlike those other
functions, asynchronous zone loading events currently have no way of
getting canceled once they get posted, which means the aforementioned
code is effectively dead.  Remove it to prevent confusion.
2018-02-16 08:58:24 +01:00
Michał Kępień 749b3cacfc Only clear DNS_ZONEFLG_LOADPENDING in zone_asyncload() if zone loading is completed immediately
zone_load() is not always synchronous, it may only initiate an
asynchronous load and return DNS_R_CONTINUE, which means zone loading
has not yet been completed.  In such a case, zone_asyncload() must not
clear DNS_ZONEFLG_LOADPENDING immediately and leave that up to
zone_postload().
2018-02-16 08:58:24 +01:00
Michał Kępień e0205aac03 Lock zone before checking whether its asynchronous load is already pending
While this is not an issue in named, which only calls
dns_zone_asyncload() from task-exclusive mode, this function is exported
by libdns and thus may in theory be concurrently called for the same
zone by multiple threads.  It also does not hurt to be consistent
locking-wise with other DNS_ZONEFLG_LOADPENDING accesses.
2018-02-16 08:58:24 +01:00
Mark Andrews ad5550c029 add POST(len); 2018-02-16 15:08:25 +11:00
Mark Andrews 027bc5535c add POST(len); 2018-02-16 15:08:24 +11:00
Mark Andrews bdf5c08fc4 Clarify calculation precedence for '&' and '?' 2018-02-16 15:08:24 +11:00
Mark Andrews 2c85b9afd7 add POST(tl) 2018-02-16 15:08:24 +11:00
Mark Andrews 118203925a conditionally declare strbuf 2018-02-16 15:06:51 +11:00
Mark Andrews c2e6e799b3 test for == 0 rather than <= as value is unsigned 2018-02-16 15:00:06 +11:00
Mark Andrews 012ae8afa2 simplify expression 2018-02-16 14:45:20 +11:00
Mark Andrews 0ae4bf22d2 use %u and preserve unsigned property 2018-02-16 14:45:20 +11:00
Mark Andrews 7873680877 cast to unsigned 2018-02-16 14:36:56 +11:00
Mark Andrews ea6732c354 preserve unsigned property 2018-02-16 14:36:56 +11:00
Mark Andrews c57610f1cc make both arguments of & unsigned 2018-02-16 14:36:56 +11:00
Mark Andrews faf0e3ff65 use %u instead of %d 2018-02-16 14:36:56 +11:00
Mark Andrews 4b83e4e105 use %u instead of %d 2018-02-16 14:35:36 +11:00
Mark Andrews 351a27ef5b unsigned constants 2018-02-16 14:35:36 +11:00
Mark Andrews e6cd8a52aa unsigned constants 2018-02-16 14:34:18 +11:00
Mark Andrews 9cc1ea9566 use %u instead of %d 2018-02-16 14:32:24 +11:00
Mark Andrews 2bbdfaaa0a use %u instead of %d 2018-02-16 14:32:24 +11:00
Mark Andrews 95657b047e use %u instead of %d 2018-02-16 14:32:24 +11:00
Mark Andrews 42c12e6b81 INSIST ipnum6 != NULL 2018-02-16 14:29:27 +11:00
Mark Andrews cd86c23e87 use %u instead of %d 2018-02-16 14:29:27 +11:00
Mark Andrews ca60688cb1 use %u instead of %d 2018-02-16 14:29:27 +11:00
Mark Andrews 39142beb63 test for >= 0 and use %d instead of %u 2018-02-16 14:29:27 +11:00
Mark Andrews a0adc34f3b formally cast to int; use %u instead of %d 2018-02-16 14:29:27 +11:00
Mark Andrews 61f81fde94 formally cast to int 2018-02-16 14:29:27 +11:00
Evan Hunt d77cb075aa [v9_11] prep 9.11.3rc1 2018-02-15 11:16:15 -08:00
Tinderbox User fccc836ebf update copyright notice / whitespace 2018-02-07 23:48:20 +00:00
Mark Andrews 8f1ed05dc0 4885. [security] update-policy rules that otherwise ignore the name
field now require that it be set to "." to ensure
                        that any type list present is properly interpreted.
                        [RT #47126]

(cherry picked from commit ec771bbdc8)
2018-02-07 13:50:00 +11:00
Tinderbox User 3c5862dfc7 update copyright notice / whitespace 2018-01-30 23:48:16 +00:00