Commit Graph

25997 Commits

Author SHA1 Message Date
Stephen Morris
f10b6cfeb6 [rt46602] Pass port numbers to tests via environment variables
(cherry picked from commit f5d8f07900)
2018-02-22 11:12:57 +00:00
Stephen Morris
bf2992dbe6 [rt46602] Ensure parallel tests are in alphabetical order
(cherry picked from commit b2d90da0c2)
2018-02-22 11:12:33 +00:00
Stephen Morris
3952d4631e [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 af005cdbcf)
2018-02-22 11:12:23 +00:00
Stephen Morris
78494c3a4d [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 b24c2e11d8)
2018-02-22 11:11:51 +00:00
Stephen Morris
b01b553d72 [rt46602] Modify some test files to cope with the "-p" flag
(cherry picked from commit 517d990bd4)
2018-02-22 11:11:44 +00:00
Stephen Morris
a49afdaeb8 [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 32fe6f7682)
2018-02-22 11:11:12 +00:00
Stephen Morris
df1348ad2b [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 e0ff77f9d3)
2018-02-22 11:11:12 +00:00
Stephen Morris
58de0adbf6 [rt46602] Allow catz system test to run in parallel with other tests
(cherry picked from commit 07341693e1)
2018-02-22 11:11:12 +00:00
Stephen Morris
01eb4d7c97 [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 78f2b9ca01)
2018-02-22 11:11:00 +00:00
Stephen Morris
4f68e67e5c [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 e7429b124b)
2018-02-22 11:09:59 +00:00
Stephen Morris
ba694ca38c [rt46602] Miscellaneous tidying up of code cherry-picked from experimental branch
(cherry picked from commit e1a69e5d1f)
2018-02-22 11:08:42 +00:00
Ondřej Surý
a14bd48268 [rt46602] Allow parallel run of new dynamic port tests and the old ones
(cherry picked from commit 3b14d54fd7)
2018-02-22 11:08:05 +00:00
Ondřej Surý
cf7a86661a [rt46602] Put back original .gitignore files in the system tests
(cherry picked from commit caaec1ef6d)
2018-02-22 11:08:05 +00:00
Ondřej Surý
c5aa6ed87b [rt46602] Adjust rpzrecurse for dynamic port usage
Resolve conflict in run.sh during cherry-pick from an experimental branch.

(cherry picked from commit 2a435708e4)
2018-02-22 11:07:30 +00:00
Ondřej Surý
d37a52cc56 [rt46602] Add $SEDPORTS variable to help with @PORT@ and @CONTROLPORT@ replacement
(cherry picked from commit e6802badc0)
2018-02-22 11:02:14 +00:00
Ondřej Surý
a5c3077a9c [rt46602] Move most of ignored files to top of system tests directory
(cherry picked from commit d2c8286163)
2018-02-22 11:01:35 +00:00
Ondřej Surý
112355adb8 [rt46602] Fix output from rndc reload
(cherry picked from commit 53bade5ece)
2018-02-22 11:01:35 +00:00
Ondřej Surý
76dfb5c339 [rt46602] Add .gitignore to allow_query
(cherry picked from commit bc276f6c05)
2018-02-22 11:01:35 +00:00
Ondřej Surý
93034acb4d [rt46602] Utilize echo_i to allow mixed test output
(cherry picked from commit 7e3c96c867)
2018-02-22 11:01:29 +00:00
Ondřej Surý
b8e866d60f [rt46602] Prefix R:<result> as R:<test>:<result>
Resolve conflict in run.sh during cherry-pick from experimental branch.

(cherry picked from commit 278c72fef6)
2018-02-22 11:01:08 +00:00
Ondřej Surý
bd5b36f7a4 [rt46602] Add echo_i function to print I:<testname>:string
(cherry picked from commit f7ac41757a)
2018-02-22 11:01:08 +00:00
Ondřej Surý
57adb949a4 [rt46602] Add serve-stale working files to .gitignore
(cherry picked from commit cba162e70e)
2018-02-22 11:01:07 +00:00
Ondřej Surý
1d10178e83 [rt46602] Convert allow_query to dynamic port
(cherry picked from commit 992a2bafec)
2018-02-22 11:01:01 +00:00
Ondřej Surý
0ee883d443 [rt46602] Change the system tests script to support running individual tests on different ports
Resolved conflict in run.sh.

(cherry picked from commit fb00f18005)
2018-02-22 10:58:33 +00:00
Mark Andrews
a3d54b9ac5 Merge branch '82-cacheclean-test-is-not-robust-v9_11' into 'v9_11'
Resolve "cacheclean test is not robust."

Closes #82

See merge request isc-projects/bind9!50
2018-02-22 12:42:08 +11:00
Mark Andrews
51e94baf50 add CHANGES entry
(cherry picked from commit 8c8ad74abe)
2018-02-22 12:38:04 +11:00
Mark Andrews
e0c9b5bd2b check that sed selects a non zero range of lines
(cherry picked from commit 146c16c06e)
2018-02-22 12:37:27 +11:00
Mark Andrews
606321d278 Merge branch 'cherry-pick-643c8c27' into 'v9_11'
Merge branch '67-stabilize-cacheclean-system-test' into 'v9_11'

See merge request isc-projects/bind9!49
2018-02-20 16:09:20 -05:00
Mark Andrews
ea29bec179 Merge branch '67-stabilize-cacheclean-system-test' into 'master'
Stabilize cacheclean system test

Closes #67

See merge request isc-projects/bind9!43

(cherry picked from commit 643c8c27ff)

01de79b3 Assign an index to each check in the cacheclean system test
aeea1faf Do not overwrite cache dumps
2bbff06d Wait until a cache dump completes instead of waiting for a fixed amount of time
ca1049b2 Improve the way cache contents are searched for "ns.flushtest.example"
2018-02-20 16:08:59 -05:00
Evan Hunt
06908ef2df [v9_11] add missing release note, update README 2018-02-17 20:01:17 -08:00
Michał Kępień
ea9ba22c1b Merge branch 'fix-loadpending-handling-v9_11' into v9_11 2018-02-16 08:59:00 +01:00
Michał Kępień
b9d2b8845e 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 08:58:36 +01: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
682f6c017f Merge branch 'fix-cpp-check-errors' into 'v9_11'
Fix cpp check errors v9_11

See merge request isc-projects/bind9!30
2018-02-15 23:13:06 -05:00
Mark Andrews
1cf7f9168a s/cppchecker/cppcheck 2018-02-16 15:08:49 +11:00
Mark Andrews
cdfea624f0 add GL issue number 2018-02-16 15:08:49 +11:00
Mark Andrews
9fd6febad4 add CHANGES note 2018-02-16 15:08:49 +11: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
f103cbee94 return failure count 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
0c2c1615cb add brackets 2018-02-16 14:59:20 +11:00
Mark Andrews
bb7a470a0d reorder test to silence cppcheck 2018-02-16 14:59:20 +11:00