Skip to content

Commit 351f161

Browse files
authored
[UR][CTS] Properly treat urDeviceGetNativeHandle as optional (#18671)
1 parent cbcd002 commit 351f161

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

unified-runtime/test/conformance/device/urDeviceCreateWithNativeHandle.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ TEST_P(urDeviceCreateWithNativeHandleTest, InvalidNullHandlePlatform) {
5151
UUR_KNOWN_FAILURE_ON(uur::NativeCPU{});
5252

5353
ur_native_handle_t native_handle = 0;
54-
ASSERT_SUCCESS(urDeviceGetNativeHandle(device, &native_handle));
54+
UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(
55+
urDeviceGetNativeHandle(device, &native_handle));
5556

5657
ur_device_handle_t dev = nullptr;
5758
ASSERT_EQ_RESULT(
@@ -63,7 +64,8 @@ TEST_P(urDeviceCreateWithNativeHandleTest, InvalidNullPointerDevice) {
6364
UUR_KNOWN_FAILURE_ON(uur::NativeCPU{});
6465

6566
ur_native_handle_t native_handle = 0;
66-
ASSERT_SUCCESS(urDeviceGetNativeHandle(device, &native_handle));
67+
UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(
68+
urDeviceGetNativeHandle(device, &native_handle));
6769

6870
ASSERT_EQ_RESULT(
6971
UR_RESULT_ERROR_INVALID_NULL_POINTER,

0 commit comments

Comments
 (0)