ecc7d67a | 27-Oct-2022 |
Colin Ian King <colin.i.king@gmail.com> |
selftests/watchdog: Fix spelling mistake "Temeprature" -> "Temperature"
There is a spelling mistake in a print statement. Fix it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-b
selftests/watchdog: Fix spelling mistake "Temeprature" -> "Temperature"
There is a spelling mistake in a print statement. Fix it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
ec7b4511 | 21-Oct-2022 |
Shuah Khan <skhan@linuxfoundation.org> |
selftests/watchdog: add test for WDIOC_GETTEMP
Add test for WDIOC_GETTEMP and this ioctl might not be supported by some devices and if it is this test will print the following message:
Inappropriat
selftests/watchdog: add test for WDIOC_GETTEMP
Add test for WDIOC_GETTEMP and this ioctl might not be supported by some devices and if it is this test will print the following message:
Inappropriate ioctl for device
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
8856f710 | 21-Oct-2022 |
Shuah Khan <skhan@linuxfoundation.org> |
selftests/watchdog: print watchdog_info option strings
Change show watchdog_info output to print option strings instead of hex values to make it user friendly and human readable.
Signed-off-by: Shu
selftests/watchdog: print watchdog_info option strings
Change show watchdog_info output to print option strings instead of hex values to make it user friendly and human readable.
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
ce3a6778 | 17-Sep-2019 |
George G. Davis <george_davis@mentor.com> |
selftests: watchdog: Add command line option to show watchdog_info
With the new ioctl(WDIOC_GETSUPPORT) call in place, add a command line option to show the watchdog_info.
Suggested-by: Eugeniu Ros
selftests: watchdog: Add command line option to show watchdog_info
With the new ioctl(WDIOC_GETSUPPORT) call in place, add a command line option to show the watchdog_info.
Suggested-by: Eugeniu Rosca <erosca@de.adit-jv.com> Signed-off-by: George G. Davis <george_davis@mentor.com> Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
show more ...
|
0ca2923e | 13-Dec-2018 |
Colin Ian King <colin.king@canonical.com> |
selftests: watchdog: fix spelling mistake "experies" -> "expires"
There is a spelling mistake in the --gettimeleft help text, fix it.
Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed
selftests: watchdog: fix spelling mistake "experies" -> "expires"
There is a spelling mistake in the --gettimeleft help text, fix it.
Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Shuah Khan <shuah@kernel.org>
show more ...
|
d89d08ff | 27-Sep-2018 |
Shuah Khan (Samsung OSG) <shuah@kernel.org> |
selftests: watchdog: Fix ioctl SET* error paths to take oneshot exit path
When ioctls for WDIOC_SETOPTIONS (WDIOS_DISABLECARD or WDIOS_ENABLECARD), WDIOC_SETTIMEOUT, and WDIOC_SETPRETIMEOUT fail, th
selftests: watchdog: Fix ioctl SET* error paths to take oneshot exit path
When ioctls for WDIOC_SETOPTIONS (WDIOS_DISABLECARD or WDIOS_ENABLECARD), WDIOC_SETTIMEOUT, and WDIOC_SETPRETIMEOUT fail, the error path continues to handler watchdog timer until user terminates it. When ioctl returns error, it might not be safe to let the watchdog tick. The error could be due an unsupported ioctl command or some other error.
Fix it to handle error paths as oneshot to stop the watchdog ticks and exit right away.
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
show more ...
|
7514c39c | 26-Sep-2018 |
Jerry Hoemann <jerry.hoemann@hpe.com> |
selftests: watchdog: Add gettimeout and get|set pretimeout
Add command line arguments to call ioctl WDIOC_GETTIMEOUT, WDIOC_GETPRETIMEOUT and WDIOC_SETPRETIMEOUT.
Signed-off-by: Jerry Hoemann <jerr
selftests: watchdog: Add gettimeout and get|set pretimeout
Add command line arguments to call ioctl WDIOC_GETTIMEOUT, WDIOC_GETPRETIMEOUT and WDIOC_SETPRETIMEOUT.
Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
show more ...
|
04d5e4bd | 26-Sep-2018 |
Jerry Hoemann <jerry.hoemann@hpe.com> |
selftests: watchdog: Fix error message.
Printf's say errno but print the string version of error. Make consistent.
Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com> Signed-off-by: Shuah Khan (Sa
selftests: watchdog: Fix error message.
Printf's say errno but print the string version of error. Make consistent.
Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
show more ...
|
a3d6d79f | 01-Jul-2017 |
Eugeniu Rosca <erosca@de.adit-jv.com> |
selftests: watchdog: get boot reason via WDIOC_GETBOOTSTATUS
Some watchdog drivers implement WDIOF_CARDRESET feature. As example, see commit b6ef36d2c1e3 ("watchdog: qcom: Report reboot reason"). Th
selftests: watchdog: get boot reason via WDIOC_GETBOOTSTATUS
Some watchdog drivers implement WDIOF_CARDRESET feature. As example, see commit b6ef36d2c1e3 ("watchdog: qcom: Report reboot reason"). This option allows reporting to userspace the cause of the last boot (POR/watchdog reset), being helpful in e.g. automated test-cases.
Add support for WDIOC_GETBOOTSTATUS in the test code, to be able to: - check if watchdog drivers properly implement WDIOF_CARDRESET. - check the last boot status, if WDIOF_CARDRESET is implemented.
Make the `-b, --bootstatus` option one-shot. That means, skip the keepalive mechanism if `-b` is provided on the command line, as we are only interested in the boot status information.
Tested on Rcar-H3 Salvator-X board:
********************** Cold boot finished salvator-x:/home/root# ./watchdog-test -h Usage: ./watchdog-test [options] -b, --bootstatus Get last boot status (Watchdog/POR) -d, --disable Turn off the watchdog timer -e, --enable Turn on the watchdog timer -h, --help Print the help message -p, --pingrate=P Set ping rate to P seconds (default 1) -t, --timeout=T Set timeout to T seconds
Parameters are parsed left-to-right in real-time. Example: ./watchdog-test -d -t 10 -p 5 -e salvator-x:/home/root# salvator-x:/home/root# ./watchdog-test -b Last boot is caused by: Power-On-Reset. salvator-x:/home/root# salvator-x:/home/root# ./watchdog-test -d -t 1 -p 2 -e Watchdog card disabled. Watchdog timeout set to 1 seconds. Watchdog ping rate set to 2 seconds. Watchdog card enabled. Watchdog Ticking Away! ********************** Reboot due to watchdog trigger finished salvator-x:/home/root# ./watchdog-test -b Last boot is caused by: Watchdog. salvator-x:/home/root# salvator-x:/home/root# reboot ********************** Reboot due to user action finished salvator-x:/home/root# ./watchdog-test -b Last boot is caused by: Power-On-Reset. salvator-x:/home/root#
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
show more ...
|
f8f92c07 | 01-Jul-2017 |
Eugeniu Rosca <erosca@de.adit-jv.com> |
selftests: watchdog: avoid keepalive flood
Calling `watchdog-test [options] -p 0` results in flooding the kernel with WDIOC_KEEPALIVE. Fix this by enforcing 1 second as minimal/default keepalive/pin
selftests: watchdog: avoid keepalive flood
Calling `watchdog-test [options] -p 0` results in flooding the kernel with WDIOC_KEEPALIVE. Fix this by enforcing 1 second as minimal/default keepalive/ping rate.
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
show more ...
|
42f34c4e | 01-Jul-2017 |
Eugeniu Rosca <erosca@de.adit-jv.com> |
selftests: watchdog: point out ioctl() failures
Report the failure of WDIOC_SETOPTIONS/WDIOC_SETTIMEOUT ioctls.
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com> Signed-off-by: Shuah Khan <shuah
selftests: watchdog: point out ioctl() failures
Report the failure of WDIOC_SETOPTIONS/WDIOC_SETTIMEOUT ioctls.
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
show more ...
|
7a5e10d4 | 01-Jul-2017 |
Eugeniu Rosca <erosca@de.adit-jv.com> |
selftests: watchdog: prefer strtoul() over atoi()
commit f15d7114bbdd ("Documentation/watchdog: add timeout and ping rate control to watchdog-test.c") used both atoi() and strtoul() for string to in
selftests: watchdog: prefer strtoul() over atoi()
commit f15d7114bbdd ("Documentation/watchdog: add timeout and ping rate control to watchdog-test.c") used both atoi() and strtoul() for string to integer conversion. As usage of atoi() is discouraged in newer code, replace it with strtoul() for consistency.
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
show more ...
|
749fb263 | 01-Jul-2017 |
Eugeniu Rosca <erosca@de.adit-jv.com> |
selftests: watchdog: use getopt_long()
Switch from manual argv[] parsing to getopt_long() argument processing. This creates more readable code and allows easier feature addition. This also fixes som
selftests: watchdog: use getopt_long()
Switch from manual argv[] parsing to getopt_long() argument processing. This creates more readable code and allows easier feature addition. This also fixes some segmentation faults introduced by commit 1dbdcc810928 ("selftests: watchdog: accept multiple params on command line"), when options -t or -p are not given the required value:
./watchdog-test -p 1 -t ./watchdog-test -t 1 -p
No changes are intended in the way watchdog-test interacts with the kernel. The only noticible changes, tightly related to the addition of getopt (and done for easier maintenance), are: - help message has been reworked and migrated to a dedicated function. - all short/long options and the help message are sorted alphabetically. - all case statements inside the getopt loop are sorted alphabetically.
Fixes: 1dbdcc810928 ("selftests: watchdog: accept multiple params on command line") Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
show more ...
|