]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
8 years ago[rt46602] Simplify the cleanup code
Stephen Morris [Thu, 21 Dec 2017 18:14:34 +0000 (18:14 +0000)] 
[rt46602] Simplify the cleanup code

(cherry picked from commit 0855a8a6cc8127c45cf7de04627ce34b7b189521)
(cherry picked from commit fb5974f9026ab0d5c371ccdb871d9b50474202bc)

8 years ago[rt46602] Extensions to README
Stephen Morris [Thu, 21 Dec 2017 17:00:08 +0000 (17:00 +0000)] 
[rt46602] Extensions to README

Added descriptions of how nameservers are started and stopped
during the tests, and how the framework cleans up the files created.

(cherry picked from commit f606b17dfbab828b4e923372f6df306bf745888f)
(cherry picked from commit 56ba2e822b419ab80630ddaa28fea83c0f37de7a)

8 years ago[rt46602] Miscellenous small changes
Stephen Morris [Wed, 20 Dec 2017 19:14:36 +0000 (19:14 +0000)] 
[rt46602] Miscellenous small changes

(cherry picked from commit b88b508b22c0d3fbff8386ab7ea7b5b95631403a)
(cherry picked from commit 3329876ffd54b43f3259c740035fb131aaf698eb)

8 years ago[rt46602] Handle echoing of multi-line output from tests
Stephen Morris [Wed, 20 Dec 2017 19:11:20 +0000 (19:11 +0000)] 
[rt46602] Handle echoing of multi-line output from tests

(cherry picked from commit 1f07c69f25ea8679be5645857020d860e3084b57)
(cherry picked from commit 6602a31229147e95b5c7258232ca2b51d45f39ff)

8 years ago[rt46602] Rename "test" variable to "systest"
Stephen Morris [Wed, 20 Dec 2017 19:08:57 +0000 (19:08 +0000)] 
[rt46602] Rename "test" variable to "systest"

... to avoid confusion between the variable and the command of the
same name.

(cherry picked from commit c12e06755f827e66c2e0cc6eb2c30009305c8943)
(cherry picked from commit 7a5476173aaf1632eb41864fcb2769144683839c)

8 years ago[rt46602] Add ability to prevent deletion of output files when running all tests
Stephen Morris [Wed, 20 Dec 2017 19:05:59 +0000 (19:05 +0000)] 
[rt46602] Add ability to prevent deletion of output files when running all tests

Some tests may need to examine all output files from all system tests.
Allow the deletion of these files to be inhibited if required.

(cherry picked from commit 00bc29640ba57ef4a18721bc4c75c78cdfc2fea1)
(cherry picked from commit 6917ea971a88440cb92645831d9335b57542f7ea)

8 years ago[rt46602] Error messages before start of test are output to stderr
Stephen Morris [Wed, 20 Dec 2017 15:50:03 +0000 (15:50 +0000)] 
[rt46602] Error messages before start of test are output to stderr

Error messages concerning the invocation of run.sh are output to
stderr.  Messages after the test has started are output to stdout.

(cherry picked from commit 244d1c30e20c927ffdbc2ca305e04675cbd3ac4d)
(cherry picked from commit ff5349b3b3dbcd1e6efa332468c7464ffcf9202c)

8 years ago[rt46602] Ensure that output sent to stderr is routed to the output file
Stephen Morris [Wed, 20 Dec 2017 14:54:37 +0000 (14:54 +0000)] 
[rt46602] Ensure that output sent to stderr is routed to the output file

(cherry picked from commit a5cf6bd12a9d587d76db305eb0387346cd31d1b8)
(cherry picked from commit 6bd944c9d0226b62c4de850b7b8749c91b008bec)

8 years ago[rt46602] Minor tidying up of documentation
Stephen Morris [Wed, 20 Dec 2017 14:53:07 +0000 (14:53 +0000)] 
[rt46602] Minor tidying up of documentation

(cherry picked from commit ce66752adc22ff5f59afe212eccb5c0711ec0ba6)
(cherry picked from commit 6b5e5a2da27bd514c22f9c7d98660d5b17e7251e)

8 years ago[rt46602] Check prerequsities before network interfaces when running test.
Stephen Morris [Fri, 15 Dec 2017 19:30:55 +0000 (19:30 +0000)] 
[rt46602] Check prerequsities before network interfaces when running test.

(cherry picked from commit 549a6c6bc8e451ecf15f4b98df588596117c9202)
(cherry picked from commit 0afcdf658d503a47101053883b172226ce0dde0c)

8 years ago[rt46602] Minor formatting changes to Perl files
Stephen Morris [Fri, 15 Dec 2017 18:42:52 +0000 (18:42 +0000)] 
[rt46602] Minor formatting changes to Perl files

(cherry picked from commit f0f5b5f045baa1b3e45df397368e827b34c10325)
(cherry picked from commit 5fc5b514e4f6ed7eb8645ecb03391444a21a416d)

8 years ago[rt46603] Provide echostart() and echoend() to output test start/end messages.
Stephen Morris [Fri, 15 Dec 2017 18:36:53 +0000 (18:36 +0000)] 
[rt46603] Provide echostart() and echoend() to output test start/end messages.

(cherry picked from commit c344e1d768ec079d86fb488ba29610a4f9bbcbc5)
(cherry picked from commit 88081b765ee016803b3aac7b3f0dbabd45412e4c)

8 years ago[rt46602] Ensure test output in systests.output is not mixed up
Stephen Morris [Fri, 15 Dec 2017 15:56:33 +0000 (15:56 +0000)] 
[rt46602] Ensure test output in systests.output is not mixed up

When running all the system tests, output from a test is sent to a
test.output file in the test directory.  These are combined in to
systests.output when the run finishes.

(cherry picked from commit 055e5be9fd7555e24449157bc78b8c0852f9b7d1)
(cherry picked from commit 50769a4a9e699b74b2a6fa2d5dc91ca54c99d9f3)

8 years ago[rt46602] Miscellaneous minor fixes
Stephen Morris [Thu, 14 Dec 2017 19:13:48 +0000 (19:13 +0000)] 
[rt46602] Miscellaneous minor fixes

... for misspellings, typos, trailing spaces, duplicated lines etc.

(cherry picked from commit 3c25e5fa02c6c77cb46fdb6ca6401d96084552ae)
(cherry picked from commit 0e2e251a0db6da5e29c1f954b3c1ef2f0677ac30)

8 years ago[rt46602] Allocate 100 ports to each test
Stephen Morris [Thu, 14 Dec 2017 17:17:28 +0000 (17:17 +0000)] 
[rt46602] Allocate 100 ports to each test

(cherry picked from commit edc7a18d844ea4aa40f5c60109c44bf9ef040163)
(cherry picked from commit 61514873e9a0daaa7c7a09fde269005218d59805)

8 years ago[rt46602] Pass port numbers to tests via environment variables
Stephen Morris [Thu, 14 Dec 2017 15:02:01 +0000 (15:02 +0000)] 
[rt46602] Pass port numbers to tests via environment variables

(cherry picked from commit f5d8f079008b648d2e343543e66dd728054c6101)
(cherry picked from commit f10b6cfeb6a78e9bf81d4199d4cc6ba10cae5bfb)

8 years ago[rt46602] Ensure parallel tests are in alphabetical order
Stephen Morris [Thu, 14 Dec 2017 14:59:46 +0000 (14:59 +0000)] 
[rt46602] Ensure parallel tests are in alphabetical order

(cherry picked from commit b2d90da0c2211fb2ed268b804b30d72c39341c1c)
(cherry picked from commit bf2992dbe625f17ff599651029c526295fad3c93)

8 years ago[rt46602] Expanded system tests README
Stephen Morris [Fri, 24 Nov 2017 12:55:52 +0000 (12:55 +0000)] 
[rt46602] Expanded system tests README

Add more information on running the tests, together with a section
on how the tests are organised, aimed at new developers.

(cherry picked from commit af005cdbcf236f10a0766c0f25666d697527389e)
(cherry picked from commit 3952d4631e727feac821c7d36ce64e354f51165b)

8 years ago[rt46602] More updates to the test running framework
Stephen Morris [Fri, 24 Nov 2017 12:50:19 +0000 (12:50 +0000)] 
[rt46602] More updates to the test running framework

Tidy up the stop/start files and make switch usage consistent. Also
tidy up the various "clean" targets in the Makefile.

(cherry picked from commit b24c2e11d85db48f364f3cca94b3ba8e75eca138)
(cherry picked from commit 78494c3a4df383a235bc5d0b73676bc7b905d49a)

8 years ago[rt46602] Modify some test files to cope with the "-p" flag
Stephen Morris [Fri, 24 Nov 2017 12:24:09 +0000 (12:24 +0000)] 
[rt46602] Modify some test files to cope with the "-p" flag

(cherry picked from commit 517d990bd495ef2fcfe66726c0e68cacfe2bbb90)
(cherry picked from commit b01b553d72d65e031cb1ff315ca4a41147d06076)

8 years ago[rt46602] Tidy up run management
Stephen Morris [Thu, 23 Nov 2017 10:02:15 +0000 (10:02 +0000)] 
[rt46602] Tidy up run management

Miscellaneous tidying up of run management.  The most significant
change is that "runall.sh" now runs _all_ the tests, even the
ones that can run in parallel.  runsequential.sh is the script
to run tests that have not been converted to parallel running.

(cherry picked from commit 32fe6f7682361225415cc6714a1e369dca94b636)
(cherry picked from commit a49afdaeb818fb81ead578ff21a8dcd2b89d00aa)

8 years ago[rt46602] Assign block of ports for each test
Stephen Morris [Thu, 23 Nov 2017 09:58:57 +0000 (09:58 +0000)] 
[rt46602] Assign block of ports for each test

Some tests use more ports than just the query and control ports.
Each test that can run in parallel with other tests is now assigned
a unique block of 10 ports.

(cherry picked from commit e0ff77f9d3178d09eb60cf39733ae0c5018ce29d)
(cherry picked from commit df1348ad2bc0a97a79c8b8089dbec8bb4b395f4a)

8 years ago[rt46602] Miscellaneous changes to existing parallelised tests
Stephen Morris [Fri, 17 Nov 2017 17:29:21 +0000 (17:29 +0000)] 
[rt46602] Miscellaneous changes to existing parallelised tests

Currently these tests are allow_query, rpzrecurse and serve-stale

1. Function to copy files and set port numbers renamed from copy_config
to copy_setports, as this is used to change the ports in Perl and Python
test scripts as well.
2. Changes to rpzrecurse/tests.sh to handle two calls to getopts (one to
parse port numbers, the other to parse rpzrecurse-specific options). Also
fixed various commands to use correct ports.
3. Updates to "clean.sh" scripts to ensure that all files created in the
test are removed.

(cherry picked from commit 78f2b9ca01143dd20b543a8ea360338f28c4ba78)
(cherry picked from commit 01eb4d7c973e53dc06e434d137640c1c5acde455)

8 years ago[rt46602] Ensure that tests running in parallel use unique ports
Stephen Morris [Fri, 17 Nov 2017 13:21:05 +0000 (13:21 +0000)] 
[rt46602] Ensure that tests running in parallel use unique ports

Via an intermediate make file, tests that have been modified to be able
to run in parallel are assigned unique query and control port numbers
(other than 5300 and 9953 respectively).  Tests that have not yet been
modified all use ports 5300 and 9953, so must be run sequentially.

(cherry picked from commit e7429b124bd3d0fcce107eaf790ece4ba332eccd)
(cherry picked from commit 4f68e67e5cb5799cf26657f3e00ae3fca636a96f)

8 years ago[rt46602] Miscellaneous tidying up of code cherry-picked from experimental branch
Stephen Morris [Wed, 15 Nov 2017 18:44:54 +0000 (18:44 +0000)] 
[rt46602] Miscellaneous tidying up of code cherry-picked from experimental branch

(cherry picked from commit e1a69e5d1f1e9e38db9cbd14bc2aeb54f420ace9)
(cherry picked from commit ba694ca38c673c2cb3f1554d9e775ced971282c5)

8 years ago[rt46602] Allow parallel run of new dynamic port tests and the old ones
Ondřej Surý [Wed, 18 Oct 2017 15:20:20 +0000 (17:20 +0200)] 
[rt46602] Allow parallel run of new dynamic port tests and the old ones

(cherry picked from commit 3b14d54fd7ab9afec9081d51ba0d11d94ca77f6c)
(cherry picked from commit a14bd482685aad21fb81540dab214a60cb8d06fc)

8 years ago[rt46602] Put back original .gitignore files in the system tests
Ondřej Surý [Wed, 18 Oct 2017 15:07:06 +0000 (17:07 +0200)] 
[rt46602] Put back original .gitignore files in the system tests

(cherry picked from commit caaec1ef6da141926bbc2bde62e851d05713253d)
(cherry picked from commit cf7a86661a8f29f55e18f4aa173a051dd9ac1e4e)

8 years ago[rt46602] Adjust rpzrecurse for dynamic port usage
Ondřej Surý [Wed, 18 Oct 2017 12:56:26 +0000 (14:56 +0200)] 
[rt46602] Adjust rpzrecurse for dynamic port usage

Resolve conflict in run.sh during cherry-pick from an experimental branch.

(cherry picked from commit 2a435708e4a99651a800a01f4f990459d4144414)
(cherry picked from commit c5aa6ed87bb879192f36a1fc2700921d51554ed6)

8 years ago[rt46602] Add $SEDPORTS variable to help with @PORT@ and @CONTROLPORT@ replacement
Ondřej Surý [Wed, 18 Oct 2017 13:11:08 +0000 (15:11 +0200)] 
[rt46602] Add $SEDPORTS variable to help with @PORT@ and @CONTROLPORT@ replacement

(cherry picked from commit e6802badc07062532196e51b82c21d3d9d8f56c5)
(cherry picked from commit d37a52cc56c4156f1f1bebf96f0da6770c4b8bc4)

8 years ago[rt46602] Move most of ignored files to top of system tests directory
Ondřej Surý [Wed, 18 Oct 2017 12:36:56 +0000 (14:36 +0200)] 
[rt46602] Move most of ignored files to top of system tests directory

(cherry picked from commit d2c8286163e4b262b9e41dbe4ccb356e578a9fb2)
(cherry picked from commit a5c3077a9cf19d7aa96e11a8d70ffd12ee77e01b)

8 years ago[rt46602] Fix output from rndc reload
Ondřej Surý [Wed, 18 Oct 2017 12:34:27 +0000 (14:34 +0200)] 
[rt46602] Fix output from rndc reload

(cherry picked from commit 53bade5ece4e03c2f41fb2bd3911b7e9a74e16d6)
(cherry picked from commit 112355adb86240d7a12f0595b88f53bd9a34c629)

8 years ago[rt46602] Add .gitignore to allow_query
Ondřej Surý [Wed, 18 Oct 2017 12:34:11 +0000 (14:34 +0200)] 
[rt46602] Add .gitignore to allow_query

(cherry picked from commit bc276f6c05323b6a5c6fc4b4f2e3467fb0869cf6)
(cherry picked from commit 76dfb5c339f6bc591669ad31ed4ecd7c27c3af79)

8 years ago[rt46602] Utilize echo_i to allow mixed test output
Ondřej Surý [Wed, 18 Oct 2017 12:23:35 +0000 (14:23 +0200)] 
[rt46602] Utilize echo_i to allow mixed test output

(cherry picked from commit 7e3c96c867576eb335b566ea5e0fd4b60955e7c2)
(cherry picked from commit 93034acb4d25235f11a41f44eb3059d41fef22f0)

8 years ago[rt46602] Prefix R:<result> as R:<test>:<result>
Ondřej Surý [Wed, 18 Oct 2017 12:20:48 +0000 (14:20 +0200)] 
[rt46602] Prefix R:<result> as R:<test>:<result>

Resolve conflict in run.sh during cherry-pick from experimental branch.

(cherry picked from commit 278c72fef67c5c65a897fe2e5d87db38738594f6)
(cherry picked from commit b8e866d60fab39a0909735cc01fa10fa23fe789b)

8 years ago[rt46602] Add echo_i function to print I:<testname>:string
Ondřej Surý [Wed, 18 Oct 2017 12:19:28 +0000 (14:19 +0200)] 
[rt46602] Add echo_i function to print I:<testname>:string

(cherry picked from commit f7ac41757a880577519a464583648065d9987bbd)
(cherry picked from commit bd5b36f7a465bd232f4f5521096fd132e9a43118)

8 years ago[rt46602] Add serve-stale working files to .gitignore
Ondřej Surý [Wed, 18 Oct 2017 12:18:59 +0000 (14:18 +0200)] 
[rt46602] Add serve-stale working files to .gitignore

(cherry picked from commit cba162e70e7fac43435a606106841a69ce468526)
(cherry picked from commit 57adb949a4a7b1b4211407b169257bbfd392b5b4)

8 years ago[rt46602] Convert allow_query to dynamic port
Ondřej Surý [Wed, 18 Oct 2017 11:38:20 +0000 (13:38 +0200)] 
[rt46602] Convert allow_query to dynamic port

(cherry picked from commit 992a2bafec6ab120909402ea3e0d2831d92dac59)
(cherry picked from commit 1d10178e83c6c63ecaaa97c297434f65ed4b25a6)

8 years ago[rt46602] Change the system tests script to support running individual tests on diffe...
Ondřej Surý [Wed, 18 Oct 2017 11:00:15 +0000 (13:00 +0200)] 
[rt46602] Change the system tests script to support running individual tests on different ports

Resolved conflict in run.sh.

(cherry picked from commit fb00f18005fa420349c5ee7c1fabae4eb74d4ce9)
(cherry picked from commit 0ee883d4437b7404eb2e5289dc83c800fcbdb0b6)

8 years agoMerge branch 'kyua-oot-v9_11-v9_10' into 'v9_10'
Evan Hunt [Fri, 23 Feb 2018 23:51:18 +0000 (15:51 -0800)] 
Merge branch 'kyua-oot-v9_11-v9_10' into 'v9_10'

chg: dev: Unit tests were broken in out-of-tree builds.

See merge request isc-projects/bind9!57

8 years agounit/unittest.sh is generated by configure. It will always be
Petr Menšík [Thu, 22 Feb 2018 14:32:16 +0000 (15:32 +0100)] 
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 95cde3608aab9e1e4025d5a73fa2c602b3082ea1)
(cherry picked from commit 6d9b38e9fe7608e61c5e1daf6edf99a227e5af8f)

8 years agoMerge branch 'master-v9_12-v9_11-v9_10' into 'v9_10'
Evan Hunt [Fri, 23 Feb 2018 21:57:47 +0000 (13:57 -0800)] 
Merge branch 'master-v9_12-v9_11-v9_10' into 'v9_10'

Code cleanups

See merge request isc-projects/bind9!36

8 years agoReduce repeated detection of mysql lib directory.
Petr Menšík [Thu, 15 Feb 2018 11:48:56 +0000 (12:48 +0100)] 
Reduce repeated detection of mysql lib directory.
Use common part once a bit later.

(cherry picked from commit 2a70eae04f901e13df814fc8b67b030d46cf90c6)
(cherry picked from commit d04af522226717c5d72271726446659ca87846e4)
(cherry picked from commit 1b0cf4fea63b263c1f46dbb7f282d00b5a67f9b5)

8 years agoReuse new function from rt46864 for similar block elsewhere.
Petr Menšík [Wed, 17 Jan 2018 18:43:12 +0000 (19:43 +0100)] 
Reuse new function from rt46864 for similar block elsewhere.

(cherry picked from commit e7a93321f095c8a2018df253a38bd1fc40d639cd)
(cherry picked from commit cb98ce8e676990807184e21139d5bf2a63c1890b)
(cherry picked from commit 687650160506ed30ae41319aaf5ca7883ddc5b32)

8 years agoMerge branch '82-cacheclean-test-is-not-robust-v9_11-v9_10' into 'v9_10'
Mark Andrews [Thu, 22 Feb 2018 01:49:30 +0000 (12:49 +1100)] 
Merge branch '82-cacheclean-test-is-not-robust-v9_11-v9_10' into 'v9_10'

Resolve "cacheclean test is not robust."

Closes #82

See merge request isc-projects/bind9!50

8 years agoadd CHANGES entry
Mark Andrews [Thu, 22 Feb 2018 00:27:18 +0000 (11:27 +1100)] 
add CHANGES entry

(cherry picked from commit 8c8ad74abeea3d0c7471b3bfd770ac8af6fe2db7)
(cherry picked from commit 51e94baf50c74f495d6b88aa49cf148fb686b0d4)

8 years agocheck that sed selects a non zero range of lines
Mark Andrews [Wed, 21 Feb 2018 01:33:02 +0000 (12:33 +1100)] 
check that sed selects a non zero range of lines

(cherry picked from commit 146c16c06e2faaca98772ce0f2aa99ff42e2be08)
(cherry picked from commit e0c9b5bd2bbac36a0418ce31533ea4668aa8b3ff)

8 years agoMerge branch '67-stabilize-cacheclean-system-test-v9_10' into 'v9_10'
Mark Andrews [Tue, 20 Feb 2018 23:45:41 +0000 (10:45 +1100)] 
Merge branch '67-stabilize-cacheclean-system-test-v9_10' into 'v9_10'

Stabilize cacheclean system test

Closes #67

See merge request isc-projects/bind9!43

8 years agoImprove the way cache contents are searched for "ns.flushtest.example"
Michał Kępień [Tue, 20 Feb 2018 12:59:29 +0000 (13:59 +0100)] 
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 ca1049b2f36be42a6daa9c04289d51c481cb7b52)

8 years agoWait until a cache dump completes instead of waiting for a fixed amount of time
Michał Kępień [Tue, 20 Feb 2018 12:59:28 +0000 (13:59 +0100)] 
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 2bbff06d3631653fcea95e223da47aea0f9cdf0b)

8 years agoDo not overwrite cache dumps
Michał Kępień [Tue, 20 Feb 2018 12:59:27 +0000 (13:59 +0100)] 
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 aeea1faf0191f8f693393ee088272f893fc4faa1)

8 years agoAssign an index to each check in the cacheclean system test
Michał Kępień [Tue, 20 Feb 2018 12:59:25 +0000 (13:59 +0100)] 
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 01de79b332ec3fbd0960dc9f4ab9a650ae85d453)

8 years ago[v9_10] add missing release note, update README
Evan Hunt [Sun, 18 Feb 2018 04:04:06 +0000 (20:04 -0800)] 
[v9_10] add missing release note, update README

8 years agoMerge branch 'fix-loadpending-handling-v9_10' into v9_10
Michał Kępień [Fri, 16 Feb 2018 08:00:25 +0000 (09:00 +0100)] 
Merge branch 'fix-loadpending-handling-v9_10' into v9_10

8 years agoAdd CHANGES entry
Michał Kępień [Thu, 15 Feb 2018 19:31:55 +0000 (20:31 +0100)] 
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]

8 years agoDo not recheck DNS_ZONEFLG_LOADPENDING in zone_asyncload()
Michał Kępień [Thu, 15 Feb 2018 19:31:54 +0000 (20:31 +0100)] 
Do not recheck DNS_ZONEFLG_LOADPENDING in zone_asyncload()

Remove a block of code which dates back to commit 8a2ab2b9203, 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.

8 years agoAsynchronous zone load events have no way of getting canceled
Michał Kępień [Thu, 15 Feb 2018 19:31:53 +0000 (20:31 +0100)] 
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 8a2ab2b9203.  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.

8 years agoOnly clear DNS_ZONEFLG_LOADPENDING in zone_asyncload() if zone loading is completed...
Michał Kępień [Thu, 15 Feb 2018 19:31:51 +0000 (20:31 +0100)] 
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().

8 years agoLock zone before checking whether its asynchronous load is already pending
Michał Kępień [Thu, 15 Feb 2018 19:31:49 +0000 (20:31 +0100)] 
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.

8 years agoMerge branch 'fix-cpp-check-errors' into 'v9_10'
Mark Andrews [Fri, 16 Feb 2018 06:38:21 +0000 (01:38 -0500)] 
Merge branch 'fix-cpp-check-errors' into 'v9_10'

Fix cpp check errors

See merge request isc-projects/bind9!31

8 years agos/cppchecker/cppcheck
Mark Andrews [Fri, 16 Feb 2018 00:24:29 +0000 (11:24 +1100)] 
s/cppchecker/cppcheck

8 years agoadd GL issue number
Mark Andrews [Fri, 16 Feb 2018 00:21:16 +0000 (11:21 +1100)] 
add GL issue number

8 years agoadd CHANGES note
Mark Andrews [Thu, 15 Feb 2018 23:34:49 +0000 (10:34 +1100)] 
add CHANGES note

8 years agoadd POST(len);
Mark Andrews [Thu, 15 Feb 2018 21:41:41 +0000 (08:41 +1100)] 
add POST(len);

8 years agoconditionally declare stacksize
Mark Andrews [Thu, 15 Feb 2018 21:37:33 +0000 (08:37 +1100)] 
conditionally declare stacksize

8 years agoadd POST(len);
Mark Andrews [Thu, 15 Feb 2018 07:18:19 +0000 (18:18 +1100)] 
add POST(len);

8 years agoClarify calculation precedence for '&' and '?'
Mark Andrews [Thu, 15 Feb 2018 07:09:29 +0000 (18:09 +1100)] 
Clarify calculation precedence for '&' and '?'

8 years agoadd POST(tl)
Mark Andrews [Thu, 15 Feb 2018 05:21:57 +0000 (16:21 +1100)] 
add POST(tl)

8 years agoreturn failure count
Mark Andrews [Thu, 15 Feb 2018 05:14:08 +0000 (16:14 +1100)] 
return failure count

8 years agoconditionally declare strbuf
Mark Andrews [Thu, 15 Feb 2018 05:07:01 +0000 (16:07 +1100)] 
conditionally declare strbuf

8 years agotest for == 0 rather than <= as value is unsigned
Mark Andrews [Thu, 15 Feb 2018 05:04:01 +0000 (16:04 +1100)] 
test for == 0 rather than <= as value is unsigned

8 years agoadd brackets
Mark Andrews [Thu, 15 Feb 2018 04:58:19 +0000 (15:58 +1100)] 
add brackets

8 years agoreorder test to silence cppcheck
Mark Andrews [Thu, 15 Feb 2018 04:53:47 +0000 (15:53 +1100)] 
reorder test to silence cppcheck

8 years agoremove event which is only used for sizeof
Mark Andrews [Thu, 15 Feb 2018 04:00:34 +0000 (15:00 +1100)] 
remove event which is only used for sizeof

8 years agoreorder test to silence cppcheck
Mark Andrews [Thu, 15 Feb 2018 03:50:36 +0000 (14:50 +1100)] 
reorder test to silence cppcheck

8 years agouse %u instead of %d
Mark Andrews [Thu, 15 Feb 2018 03:25:37 +0000 (14:25 +1100)] 
use %u instead of %d

8 years agouse %u instead of %d
Mark Andrews [Thu, 15 Feb 2018 03:23:54 +0000 (14:23 +1100)] 
use %u instead of %d

8 years agouse %u instead of %d
Mark Andrews [Thu, 15 Feb 2018 03:23:15 +0000 (14:23 +1100)] 
use %u instead of %d

8 years agouse %u instead of %d
Mark Andrews [Thu, 15 Feb 2018 03:21:42 +0000 (14:21 +1100)] 
use %u instead of %d

8 years agouse %u instead of %d
Mark Andrews [Thu, 15 Feb 2018 03:20:16 +0000 (14:20 +1100)] 
use %u instead of %d

8 years agouse %u instead of %d
Mark Andrews [Thu, 15 Feb 2018 02:43:13 +0000 (13:43 +1100)] 
use %u instead of %d

8 years agouse %u instead of %d
Mark Andrews [Thu, 15 Feb 2018 02:29:22 +0000 (13:29 +1100)] 
use %u instead of %d

8 years agouse %u instead of %d
Mark Andrews [Thu, 15 Feb 2018 02:27:03 +0000 (13:27 +1100)] 
use %u instead of %d

8 years agouse %u instead of %d
Mark Andrews [Thu, 15 Feb 2018 02:26:09 +0000 (13:26 +1100)] 
use %u instead of %d

8 years agocase to unsigned; reorder expression
Mark Andrews [Thu, 15 Feb 2018 02:20:59 +0000 (13:20 +1100)] 
case to unsigned; reorder expression

8 years agosimplify expression
Mark Andrews [Thu, 15 Feb 2018 02:11:25 +0000 (13:11 +1100)] 
simplify expression

8 years agouse %u and preserve unsigned property
Mark Andrews [Thu, 15 Feb 2018 01:38:22 +0000 (12:38 +1100)] 
use %u and preserve unsigned property

8 years agocast to unsigned
Mark Andrews [Thu, 15 Feb 2018 01:24:56 +0000 (12:24 +1100)] 
cast to unsigned

8 years agopreserve unsigned property
Mark Andrews [Thu, 15 Feb 2018 01:24:33 +0000 (12:24 +1100)] 
preserve unsigned property

8 years agouse %u instead of %d
Mark Andrews [Thu, 15 Feb 2018 01:11:17 +0000 (12:11 +1100)] 
use %u instead of %d

8 years agomake both arguments of & unsigned
Mark Andrews [Thu, 15 Feb 2018 01:08:52 +0000 (12:08 +1100)] 
make both arguments of & unsigned

8 years agouse %u instead of %d
Mark Andrews [Thu, 15 Feb 2018 00:41:13 +0000 (11:41 +1100)] 
use %u instead of %d

8 years agoshift unsigned (~0U) rather than signed (~0) contant
Mark Andrews [Wed, 14 Feb 2018 13:41:13 +0000 (00:41 +1100)] 
shift unsigned (~0U) rather than signed (~0) contant

8 years agouse %u instead of %d
Mark Andrews [Wed, 14 Feb 2018 13:24:11 +0000 (00:24 +1100)] 
use %u instead of %d

8 years agounsigned constants
Mark Andrews [Wed, 14 Feb 2018 13:16:19 +0000 (00:16 +1100)] 
unsigned constants

8 years agounsigned constants
Mark Andrews [Wed, 14 Feb 2018 13:14:06 +0000 (00:14 +1100)] 
unsigned constants

8 years agouse %u instead of %d
Mark Andrews [Wed, 14 Feb 2018 13:03:05 +0000 (00:03 +1100)] 
use %u instead of %d

8 years agouse %u instead of %d
Mark Andrews [Wed, 14 Feb 2018 13:02:14 +0000 (00:02 +1100)] 
use %u instead of %d

8 years agouse %u instead of %d
Mark Andrews [Wed, 14 Feb 2018 13:00:17 +0000 (00:00 +1100)] 
use %u instead of %d

8 years agoINSIST ipnum6 != NULL
Mark Andrews [Wed, 14 Feb 2018 08:31:16 +0000 (19:31 +1100)] 
INSIST ipnum6 != NULL

8 years agouse %u instead of %d
Mark Andrews [Wed, 14 Feb 2018 08:28:13 +0000 (19:28 +1100)] 
use %u instead of %d