Skip to content

Commit

Permalink
Moved testing invalid sync_point to the top of test case
Browse files Browse the repository at this point in the history
  • Loading branch information
kamil-goras-mobica committed May 8, 2024
1 parent b0cafe9 commit 07f67e0
Showing 1 changed file with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,19 @@ struct CommandNDRangeKerneSyncPointsNullOrNumZero

cl_int Run() override
{
cl_sync_point_khr invalid_point = 0;
cl_sync_point_khr* invalid_sync_points[] = { &invalid_point };
cl_int error = clCommandNDRangeKernelKHR(
command_buffer, nullptr, nullptr, kernel, 0, nullptr, &num_elements,
nullptr, 1, invalid_sync_points[0], nullptr, nullptr);

test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR,
"clCommandNDRangeKernelKHR should return "
"CL_INVALID_SYNC_POINT_WAIT_LIST_KHR",
TEST_FAIL);


error = clCommandNDRangeKernelKHR(
command_buffer, nullptr, nullptr, kernel, 1, nullptr, &num_elements,
nullptr, 1, nullptr, nullptr, nullptr);

Expand All @@ -130,16 +142,6 @@ struct CommandNDRangeKerneSyncPointsNullOrNumZero
"CL_INVALID_SYNC_POINT_WAIT_LIST_KHR",
TEST_FAIL);

cl_sync_point_khr invalid_point = 0;
cl_sync_point_khr* invalid_sync_points[] = { &invalid_point };
error = clCommandNDRangeKernelKHR(
command_buffer, nullptr, nullptr, kernel, 0, nullptr, &num_elements,
nullptr, 1, invalid_sync_points[0], nullptr, nullptr);

test_failure_error_ret(error, CL_INVALID_SYNC_POINT_WAIT_LIST_KHR,
"clCommandNDRangeKernelKHR should return "
"CL_INVALID_SYNC_POINT_WAIT_LIST_KHR",
TEST_FAIL);

return CL_SUCCESS;
}
Expand Down

0 comments on commit 07f67e0

Please sign in to comment.