summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/resctrl/resctrl_val.c
diff options
context:
space:
mode:
authorFenghua Yu <fenghua.yu@intel.com>2021-03-17 05:22:42 +0300
committerShuah Khan <skhan@linuxfoundation.org>2021-04-02 22:54:08 +0300
commitca2f4214f9671dfc08b6c5723188e03574203dc5 (patch)
treed44d208f746dbf39b091e981935346a03ef52fc4 /tools/testing/selftests/resctrl/resctrl_val.c
parent2f320911d9fab38597d2a32d91b4f31165e0c9b4 (diff)
downloadlinux-ca2f4214f9671dfc08b6c5723188e03574203dc5.tar.xz
selftests/resctrl: Call kselftest APIs to log test results
Call kselftest APIs instead of using printf() to log test results for cleaner code and better future extension. Suggested-by: Shuah Khan <skhan@linuxfoundation.org> Tested-by: Babu Moger <babu.moger@amd.com> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/resctrl/resctrl_val.c')
-rw-r--r--tools/testing/selftests/resctrl/resctrl_val.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/resctrl/resctrl_val.c b/tools/testing/selftests/resctrl/resctrl_val.c
index 17770095c98e..5dfae51133bc 100644
--- a/tools/testing/selftests/resctrl/resctrl_val.c
+++ b/tools/testing/selftests/resctrl/resctrl_val.c
@@ -449,7 +449,7 @@ void ctrlc_handler(int signum, siginfo_t *info, void *ptr)
kill(bm_pid, SIGKILL);
umount_resctrlfs();
tests_cleanup();
- printf("Ending\n\n");
+ ksft_print_msg("Ending\n\n");
exit(EXIT_SUCCESS);
}
@@ -645,7 +645,7 @@ int resctrl_val(char **benchmark_cmd, struct resctrl_val_param *param)
PARENT_EXIT("Child is done");
}
- printf("# benchmark PID: %d\n", bm_pid);
+ ksft_print_msg("Benchmark PID: %d\n", bm_pid);
/*
* Register CTRL-C handler for parent, as it has to kill benchmark