1. 30 Jul, 2020 6 commits
  2. 24 Jul, 2020 2 commits
  3. 21 Jul, 2020 2 commits
    • Michal Nowak's avatar
      Drop feature test for dlopen() · 2064e01c
      Michal Nowak authored
      With libtool being mandatory from 9.17 on, so is dlopen() (via libltdl).
      2064e01c
    • Ondřej Surý's avatar
      Fix the rbt hashtable and grow it when setting max-cache-size · e24bc324
      Ondřej Surý authored
      There were several problems with rbt hashtable implementation:
      
      1. Our internal hashing function returns uint64_t value, but it was
         silently truncated to unsigned int in dns_name_hash() and
         dns_name_fullhash() functions.  As the SipHash 2-4 higher bits are
         more random, we need to use the upper half of the return value.
      
      2. The hashtable implementation in rbt.c was using modulo to pick the
         slot number for the hash table.  This has several problems because
         modulo is: a) slow, b) oblivious to patterns in the input data.  This
         could lead to very uneven distribution of the hashed data in the
         hashtable.  Combined with the single-linked lists we use, it could
         really hog-down the lookup and removal of the nodes from the rbt
         tree[a].  The Fibonacci Hashing is much better fit for the hashtable
         function here.  For longer description, read "Fibonacci Hashing: The
         Optimization that the World Forgot"[b] or just look at the Linux
         kernel.  Also this will make Diego very happy :).
      
      3. The hashtable would rehash every time the number of nodes in the rbt
         tree would exceed 3 * (hashtable size).  The overcommit will make the
         uneven distribution in the hashtable even worse, but the main problem
         lies in the rehashing - every time the database grows beyond the
         limit, each subsequent rehashing will be much slower.  The mitigation
         here is letting the rbt know how big the cache can grown and
         pre-allocate the hashtable to be big enough to actually never need to
         rehash.  This will consume more memory at the start, but since the
         size of the hashtable is capped to `1 << 32` (e.g. 4 mio entries), it
         will only consume maximum of 32GB of memory for hashtable in the
         worst case (and max-cache-size would need to be set to more than
         4TB).  Calling the dns_db_adjusthashsize() will also cap the maximum
         size of the hashtable to the pre-computed number of bits, so it won't
         try to consume more gigabytes of memory than available for the
         database.
      
         FIXME: What is the average size of the rbt node that gets hashed?  I
         chose the pagesize (4k) as initial value to precompute the size of
         the hashtable, but the value is based on feeling and not any real
         data.
      
      For future work, there are more places where we use result of the hash
      value modulo some small number and that would benefit from Fibonacci
      Hashing to get better distribution.
      
      Notes:
      a. A doubly linked list should be used here to speedup the removal of
         the entries from the hashtable.
      b. https://probablydance.com/2018/06/16/fibonacci-hashing-the-optimization-that-the-world-forgot-or-a-better-alternative-to-integer-modulo/
      e24bc324
  4. 17 Jul, 2020 3 commits
    • Michal Nowak's avatar
      Check tests for core files regardless of test status · 1b13123c
      Michal Nowak authored
      Failed test should be checked for core files et al. and have
      backtrace generated.
      1b13123c
    • Michal Nowak's avatar
      Rationalize backtrace logging · 05c13e50
      Michal Nowak authored
      GDB backtrace generated via "thread apply all bt full" is too long for
      standard output, lets save them to .txt file among other log files.
      05c13e50
    • Michal Nowak's avatar
      Ensure various test issues are treated as failures · b232e858
      Michal Nowak authored
      Make sure bin/tests/system/run.sh returns a non-zero exit code if any of
      the following happens:
      
        - the test being run produces a core dump,
        - assertion failures are found in the test's logs,
        - ThreadSanitizer reports are found after the test completes,
        - the servers started by the test fail to shut down cleanly.
      
      This change is necessary to always fail a test in such cases (before the
      migration to Automake, test failures were determined based on the
      presence of "R:<test-name>:FAIL" lines in the test suite output and thus
      it was not necessary for bin/tests/system/run.sh to return a non-zero
      exit code).
      b232e858
  5. 14 Jul, 2020 1 commit
  6. 13 Jul, 2020 1 commit
  7. 06 Jul, 2020 1 commit
  8. 02 Jul, 2020 1 commit
  9. 01 Jul, 2020 7 commits
    • Matthijs Mekking's avatar
      Fix kasp test set_keytime · 24e07ae9
      Matthijs Mekking authored
      While the creation and publication times of the various keys
      in this policy are nearly at the same time there is a chance that
      one key is created a second later than the other.
      
      The `set_keytimes_algorithm_policy` mistakenly set the keytimes
      for KEY3 based of the "published" time from KEY2.
      24e07ae9
    • Evan Hunt's avatar
      further tidying of primary/secondary terminology in system tests · e43b3c1f
      Evan Hunt authored
      this changes most visble uses of master/slave terminology in tests.sh
      and most uses of 'type master' or 'type slave' in named.conf files.
      files in the checkconf test were not updated in order to confirm that
      the old syntax still works. rpzrecurse was also left mostly unchanged
      to avoid interference with DNSRPS.
      e43b3c1f
    • Evan Hunt's avatar
      prevent "primaries" lists from having duplicate names · f619708b
      Evan Hunt authored
      it is now an error to have two primaries lists with the same
      name. this is true regardless of whether the "primaries" or
      "masters" keywords were used to define them.
      f619708b
    • Evan Hunt's avatar
      add "primary-only" as a synonym for "master-only" · 424a3cf3
      Evan Hunt authored
      update the "notify" option to use RFC 8499 terminology as well.
      424a3cf3
    • Evan Hunt's avatar
      add "primaries" as a synonym for "masters" in named.conf · 16e14353
      Evan Hunt authored
      as "type primary" is preferred over "type master" now, it makes
      sense to make "primaries" available as a synonym too.
      
      added a correctness check to ensure "primaries" and "masters"
      cannot both be used in the same zone.
      16e14353
    • Diego dos Santos Fronza's avatar
      Added test for the fix · 042e5097
      Diego dos Santos Fronza authored
      This test ensures that named will correctly shutdown
      when receiving multiple control connections after processing
      of either "rncd stop" or "kill -SIGTERM" commands.
      
      Before the fix, named was crashing due to a race condition happening
      between two threads, one running shutdown logic in named/server.c
      and other handling control logic in controlconf.c.
      
      This test tries to reproduce the above scenario by issuing multiple
      queries to a target named instance, issuing either rndc stop or kill
      -SIGTERM command to the same named instance, then starting multiple rndc
      status connections to ensure it is not crashing anymore.
      042e5097
    • Evan Hunt's avatar
      update the acl system test to include a blackhole test case · e3ee1380
      Evan Hunt authored
      this ACL was previously untested, which allowed a regression to
      go undetected.
      e3ee1380
  10. 30 Jun, 2020 2 commits
    • Matthijs Mekking's avatar
      Output rndc dnssec -status · 19ce9ec1
      Matthijs Mekking authored
      Implement the 'rndc dnssec -status' command that will output
      some information about the key states, such as which policy is
      used for the zone, what keys are in use, and when rollover is
      scheduled.
      
      Add loose testing in the kasp system test, the actual times are
      already tested via key file inspection.
      19ce9ec1
    • Matthijs Mekking's avatar
      Add one more RFC 4592 test · f0b5eb03
      Matthijs Mekking authored
      This deals with the SRV example.
      f0b5eb03
  11. 29 Jun, 2020 1 commit
  12. 26 Jun, 2020 2 commits
    • Matthijs Mekking's avatar
      kasp tests: fix wait for reconfig done · a47192ed
      Matthijs Mekking authored
      The wait until zones are signed after rndc reconfig is broken
      because the zones are already signed before the reconfig.  Fix
      by having a different way to ensure the signing of the zone is
      complete.  This does require a call to the "wait_for_done_signing"
      function after each "check_keys" call after the ns6 reconfig.
      
      The "wait_for_done_signing" looks for a (newly added) debug log
      message that named will output if it is done signing with a certain
      key.
      a47192ed
    • Matthijs Mekking's avatar
      cf76d839
  13. 25 Jun, 2020 2 commits
  14. 23 Jun, 2020 1 commit
  15. 22 Jun, 2020 2 commits
    • Evan Hunt's avatar
      reorder system tests to shorten runtime · a9154f2a
      Evan Hunt authored
      if tests that take a particularly long time to complete
      (serve-stale, dnssec, rpzrecurse) are run first, a parallel
      run of the system tests can finish 1-2 minutes faster.
      a9154f2a
    • Evan Hunt's avatar
      "check-names primary" and "check-names secondary" were ignored · ba31b189
      Evan Hunt authored
      these keywords were added to the parser as synonyms for "master"
      and "slave" but were never hooked in to the configuration of named,
      so they were ignored. this has been fixed and the option is now
      checked for correctness.
      ba31b189
  16. 18 Jun, 2020 1 commit
  17. 09 Jun, 2020 2 commits
    • Michał Kępień's avatar
      Disable temporarily unsupported tests on Windows · fef15bc3
      Michał Kępień authored
      Due to the changes introduced by the Automake migration, system tests
      requiring Python (chain, pipelined, qmin, tcp), dynamic loading of
      shared objects (dlzexternal, dyndb, filter-aaaa), or LMDB (nzd2nzf)
      currently do not work on Windows.  Temporarily disable them on that
      platform by moving them from the PARALLEL_COMMON list to the
      PARALLEL_UNIX list until the situation is rectified.
      fef15bc3
    • Michał Kępień's avatar
      Fix SYSTEMTESTTOP on Windows · 1861866f
      Michał Kępień authored
      Without SYSTEMTESTTOP=.. lines in tests.sh scripts, SYSTEMTESTTOP is
      being set to an absolute path.  On Windows, this means that an absolute
      Cygwin path gets passed as a command line argument to native Windows
      binaries, which cannot work and causes system tests to break.  Fix by
      passing SYSTEMTESTTOP through cygpath on Windows, which causes that
      variable to be set to an absolute "mixed mode" path (Windows path with
      forward slashes).
      1861866f
  18. 05 Jun, 2020 2 commits
    • Michal Nowak's avatar
      Fix "make dist" · 5bbc6dd7
      Michal Nowak authored
      Make various adjustments necessary to enable "make dist" to build a BIND
      source tarball whose contents are complete enough to build binaries, run
      unit & system tests, and generate documentation on Unix systems.
      
      Known outstanding issues:
      
        - "make distcheck" does not work yet.
        - Tests do not work for out-of-tree source-tarball-based builds.
        - Source tarballs are not complete enough for building on Windows.
      
      All of the above will be addressed in due course.
      5bbc6dd7
    • Mark Andrews's avatar
      9e722667
  19. 04 Jun, 2020 1 commit