Skip to content

Commit 9dc6a32

Browse files
JackAKirkldrumm
authored andcommitted
Fix test: mark API success or unsupported.
Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
1 parent e0ba66b commit 9dc6a32

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

source/adapters/hip/context.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,9 @@ urContextRetain(ur_context_handle_t hContext) {
111111
// urContextGetNativeHandle should not be implemented in the HIP backend.
112112
// hipCtx_t is not natively supported by amd devices, and more importantly does
113113
// not map to ur_context_handle_t in any way.
114-
UR_APIEXPORT ur_result_t UR_APICALL urContextGetNativeHandle(
115-
ur_context_handle_t hContext, ur_native_handle_t *phNativeContext) {
114+
UR_APIEXPORT ur_result_t UR_APICALL
115+
urContextGetNativeHandle([[maybe_unused]] ur_context_handle_t hContext,
116+
[[maybe_unused]] ur_native_handle_t *phNativeContext) {
116117
std::ignore = hContext;
117118
std::ignore = phNativeContext;
118119
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;

test/conformance/context/urContextCreateWithNativeHandle.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ TEST_P(urContextCreateWithNativeHandleTest, SuccessWithUnOwnedNativeHandle) {
7676

7777
TEST_P(urContextCreateWithNativeHandleTest, InvalidNullPointerDevices) {
7878
ur_native_handle_t native_context = 0;
79-
ASSERT_SUCCESS(urContextGetNativeHandle(context, &native_context));
79+
UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(
80+
urContextGetNativeHandle(context, &native_context));
8081

8182
ur_context_handle_t ctx = nullptr;
8283
ASSERT_EQ_RESULT(UR_RESULT_ERROR_INVALID_NULL_POINTER,
@@ -86,7 +87,8 @@ TEST_P(urContextCreateWithNativeHandleTest, InvalidNullPointerDevices) {
8687

8788
TEST_P(urContextCreateWithNativeHandleTest, InvalidNullPointerContext) {
8889
ur_native_handle_t native_context = 0;
89-
ASSERT_SUCCESS(urContextGetNativeHandle(context, &native_context));
90+
UUR_ASSERT_SUCCESS_OR_UNSUPPORTED(
91+
urContextGetNativeHandle(context, &native_context));
9092

9193
ASSERT_EQ_RESULT(UR_RESULT_ERROR_INVALID_NULL_POINTER,
9294
urContextCreateWithNativeHandle(native_context, 1, &device,

0 commit comments

Comments
 (0)