Re: [PATCH v3 4/6] selftests: watchdog: point out ioctl() failures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 22, 2017 at 10:31:25AM -0600, Shuah Khan wrote:
> On 06/16/2017 05:53 PM, Eugeniu Rosca wrote:
> > On Thu, Jun 15, 2017 at 03:16:20PM -0600, Shuah Khan wrote:
> >> Hi Eugeniu,
> >>
> >> On 06/03/2017 02:14 PM, Eugeniu Rosca wrote:
> >>> Report the failure of WDIOC_SETOPTIONS/WDIOC_SETTIMEOUT ioctls.
> >>>
> >>> Signed-off-by: Eugeniu Rosca <erosca@xxxxxxxxxxxxxx>
> >>> ---
> >>>  tools/testing/selftests/watchdog/watchdog-test.c | 6 ++++++
> >>>  1 file changed, 6 insertions(+)
> >>>
> >>> diff --git a/tools/testing/selftests/watchdog/watchdog-test.c b/tools/testing/selftests/watchdog/watchdog-test.c
> >>> index 5cfa88c73095..c1c9a3bb9ec7 100644
> >>> --- a/tools/testing/selftests/watchdog/watchdog-test.c
> >>> +++ b/tools/testing/selftests/watchdog/watchdog-test.c
> >>> @@ -94,12 +94,16 @@ int main(int argc, char *argv[])
> >>>  			ret = ioctl(fd, WDIOC_SETOPTIONS, &flags);
> >>>  			if (!ret)
> >>>  				printf("Watchdog card disabled.\n");
> >>> +			else
> >>> +				printf("Failed to disable watchdog card.\n");
> >>
> >> Could you please add ioctl ret value to the error message.
> > 
> > I suspect that the ioctl return value is not going to be very
> > informative (-1). Therefore, please select your preference on
> > what to print on ioctl() failure:
> > a) ioctl ret value
> > b) errno
> > c) strerror(errno)
> > d) combination of (a), (b), (c)
> > 
> > Thanks,
> > Eugeniu.
> > 
> > 
> 
> Give it some thought on what kind of information would be helpful
> for a user of this test to determine the failure. For example,
> including the ioctl that failed is going to be useful.
> 
> In general, it is a good practice to figure out what information
> would be useful and send a patch, instead of sending multiple
> choice questions to the maintainer.

Thanks for your suggestions. I've pushed the 4th patch-set.

Best regards,
Eugeniu.

> 
> thanks,
> -- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux