From: Nicki Křížek Date: Wed, 1 Jul 2026 13:40:07 +0000 (+0000) Subject: Move gssapi prereq.sh checks to a with_gssapi marker X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=c5ccd0e81cebea5aeb30b38a83fa826da1bf2937;p=thirdparty%2Fbind9.git Move gssapi prereq.sh checks to a with_gssapi marker Gates tkeyleak and the tsiggss modules. tsiggss also needs FIPS-DH, so its prereq.sh keeps that check for now. Assisted-by: Claude:claude-opus-4-8 --- diff --git a/bin/tests/system/isctest/mark.py b/bin/tests/system/isctest/mark.py index e80dc620539..67a8ddc01c1 100644 --- a/bin/tests/system/isctest/mark.py +++ b/bin/tests/system/isctest/mark.py @@ -123,6 +123,10 @@ with_geoip2 = pytest.mark.skipif( os.getenv("FEATURE_GEOIP2") != "1", reason="GeoIP2 support disabled in the build" ) +with_gssapi = pytest.mark.skipif( + os.getenv("FEATURE_GSSAPI") != "1", reason="GSS-API support disabled in the build" +) + without_tsan = pytest.mark.skipif( os.getenv("FEATURE_TSAN") == "1", reason="incompatible with ThreadSanitizer (TSAN)" ) diff --git a/bin/tests/system/tkeyleak/prereq.sh b/bin/tests/system/tkeyleak/prereq.sh deleted file mode 100644 index 8a68ae7df15..00000000000 --- a/bin/tests/system/tkeyleak/prereq.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# SPDX-License-Identifier: MPL-2.0 -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, you can obtain one at https://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -. ../conf.sh - -$FEATURETEST --gssapi || { - echo_i "gssapi not supported - skipping tkeyleak test" - exit 255 -} - -exit 0 diff --git a/bin/tests/system/tkeyleak/tests_tkeyleak.py b/bin/tests/system/tkeyleak/tests_tkeyleak.py index fd97c8540cd..37f2a7692e1 100644 --- a/bin/tests/system/tkeyleak/tests_tkeyleak.py +++ b/bin/tests/system/tkeyleak/tests_tkeyleak.py @@ -38,13 +38,19 @@ import dns.rdtypes.ANY.TKEY import pytest import isctest +import isctest.mark -pytestmark = pytest.mark.extra_artifacts( +EXTRA_ARTIFACTS = pytest.mark.extra_artifacts( [ "*/*.db", ] ) +pytestmark = [ + isctest.mark.with_gssapi, + EXTRA_ARTIFACTS, +] + TKEY_NAME = dns.name.from_text("test.key.") GSSAPI_ALGORITHM = dns.name.from_text("gss-tsig.") TKEY_MODE_GSSAPI = 3 diff --git a/bin/tests/system/tsiggss/prereq.sh b/bin/tests/system/tsiggss/prereq.sh index eb69fbb00cb..2098e7e8460 100644 --- a/bin/tests/system/tsiggss/prereq.sh +++ b/bin/tests/system/tsiggss/prereq.sh @@ -13,12 +13,6 @@ . ../conf.sh -# enable the tsiggss test only if gssapi was enabled -$FEATURETEST --gssapi || { - echo_i "gssapi and krb5 not supported - skipping tsiggss test" - exit 255 -} - $FEATURETEST --have-fips-dh || { echo_i "FIPS mode Diffie-Hellman not working - skipping tsiggss test" exit 255 diff --git a/bin/tests/system/tsiggss/tests_isc_spnego_flaws.py b/bin/tests/system/tsiggss/tests_isc_spnego_flaws.py index 3193ea6c3fe..867686a8beb 100755 --- a/bin/tests/system/tsiggss/tests_isc_spnego_flaws.py +++ b/bin/tests/system/tsiggss/tests_isc_spnego_flaws.py @@ -28,14 +28,20 @@ import dns.rrset import pytest import isctest +import isctest.mark -pytestmark = pytest.mark.extra_artifacts( +EXTRA_ARTIFACTS = pytest.mark.extra_artifacts( [ "ns1/K*", "ns1/example.nil.db", ] ) +pytestmark = [ + isctest.mark.with_gssapi, + EXTRA_ARTIFACTS, +] + class CraftedTKEYQuery: """ diff --git a/bin/tests/system/tsiggss/tests_sh_tsiggss.py b/bin/tests/system/tsiggss/tests_sh_tsiggss.py index 7dc8bc849ed..5ddfa2c1347 100644 --- a/bin/tests/system/tsiggss/tests_sh_tsiggss.py +++ b/bin/tests/system/tsiggss/tests_sh_tsiggss.py @@ -11,7 +11,9 @@ import pytest -pytestmark = pytest.mark.extra_artifacts( +import isctest.mark + +EXTRA_ARTIFACTS = pytest.mark.extra_artifacts( [ "authsock.pid", "nsupdate.out*", @@ -24,6 +26,11 @@ pytestmark = pytest.mark.extra_artifacts( ] ) +pytestmark = [ + isctest.mark.with_gssapi, + EXTRA_ARTIFACTS, +] + def test_tsiggss(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/tsiggss/tests_tkey_duplicate.py b/bin/tests/system/tsiggss/tests_tkey_duplicate.py index c38c358f660..5fe6518e78d 100644 --- a/bin/tests/system/tsiggss/tests_tkey_duplicate.py +++ b/bin/tests/system/tsiggss/tests_tkey_duplicate.py @@ -27,8 +27,9 @@ import subprocess import pytest import isctest +import isctest.mark -pytestmark = pytest.mark.extra_artifacts( +EXTRA_ARTIFACTS = pytest.mark.extra_artifacts( [ "nsupdate.out*", "ns1/K*", @@ -38,6 +39,11 @@ pytestmark = pytest.mark.extra_artifacts( ] ) +pytestmark = [ + isctest.mark.with_gssapi, + EXTRA_ARTIFACTS, +] + TKEY_NAME = "duptest.sig-example.nil."