Skip to content

Commit

Permalink
selftests/resctrl: Change a few printed messages
Browse files Browse the repository at this point in the history
Change a few printed messages to report test progress more clearly.

Add a missing "\n" at the end of one printed message.

Suggested-by: Shuah Khan <shuah@kernel.org>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
  • Loading branch information
Fenghua Yu authored and Shuah Khan committed Apr 7, 2021
1 parent 87f1c20 commit e750747
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tools/testing/selftests/resctrl/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ int show_cache_info(unsigned long sum_llc_val, int no_of_bits,
ret = platform && abs((int)diff_percent) > max_diff_percent &&
(cmt ? (abs(avg_diff) > max_diff) : true);

ksft_print_msg("%s cache miss rate within %d%%\n",
ksft_print_msg("%s Check cache miss rate within %d%%\n",
ret ? "Fail:" : "Pass:", max_diff_percent);

ksft_print_msg("Percent diff=%d\n", abs((int)diff_percent));
Expand Down
6 changes: 3 additions & 3 deletions tools/testing/selftests/resctrl/mba_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static void show_mba_info(unsigned long *bw_imc, unsigned long *bw_resc)
avg_diff = (float)labs(avg_bw_resc - avg_bw_imc) / avg_bw_imc;
avg_diff_per = (int)(avg_diff * 100);

ksft_print_msg("%s MBA: diff within %d%% for schemata %u\n",
ksft_print_msg("%s Check MBA diff within %d%% for schemata %u\n",
avg_diff_per > MAX_DIFF_PERCENT ?
"Fail:" : "Pass:",
MAX_DIFF_PERCENT,
Expand All @@ -93,10 +93,10 @@ static void show_mba_info(unsigned long *bw_imc, unsigned long *bw_resc)
failed = true;
}

ksft_print_msg("%s schemata change using MBA\n",
ksft_print_msg("%s Check schemata change using MBA\n",
failed ? "Fail:" : "Pass:");
if (failed)
ksft_print_msg("At least one test failed");
ksft_print_msg("At least one test failed\n");
}

static int check_results(void)
Expand Down
2 changes: 1 addition & 1 deletion tools/testing/selftests/resctrl/mbm_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ show_bw_info(unsigned long *bw_imc, unsigned long *bw_resc, int span)
avg_diff_per = (int)(avg_diff * 100);

ret = avg_diff_per > MAX_DIFF_PERCENT;
ksft_print_msg("%s MBM: diff within %d%%\n",
ksft_print_msg("%s Check MBM diff within %d%%\n",
ret ? "Fail:" : "Pass:", MAX_DIFF_PERCENT);
ksft_print_msg("avg_diff_per: %d%%\n", avg_diff_per);
ksft_print_msg("Span (MB): %d\n", span);
Expand Down
4 changes: 2 additions & 2 deletions tools/testing/selftests/resctrl/resctrlfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,14 +570,14 @@ bool check_resctrlfs_support(void)

fclose(inf);

ksft_print_msg("%s kernel supports resctrl filesystem\n",
ksft_print_msg("%s Check kernel supports resctrl filesystem\n",
ret ? "Pass:" : "Fail:");

if (!ret)
return ret;

dp = opendir(RESCTRL_PATH);
ksft_print_msg("%s resctrl mountpoint \"%s\" exists\n",
ksft_print_msg("%s Check resctrl mountpoint \"%s\" exists\n",
dp ? "Pass:" : "Fail:", RESCTRL_PATH);
if (dp)
closedir(dp);
Expand Down

0 comments on commit e750747

Please sign in to comment.