UT for update mutable command and mutable command getinfo#17
UT for update mutable command and mutable command getinfo#17Bogumil-Sapinski-Mobica wants to merge 3 commits intomainfrom
Conversation
574701d to
c1a201d
Compare
c1a201d to
50a5c72
Compare
|
@shajder could you review this? |
tests/test_openclhpp.cpp
Outdated
| ****************************************************************************/ | ||
|
|
||
| #if defined(cl_khr_command_buffer_mutable_dispatch) | ||
| cl_int clUpdateMutableCommandsKHR_testCommandBufferKhrUpdateMutableCommands( |
tests/test_openclhpp.cpp
Outdated
| TEST_ASSERT_EQUAL(CL_SUCCESS, response); | ||
| } | ||
|
|
||
| cl_int clGetMutableCommandInfoKHR_testMutableCommandKhrGetInfo( |
tests/test_openclhpp.cpp
Outdated
| (void)param_value_size; | ||
| (void)param_value; | ||
| (void)param_value_size_ret; |
There was a problem hiding this comment.
I think we should really verify all those parameters passed in here. Please notice it should have different size and type depending on param_name value. Moreover, I think in this specific case we should test all available parameters (please refer to spec section 50.8.3, Table 72) to make sure param_value and param_value_size have correct sizes, then cast specific type and set dummy value.
Another possible improvement of this procedure is testing param_value_size_ret variable. If that's not nullptr we should return real data.
764340d to
68702e9
Compare
shajder
left a comment
There was a problem hiding this comment.
Except those two minor comments it LGTM
tests/test_openclhpp.cpp
Outdated
| // Deactivated because unused for now. | ||
| #if 0 | ||
| MAKE_REFCOUNT_STUBS(cl_mutable_command_khr, clUpdateMutableCommandsKHR, clGetMutableCommandInfoKHR) | ||
| #endif |
There was a problem hiding this comment.
hmm, I would rather remove or comment out
|
|
||
| cl::vector<cl_ndrange_kernel_command_properties_khr> kernel_properties = mutableCommandKhrPool[0].getInfo<CL_MUTABLE_DISPATCH_PROPERTIES_ARRAY_KHR>(&err); | ||
| TEST_ASSERT_EQUAL(CL_SUCCESS, err); | ||
| for (int i = 0; i < kernel_properties.size(); i++) |
There was a problem hiding this comment.
Maybe we could TEST_ASSERT_ size of kernel_properties vector first ?
4d5c1e7 to
11d03cd
Compare
No description provided.