From 5ebe4fa1b87edd8f7eb41064657729f967224a29 Mon Sep 17 00:00:00 2001 From: Ross Brunton Date: Mon, 6 Jan 2025 15:31:58 +0000 Subject: [PATCH] Update urProgramGetFunctionPointer test The spec says that implementations may return `UR_RESULT_ERROR_FUNCTION_ADDRESS_NOT_AVAILABLE` for this function, but that wasn't handled by this test. --- test/conformance/program/urProgramGetFunctionPointer.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/conformance/program/urProgramGetFunctionPointer.cpp b/test/conformance/program/urProgramGetFunctionPointer.cpp index 41d397d527..08732ddfcc 100644 --- a/test/conformance/program/urProgramGetFunctionPointer.cpp +++ b/test/conformance/program/urProgramGetFunctionPointer.cpp @@ -21,8 +21,12 @@ UUR_INSTANTIATE_KERNEL_TEST_SUITE_P(urProgramGetFunctionPointerTest); TEST_P(urProgramGetFunctionPointerTest, Success) { void *function_pointer = nullptr; - ASSERT_SUCCESS(urProgramGetFunctionPointer( - device, program, function_name.data(), &function_pointer)); + ur_result_t res = urProgramGetFunctionPointer( + device, program, function_name.data(), &function_pointer); + if (res == UR_RESULT_ERROR_FUNCTION_ADDRESS_NOT_AVAILABLE) { + return; + } + ASSERT_SUCCESS(res); ASSERT_NE(function_pointer, nullptr); }