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>
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user