From 021508d3bf94393441f6bdedcd0ce193eee85796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicki=20K=C5=99=C3=AD=C5=BEek?= Date: Wed, 1 Jul 2026 13:40:07 +0000 Subject: [PATCH] Move FIPS-DH prereq.sh checks to a with_fips_dh marker Completes the conversion of doth and tsiggss, removing both prereq.sh files. Assisted-by: Claude:claude-opus-4-8 (cherry picked from commit 82ba021a5a5f613c6c8561c877364dcca760637a) --- bin/tests/system/doth/prereq.sh | 21 ------------------- bin/tests/system/doth/tests_gnutls.py | 1 + bin/tests/system/doth/tests_malicious.py | 1 + bin/tests/system/doth/tests_sh_doth.py | 1 + bin/tests/system/doth/tests_sslyze.py | 1 + bin/tests/system/isctest/mark.py | 4 ++++ bin/tests/system/tsiggss/prereq.sh | 21 ------------------- .../system/tsiggss/tests_isc_spnego_flaws.py | 1 + bin/tests/system/tsiggss/tests_sh_tsiggss.py | 1 + 9 files changed, 10 insertions(+), 42 deletions(-) delete mode 100644 bin/tests/system/doth/prereq.sh delete mode 100644 bin/tests/system/tsiggss/prereq.sh diff --git a/bin/tests/system/doth/prereq.sh b/bin/tests/system/doth/prereq.sh deleted file mode 100644 index 4dabc5b3e8..0000000000 --- a/bin/tests/system/doth/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 --have-fips-dh || { - echo_i "FIPS mode Diffie-Hellman not working - skipping doth test" - exit 255 -} - -exit 0 diff --git a/bin/tests/system/doth/tests_gnutls.py b/bin/tests/system/doth/tests_gnutls.py index 81eb4980d4..ef36030a3b 100644 --- a/bin/tests/system/doth/tests_gnutls.py +++ b/bin/tests/system/doth/tests_gnutls.py @@ -35,6 +35,7 @@ EXTRA_ARTIFACTS = pytest.mark.extra_artifacts( pytestmark = [ isctest.mark.with_libnghttp2, + isctest.mark.with_fips_dh, EXTRA_ARTIFACTS, ] diff --git a/bin/tests/system/doth/tests_malicious.py b/bin/tests/system/doth/tests_malicious.py index 34b26b445e..d15440fa24 100644 --- a/bin/tests/system/doth/tests_malicious.py +++ b/bin/tests/system/doth/tests_malicious.py @@ -22,6 +22,7 @@ import isctest.mark pytestmark = [ isctest.mark.with_libnghttp2, + isctest.mark.with_fips_dh, ] diff --git a/bin/tests/system/doth/tests_sh_doth.py b/bin/tests/system/doth/tests_sh_doth.py index 2886639558..a68f8c3166 100644 --- a/bin/tests/system/doth/tests_sh_doth.py +++ b/bin/tests/system/doth/tests_sh_doth.py @@ -23,6 +23,7 @@ EXTRA_ARTIFACTS = pytest.mark.extra_artifacts( pytestmark = [ isctest.mark.with_libnghttp2, + isctest.mark.with_fips_dh, EXTRA_ARTIFACTS, ] diff --git a/bin/tests/system/doth/tests_sslyze.py b/bin/tests/system/doth/tests_sslyze.py index 9ab801d942..1b1b5f9a85 100644 --- a/bin/tests/system/doth/tests_sslyze.py +++ b/bin/tests/system/doth/tests_sslyze.py @@ -29,6 +29,7 @@ EXTRA_ARTIFACTS = pytest.mark.extra_artifacts( pytestmark = [ isctest.mark.with_libnghttp2, + isctest.mark.with_fips_dh, EXTRA_ARTIFACTS, ] diff --git a/bin/tests/system/isctest/mark.py b/bin/tests/system/isctest/mark.py index 7839948d41..7e66ca0828 100644 --- a/bin/tests/system/isctest/mark.py +++ b/bin/tests/system/isctest/mark.py @@ -134,6 +134,10 @@ with_gssapi = pytest.mark.skipif( os.getenv("FEATURE_GSSAPI") != "1", reason="GSS-API support disabled in the build" ) +with_fips_dh = pytest.mark.skipif( + os.getenv("FEATURE_FIPS_DH") != "1", reason="FIPS mode Diffie-Hellman is required" +) + without_tsan = pytest.mark.skipif( os.getenv("FEATURE_TSAN") == "1", reason="incompatible with ThreadSanitizer (TSAN)" ) diff --git a/bin/tests/system/tsiggss/prereq.sh b/bin/tests/system/tsiggss/prereq.sh deleted file mode 100644 index 2098e7e846..0000000000 --- a/bin/tests/system/tsiggss/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 --have-fips-dh || { - echo_i "FIPS mode Diffie-Hellman not working - skipping tsiggss test" - exit 255 -} - -exit 0 diff --git a/bin/tests/system/tsiggss/tests_isc_spnego_flaws.py b/bin/tests/system/tsiggss/tests_isc_spnego_flaws.py index 867686a8be..e23b75419c 100755 --- a/bin/tests/system/tsiggss/tests_isc_spnego_flaws.py +++ b/bin/tests/system/tsiggss/tests_isc_spnego_flaws.py @@ -39,6 +39,7 @@ EXTRA_ARTIFACTS = pytest.mark.extra_artifacts( pytestmark = [ isctest.mark.with_gssapi, + isctest.mark.with_fips_dh, EXTRA_ARTIFACTS, ] diff --git a/bin/tests/system/tsiggss/tests_sh_tsiggss.py b/bin/tests/system/tsiggss/tests_sh_tsiggss.py index 5ddfa2c134..0e8aeac961 100644 --- a/bin/tests/system/tsiggss/tests_sh_tsiggss.py +++ b/bin/tests/system/tsiggss/tests_sh_tsiggss.py @@ -28,6 +28,7 @@ EXTRA_ARTIFACTS = pytest.mark.extra_artifacts( pytestmark = [ isctest.mark.with_gssapi, + isctest.mark.with_fips_dh, EXTRA_ARTIFACTS, ]