diff --git a/test_conformance/basic/test_kernel_call_kernel_function.cpp b/test_conformance/basic/test_kernel_call_kernel_function.cpp index 82cb1a65..fd0fd83d 100644 --- a/test_conformance/basic/test_kernel_call_kernel_function.cpp +++ b/test_conformance/basic/test_kernel_call_kernel_function.cpp @@ -125,19 +125,23 @@ REGISTER_TEST(kernel_call_kernel_function) // Compare the results pass = 1; + int subtest_errors = 0; for (int i=0; i 10) - continue; - if (errors == 10) { - log_error("Suppressing further results...\n"); - continue; - } - log_error("Results do not match: output[%d]=%d != expected[%d]=%d\n", i, output[i], i, expected[i]); - errors++; + if (output[i] != expected[i]) + { + subtest_errors++; pass = 0; + log_error( + "Results do not match: output[%d]=%d != expected[%d]=%d\n", i, + output[i], i, expected[i]); + if (subtest_errors == 10) + { + log_error("Suppressing further results...\n"); + break; + } } } + errors += subtest_errors; if (pass) log_info("Passed kernel calling kernel...\n"); @@ -172,19 +176,23 @@ REGISTER_TEST(kernel_call_kernel_function) // Compare the results pass = 1; + subtest_errors = 0; for (int i=0; i 10) - continue; - if (errors > 10) { - log_error("Suppressing further results...\n"); - continue; - } - log_error("Results do not match: output[%d]=%d != expected[%d]=%d\n", i, output[i], i, expected[i]); - errors++; + if (output[i] != expected[i]) + { + subtest_errors++; pass = 0; + log_error( + "Results do not match: output[%d]=%d != expected[%d]=%d\n", i, + output[i], i, expected[i]); + if (subtest_errors == 10) + { + log_error("Suppressing further results...\n"); + break; + } } } + errors += subtest_errors; if (pass) log_info("Passed kernel calling function...\n"); @@ -227,19 +235,23 @@ REGISTER_TEST(kernel_call_kernel_function) // Compare the results pass = 1; + subtest_errors = 0; for (int i=0; i 10) - continue; - if (errors > 10) { - log_error("Suppressing further results...\n"); - continue; - } - log_error("Results do not match: output[%d]=%d != expected[%d]=%d\n", i, output[i], i, expected[i]); - errors++; + if (output[i] != expected[i]) + { + subtest_errors++; pass = 0; + log_error( + "Results do not match: output[%d]=%d != expected[%d]=%d\n", i, + output[i], i, expected[i]); + if (subtest_errors == 10) + { + log_error("Suppressing further results...\n"); + break; + } } } + errors += subtest_errors; if (pass) log_info("Passed calling the kernel we called from another kernel before...\n"); free( input );