linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eugeniu Rosca <erosca@de.adit-jv.com>
To: shuah <shuah@kernel.org>
Cc: Eugeniu Rosca <roscaeugeniu@gmail.com>,
	"George G. Davis" <george_davis@mentor.com>,
	Jerry Hoemann <jerry.hoemann@hpe.com>,
	Colin Ian King <colin.king@canonical.com>,
	<linux-kselftest@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Eugeniu Rosca <erosca@de.adit-jv.com>
Subject: Re: [PATCH 2/2] selftests: watchdog: Add command line option to show watchdog_info
Date: Mon, 16 Sep 2019 15:57:56 +0200	[thread overview]
Message-ID: <20190916135756.GA24319@vmlxhi-102.adit-jv.com> (raw)
In-Reply-To: <2b08fa83-185b-4eb7-1217-37ed31d810b5@kernel.org>

Hi Shuah,
CC George

On Mon, Sep 16, 2019 at 07:26:41AM -0600, shuah wrote:
[..]
> >   		case 'f':
> >   			/* Handled above */
> >   			break;
> > +		case 'i':
> > +			/*
> > +			 * watchdog_info was obtained as part of file open
> > +			 * validation. So we just show it here.
> > +			 */
> > +			oneshot = 1;
> > +			printf("watchdog_info:\n");
> > +			printf(" identity:\t\t%s\n", info.identity);
> > +			printf(" firmware_version:\t%u\n",
> > +			       info.firmware_version);
> > +			printf(" options:\t\t%08x\n", info.options);
> > +			break;
> >   		default:
> >   			usage(argv[0]);
> > 
> 
> I would like to see these combined. Please don't add another argument.
> Combine patch and 1&2.

With all my appreciation for your comment, why do you think it is better
to get rid of the new argument? I don't think it is user-friendly to
always report the watchdog_info to the user. Just look at outputs [1-2]
and imagine that the watchdog_info part would pop up unconditionally.
It looks too busy to me.

[1] watchdog-test -b -i
Last boot is caused by: Power-On-Reset.
watchdog_info:
 identity:              Renesas WDT Watchdog
 firmware_version:      0
 options:               000081a0

[2] watchdog-test -i --help    
watchdog_info:
 identity:              Renesas WDT Watchdog
 firmware_version:      0
 options:               000081a0
Usage: ./watchdog-test [options]
 -f, --file             Open watchdog device file
                        Default is /dev/watchdog
 -i, --info             Show watchdog_info
 -b, --bootstatus       Get last boot status (Watchdog/POR)
 -d, --disable          Turn off the watchdog timer
 -e, --enable           Turn on the watchdog timer
 -h, --help             Print the help message
 -p, --pingrate=P       Set ping rate to P seconds (default 1)
 -t, --timeout=T        Set timeout to T seconds
 -T, --gettimeout       Get the timeout
 -n, --pretimeout=T     Set the pretimeout to T seconds
 -N, --getpretimeout    Get the pretimeout
 -L, --gettimeleft      Get the time left until timer expires

Parameters are parsed left-to-right in real-time.
Example: ./watchdog-test -d -t 10 -p 5 -e
Example: ./watchdog-test -t 12 -T -n 7 -N

-- 
Best Regards,
Eugeniu.

  parent reply	other threads:[~2019-09-16 13:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-07  8:58 [PATCH 1/2] selftests: watchdog: Validate optional file argument Eugeniu Rosca
2019-09-07  8:58 ` [PATCH 2/2] selftests: watchdog: Add command line option to show watchdog_info Eugeniu Rosca
2019-09-16 13:26   ` shuah
2019-09-16 13:55     ` George G. Davis
2019-09-16 13:57     ` Eugeniu Rosca [this message]
2019-09-16 16:05       ` shuah
2019-09-16 16:15         ` George G. Davis
2019-09-17 18:53           ` Eugeniu Rosca
2019-09-16 12:08 ` [PATCH 1/2] selftests: watchdog: Validate optional file argument Eugeniu Rosca
2019-09-16 13:29   ` shuah
2019-09-17 18:55     ` Eugeniu Rosca
2019-09-16 13:25 ` shuah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190916135756.GA24319@vmlxhi-102.adit-jv.com \
    --to=erosca@de.adit-jv.com \
    --cc=colin.king@canonical.com \
    --cc=george_davis@mentor.com \
    --cc=jerry.hoemann@hpe.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=roscaeugeniu@gmail.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).