aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGil Pitney <gil.pitney@linaro.org>2016-06-22 16:53:45 +0000
committerGil Pitney <gil.pitney@linaro.org>2016-06-29 22:50:38 +0000
commitde4b0245f175fd7ce5aab529a190b5520d391755 (patch)
treee763fde01aced9b5c91b1dfff7455a4c78bc5fe0
parent4a41e923b66c1569f7fc078719cd268f5d676f71 (diff)
downloadshamrock-de4b0245f175fd7ce5aab529a190b5520d391755.tar.gz
Fixes to sanity test case 'tests kernel'
Previously, an event was not being released in test_compiled_kernel() test case, causing an imbalance in program object reference count. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
-rw-r--r--tests/test_kernel.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_kernel.cpp b/tests/test_kernel.cpp
index 7046279..6c61ed2 100644
--- a/tests/test_kernel.cpp
+++ b/tests/test_kernel.cpp
@@ -123,7 +123,7 @@ START_TEST (test_compiled_kernel)
"unable to create a valid kernel"
);
- clReleaseKernel(kernels[0]); // Just born and already killed...
+ clReleaseKernel(kernels[1]); // Just born and already killed...
result = clCreateKernelsInProgram(program, 0, 0, &num_kernels);
fail_if(
@@ -183,9 +183,11 @@ START_TEST (test_compiled_kernel)
"the kernel hasn't done its job, the buffer is wrong"
);
+ clReleaseEvent(event);
clReleaseKernel(kernels[0]);
clReleaseKernel(kernels[1]);
clReleaseProgram(program);
+ clReleaseCommandQueue(queue);
clReleaseContext(ctx);
}
END_TEST