Skip to content

Commit

Permalink
Merge pull request #1741 from hdelan/in-order-test-for-same-backend-q…
Browse files Browse the repository at this point in the history
…ueue

[UR] Test that an in order queue returns same backend q
  • Loading branch information
kbenzie authored Jun 20, 2024
2 parents 975313c + f7bd24b commit 41c6290
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/conformance/queue/urQueueGetNativeHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,17 @@ TEST_P(urQueueGetNativeHandleTest, InvalidNullPointerNativeHandle) {
ASSERT_EQ_RESULT(UR_RESULT_ERROR_INVALID_NULL_POINTER,
urQueueGetNativeHandle(queue, nullptr, nullptr));
}

TEST_P(urQueueGetNativeHandleTest, InOrderQueueSameNativeHandle) {
ur_queue_handle_t in_order_queue;
ur_native_handle_t native_handle1 = nullptr, native_handle2 = nullptr;
ASSERT_SUCCESS(urQueueCreate(context, device, nullptr, &in_order_queue));
if (auto error =
urQueueGetNativeHandle(in_order_queue, nullptr, &native_handle1)) {
ASSERT_EQ_RESULT(UR_RESULT_ERROR_UNSUPPORTED_FEATURE, error);
return;
}
ASSERT_SUCCESS(
urQueueGetNativeHandle(in_order_queue, nullptr, &native_handle2));
ASSERT_EQ(native_handle1, native_handle2);
}

0 comments on commit 41c6290

Please sign in to comment.