summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/futex/include
diff options
context:
space:
mode:
authorShuah Khan <shuahkh@osg.samsung.com>2017-08-05 02:12:29 +0300
committerShuah Khan <shuahkh@osg.samsung.com>2017-08-17 02:45:00 +0300
commitb274e75c20f91c2d8fec43f8246282c2817f8e7c (patch)
tree734bb4d4652bffbbe9f9a6f6e6a200b668add2de /tools/testing/selftests/futex/include
parent3c1f619eea08cc31057c437a1c064e33c73ebe35 (diff)
downloadlinux-b274e75c20f91c2d8fec43f8246282c2817f8e7c.tar.xz
selftests: futex: convert test to use ksft TAP13 framework
Convert test to use ksft TAP13 framework to print user friendly test output which is consistent across kselftest suite. Acked-by: Darren Hart (VMware) <dvhart@infradead.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools/testing/selftests/futex/include')
-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 4e7944984fbb..01989644e50a 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 */