[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANDhNCoXjW8iOBj7ZvBC1O7J0om=qUsYmiuBJ8BA+2PK_3-weA@mail.gmail.com>
Date: Wed, 13 Jul 2022 14:05:48 -0700
From: John Stultz <jstultz@...gle.com>
To: Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc: linux-renesas-soc@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>,
Stephen Boyd <sboyd@...nel.org>, Shuah Khan <shuah@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@...r.kernel.org>
Subject: Re: [PATCH 8/9] selftests: timers: clocksource-switch: add 'runtime'
command line parameter
On Wed, Jul 13, 2022 at 1:46 PM Wolfram Sang
<wsa+renesas@...g-engineering.com> wrote:
>
> So the user can decide how long the test should run.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
> ---
> tools/testing/selftests/timers/clocksource-switch.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/timers/clocksource-switch.c b/tools/testing/selftests/timers/clocksource-switch.c
> index 5256e6215980..a1d0d33738b6 100644
> --- a/tools/testing/selftests/timers/clocksource-switch.c
> +++ b/tools/testing/selftests/timers/clocksource-switch.c
> @@ -124,14 +124,18 @@ int main(int argc, char **argv)
> char orig_clk[512];
> int count, i, status, opt;
> int do_sanity_check = 1;
> + int runtime = 60;
> pid_t pid;
>
> /* Process arguments */
> - while ((opt = getopt(argc, argv, "s")) != -1) {
> + while ((opt = getopt(argc, argv, "st:")) != -1) {
> switch (opt) {
> case 's':
> do_sanity_check = 0;
> break;
> + case 't':
> + runtime = atoi(optarg);
> + break;
> default:
> printf("Usage: %s [-s]\n", argv[0]);
> printf(" -s: skip sanity checks\n");
Ah, one minor nit: Should the -t option get documented here in the
usage output?
thanks again!
-john
Powered by blists - more mailing lists