[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c7fe69f5-e793-b3aa-dda1-bc90ee1a7f95@linuxfoundation.org>
Date: Mon, 25 Jan 2021 19:36:01 -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 09/17] selftests/resctrl: Fix missing options "-n" and
"-p"
On 11/30/20 1:20 PM, Fenghua Yu wrote:
> resctrl test suite accepts command line arguments (like -b, -t, -n and -p)
> as documented in the help. But passing -n and -p throws an invalid option
> error. This happens because -n and -p are missing in the list of
> characters that getopt() recognizes as valid arguments. Hence, they are
> treated as invalid options.
>
> Fix this by adding them to the list of characters that getopt() recognizes
> as valid arguments. Please note that the main() function already has the
> logic to deal with the values passed as part of these arguments and hence
> no changes are needed there.
>
> Signed-off-by: Fenghua Yu <fenghua.yu@...el.com>
> ---
> tools/testing/selftests/resctrl/resctrl_tests.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/resctrl/resctrl_tests.c b/tools/testing/selftests/resctrl/resctrl_tests.c
> index 0e036dbf5d17..ef09e0ef2366 100644
> --- a/tools/testing/selftests/resctrl/resctrl_tests.c
> +++ b/tools/testing/selftests/resctrl/resctrl_tests.c
> @@ -73,7 +73,7 @@ int main(int argc, char **argv)
> }
> }
>
> - while ((c = getopt(argc_new, argv, "ht:b:")) != -1) {
> + while ((c = getopt(argc_new, argv, "ht:b:n:p:")) != -1) {
> char *token;
>
> switch (c) {
>
Same comment. Please make this change before making the cleanup changes.
thanks,
-- Shuah
Powered by blists - more mailing lists