From 38f02a2c2261348ee32bb4420c42ce5ff08a8ab0 Mon Sep 17 00:00:00 2001 From: Ross Brunton Date: Thu, 24 Oct 2024 15:18:37 +0100 Subject: [PATCH] Add guards to InvalidNullPointerPlatform This test calls `urPlatformGetNativeHandle`, which may report that the feature is unsupported. Skip this test if the feature is unavailable. --- test/conformance/platform/platform_adapter_cuda.match | 2 -- test/conformance/platform/platform_adapter_hip.match | 2 -- test/conformance/platform/platform_adapter_native_cpu.match | 2 -- test/conformance/platform/urPlatformCreateWithNativeHandle.cpp | 3 ++- 4 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 test/conformance/platform/platform_adapter_cuda.match delete mode 100644 test/conformance/platform/platform_adapter_hip.match delete mode 100644 test/conformance/platform/platform_adapter_native_cpu.match diff --git a/test/conformance/platform/platform_adapter_cuda.match b/test/conformance/platform/platform_adapter_cuda.match deleted file mode 100644 index 7806019709..0000000000 --- a/test/conformance/platform/platform_adapter_cuda.match +++ /dev/null @@ -1,2 +0,0 @@ -{{NONDETERMINISTIC}} -urPlatformCreateWithNativeHandleTest.InvalidNullPointerPlatform diff --git a/test/conformance/platform/platform_adapter_hip.match b/test/conformance/platform/platform_adapter_hip.match deleted file mode 100644 index 7806019709..0000000000 --- a/test/conformance/platform/platform_adapter_hip.match +++ /dev/null @@ -1,2 +0,0 @@ -{{NONDETERMINISTIC}} -urPlatformCreateWithNativeHandleTest.InvalidNullPointerPlatform diff --git a/test/conformance/platform/platform_adapter_native_cpu.match b/test/conformance/platform/platform_adapter_native_cpu.match deleted file mode 100644 index 7806019709..0000000000 --- a/test/conformance/platform/platform_adapter_native_cpu.match +++ /dev/null @@ -1,2 +0,0 @@ -{{NONDETERMINISTIC}} -urPlatformCreateWithNativeHandleTest.InvalidNullPointerPlatform diff --git a/test/conformance/platform/urPlatformCreateWithNativeHandle.cpp b/test/conformance/platform/urPlatformCreateWithNativeHandle.cpp index 46d6d43db2..41fe59442d 100644 --- a/test/conformance/platform/urPlatformCreateWithNativeHandle.cpp +++ b/test/conformance/platform/urPlatformCreateWithNativeHandle.cpp @@ -83,7 +83,8 @@ TEST_F(urPlatformCreateWithNativeHandleTest, SuccessWithUnOwnedNativeHandle) { TEST_F(urPlatformCreateWithNativeHandleTest, InvalidNullPointerPlatform) { for (auto platform : platforms) { ur_native_handle_t native_handle = 0; - ASSERT_SUCCESS(urPlatformGetNativeHandle(platform, &native_handle)); + UUR_ASSERT_SUCCESS_OR_UNSUPPORTED( + urPlatformGetNativeHandle(platform, &native_handle)); ASSERT_EQ_RESULT(UR_RESULT_ERROR_INVALID_NULL_POINTER, urPlatformCreateWithNativeHandle( native_handle, adapters[0], nullptr, nullptr));