selftests: watchdog: accept multiple params on command line
authorTimur Tabi <timur@codeaurora.org>
Mon, 1 May 2017 19:23:04 +0000 (14:23 -0500)
committerShuah Khan <shuahkh@osg.samsung.com>
Tue, 2 May 2017 16:48:24 +0000 (10:48 -0600)
commit1dbdcc810928a2c1acdd0bbfce9495f63610a0d1
tree419b5df1eaed107760cf7eae51d4dc71b0d618c9
parent83896c68fd32895ba4ff685c4df9d1e794dfb4fe
selftests: watchdog: accept multiple params on command line

Watchdog drivers are not required to retain programming information,
such as timeouts, after the watchdog device is closed.  Therefore,
the watchdog test should be able to perform multiple actions after
opening the watchdog device.

For example, to set the timeout to 10s and ping every 5s:

watchdog-test -t 10 -p 5 -e

Also, display the periodic decimal point only if the keep-alive call
succeeds.

Signed-off-by: Timur Tabi <timur@codeaurora.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
tools/testing/selftests/watchdog/watchdog-test.c