Messages in this thread | | | Subject | Re: [PATCH v4 04/17] selftests/resctrl: Fix printed messages | From | Shuah Khan <> | Date | Mon, 25 Jan 2021 19:25:48 -0700 |
| |
On 11/30/20 1:19 PM, Fenghua Yu wrote: > From: Reinette Chatre <reinette.chatre@intel.com> > > 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@intel.com> > Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> > --- > 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); >
I noticed show_cache_info() is a duplicate of the one in cqm_test.c Let's make this a common function.
I would make this a separate patch and before 2/7
> 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"); >
thanks, -- Shuah
| |