diff --git a/test_common/harness/errorHelpers.cpp b/test_common/harness/errorHelpers.cpp index 343be3f9..e8311dd6 100644 --- a/test_common/harness/errorHelpers.cpp +++ b/test_common/harness/errorHelpers.cpp @@ -707,47 +707,63 @@ const char * subtests_requiring_opencl_1_2[] = { "popcount" }; -const char * subtests_to_skip_with_offline_compiler[] = { - "get_kernel_arg_info", - "binary_create", - "load_program_source", - "load_multistring_source", - "load_two_kernel_source", - "load_null_terminated_source", - "load_null_terminated_multi_line_source", - "load_null_terminated_partial_multi_line_source", - "load_discreet_length_source", - "get_program_source", - "get_program_build_info", - "options_build_optimizations", - "options_build_macro", - "options_build_macro_existence", - "options_include_directory", - "options_denorm_cache", - "preprocessor_define_udef", - "preprocessor_include", - "preprocessor_line_error", - "preprocessor_pragma", - "compiler_defines_for_extensions", - "image_macro", - "simple_extern_compile_only", - "simple_embedded_header_compile", - "two_file_regular_variable_access", - "two_file_regular_struct_access", - "two_file_regular_function_access", - "simple_embedded_header_link", - "execute_after_simple_compile_and_link_with_defines", - "execute_after_simple_compile_and_link_with_callbacks", - "execute_after_embedded_header_link", - "execute_after_included_header_link", - "multi_file_libraries", - "multiple_files", - "multiple_libraries", - "multiple_files_multiple_libraries", - "multiple_embedded_headers", - "program_binary_type", - "compile_and_link_status_options_log", - "kernel_preprocessor_macros", +const char *subtests_to_skip_with_offline_compiler[] = { + "get_kernel_arg_info", + "get_kernel_arg_info_compatibility", + "binary_create", + "load_program_source", + "load_multistring_source", + "load_two_kernel_source", + "load_null_terminated_source", + "load_null_terminated_multi_line_source", + "load_null_terminated_partial_multi_line_source", + "load_discreet_length_source", + "get_program_source", + "get_program_build_info", + "options_build_optimizations", + "options_build_macro", + "options_build_macro_existence", + "options_include_directory", + "options_denorm_cache", + "preprocessor_define_udef", + "preprocessor_include", + "preprocessor_line_error", + "preprocessor_pragma", + "compiler_defines_for_extensions", + "image_macro", + "simple_extern_compile_only", + "simple_embedded_header_compile", + "two_file_regular_variable_access", + "two_file_regular_struct_access", + "two_file_regular_function_access", + "simple_embedded_header_link", + "execute_after_simple_compile_and_link_with_defines", + "execute_after_simple_compile_and_link_with_callbacks", + "execute_after_embedded_header_link", + "execute_after_included_header_link", + "multi_file_libraries", + "multiple_files", + "multiple_libraries", + "multiple_files_multiple_libraries", + "multiple_embedded_headers", + "program_binary_type", + "compile_and_link_status_options_log", + "kernel_preprocessor_macros", + "execute_after_serialize_reload_library", + "execute_after_serialize_reload_object", + "execute_after_simple_compile_and_link", + "execute_after_simple_compile_and_link_no_device_info", + "execute_after_simple_library_with_link", + "execute_after_two_file_link", + "simple_compile_only", + "simple_compile_with_callback", + "simple_library_only", + "simple_library_with_callback", + "simple_library_with_link", + "simple_link_only", + "simple_link_with_callback", + "simple_static_compile_only", + "two_file_link", }; int check_functions_for_offline_compiler(const char *subtestname, cl_device_id device) diff --git a/test_conformance/contractions/contractions.cpp b/test_conformance/contractions/contractions.cpp index 6d80dee4..dddebb40 100644 --- a/test_conformance/contractions/contractions.cpp +++ b/test_conformance/contractions/contractions.cpp @@ -576,56 +576,39 @@ test_status InitCL( cl_device_id device ) "}\n" "\n" }; - for( i = 0; i < sizeof( sizeNames ) / sizeof( sizeNames[0] ); i++ ) + for (i = 0; i < sizeof(sizeNames) / sizeof(sizeNames[0]); i++) { - size_t strCount = sizeof( kernels ) / sizeof( kernels[0] ); + size_t strCount = sizeof(kernels) / sizeof(kernels[0]); kernels[0] = ""; - for( j = 2; j < strCount; j += 2 ) - kernels[j] = sizeNames[i]; - - gProgram[i] = clCreateProgramWithSource(gContext, strCount, kernels, NULL, &error); - if( NULL == gProgram[i] ) + for (j = 2; j < strCount; j += 2) kernels[j] = sizeNames[i]; + error = create_single_kernel_helper(gContext, &gProgram[i], nullptr, + strCount, kernels, nullptr); + if (CL_SUCCESS != error || nullptr == gProgram[i]) { - vlog_error( "clCreateProgramWithSource failed\n" ); - return TEST_FAIL; - } - - if(( error = clBuildProgram(gProgram[i], 1, &device, NULL, NULL, NULL) )) - { - vlog_error( "clBuildProgramExecutable failed\n" ); - char build_log[2048] = ""; - - clGetProgramBuildInfo(gProgram[i], device, CL_PROGRAM_BUILD_LOG, sizeof(build_log), build_log, NULL); - vlog_error( "Log:\n%s\n", build_log ); + log_error("Error: Unable to create test program! (%s) (in %s:%d)\n", + IGetErrorString(error), __FILE__, __LINE__); return TEST_FAIL; } } - if( gHasDouble ) + if (gHasDouble) { kernels[0] = "#pragma OPENCL EXTENSION cl_khr_fp64 : enable\n"; - for( i = 0; i < sizeof( sizeNames_double ) / sizeof( sizeNames_double[0] ); i++ ) + for (i = 0; i < sizeof(sizeNames_double) / sizeof(sizeNames_double[0]); + i++) { - size_t strCount = sizeof( kernels ) / sizeof( kernels[0] ); + size_t strCount = sizeof(kernels) / sizeof(kernels[0]); - for( j = 2; j < strCount; j += 2 ) - kernels[j] = sizeNames_double[i]; - - gProgram_double[i] = clCreateProgramWithSource(gContext, strCount, kernels, NULL, &error); - if( NULL == gProgram_double[i] ) + for (j = 2; j < strCount; j += 2) kernels[j] = sizeNames_double[i]; + error = create_single_kernel_helper(gContext, &gProgram_double[i], + nullptr, strCount, kernels, + nullptr); + if (CL_SUCCESS != error || nullptr == gProgram_double[i]) { - vlog_error( "clCreateProgramWithSource failed\n" ); - return TEST_FAIL; - } - - if(( error = clBuildProgram(gProgram_double[i], 1, &device, NULL, NULL, NULL) )) - { - vlog_error( "clBuildProgramExecutable failed\n" ); - char build_log[2048] = ""; - - clGetProgramBuildInfo(gProgram_double[i], device, CL_PROGRAM_BUILD_LOG, sizeof(build_log), build_log, NULL); - vlog_error( "Log:\n%s\n", build_log ); + log_error( + "Error: Unable to create test program! (%s) (in %s:%d)\n", + IGetErrorString(error), __FILE__, __LINE__); return TEST_FAIL; } }