Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test unicast DNS-SD as well as multicast, with both Avahi and mDNSResponder, on Ubuntu 20.04 #250

Merged
merged 6 commits into from
Apr 27, 2022

Commits on Apr 27, 2022

  1. Test unicast DNS-SD as well as multicast, with both Avahi and mDNSRes…

    …ponder, on Ubuntu 20.04
    
    * Add matrix.dns_sd_mode as 'unicast' or 'multicast', used in job name and results filenames
    * For now, unicast DNS-SD testing is not supported on Windows and macOS
    * Add api.testsuite.nmos.tv and mocks.testsuite.nmos.tv to /etc/hosts (as per https://github.com/AMWA-TV/nmos-testing/blob/master/test_data/BCP00301/README.md#hosts-files)
    * Stomp on /etc/resolv.conf (systemd-resolve --set-dns didn't replace only add) to ensure that only the mock DNS server is used and restart the Avahi or mDNSResponder daemon (reloading and/or invalidating/flushing systemd-resolve and nscd caches between test suite runs was found to be unnecessary)
    * Configure nmos-cpp-node to timeout registration requests (after 5s) and retry long-running DNS-SD queries (after 10s), well before the testing tool's DNS_SD_ADVERT_TIMEOUT (30s by default)
    * Run the testing tool with elevated permissions when testing unicast DNS-SD (unfortunately necessitating quick hack of pip install-ing packages as root, with --upgrade to workaround incompatibilities with e.g. cryptography in dist-packages)
    * Note the domain names passed to run_nmos_testing.sh mustn't have trailing dots to avoid "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'api.testsuite.nmos.tv.'. (_ssk.c:1131)" from e.g. IS-07-02 test_05
    
    Unrelated changes:
    * Update to conan-cmake 0.18.1 to support Visual Studio 2022 (a.k.a. "17", or "MSVC 19.31.31105.0" as now installed on GitHub windows-latest runnner)
    * However, switch to windows-2019 rather than windows-latest (now an alias for windows-2022) because there aren't any Conan binary packages for VS 2022 and testssl.sh is consistently failing with "Fatal error: No IPv4/IPv6 address(es) for "nmos-api.local" available" on the newer virtual environment
    * Add host_addresses to config because on Windows I'm seeing "No matching mDNS announcement" failures in IS-04-02 and IS-04-03 and a second "Registered address" in the nodeoutput log for the "vEthernet (nat)" adapter, despite it being disabled in the "windows setup" step...
    garethsb committed Apr 27, 2022
    Configuration menu
    Copy the full SHA
    7a84327 View commit details
    Browse the repository at this point in the history
  2. Additional logging around DNS-SD

    * Stop and restart mDNS daemons when testing
    * Launch mdnsd with -debug for the duration
    * Log mDNS announcements to demonstrate mdnsd messages about "excessive update rate" are based on its interpretation of the spec (targeting 6s interval rather than 1s interval)
    garethsb committed Apr 27, 2022
    Configuration menu
    Copy the full SHA
    6cdcdd7 View commit details
    Browse the repository at this point in the history
  3. Use testing tool's DNS_UPSTREAM_IP to ensure we're not subject to the…

    … resolver intermittently picking another DNS server
    garethsb committed Apr 27, 2022
    Configuration menu
    Copy the full SHA
    7b9d785 View commit details
    Browse the repository at this point in the history
  4. Remove minimum timeout for resolve and getaddrinfo to resolve failure…

    …s in at least IS-04-01 test_15, test_16 and test_21 (see sony#128)
    garethsb committed Apr 27, 2022
    Configuration menu
    Copy the full SHA
    1edccb6 View commit details
    Browse the repository at this point in the history
  5. For now, exclude unicast DNS-SD with mDNSResponder due to intermitten…

    …t *** buffer overflow detected *** in mdnsd
    garethsb committed Apr 27, 2022
    Configuration menu
    Copy the full SHA
    58d95df View commit details
    Browse the repository at this point in the history
  6. Turn off mdnsd debug logging again as it's very noisy

    E.g.
    * Bad service type in ._nmos-registration._tcp...
    * Excessive update rate for nmos-cpp_node_nmos-api-...
    * mDNSPosix.c:mDNSPlatformSetAllowSleep(): NOT IMPLEMENTED!
    * setsockopt - SO_RECV_ANYIF: Protocol not available
    garethsb committed Apr 27, 2022
    Configuration menu
    Copy the full SHA
    85aa89d View commit details
    Browse the repository at this point in the history