From: Nicki Křížek Date: Wed, 1 Jul 2026 13:40:07 +0000 (+0000) Subject: Move the cpu prereq.sh check to a with_cpu_affinity marker X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=26c26e63fcaeee34c8a5be43d23bfe17460070b6;p=thirdparty%2Fbind9.git Move the cpu prereq.sh check to a with_cpu_affinity marker Assisted-by: Claude:claude-opus-4-8 --- diff --git a/bin/tests/system/cpu/prereq.sh b/bin/tests/system/cpu/prereq.sh deleted file mode 100644 index 7f9f6c06d54..00000000000 --- a/bin/tests/system/cpu/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 - -command -v cpuset >/dev/null || command -v numactl >/dev/null || command -v taskset >/dev/null || { - echo_i "This test requires cpuset, numactl, or taskset." >&2 - exit 255 -} - -exit 0 diff --git a/bin/tests/system/cpu/tests_sh_cpu.py b/bin/tests/system/cpu/tests_sh_cpu.py index f2f30c6abd4..48ed3309fe5 100644 --- a/bin/tests/system/cpu/tests_sh_cpu.py +++ b/bin/tests/system/cpu/tests_sh_cpu.py @@ -11,13 +11,20 @@ import pytest -pytestmark = pytest.mark.extra_artifacts( +import isctest.mark + +EXTRA_ARTIFACTS = pytest.mark.extra_artifacts( [ "named.run.*", "ns1/managed-keys.*", ] ) +pytestmark = [ + isctest.mark.with_cpu_affinity, + EXTRA_ARTIFACTS, +] + def test_cpu(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/isctest/mark.py b/bin/tests/system/isctest/mark.py index 0dbb0ca8f35..e80dc620539 100644 --- a/bin/tests/system/isctest/mark.py +++ b/bin/tests/system/isctest/mark.py @@ -127,6 +127,11 @@ without_tsan = pytest.mark.skipif( os.getenv("FEATURE_TSAN") == "1", reason="incompatible with ThreadSanitizer (TSAN)" ) +with_cpu_affinity = pytest.mark.skipif( + not (shutil.which("cpuset") or shutil.which("numactl") or shutil.which("taskset")), + reason="cpuset, numactl, or taskset is required", +) + softhsm2_environment = pytest.mark.skipif( not ( os.getenv("SOFTHSM2_CONF")