From 7433f3aaf086fc3552eebcae359aedf5f1ab2cdc Mon Sep 17 00:00:00 2001 From: Rui Luo Date: Tue, 21 Jul 2026 10:35:51 +0800 Subject: [PATCH] test: skip addressing_mode/repair_status when KMD < R580 --- cuda_core/tests/system/test_system_device.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cuda_core/tests/system/test_system_device.py b/cuda_core/tests/system/test_system_device.py index b5fe8cccbfa..b53c60acc19 100644 --- a/cuda_core/tests/system/test_system_device.py +++ b/cuda_core/tests/system/test_system_device.py @@ -3,7 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 -from .conftest import skip_if_nvml_unsupported, unsupported_before +from .conftest import SHOULD_SKIP_NVML_TESTS, skip_if_nvml_unsupported, unsupported_before pytestmark = skip_if_nvml_unsupported @@ -439,6 +439,10 @@ def test_module_id(): assert module_id >= 0 +@pytest.mark.skipif( + not SHOULD_SKIP_NVML_TESTS and system.get_kernel_mode_driver_version()[0] < 580, + reason="nvmlDeviceGetAddressingMode requires an R580+ kernel-mode driver", +) def test_addressing_mode(): for device in system.Device.get_all_devices(): # By docs, should be supported on TURING or newer, but experimentally, @@ -457,6 +461,10 @@ def test_display_mode(): assert isinstance(is_display_active, bool) +@pytest.mark.skipif( + not SHOULD_SKIP_NVML_TESTS and system.get_kernel_mode_driver_version()[0] < 580, + reason="nvmlDeviceGetRepairStatus requires an R580+ kernel-mode driver", +) def test_repair_status(): for device in system.Device.get_all_devices(): # By docs, should be supported on AMPERE or newer, but experimentally,