]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Move gssapi prereq.sh checks to a with_gssapi marker
authorNicki Křížek <nicki@isc.org>
Wed, 1 Jul 2026 13:40:07 +0000 (13:40 +0000)
committerNicki Křížek <nicki@isc.org>
Fri, 10 Jul 2026 11:17:41 +0000 (13:17 +0200)
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
bin/tests/system/isctest/mark.py
bin/tests/system/tkeyleak/prereq.sh [deleted file]
bin/tests/system/tkeyleak/tests_tkeyleak.py
bin/tests/system/tsiggss/prereq.sh
bin/tests/system/tsiggss/tests_isc_spnego_flaws.py
bin/tests/system/tsiggss/tests_sh_tsiggss.py
bin/tests/system/tsiggss/tests_tkey_duplicate.py

index e80dc6205391b865bc2214d9be0c116666030c07..67a8ddc01c1841749c979db5ef364156835446d1 100644 (file)
@@ -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 (file)
index 8a68ae7..0000000
+++ /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
index fd97c8540cdfa1238d19570c8741d7192174d6f8..37f2a7692e13a5583d11ca257422bc82e13cdf9e 100644 (file)
@@ -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
index eb69fbb00cb26952f07601c3ce482f7c2e27e49e..2098e7e8460ddd732ad822b502cef3fb441f1b02 100644 (file)
 
 . ../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
index 3193ea6c3fec9548087fc4570aa0acf988266aaf..867686a8beb63cd9227b437d4abd57290ba5b608 100755 (executable)
@@ -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:
     """
index 7dc8bc849edbd3b4f77b89ee1db1eb212b8fb7be..5ddfa2c1347e819d437fc77ffe613bebf3343316 100644 (file)
@@ -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()
index c38c358f6604b90373ac08677d6d6ac8cdfa0421..5fe6518e78dc57e5504745f33cb8b2926cfc266d 100644 (file)
@@ -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."