selftests/watchdog: print watchdog_info option strings
authorShuah Khan <skhan@linuxfoundation.org>
Fri, 21 Oct 2022 16:52:48 +0000 (10:52 -0600)
committerShuah Khan <skhan@linuxfoundation.org>
Wed, 26 Oct 2022 03:23:41 +0000 (21:23 -0600)
Change show watchdog_info output to print option strings instead
of hex values to make it user friendly and human readable.

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

index 469f611a4b88e0ae0e6cdb5c22e1ac37321303c8..a4547dd53b4eafcbf36dc32a0aeb7727237d4260 100644 (file)
@@ -6,7 +6,6 @@
 * - Could be tested against softdog driver on systems that
 *   don't have watchdog hardware.
 * - TODO:
-* - Enhance coverage of ioctl return values - flags and status.
 * - Enhance test to add coverage for WDIOC_GETTEMP.
 *
 * Reference: Documentation/watchdog/watchdog-api.rst
@@ -314,7 +313,7 @@ int main(int argc, char *argv[])
                        printf(" identity:\t\t%s\n", info.identity);
                        printf(" firmware_version:\t%u\n",
                               info.firmware_version);
-                       printf(" options:\t\t%08x\n", info.options);
+                       print_status(info.options);
                        break;
 
                default: