The watchdog selftest script supports various parameters for testing different IOCTLs. The watchdog ping functionality is validated by starting a loop where the watchdog device is periodically pet, which can only be stopped by the user interrupting the script.
This results in a timeout when running this test using the kselftest runner with no non-oneshot parameters (or no parameters at all):
TAP version 13 1..1 # timeout set to 45 # selftests: watchdog: watchdog-test # Watchdog Ticking Away! # .............................................# not ok 1 selftests: watchdog: watchdog-test # TIMEOUT 45 seconds
To address this issue, the first patch in this series limits the loop to 5 iterations by default and adds support for a new '-c' option to customize the number of pings as required.
The second patch conforms the test output to the KTAP format.
Laura Nao (2): selftests/watchdog: limit ping loop and allow configuring the number of pings selftests/watchdog: convert the test output to KTAP format
.../selftests/watchdog/watchdog-test.c | 166 +++++++++++------- 1 file changed, 101 insertions(+), 65 deletions(-)