[RFC/PATCH] watchdog_ioctl: Add decoding of WDIOC_GETSUPPORT and WDIOC_SETOPTIONS ioctls.

Sahil icegambit91 at gmail.com
Sun Aug 4 17:33:54 UTC 2024


Hi,

On Sunday, August 4, 2024 9:28:33 PM GMT+5:30 Dmitry V. Levin wrote:
> On Sun, Aug 04, 2024 at 12:28:00PM +0530, Sahil Siddiq wrote:
> > Hi,
> > 
> > I am not sure how one adds a test for the constants
> > that are bitwise OR'd in the options field of "struct
> > watchdog_info". The struct is decoded when fd refers
> > to a watchdog device (eg.: /dev/watchdog) but one needs
> > to have the appropriate privileges to access such a
> > device. I have left this part out for the time being.
> 
> We usually test decoding of such ioctls using injections, see
> tests/ioctl_*-success.c tests, e.g. tests/ioctl_lirc-success.c

Understood, I'll take a look at tests/ioctl_lirc-success.c to get
an idea.

Thanks,
Sahil




More information about the Strace-devel mailing list