Implement WDIOC_GETBOOTSTATUS in the test code to be able to check if watchdog drivers have proper support of WDIOF_CARDRESET. If this support is in place, then watchdog-test gets the ability to check the status/reason of the last boot (POR/Watchdog). Aside from the main feature, include a number of fixes following the spirt of v1 and v2 comments. v3: - Fix checkpatch.pl --strict --max-line-length=120 -f watchdog-test.c - Switch from manual argv[] parsing to getopt() - Include minor fixes - Convert `--bootstatus` into a "oneshot" command (skip keepalive loop) v2: - Fix segmentation fault caused by a previous commit. - Don't break processing of other arguments when passing `-s`. Eugeniu Rosca (6): selftests: watchdog: fix mixed whitespace selftests: watchdog: use getopt_long() selftests: watchdog: prefer strtoul() over atoi() selftests: watchdog: point out ioctl() failures selftests: watchdog: avoid keepalive flood selftests: watchdog: get boot reason via WDIOC_GETBOOTSTATUS tools/testing/selftests/watchdog/watchdog-test.c | 188 ++++++++++++++--------- 1 file changed, 117 insertions(+), 71 deletions(-) -- 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