From d20de8ddea697e2d1372eaabce2718b5280ca748 Mon Sep 17 00:00:00 2001 From: Ahmed <36049290+AhmedAmraniAkdi@users.noreply.github.com> Date: Tue, 5 Sep 2023 17:09:04 +0100 Subject: [PATCH] Command buffer wait_for_sec_queue_event subtest, call clFinish in the correct order. (#1758) * Fix for Command buffer wait_for_sec_queue_event subtest, call clFinish in the correct order. queue has a command that depends on a command that resides in queue_sec, calling clFinish(queue) before clFinish(queue_sec) causes the test to hang as the queue_sec command never got a chance to finish. * Update PR change as per the suggestion. --- .../cl_khr_command_buffer/command_buffer_event_sync.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test_conformance/extensions/cl_khr_command_buffer/command_buffer_event_sync.cpp b/test_conformance/extensions/cl_khr_command_buffer/command_buffer_event_sync.cpp index be8530b2..6ef26bb9 100644 --- a/test_conformance/extensions/cl_khr_command_buffer/command_buffer_event_sync.cpp +++ b/test_conformance/extensions/cl_khr_command_buffer/command_buffer_event_sync.cpp @@ -603,12 +603,15 @@ struct CommandBufferEventSync : public BasicCommandBufferTest event_ptrs[1], nullptr); test_error(error, "clEnqueueReadBuffer failed"); - error = clFinish(queue); - test_error(error, "clFinish failed"); + error = clFlush(queue); + test_error(error, "clFlush failed"); error = clFinish(queue_sec); test_error(error, "clFinish failed"); + error = clFinish(queue); + test_error(error, "clFinish failed"); + // verify the result - result buffer must contain initial pattern for (size_t i = 0; i < num_elements; i++) {