summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/resctrl/mbm_test.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2023-12-15 17:04:47 +0200
committerShuah Khan <skhan@linuxfoundation.org>2024-02-13 13:56:43 -0700
commitcc8ff7f5c85c076297b18fb9f6d45ec5569d3d44 (patch)
treef6d9993535ae650cb3c611b7eff8d4d933106282 /tools/testing/selftests/resctrl/mbm_test.c
parent6a71770442b5b7cf8f880ca1c0a72456c918c757 (diff)
downloadlinux-stable-cc8ff7f5c85c076297b18fb9f6d45ec5569d3d44.tar.gz
linux-stable-cc8ff7f5c85c076297b18fb9f6d45ec5569d3d44.tar.bz2
linux-stable-cc8ff7f5c85c076297b18fb9f6d45ec5569d3d44.zip
selftests/resctrl: Convert perror() to ksft_perror() or ksft_print_msg()
The resctrl selftest code contains a number of perror() calls. Some of them come with hash character and some don't. The kselftest framework provides ksft_perror() that is compatible with test output formatting so it should be used instead of adding custom hash signs. Some perror() calls are too far away from anything that sets error. For those call sites, ksft_print_msg() must be used instead. Convert perror() to ksft_perror() or ksft_print_msg(). Other related changes: - Remove hash signs - Remove trailing stops & newlines from ksft_perror() - Add terminating newlines for converted ksft_print_msg() - Use consistent capitalization - Small fixes/tweaks to typos & grammar of the messages - Extract error printing out of PARENT_EXIT() to be able to differentiate Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/resctrl/mbm_test.c')
-rw-r--r--tools/testing/selftests/resctrl/mbm_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/resctrl/mbm_test.c b/tools/testing/selftests/resctrl/mbm_test.c
index 741533f2b075..045cd7818c79 100644
--- a/tools/testing/selftests/resctrl/mbm_test.c
+++ b/tools/testing/selftests/resctrl/mbm_test.c
@@ -59,7 +59,7 @@ static int check_results(size_t span)
fp = fopen(output, "r");
if (!fp) {
- perror(output);
+ ksft_perror(output);
return errno;
}