lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <88836a02-6b3a-1a22-7652-e2a361f59d5a@linuxfoundation.org>
Date:   Mon, 25 Jan 2021 19:25:48 -0700
From:   Shuah Khan <skhan@...uxfoundation.org>
To:     Fenghua Yu <fenghua.yu@...el.com>, Shuah Khan <shuah@...nel.org>,
        Tony Luck <tony.luck@...el.com>,
        Reinette Chatre <reinette.chatre@...el.com>,
        David Binderman <dcb314@...mail.com>,
        Babu Moger <babu.moger@....com>,
        James Morse <james.morse@....com>,
        Ravi V Shankar <ravi.v.shankar@...el.com>,
        Shuah Khan <skhan@...uxfoundation.org>
Cc:     linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 04/17] selftests/resctrl: Fix printed messages

On 11/30/20 1:19 PM, Fenghua Yu wrote:
> From: Reinette Chatre <reinette.chatre@...el.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@...el.com>
> Signed-off-by: Fenghua Yu <fenghua.yu@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ