From: Junyan He <[email protected]> The case: Trigger CL_INVALID_VALUE if size in bytes specified by param_value is less than size of return type and param_value is not a NULL value. This case will sometime pass the param_value NULL to the function call and cause the check failed.
Signed-off-by: Junyan He <[email protected]> --- tests/cl/api/get-program-build-info.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/cl/api/get-program-build-info.c b/tests/cl/api/get-program-build-info.c index f9088ce..5343e5d 100644 --- a/tests/cl/api/get-program-build-info.c +++ b/tests/cl/api/get-program-build-info.c @@ -129,12 +129,16 @@ piglit_cl_test(const int argc, piglit_merge_result(&result, PIGLIT_FAIL); } + param_value = malloc(sizeof(int)); errNo = clGetProgramBuildInfo(env->program, env->device_id, CL_PROGRAM_BUILD_STATUS, 1, param_value, NULL); + free(param_value); + param_value = NULL; + if(!piglit_cl_check_error(errNo, CL_INVALID_VALUE)) { fprintf(stderr, "Failed (error code: %s): Trigger CL_INVALID_VALUE if size in bytes specified by param_value is less than size of return type and param_value is not a NULL value.\n", -- 1.7.9.5 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
