selftests/watchdog: change to print reset reason info.
authorShuah Khan <skhan@linuxfoundation.org>
Thu, 20 Oct 2022 21:18:28 +0000 (15:18 -0600)
committerShuah Khan <skhan@linuxfoundation.org>
Wed, 26 Oct 2022 03:15:10 +0000 (21:15 -0600)
commit66d1dce0ecb2a15ec2e1ec2d9c25bf13d9004d57
tree560ca7097ada18df761ce37fb6fb581fd1e73c6c
parentde3ee3f63400a23954e7c1ad1cb8c20f29ab6fe3
selftests/watchdog: change to print reset reason info.

The test prints reset reason when WDIOC_GETBOOTSTATUS returns
a 0 flag value and all other cases simply say watchdog.

Parse the flag values returned by WDIOC_GETBOOTSTATUS and print
corresponding reset reason for each WDIOF_* boot status.

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/watchdog/watchdog-test.c