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); break; case 't': -- 2.13.0 -- 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