[PATCH v4 04/17] selftests/resctrl: Fix printed messages

From: Fenghua Yu
Date: Mon Nov 30 2020 - 15:21:21 EST


From: Reinette Chatre <reinette.chatre@xxxxxxxxx>

Fix one instance where "not" (without a space) is printed on test
failure resulting in output of "notok" on test failure.

Add a missing newline to the printed help text to improve readability.

Signed-off-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
Signed-off-by: Fenghua Yu <fenghua.yu@xxxxxxxxx>
---
tools/testing/selftests/resctrl/cmt_test.c | 2 +-
tools/testing/selftests/resctrl/resctrl_tests.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/resctrl/cmt_test.c b/tools/testing/selftests/resctrl/cmt_test.c
index 05a180d85e93..188b73b5a2cc 100644
--- a/tools/testing/selftests/resctrl/cmt_test.c
+++ b/tools/testing/selftests/resctrl/cmt_test.c
@@ -53,7 +53,7 @@ static void show_cache_info(unsigned long sum_llc_occu_resc, int no_of_bits,
else
res = false;

- printf("%sok CMT: diff within %d, %d\%%\n", res ? "" : "not",
+ printf("%sok CMT: diff within %d, %d\%%\n", res ? "" : "not ",
MAX_DIFF, (int)MAX_DIFF_PERCENT);

printf("# diff: %ld\n", avg_diff);
diff --git a/tools/testing/selftests/resctrl/resctrl_tests.c b/tools/testing/selftests/resctrl/resctrl_tests.c
index 2dceff59e245..d92b0b32a349 100644
--- a/tools/testing/selftests/resctrl/resctrl_tests.c
+++ b/tools/testing/selftests/resctrl/resctrl_tests.c
@@ -37,8 +37,8 @@ void detect_amd(void)
static void cmd_help(void)
{
printf("usage: resctrl_tests [-h] [-b \"benchmark_cmd [options]\"] [-t test list] [-n no_of_bits]\n");
- printf("\t-b benchmark_cmd [options]: run specified benchmark for MBM, MBA and CMT");
- printf("\t default benchmark is builtin fill_buf\n");
+ printf("\t-b benchmark_cmd [options]: run specified benchmark for MBM, MBA and CMT\n");
+ printf("\t default benchmark is builtin fill_buf\n");
printf("\t-t test list: run tests specified in the test list, ");
printf("e.g. -t mbm, mba, cmt, cat\n");
printf("\t-n no_of_bits: run cache tests using specified no of bits in cache bit mask\n");
--
2.29.2