[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <197ee603-6ea7-a3c8-6b62-e3ba95433053@kernel.org>
Date: Fri, 30 Aug 2019 09:12:10 -0600
From: shuah <shuah@...nel.org>
To: "George G. Davis" <george_davis@...tor.com>,
Jerry Hoemann <jerry.hoemann@....com>,
Colin Ian King <colin.king@...onical.com>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Cc: Eugeniu Rosca <erosca@...adit-jv.com>, shuah <shuah@...nel.org>
Subject: Re: [PATCH v2] selftests: watchdog: Add optional file argument
On 8/30/19 6:53 AM, George G. Davis wrote:
> Some systems have multiple watchdog devices where the first device
> registered is assigned to the /dev/watchdog device file. In order
> to test other watchdog devices, add an optional file argument for
> selecting non-default watchdog devices for testing.
>
> Tested-by: Eugeniu Rosca <erosca@...adit-jv.com>
> Signed-off-by: George G. Davis <george_davis@...tor.com>
> ---
> v1:
> - https://lkml.org/lkml/2019/8/29/16
> v2:
> - Update printf for ENOENT case based on report from Eugeniu Rosca
> ---
> tools/testing/selftests/watchdog/watchdog-test.c | 19 ++++++++++++++++---
> 1 file changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/watchdog/watchdog-test.c b/tools/testing/selftests/watchdog/watchdog-test.c
> index c2333c78cf04..9f17cae61007 100644
> --- a/tools/testing/selftests/watchdog/watchdog-test.c
> +++ b/tools/testing/selftests/watchdog/watchdog-test.c
> @@ -19,7 +19,7 @@
>
> int fd;
> const char v = 'V';
> -static const char sopts[] = "bdehp:t:Tn:NL";
> +static const char sopts[] = "bdehp:t:Tn:NLf:";
> static const struct option lopts[] = {
> {"bootstatus", no_argument, NULL, 'b'},
> {"disable", no_argument, NULL, 'd'},
> @@ -31,6 +31,7 @@ static const struct option lopts[] = {
> {"pretimeout", required_argument, NULL, 'n'},
> {"getpretimeout", no_argument, NULL, 'N'},
> {"gettimeleft", no_argument, NULL, 'L'},
> + {"file", required_argument, NULL, 'f'},
> {NULL, no_argument, NULL, 0x0}
> };
>
> @@ -69,6 +70,7 @@ static void term(int sig)
> static void usage(char *progname)
> {
> printf("Usage: %s [options]\n", progname);
> + printf(" -f, --file Open watchdog device file (default is /dev/watchdog)\n");
Can you split this line into two printf's. Checkpatch doesn't like
it.
printf(" -f, --file Open watchdog device file\n");
A second one below for default.
On a separate note, I wish this usage block uses \t instead of spacing
things out.
thanks,
-- Shuah
Powered by blists - more mailing lists