Commit Graph
3706 Commits
Author SHA1 Message Date
Michał KępieńandOndřej Surý 39ddf9991f Do not access dns_fixedname_t fields directly
Employ dns_fixedname_name() and dns_fixedname_initname() to no longer
directly access dns_fixedname_t fields.
2018-04-09 12:14:16 +02:00
Michał KępieńandOndřej Surý 4df4a8e731 Use dns_fixedname_initname() where possible
Replace dns_fixedname_init() calls followed by dns_fixedname_name()
calls with calls to dns_fixedname_initname() where it is possible
without affecting current behavior and/or performance.

This patch was mostly prepared using Coccinelle and the following
semantic patch:

    @@
    expression fixedname, name;
    @@
    -	dns_fixedname_init(&fixedname);
    	...
    -	name = dns_fixedname_name(&fixedname);
    +	name = dns_fixedname_initname(&fixedname);

The resulting set of changes was then manually reviewed to exclude false
positives and apply minor tweaks.

It is likely that more occurrences of this pattern can be refactored in
an identical way.  This commit only takes care of the low-hanging fruit.
2018-04-09 12:14:16 +02:00
Witold Kręcicki c8aa1ee9e6 libdns refactoring: get rid of multiple versions of dns_dt_create, dns_view_setcache, dns_zt_apply, dns_message_logfmtpacket, dns_message_logpacket, dns_ssutable_checkrules and dns_ttl_totext 2018-04-06 08:04:41 +02:00
Witold Kręcicki 702c022016 libdns refactoring: get rid of multiple versions of dns_xfrin_create, dst_key_generate, dst_lib_init and dst_context_create 2018-04-06 08:04:41 +02:00
Witold Kręcicki 7dbc6768d6 libdns refactoring: get rid of multiple versions of dns_zone_setfile, dns_zone_notifyreceive, dns_zone_dumptostream, dns_zone_getserial 2018-04-06 08:04:41 +02:00
Witold Kręcicki 8c12e488f7 libdns refactoring: get rid of multiple versions of dns_request_createraw and dns_request_createvia 2018-04-06 08:04:41 +02:00
Witold Kręcicki e2a06db7f3 libdns refactoring: get rid of multiple versions of dns_master_loadfile, dns_master_loadfileinc, dns_master_dump, dns_master_dumpinc, dns_master_dumptostream, dns_master_stylecreate 2018-04-06 08:04:41 +02:00
Witold Kręcicki 275a6a3bec libdns refactoring: get rid of unnecessary dns_db_dump2 and 3 versions of dns_db_load 2018-04-06 08:04:41 +02:00
Witold Kręcicki d39b3209fb libdns refactoring: get rid of 3 versions of dns_cache_create 2018-04-06 08:04:41 +02:00
Witold Kręcicki d76ed0da1c libdns refactoring: get rid of two versions of dns_byaddr_createptrname 2018-04-06 08:04:41 +02:00
Witold Kręcicki f0a07b7546 libdns refactoring: get rid of two versions of dns_adb_createfind and dns_adb_probesize 2018-04-06 08:04:41 +02:00
Mark Andrews f87e0c03ee system should only be in SUBDIRS 2018-04-06 13:33:53 +10:00
Ondřej Surý b097be17ef Remove unused obsolete isc_hash_* function, and just keep the FNV-1a version 2018-04-04 23:12:14 +02:00
Kevin ChenandOndřej Surý 8b1b809ab4 Add a Net::DNS prereq for digdelv, fetchlimit, rpzrecurse, and zero
tests to avoid failed tests when Net::DNS is not present.
2018-04-04 22:23:14 +02:00
Stephen Morris e0e81288cd Check libidn2 version before proceding with one of the tests.
A known issue in libidn2 causes one of the tests of a fake A-label
to fail.  The problem should be corrected in version 2.0.5 of
libidn2.
2018-04-04 09:42:08 -04:00
Ondřej SurýandStephen Morris 4dad408ead Use C.UTF-8 if available, and en_US.UTF-8 is available, otherwise do nothing and let the test break 2018-04-04 09:42:08 -04:00
Stephen Morris 8cf29aafec Set known locale prior to running tests. 2018-04-04 09:42:08 -04:00
Stephen Morris 5009724f40 Fix check for the presence of IDNA. 2018-04-04 09:42:08 -04:00
Stephen Morris dc7b3d7597 Added additional tests for invalid punycode strings. 2018-04-04 09:42:07 -04:00
Stephen Morris 6755118493 Initial set of IDNA tests. 2018-04-04 09:42:07 -04:00
Mark Andrews 4be5667b2c fix temporary file name to have subtest number
(cherry picked from commit e12453f43c88bac722fb511b62f12303735b788c)
2018-03-19 23:14:28 +11:00
Mark Andrews 6e4b5f2345 fix typo 2018-03-19 22:31:22 +11:00
Mark Andrews dd5dff3096 fix numbering of tests and make consistent 2018-03-19 17:51:04 +11:00
Mukund SivaramanandOndřej Surý d20d86e37d Check for more than 64 policy zones 2018-03-18 10:08:22 +00:00
Mukund SivaramanandOndřej Surý 8c5fe523b2 Add system test 2018-03-18 10:07:48 +00:00
Evan Hunt 0fabe0da83 update file headers 2018-03-15 18:33:13 -07:00
Evan Hunt 733086cc67 clean up dig.out files that were left behind after xfer test 2018-03-10 13:04:31 -08:00
Evan Hunt 74347f4a55 reduce race risk in parallel builds 2018-03-09 14:12:50 -08:00
Evan Hunt a4ebe83cdb migrate t_dst signature test to lib/dns/tests/dst_test 2018-03-09 14:12:50 -08:00
Evan Hunt f58ac8ada3 migrate t_db to lib/dns/tests/db_test 2018-03-09 14:12:49 -08:00
Evan Hunt 8ecf69ef7b migrate t_names to lib/dns/tests/name_test 2018-03-09 14:12:49 -08:00
Evan Hunt 109546cbda migrate t_rbt to lib/dns/tests/rbt_test 2018-03-09 14:12:49 -08:00
Evan Hunt c6c1e99252 migrate t_tasks to lib/isc/tests/task_test 2018-03-09 14:12:49 -08:00
Evan Hunt d80825c40b migrate t_resolver to lib/dns/tests/resolver_test 2018-03-09 14:12:49 -08:00
Evan Hunt e2b8699df9 migrate t_timers to lib/isc/tests/timer_test 2018-03-09 14:12:49 -08:00
Evan Hunt 874e2fc70c migrate t_atomic to lib/isc/tests/atomic_test 2018-03-09 14:12:48 -08:00
Evan Hunt 979f054702 migrate t_mem to lib/isc/tests/mem_test 2018-03-09 14:12:48 -08:00
Evan Hunt 05b7251d51 migrate t_net to lib/isc/tests 2018-03-09 14:12:48 -08:00
Evan Hunt 62f650078a migrate t_sockaddr to lib/isc/tests 2018-03-09 14:12:48 -08:00
Evan Hunt 6ad1a042bc remove hashes test (duplicates lib/isc/tests/hash_test) 2018-03-09 14:12:48 -08:00
Evan Hunt 6717f31e10 remove master test (duplicates lib/isc/tests/master_test) 2018-03-09 14:12:48 -08:00
Evan Hunt ccfe778c01 migrate tests from bin/tests/dnssec-signzone to bin/tests/system/dnssec
- added tests to the dnssec system test that duplicate the ones
  from bin/tests/dnssec-signzone
- changed cleanall.sh so it doesn't automatically remove all
  key files, because there are now some of those that are part of the
  distribution
2018-03-09 14:12:48 -08:00
Evan Hunt 344ab0eb7d move all optional tests from bin/tests to bin/tests/optional
- some of these tests are obsolete and should be cleared up,
  others overlap with ATF tests and may be removed later.
  for now, let's just tidy up the bin/tests directory by
  moving these files down a level.
2018-03-09 14:12:47 -08:00
Evan Hunt a633f6c5dd remove some old and obsolete test files 2018-03-09 14:12:47 -08:00
Michał KępieńandEvan Hunt ab2913a29f Tweak timestamp checking in the cds system test
Given the characteristics of the three timestamps involved in file
modification time checks in the cds system test (each one is an hour
apart from the next), reduce the resolution of these checks to 1 minute.
This will prevent intermittent false negatives caused by exceeding the
currently allowed difference of 9 seconds between file modification
times without making the test moot.

Also note that by using abs(), checkmtime.pl allows the cds system test
to pass when the modification time of the checked file is less than an
hour (or two hours for the second check) in the past.  This should never
happen, so remove abs() from the condition checked by checkmtime.pl.
2018-03-08 13:57:30 -05:00
Michał Kępień 012ca0a27d Fix a race between "rndc reconfig" and waiting for a ./DNSKEY fetch to complete
Calling nextpart() after reconfiguring ns1 is not safe, because the
expected log message may appear in ns5/named.run before nextpart() is
run.  With the TTL for ./DNSKEY set to 20 seconds, ns5 will refresh it
after 10 seconds, by which time wait_for_log() will already have failed.
This results in a false negative.

However, just calling nextpart() before reconfiguring ns1 would
introduce a different problem: if ns5 refreshed ./DNSKEY between these
two steps, the subsequent wait_for_log() call would return immediately
as it would come across the log message about a failure while refreshing
./DNSKEY instead of the expected success.  This in turn would result in
a different false negative as the root key would still be uninitialized
by the time "rndc secroots" is called.

Prevent both kinds of false negatives by:

  - calling nextpart() before reconfiguring ns1, in order to prevent the
    first case described above,

  - looking for a more specific log message, in order to prevent the
    second case described above.

Also look for a more specific log message in the first part of the
relevant check, not to fix any problem, but just to emphasize that a
different fetch result is expected in that case.

With these tweaks in place, if a (failed) ./DNSKEY refresh is scheduled
between nextpart() and reconfiguring ns1, wait_for_log() will just wait
for two more seconds (one "hour"), at which point another refresh
attempt will be made that will succeed.
2018-03-08 13:19:54 +01:00
Mark Andrews ca55c672b0 add test configuration where a in-view zone collides with a existing zone 2018-03-08 11:50:09 +11:00
Evan Hunt 1eff695f33 use the test name in the -D string for each name server 2018-03-07 17:37:00 -05:00
Evan Hunt 4a714bffbc restore long options for run.sh 2018-03-07 17:22:58 -05:00
Evan Hunt a9b6bed6af eliminate unnecessary waiting in allow-query test
- grep in the log to see if configuration is finished rather
  than sleeping for 5 seconds
2018-03-07 13:20:01 -08:00