-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added new cl_khr_semaphore tests to verify clCreateSemaphoreWithPropertiesKHR negative results #1962
Added new cl_khr_semaphore tests to verify clCreateSemaphoreWithPropertiesKHR negative results #1962
Conversation
test_conformance/extensions/cl_khr_semaphore/test_semaphores_negative_create.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CL_INVALID_SEMAPHORE_KHR is an error code. Define an invalid property local to the test, this is not correct usage of the macro
@joshqti thanks, do you have other values on your mind ? Please keep in mind it supposed to be incorrect usage because this is negative test! |
test_failure_error( | ||
err, CL_INVALID_PROPERTY, | ||
"Unexpected clCreateSemaphoreWithPropertiesKHR return"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are two possible errors here:
- There is an invalid property, which would return
CL_INVALID_PROPERTY
. - The properties do not contain the required properties to create a semaphore (specifically, the semaphore type), which would return
CL_INVALID_VALUE
.
We should either allow for both error conditions, or we should disambiguate the errors so only CL_INVALID_PROPERTY
is returned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, after a second look the description of CL_INVALID_PROPERTY
and CL_INVALID_VALUE
slightly overlaps. I will allow both errors at the moment since correction of spec could be more time consuming. Should I create doc issue ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
2024/07/02 teleconference: @shajder Could you rebase/resolve conflicts please? |
…VALUE in overlapping cases
Summarizing discussion from memory subgroup call of July 9th 2024. Per Joshua's comment, using CL_INVALID_SEMAPHORE error code as a property value is confusing.
|
in order to avoid using CL_INVALID_SEMAPHORE_KHR as property name or value
corrected according to mentioned suggestion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Merging as discussed in memory subgroup call on August 6th 2024. |
According to work plan from #1691, new clSemaphoreWrapper introduced to avoid duplication of code