Commit graph

10728 commits

Author SHA1 Message Date
Mukund Sivaraman
4445ee6491 Check return value of isc_mem_get()
(cherry picked from commit de3a4af1bf)
2018-03-20 09:54:55 +11:00
Evan Hunt
09cf48603a update file headers 2018-03-15 18:38:48 -07:00
Evan Hunt
14e22ddf8c add an 'untested' case when none of the atomic operations are available
- this fixes a build failure introduced in change 4913 when
  compiling with ATF and --disable-atomic

(cherry picked from commit 1b3eac926e)
2018-03-15 12:09:38 -07:00
Evan Hunt
8b205089b7 update file headers to remove copyright years 2018-03-14 16:40:20 -07:00
Ondřej Surý
413b7d4b24 Update whitespace 2018-03-14 12:45:03 +01:00
Evan Hunt
e98ec51b96 Fix compiler warnings and test failures when building without threads
(cherry picked from commit 56353aaf42)
2018-03-10 10:37:20 -08:00
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
941946cf14 remove lib/tests as nothing uses it anymore
(cherry picked from commit d132f73497)
(cherry picked from commit d35f62434a)
2018-03-09 15:48:32 -08:00
Evan Hunt
64ea21a0e5 shorten ht_test and random_test
(cherry picked from commit 9b753aa154)
(cherry picked from commit 289836a066)
2018-03-09 15:47:21 -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
38f9cddcad migrate t_tasks to lib/isc/tests/task_test
(cherry picked from commit c6c1e99252)
(cherry picked from commit 88bfe56876)
2018-03-09 15:38:53 -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
274ee0b425 migrate t_timers to lib/isc/tests/timer_test
(cherry picked from commit e2b8699df9)
(cherry picked from commit efccdad0ea)
2018-03-09 15:37:03 -08:00
Evan Hunt
492e19d6ec migrate t_atomic to lib/isc/tests/atomic_test
(cherry picked from commit 874e2fc70c)
(cherry picked from commit c7fa56e8db)
2018-03-09 15:35:09 -08:00
Evan Hunt
814cd21e22 migrate t_mem to lib/isc/tests/mem_test
(cherry picked from commit 979f054702)
(cherry picked from commit af48544b75)
2018-03-09 15:34:31 -08:00
Evan Hunt
faedafd2b4 migrate t_net to lib/isc/tests
(cherry picked from commit 05b7251d51)
(cherry picked from commit af0c9b2cee)
2018-03-09 15:33:48 -08:00
Evan Hunt
323e2f7152 migrate t_sockaddr to lib/isc/tests
(cherry picked from commit 62f650078a)
(cherry picked from commit fadb93cf43)
2018-03-09 15:33:01 -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
Mark Andrews
229e9e2215 check for in-view zones colliding with other zone definitions; also check the syntax of the in-view zone name
(cherry picked from commit 3e7e280040)
2018-03-08 12:20:59 +11:00
Michał Kępień
8f07fb476b Remove duplicate irs_resconf_load() unit test
The "sortlist-v4.conf" unit test for irs_resconf_load() is always run
twice due to a duplicate entry in the "tests" table.  Remove one of them
to prevent this.

(cherry picked from commit 6c09f305ae)
2018-03-06 09:24:41 +01:00
Michał Kępień
b4a10e77ea Do not ignore resolv.conf syntax errors
irs_resconf_load() stores the value returned by add_search() into ret
without consulting its current value first.  This causes any previous
errors raised while parsing resolv.conf to be ignored as long as any
"domain" or "search" statement is present in the file.

Prevent this by returning early in case an error is detected while
parsing resolv.conf.  Ensure that "searchlist" and "magic" members of
the created irs_resconf_t structure are always initialized before
isc_resconf_destroy() is called.

(cherry picked from commit 1f400b68a8)
2018-03-06 09:24:41 +01: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 Hunt
0be726b440 minor cleanup and addressed a sprintf format warning
(cherry picked from commit ab0fe63f07)
2018-02-26 10:45:13 +11:00
Mark Andrews
bf79ae278c update printf format to match type
(cherry picked from commit 48ca11df5f)
2018-02-26 10:40:11 +11:00
Mark Andrews
4d8e501abe improve the conditional declaration and use of variable to silence cppcheck
(cherry picked from commit a04bb76973)
2018-02-26 10:40:11 +11:00
Mark Andrews
ae50b73d78 remove deadcode
(cherry picked from commit b71a1386ed)
2018-02-26 10:40:10 +11:00
Mark Andrews
ded99ca751 silence unread assignment warning by using POST macro
(cherry picked from commit e8249dcd49)
2018-02-26 10:40:10 +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
edbca5937c conditionally typedef fstrmtable
(cherry picked from commit dcd309bea1)
2018-02-26 10:40:09 +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šík
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šík
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
65cfe7e1ad conditionally declare stacksize 2018-02-16 15:08:24 +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