diff --git a/cuda_bindings/tests/test_nvrtc.py b/cuda_bindings/tests/test_nvrtc.py index 077484010..013d75f72 100644 --- a/cuda_bindings/tests/test_nvrtc.py +++ b/cuda_bindings/tests/test_nvrtc.py @@ -29,3 +29,13 @@ def test_nvrtcGetSupportedArchs(): err, supportedArchs = nvrtc.nvrtcGetSupportedArchs() ASSERT_DRV(err) assert len(supportedArchs) != 0 + + +@pytest.mark.skipif(nvrtcVersionLessThan(12, 1), reason="Preempt Segmentation Fault (see #499)") +def test_nvrtcGetLoweredName_failure(): + err, name = nvrtc.nvrtcGetLoweredName(None, b"I'm an elevated name!") + assert err == nvrtc.nvrtcResult.NVRTC_ERROR_INVALID_PROGRAM + assert name is None + err, name = nvrtc.nvrtcGetLoweredName(0, b"I'm another elevated name!") + assert err == nvrtc.nvrtcResult.NVRTC_ERROR_INVALID_PROGRAM + assert name is None