Re: [PATCH 1/2] selftests: watchdog: Validate optional file argument

From: shuah
Date: Mon Sep 16 2019 - 09:29:58 EST


On 9/16/19 6:08 AM, Eugeniu Rosca wrote:
Hi Shuah,

On Sat, Sep 07, 2019 at 10:58:32AM +0200, Eugeniu Rosca wrote:
From: "George G. Davis" <george_davis@xxxxxxxxxx>

As reported by Eugeniu Rosca, 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.

Reported-by: Eugeniu Rosca <erosca@xxxxxxxxxxxxxx>
Signed-off-by: George G. Davis <george_davis@xxxxxxxxxx>
Signed-off-by: Eugeniu Rosca <erosca@xxxxxxxxxxxxxx>
---
v1: Applied/tested on commit ce54eab71e210f ("kunit: fix failure to build without printk") of
https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/log/?h=next

Any concerns about the two patches?
I responded to the patches as well.

Can you please confirm they are in your queue?


I just sent response. Please collapse the two patches. They will go in
for 5.4-rc1 second update.

thanks,
-- Shuah