summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/futex/include/logging.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/futex/include/logging.h')
-rw-r--r--tools/testing/selftests/futex/include/logging.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/tools/testing/selftests/futex/include/logging.h b/tools/testing/selftests/futex/include/logging.h
index 4e79449..0198964 100644
--- a/tools/testing/selftests/futex/include/logging.h
+++ b/tools/testing/selftests/futex/include/logging.h
@@ -109,22 +109,20 @@ void log_verbosity(int level)
*/
void print_result(const char *test_name, int ret)
{
- const char *result = "Unknown return code";
-
switch (ret) {
case RET_PASS:
- ksft_inc_pass_cnt();
- result = PASS;
- break;
+ ksft_test_result_pass("%s\n", test_name);
+ ksft_print_cnts();
+ return;
case RET_ERROR:
- result = ERROR;
- break;
+ ksft_test_result_error("%s\n", test_name);
+ ksft_print_cnts();
+ return;
case RET_FAIL:
- ksft_inc_fail_cnt();
- result = FAIL;
- break;
+ ksft_test_result_fail("%s\n", test_name);
+ ksft_print_cnts();
+ return;
}
- printf("selftests: %s [%s]\n", test_name, result);
}
/* log level macros */
OpenPOWER on IntegriCloud