Skip to content

UT for EnqueueCommandBuffer#20

Open
kamil-goras-mobica wants to merge 2 commits intomainfrom
ut_enqueueCommandBuffer
Open

UT for EnqueueCommandBuffer#20
kamil-goras-mobica wants to merge 2 commits intomainfrom
ut_enqueueCommandBuffer

Conversation

@kamil-goras-mobica
Copy link
Collaborator

UT for EnqueueCommandBuffer

}

static cl_int clEnqueueCommandBufferKHR_testEnqueueCommandBuffer(
cl_uint num_queues,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could verify num_queues at least once

{
#if defined(cl_khr_command_buffer)
std::vector<cl::CommandQueue> command_queues;
command_queues.emplace_back(commandQueuePool[0]());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's increase number of queues for second call with commandQueuePool[1], thanks

Comment on lines +3650 to +3651
ret = notValidCommandBuffer.enqueueCommandBuffer(command_queues, nullptr, nullptr);
TEST_ASSERT_EQUAL(ret, CL_INVALID_COMMAND_BUFFER_KHR);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least in one case we could deliver wait list. Then it should be tested in clEnqueueCommandBufferKHR_testEnqueueCommandBuffer like this:

    TEST_ASSERT_EQUAL(1, num_events_in_wait_list);
    TEST_ASSERT_EQUAL_PTR(make_event(1), event_wait_list[0]);
    TEST_ASSERT_EQUAL(0, num_calls);

    if (event != nullptr)
    {
        *event = make_event(2);
    }

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shajder Corrections added for all comments

Copy link
Collaborator

@shajder shajder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants