v2:
- add a-bs
- add examples for non-anon tests [Mike]
- use brackets properly for nested ifs [Mike]
Recently I wrote some uffd write-protection test for the
not-yet-published uffd-wp tree, and I picked these common patches out
first for the selftest which even suite for master.
Any feedback is welcomed. Please have a look, thanks.
Peter Xu (3):
userfaultfd: selftest: cleanup help messages
userfaultfd: selftest: generalize read and poll
userfaultfd: selftest: recycle lock threads first
tools/testing/selftests/vm/userfaultfd.c | 134 +++++++++++++----------
1 file changed, 77 insertions(+), 57 deletions(-)
--
2.17.1
Recently I wrote some uffd write-protection test for the
not-yet-published uffd-wp tree, and I picked these common patches out
first for the selftest which even suite for master.
Any feedback is welcomed. Please have a look, thanks.
Peter Xu (3):
userfaultfd: selftest: cleanup help messages
userfaultfd: selftest: generalize read and poll
userfaultfd: selftest: recycle lock threads first
tools/testing/selftests/vm/userfaultfd.c | 131 +++++++++++++----------
1 file changed, 74 insertions(+), 57 deletions(-)
--
2.17.1
Add command line arguments to call ioctl WDIOC_GETTIMEOUT,
WDIOC_GETPRETIMEOUT and WDIOC_SETPRETIMEOUT.
Changes v2
1) Update usage to include argument
2) Update usage to give example.
3) Made printf of WDIOC_GETTIMEOUT distinct from WDIOC_SETTIMEOUT
4) Made WDIOC_GETTIMEOUT a "one shot"
5) Made printf of WDIOC_GETPRETIMEOUT disnct from WDIOC_SETPRETIMEOUT
6) Made WDIOC_GETPRETIMEOUT a "one shot"
Change v3
1) Printf says errno, but prints the string version of the error.
Make the printf consistent.
2) As above error was cut/paste from prior printf in application
add new patch 1 to fix the existing printf first.
Jerry Hoemann (2):
selftests: watchdog: Fix error message.
selftests: watchdog: Add gettimeout and get|set pretimeout
tools/testing/selftests/watchdog/watchdog-test.c | 41 +++++++++++++++++++++---
1 file changed, 36 insertions(+), 5 deletions(-)
--
1.8.3.1
Add command line arguments to call ioctl WDIOC_GETTIMEOUT,
WDIOC_GETPRETIMEOUT and WDIOC_SETPRETIMEOUT.
Changes v2
1) Update usage to include argument
2) Update usage to give example.
3) Made printf of WDIOC_GETTIMEOUT distinct from WDIOC_SETTIMEOUT
4) Made WDIOC_GETTIMEOUT a "one shot"
5) Made printf of WDIOC_GETPRETIMEOUT disnct from WDIOC_SETPRETIMEOUT
6) Made WDIOC_GETPRETIMEOUT a "one shot"
Jerry Hoemann (1):
selftests: watchdog: Add gettimeout and get|set pretimeout
tools/testing/selftests/watchdog/watchdog-test.c | 33 +++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
--
1.8.3.1
When /dev/watchdog open fails, watchdog exits with "watchdog not enabled"
message. This is incorrect when open fails due to insufficient privilege.
Fix message to clearly state the reason when open fails with EACCESS when
a non-root user runs it.
Signed-off-by: Shuah Khan (Samsung OSG) <shuah(a)kernel.org>
---
tools/testing/selftests/watchdog/watchdog-test.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/watchdog/watchdog-test.c b/tools/testing/selftests/watchdog/watchdog-test.c
index 6e290874b70e..e029e2017280 100644
--- a/tools/testing/selftests/watchdog/watchdog-test.c
+++ b/tools/testing/selftests/watchdog/watchdog-test.c
@@ -89,7 +89,13 @@ int main(int argc, char *argv[])
fd = open("/dev/watchdog", O_WRONLY);
if (fd == -1) {
- printf("Watchdog device not enabled.\n");
+ if (errno == ENOENT)
+ printf("Watchdog device not enabled.\n");
+ else if (errno == EACCES)
+ printf("Run watchdog as root.\n");
+ else
+ printf("Watchdog device open failed %s\n",
+ strerror(errno));
exit(-1);
}
--
2.17.0