Re: [PATCH v2] selftests: watchdog: Add optional file argument

From: Eugeniu Rosca
Date: Fri Aug 30 2019 - 09:38:26 EST


Hi George,

On Fri, Aug 30, 2019 at 08:53:16AM -0400, George G. Davis wrote:
> Some systems have multiple watchdog devices where the first device
> registered is assigned to the /dev/watchdog device file. In order
> to test other watchdog devices, add an optional file argument for
> selecting non-default watchdog devices for testing.
>
> Tested-by: Eugeniu Rosca <erosca@xxxxxxxxxxxxxx>
> Signed-off-by: George G. Davis <george_davis@xxxxxxxxxx>
> ---
> v1:
> - https://lkml.org/lkml/2019/8/29/16
> v2:
> - Update printf for ENOENT case based on report from Eugeniu Rosca

Below interdiff [1] matches my expectations. Thanks!

Reviewed-by: Eugeniu Rosca <erosca@xxxxxxxxxxxxxx>

[1] interdiff <(git show patch_v1) <(git show patch_v2)
diff -u b/tools/testing/selftests/watchdog/watchdog-test.c b/tools/testing/selftests/watchdog/watchdog-test.c
--- b/tools/testing/selftests/watchdog/watchdog-test.c
+++ b/tools/testing/selftests/watchdog/watchdog-test.c
@@ -107,7 +107,7 @@

if (fd == -1) {
if (errno == ENOENT)
- printf("Watchdog device not enabled.\n");
+ printf("Watchdog device (%s) not found.\n", file);
else if (errno == EACCES)
printf("Run watchdog as root.\n");
else

--
Best Regards,
Eugeniu.