selftests: watchdog: Validate optional file argument
The newly added optional file argument does not validate if the file is indeed a watchdog, e.g.: ./watchdog-test -f /dev/zero Watchdog Ticking Away! Fix it by confirming that the WDIOC_GETSUPPORT ioctl succeeds. Fixes: a4864a33 ("selftests: watchdog: Add optional file argument") Reported-by: NEugeniu Rosca <erosca@de.adit-jv.com> Signed-off-by: NGeorge G. Davis <george_davis@mentor.com> Signed-off-by: NEugeniu Rosca <erosca@de.adit-jv.com> Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
Showing
想要评论请 注册 或 登录