Hi Eugeniu, On 06/03/2017 02:14 PM, Eugeniu Rosca wrote: > Calling `watchdog-test [options] -p 0` results in flooding the kernel > with WDIOC_KEEPALIVE. Fix this by enforcing 1 second as minimal > keepalive/ping period. > > Signed-off-by: Eugeniu Rosca <erosca@xxxxxxxxxxxxxx> > --- > tools/testing/selftests/watchdog/watchdog-test.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tools/testing/selftests/watchdog/watchdog-test.c b/tools/testing/selftests/watchdog/watchdog-test.c > index c1c9a3bb9ec7..c768b51a044e 100644 > --- a/tools/testing/selftests/watchdog/watchdog-test.c > +++ b/tools/testing/selftests/watchdog/watchdog-test.c > @@ -107,6 +107,8 @@ int main(int argc, char *argv[]) > break; > case 'p': > ping_rate = strtoul(optarg, NULL, 0); > + if (!ping_rate) > + ping_rate = 1; > printf("Watchdog ping rate set to %u seconds.\n", ping_rate); This is good. Please update the Usage string to reflect the default ping_rate when one isn't specified. Better yet, please add a define DEAFAULT_PING_RATE and then use that instead of hard-coding it. > break; > case 't': > thanks, -- Shuah -- To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html