Commit Graph

24238 Commits

Author SHA1 Message Date
Evan Hunt
87c7455b4c removed some unnecessary greps
(cherry picked from commit 731ad28be2)
(cherry picked from commit 17245b86d5)
(cherry picked from commit 350f18b0d1)
(cherry picked from commit 539be337d9)
2018-02-25 11:19:05 -08:00
Evan Hunt
a236a1e2b4 reorder tests to get better use of parallelism
(cherry picked from commit 56e440f65f)
(cherry picked from commit 4429f8b291)
(cherry picked from commit fa8740feda)
(cherry picked from commit 438dcd9f9c)
2018-02-25 11:18:48 -08:00
Evan Hunt
f8fe59f279 parallelize most system tests
(cherry picked from commit c032c54dda)
(cherry picked from commit 2b81f322cb)
(cherry picked from commit 167fa161d1)
(cherry picked from commit 1f297d33a0)
2018-02-25 11:17:55 -08:00
Evan Hunt
89e4fff657 Merge branch 'kyua-oot-v9_11-v9_10-v9_9' into 'v9_9'
chg: dev: Unit tests were broken in out-of-tree builds.

See merge request isc-projects/bind9!57
2018-02-23 15:51:50 -08:00
Petr Menšík
3727e6a944 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)
(cherry picked from commit 6d9b38e9fe)
(cherry picked from commit 6f2fd5ccca)
2018-02-23 15:51:50 -08:00
Evan Hunt
8fe8948bb0 Merge branch 'master-v9_12-v9_11-v9_10-v9_9' into 'v9_9'
Code cleanups

See merge request isc-projects/bind9!36
2018-02-23 13:57:56 -08:00
Petr Menšík
f3f8d67ad2 Reduce repeated detection of mysql lib directory.
Use common part once a bit later.

(cherry picked from commit 2a70eae04f)
(cherry picked from commit d04af52222)
(cherry picked from commit 1b0cf4fea6)
(cherry picked from commit 9982419c4c)
2018-02-23 13:57:56 -08:00
Petr Menšík
07b6ddd178 Reuse new function from rt46864 for similar block elsewhere.
(cherry picked from commit e7a93321f0)
(cherry picked from commit cb98ce8e67)
(cherry picked from commit 6876501605)
(cherry picked from commit 16ea60d8cc)
2018-02-23 13:57:56 -08:00
Michał Kępień
f55f714bce Merge branch '90-remove-i-check-flushtree-clears-adb-correctly-from-cacheclean-in-bind-9-9' into 'v9_9'
Resolve "remove "I:check flushtree clears adb correctly" from cacheclean in BIND 9.9"

See merge request isc-projects/bind9!53
2018-02-22 07:15:56 -05:00
Mark Andrews
29652923f8 remove 'check flushtree clears adb correctly' test 2018-02-22 14:35:40 +11:00
Mark Andrews
0b5b2c9b72 Merge branch '67-stabilize-cacheclean-system-test-v9_10-v9_9' into 'v9_9'
Stabilize cacheclean system test

Closes #67

See merge request isc-projects/bind9!43
2018-02-21 11:28:57 +11:00
Michał Kępień
598d5538fe Improve the way cache contents are searched for "ns.flushtest.example"
During the "check flushtree clears adb correctly" check, expecting
"ns.flushtest.example" to always be the first name in the ADB dump is
fragile, because in a certain corner case "a.root-servers.nil" will be
the first name instead.

As the purpose of the relevant check is to ensure "ns.flushtest.example"
is removed from ADB by "rndc flushtree flushtest.example", search the
entire list of names present in ADB instead of just the first entry when
looking for "ns.flushtest.example".

(cherry picked from commit ca1049b2f3)
(cherry picked from commit 3513a585e3)
2018-02-21 11:28:21 +11:00
Michał Kępień
580fb63a68 Wait until a cache dump completes instead of waiting for a fixed amount of time
Dumping the cache is an asynchronous operation, so sleeping for a fixed
amount of time after running "rndc dumpdb" is imperfect as dumping cache
contents may take longer than expected on slower machines.  Instead of
always sleeping for 1 second, wait until the "; Dump complete" line
appears in the dump or 10 seconds pass, whichever comes first.

(cherry picked from commit 2bbff06d36)
(cherry picked from commit e617b91527)
2018-02-21 11:28:16 +11:00
Michał Kępień
44e946e9e9 Do not overwrite cache dumps
Unless configured otherwise in named.conf, "rndc dumpdb" causes a cache
dump to be written to a file called "named_dump.db" in the working
directory of the given named instance.  Repeatedly using this command
throughout different checks in the cacheclean system test causes cache
dumps for older checks to be overwritten, which hinders failure
diagnosis.  Prevent this by moving each cache dump to a check-specific
location after running "rndc dumpdb".

Furthermore, during the "check flushtree clears adb correctly" check,
dump_cache() is called twice without renaming the resulting files.
Prevent the first cache dump from being overwritten by moving it to a
different file before calling "rndc dumpdb" for the second time.

(cherry picked from commit aeea1faf01)
(cherry picked from commit dcd91ab322)
2018-02-21 11:26:58 +11:00
Michał Kępień
5c0afa76f7 Assign an index to each check in the cacheclean system test
This will enable storing per-check forensic data, which facilitates
troubleshooting test failures.

(cherry picked from commit 01de79b332)
(cherry picked from commit 7679819e15)
2018-02-21 10:52:43 +11:00
Evan Hunt
f8d31691b5 [v9_9] add missing release note, update README 2018-02-17 20:04:13 -08:00
Michał Kępień
45cbf528f7 Merge branch 'fix-loadpending-handling-v9_9' into v9_9 2018-02-16 09:03:53 +01:00
Michał Kępień
d55d1c9f92 Add CHANGES entry
4892.	[bug]		named could leak memory when "rndc reload" was invoked
			before all zone loading actions triggered by a previous
			"rndc reload" command were completed. [RT #47076]
2018-02-16 09:03:48 +01:00
Michał Kępień
13cc08ea67 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 09:03:27 +01:00
Michał Kępień
b38c5d2840 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 09:03:27 +01:00
Michał Kępień
ec51b6d3d4 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 09:03:27 +01:00
Michał Kępień
9c103120ad 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 09:03:27 +01:00
Mark Andrews
0402b2121f Merge branch 'fix-cpp-check-errors' into 'v9_9'
Fix cpp check errors v9_9

See merge request isc-projects/bind9!32
2018-02-16 02:49:07 -05:00
Mark Andrews
292245ebbf s/cppchecker/cppcheck 2018-02-16 18:45:24 +11:00
Mark Andrews
f80160d467 add GL issue number 2018-02-16 18:45:24 +11:00
Mark Andrews
469bc9fd15 add CHANGES note 2018-02-16 18:45:23 +11:00
Mark Andrews
1832348d27 add POST(len); 2018-02-16 18:44:47 +11:00
Mark Andrews
2670173c43 conditionally declare stacksize 2018-02-16 18:44:47 +11:00
Mark Andrews
ca738505ec add POST(len); 2018-02-16 18:43:59 +11:00
Mark Andrews
622bf9256b add POST(tl) 2018-02-16 18:43:46 +11:00
Mark Andrews
4404fcb384 return failure count 2018-02-16 18:42:11 +11:00
Mark Andrews
7245f12d3e conditionally declare strbuf 2018-02-16 18:41:31 +11:00
Mark Andrews
192a119b5a test for == 0 rather than <= as value is unsigned 2018-02-16 18:41:31 +11:00
Mark Andrews
872543eca7 add brackets 2018-02-16 18:37:05 +11:00
Mark Andrews
5de799a1c8 reorder test to silence cppcheck 2018-02-16 18:37:05 +11:00
Mark Andrews
32166fae3b remove event which is only used for sizeof 2018-02-16 18:37:05 +11:00
Mark Andrews
a4d8e7526a reorder test to silence cppcheck 2018-02-16 18:36:17 +11:00
Mark Andrews
324039934d use %u instead of %d 2018-02-16 18:36:17 +11:00
Mark Andrews
a6a6928e7e use %u instead of %d 2018-02-16 18:35:49 +11:00
Mark Andrews
fb188d4795 use %u instead of %d 2018-02-16 18:32:54 +11:00
Mark Andrews
f7c7a87cb4 use %u instead of %d 2018-02-16 18:30:18 +11:00
Mark Andrews
810fdbe4e7 use %u instead of %d 2018-02-16 18:30:18 +11:00
Mark Andrews
f6e83e4108 use %u instead of %d 2018-02-16 18:30:18 +11:00
Mark Andrews
9d061a7864 use %u instead of %d 2018-02-16 18:29:17 +11:00
Mark Andrews
a6f0a302ea case to unsigned; reorder expression 2018-02-16 18:25:33 +11:00
Mark Andrews
fd0877d294 simplify expression 2018-02-16 18:23:12 +11:00
Mark Andrews
ef0fb20613 use %u and preserve unsigned property 2018-02-16 18:23:11 +11:00
Mark Andrews
6cc168d6d4 cast to unsigned 2018-02-16 18:17:59 +11:00
Mark Andrews
bc7adce774 preserve unsigned property 2018-02-16 18:17:59 +11:00
Mark Andrews
b7a4a93b0d use %u instead of %d 2018-02-16 18:17:59 +11:00