HomeFreeBSD

cap_dns tests: Convert to ATF, avoid failing when lookups don't resolve

Description

cap_dns tests: Convert to ATF, avoid failing when lookups don't resolve

The cap_dns tests require Internet access. Currently they fail when
that's not available, which for CI purposes is undesirable. Let's
instead skip the tests if none of the non-casper name/addr lookups
succeed.

To that end:

  • Convert the tests to ATF so that skipping is easier to implement.
  • Break up the tests into separate test cases.
  • If one of the system (i.e., non-casper) lookup functions fails, skip the test if all of them failed, otherwise fail the tests, since partial failure indicates something is flaky and deserves a closer look.

Reviewed by: oshogbo
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D39241

(cherry picked from commit 615bf03e33e466ca10e3f1d203f4c27188d28fc3)

Details

Provenance
markjAuthored on Mar 30 2023, 11:27 PM
Reviewer
oshogbo
Differential Revision
D39241: cap_dns tests: Convert to ATF, avoid failing when lookups don't resolve
Parents
rGb52c60d4e8c6: cap_sysctl tests: Serialize
Branches
Unknown
Tags
Unknown