Repository navigation
Conversation
rjodinchr
left a comment
There was a problem hiding this comment.
Could you change Fixes #2791 to Ref #2791 in the PR description so the issue isn't closed automatically when this merges? There is still work left to do for #2791 (for example, covering clCreateSubBuffer, and possibly clCreateImage2D / clCreateImage3D or clCreatePipe).
Changed as requested. |
| if (error != CL_INVALID_VALUE || buffer != nullptr) | ||
| { | ||
| log_error("%s(flags: 0x%llx) with CL_MEM_KERNEL_READ_AND_WRITE, " | ||
| "expected CL_INVALID_VALUE, got %s\n", | ||
| api_name, (unsigned long long)flags, | ||
| IGetErrorString(error)); | ||
| return TEST_FAIL; | ||
| } |
There was a problem hiding this comment.
Minor nit: if a driver sets error to CL_INVALID_VALUE but returns a non-null cl_mem, this message (and the one in test_create_image below) will print expected CL_INVALID_VALUE, got CL_INVALID_VALUE. Could we also print the returned handle (e.g., expected NULL and CL_INVALID_VALUE, got %p and %s) or use test_object_failure_ret?
Good catch! Indeed, In that case, this PR looks good to me as-is (and feel free to re-add |
Ref #2791
Checks that
clCreateBuffer,clCreateBufferWithProperties,clCreateImageandclCreateImageWithPropertiesreturnCL_INVALID_VALUEwhenCL_MEM_KERNEL_READ_AND_WRITEis set inflags.[run-test: test_api negative_create_buffer negative_create_buffer_with_properties negative_create_image negative_create_image_with_properties]