Commit Graph
2722 Commits
Author SHA1 Message Date
Mark Andrews 809d55226b Address race in dnssec system test. 'clear signing records' can fail
as the update triggers by the rndc command to clear the signing records
may not have completed by the time the subsequent rndc command to test
that the records have been removed is commenced.  Loop several times to
prevent false negative.

(cherry picked from commit 353018c0e5)
2020-05-19 13:50:51 +10:00
Mark Andrews ae4f31e434 Retry checks that records are present and signed
There a race between when the delta is logged and when the
server returns signed record.  Retry the queries if the
lookups fail to meet expectations.

(cherry picked from commit 46c4e5d96f)
2020-05-18 16:00:51 +10:00
Mark Andrews 7c1043ae73 move provide-ixfr testing after the serial has been checked
(cherry picked from commit c7cdc47cc5)
(cherry picked from commit 89c1bc58e4)
2020-05-18 09:40:13 +10:00
Mark Andrews ee49cc6201 Check display of EDE option
(cherry picked from commit e6b0153f8a)
(cherry picked from commit 88e11a9971)
2020-05-13 12:18:55 +10:00
Mark AndrewsandOndřej Surý 31b863f3d1 Silence: E741 ambiguous variable name 'l'
(cherry picked from commit 189d21fb96)
2020-05-12 14:05:37 +02:00
Evan Hunt 1df4141279 initialize sockaddrdscp to prevent spurious output from 'named-checkconf -p'
(cherry picked from commit f8d753d452)
2020-05-06 12:48:13 -07:00
Evan Hunt 410ee752dd named-checkconf -z could exit with an incorrect staatus
the CHECK() macro resets result, so an error code from an earlier
view could be erased if the last view loaded had no errors.

(cherry picked from commit 7e73660206)
2020-05-01 17:47:44 -07:00
Mark Andrews 0c21ddcac6 Add more special zones to addzone restart test.
Test zones with various escape sequences and filesystem seperator
characters.
* escaped double quote (\")
* escaped escape (\\)
* escaped decimal byte value (\032)
* slash seperator (/)

(cherry picked from commit 5ab9b5b1e6)
2020-05-01 09:18:04 +10:00
Mark Andrews 3a79f3629c Check that bad message id's are caught by named
(cherry picked from commit 06e53c9e14)
2020-04-21 09:37:47 +10:00
Mark Andrews 87a22c5705 Convert to using retry_quiet and nextpart
(cherry picked from commit 9937116f21)
2020-04-21 09:33:36 +10:00
Ondřej Surý 5fd1df8cfa Disable MSB8028 warning
All our MSVS Project files share the same intermediate directory.  We
know that this doesn't cause any problems, so we can just disable the
detection in the project files.

Example of the warning:

  warning MSB8028: The intermediate directory (.\Release\) contains files shared from another project (dnssectool.vcxproj).  This can lead to incorrect clean and rebuild behavior.

(cherry picked from commit b6c2012d93)
2020-04-16 08:12:39 +02:00
Ondřej Surý 1eb5a77baa Set WarningLevel to Level1 for Release, treat warnings as errors
Our vcxproj files set the WarningLevel to Level3, which is too verbose
for a code that needs to be portable.  That basically leads to ignoring
all the errors that MSVC produces.  This commits downgrades the
WarningLevel to Level1 and enables treating warnings as errors for
Release builds.  For the Debug builds the WarningLevel got upgraded to
Level4, and treating warnings as errors is explicitly disabled.

We should eventually make the code clean of all MSVC warnings, but it's
a long way to go for Level4, so it's more reasonable to start at Level1.

For reference[1], these are the warning levels as described by MSVC
documentation:

  * /W0 suppresses all warnings. It's equivalent to /w.
  * /W1 displays level 1 (severe) warnings. /W1 is the default setting
    in the command-line compiler.
  * /W2 displays level 1 and level 2 (significant) warnings.
  * /W3 displays level 1, level 2, and level 3 (production quality)
    warnings. /W3 is the default setting in the IDE.
  * /W4 displays level 1, level 2, and level 3 warnings, and all level 4
    (informational) warnings that aren't off by default. We recommend
    that you use this option to provide lint-like warnings. For a new
    project, it may be best to use /W4 in all compilations. This option
    helps ensure the fewest possible hard-to-find code defects.
  * /Wall displays all warnings displayed by /W4 and all other warnings
    that /W4 doesn't include — for example, warnings that are off by
    default.
  * /WX treats all compiler warnings as errors. For a new project, it
    may be best to use /WX in all compilations; resolving all warnings
    ensures the fewest possible hard-to-find code defects.

1. https://docs.microsoft.com/en-us/cpp/build/reference/compiler-option-warning-level?view=vs-2019

(cherry picked from commit 789d253e3d)
2020-04-16 08:12:39 +02:00
Ondřej SurýandOndřej Surý 9301d69ebc Make the python code pylint and flake8 compliant
(cherry picked from commit 1e4ff9d485)
2020-04-15 07:46:35 +02:00
Diego FronzaandOndřej Surý eace12fb70 Add test for the proposed fix
This test asserts that option "deny-answer-aliases" works correctly
when forwarding requests.

As a matter of example, the behavior expected for a forwarder BIND
instance, having an option such as deny-answer-aliases { "domain"; }
is that when forwarding a request for *.anything-but-domain, it is
expected that it will return SERVFAIL if any answer received has a CNAME
for "*.domain".
2020-04-08 09:21:03 +02:00
Mark Andrews 614381a936 wait for the reply message before checking to avoid false negative.
Waiting for the reply message will ensure that all messages being
looked for exist in the logs at the time of checking.  When the
test was only waiting for the send message there was a race between
grep and the ns1 instance of named logging that it had seen the
request.

(cherry picked from commit a38a324442)
2020-03-16 10:52:31 +11:00
Mark Andrews be57cd016c Test reloading of zones with special
(cherry picked from commit ad030332bd)
2020-03-13 15:03:49 +11:00
Mark Andrews 0cf8585b81 Check that dig/host/nslookup handle a UPDATE response.
Additionally check that "delete $qname SOA" in the update
reponse doesn't trigger a insertion in nslookup.

(cherry picked from commit 6593cf0b5a)
2020-03-13 12:17:21 +11:00
Michal Nowak 5cb50baf50 Fix "pkcs11" system test
- Define the SLOT environment variable before starting the test.  This
    variable defaults to 0 and that does not work with SoftHSM 2.

  - The system test expects the PIN environment variable to be set to
    "1234" while bin/tests/prepare-softhsm2.sh sets it to "0000".
    Update bin/tests/prepare-softhsm2.sh so that it sets the PIN to
    "1234".

  - Move contents of bin/tests/system/pkcs11/prereq.sh to
    bin/tests/system/pkcs11/setup.sh as the former was creating a file
    called "supported" that was getting removed by the latter before
    bin/tests/system/pkcs11/tests.sh could access it.

  - Fix typo in "have_ecx".

(cherry picked from commit 100a230e80f01a777b917b135b4bae9a4ac0e8ae)
2020-03-05 07:57:12 +01:00
Mark Andrews 5c54402889 properly wait for zone to be loaded
(cherry picked from commit 0abcface49)
2020-03-04 18:17:08 +11:00
Mark Andrews e7a486be25 Check inline master zones that are touched reload correctly.
(cherry picked from commit 50e079d6c3)
2020-03-04 09:20:40 +11:00
Mark Andrews a32d952d9d capture named-journalprint output
(cherry picked from commit 88c828cb9f)
2020-02-28 10:14:02 +11:00
Evan Hunt 191b616579 fix additional spelling errors 2020-02-24 22:04:43 -08:00
Evan Hunt e63223332c fix spelling errors reported by Fossies. 2020-02-21 14:09:59 -08:00
Mark Andrews a8ee4f9923 spin waiting for prototype dig responses
(cherry picked from commit c38752b07c)
2020-02-12 19:45:34 +11:00
Mark Andrews c99ad5c8c7 wait for apex NSEC3 to be generated 2020-02-12 12:47:09 +11:00
Mark Andrews aef2c41e79 indent failed: descriptions
(cherry picked from commit 1e4773f121)
2020-02-08 08:47:42 +11:00
Mark Andrews ffac1eb5e6 indent some test descriptions/continuation
(cherry picked from commit ec95bc6f2c)
2020-02-08 08:44:43 +11:00
Mark Andrews f63bfc7928 remove space before 'failed'
(cherry picked from commit 0d5ec0c7dc)
2020-02-08 08:42:04 +11:00
Mark Andrews 4f6083138e ident continuation of test descriptions
(cherry picked from commit 059b16b991)
2020-02-08 08:42:04 +11:00
Mark Andrews 41173c0af9 remove space from before 'failed'; count errors
(cherry picked from commit 879c63b573)
2020-02-08 08:41:59 +11:00
Mark Andrews 85af984040 wait for root server to complete reloading
(cherry picked from commit 784e64f238)
2020-02-07 14:14:18 +00:00
Mark Andrews 870bb60456 wait a short while for no NSEC3PARAM
(cherry picked from commit e378241324)
2020-02-08 00:43:23 +11:00
Michał Kępień 9d5d2c9d20 Fix the "dnssec" system test on Windows
Make sure carriage return characters are stripped from awk input to
enable the "dnssec" system test to pass on Windows.

(cherry picked from commit 2f694f0b77)
2020-02-06 15:19:22 +01:00
Mark AndrewsandEvan Hunt c02d947772 don't swallow backslash characters in test output
(cherry picked from commit fc4e44bd37)
2020-02-03 19:46:17 -08:00
Mark AndrewsandEvan Hunt a68a187edf test all the scenarios for hashed filenames together
(cherry picked from commit 8745043a86)
2020-02-03 19:30:35 -08:00
Evan Hunt edee4f93c5 Correctly handle catalog zone entries containing slashes
- Add quotes before and after zone name when generating "addzone"
  input so avoid "unexpected token" errors.
- Use a hex digest for zone filenames when the zone or view name
  contains a slash.
- Test with a domain name containing a slash.
- Incidentally added 'catzhash.py' to contrib/scripts to generate
  hash labels for catalog zones, as it was needed to write the test.

(cherry picked from commit dba0163dac)
2020-02-03 19:23:37 -08:00
Mark Andrews 271f7959d2 add more CDS / CDNSKEY deletion record tests
(cherry picked from commit d159fdf25d)
2020-01-31 11:33:27 +11:00
Mark Andrews baff08ba18 check that a CDNSKEY deletion record is accepted
(cherry picked from commit f91b3a69ce)
2020-01-31 11:33:27 +11:00
Michał Kępień bd6bc659c2 List atypical failures in system test summary
Each system test can be marked as failed not only due to some tested
component(s) not behaving as expected, but also because of core dumps,
assertion failures, and/or ThreadSanitizer reports being found among its
artifacts.  Make the system test summary list the tests which exhibit
such atypical symptoms to more clearly present the nature of problems
found.

(cherry picked from commit a8836b381f)
2020-01-29 14:51:00 +01:00
Mark Andrews 173b8216ab wait longer for dynamic zone to be transfered
(cherry picked from commit 7b0ba6eb10)
2020-01-29 08:25:08 +11:00
Mark Andrews 772be0174a wait for the ./NS lookup to complete
(cherry picked from commit 9b6df37303)
2020-01-24 08:20:32 +11:00
Mark Andrews a262ff515b check that all servers have finished loading before beginging tests
(cherry picked from commit 4a992c7a18)
2020-01-24 08:20:31 +11:00
Witold Kręcicki e18cdac443 tests: add a missing log nextpart in inline test 2020-01-21 16:15:07 +01:00
Michał Kępień c9a12b8a1b Make retry_quiet() available on Windows
When retry_quiet() was backported to v9_11, it was only placed in
bin/tests/system/conf.sh.in, but not in bin/tests/system/conf.sh.win32.
This prevents every system test which employs this shell function either
directly or indirectly from ever succeeding on Windows.  Fix by copying
the definition of retry_quiet() to bin/tests/system/conf.sh.win32.
2020-01-16 21:37:06 +01:00
Michał Kępień a4f6af58b2 Fix the "dnssec" system test on Windows
Make sure carriage return characters are stripped from awk input to
enable the "dnssec" system test to pass on Windows.

(cherry picked from commit 451484b870)
2020-01-16 09:50:16 +01:00
Mark AndrewsandMichał Kępień 8c857665d0 address some timing issues in inline system test
(cherry picked from commit 2dc4d72fa9)
2020-01-14 14:49:52 +01:00
Matthijs MekkingandMichał Kępień 553a2498e1 Move wait_for_log to conf.sh.common
(cherry picked from cfaa631f65)
2020-01-14 14:49:52 +01:00
Mark AndrewsandMichał Kępień 24d52c1a38 Fix autosign system test issues.
* report when NSEC3PARAM is not yet present
* allow more time for NSEC3PARAM to become present
* adjust frequency failure message

(cherry picked from commit 17d25dbf47)
2020-01-14 13:24:26 +01:00
Mark AndrewsandMichał Kępień 57cd453b1e improve forensic logs
improve forensic logs by directing output to per sub-test named
files and reporting the sub-subtest number.

(cherry picked from commit 895f60d6f8)
2020-01-14 12:20:19 +01:00
Mark AndrewsandMichał Kępień e49100c9ab suppress unnecessary zone transfer
suppressed unnecessary zone transfer in "test mapped zone with
out of zone data" sub-test.

(cherry picked from commit 28695f1c92)
2020-01-14 12:20:18 +01:00