summaryrefslogtreecommitdiff
path: root/utests/runtime_marker_list.cpp
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@intel.com>2014-09-02 10:34:33 +0800
committerZhigang Gong <zhigang.gong@intel.com>2014-09-02 12:42:51 +0800
commit8e1c54f415af9d7c09bd240dbdf4a49cbb5b2727 (patch)
treeb3b56be362d9c129134f781280c27d87980c1ca8 /utests/runtime_marker_list.cpp
parent5b60b8c98afb1fb0da9aee8284edeb05623182b6 (diff)
downloadbeignet-8e1c54f415af9d7c09bd240dbdf4a49cbb5b2727.tar.gz
utests: fix two utest bugs.
Similar as the bug found by junyan, some events are accessed before assigned. Signed-off-by: Zhigang Gong <zhigang.gong@intel.com> Reviewed-by: He Junyan <junyan.he@inbox.com>
Diffstat (limited to 'utests/runtime_marker_list.cpp')
-rw-r--r--utests/runtime_marker_list.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/utests/runtime_marker_list.cpp b/utests/runtime_marker_list.cpp
index fc771569..f64b1d15 100644
--- a/utests/runtime_marker_list.cpp
+++ b/utests/runtime_marker_list.cpp
@@ -34,7 +34,7 @@ void runtime_marker_list(void)
clEnqueueNDRangeKernel(queue, kernel, 1, NULL, globals, locals, 2, &ev[0], &ev[2]);
- for (cl_uint i = 0; i != sizeof(ev) / sizeof(cl_event); ++i) {
+ for (cl_uint i = 0; i < 3; ++i) {
clGetEventInfo(ev[i], CL_EVENT_COMMAND_EXECUTION_STATUS, sizeof(status), &status, NULL);
OCL_ASSERT(status >= CL_SUBMITTED);
}