Add test for epoll_pwait{04, 05}
cover Add test for epoll_pwait{04, 05}
Xie Ziyao (2):
epoll_pwait: Add invalid sigmask test for epoll_pwait04
epoll_pwait: Add invalid timespec test for epoll_pwait05
runtest/syscalls | 2 + .../kernel/syscalls/epoll_pwait/.gitignore | 2 + .../syscalls/epoll_pwait/epoll_pwait04.c | 61 ++++++++++++++++ .../syscalls/epoll_pwait/epoll_pwait05.c | 70 +++++++++++++++++++ 4 files changed, 135 insertions(+) create mode 100644 testcases/kernel/syscalls/epoll_pwait/epoll_pwait04.c create mode 100644 testcases/kernel/syscalls/epoll_pwait/epoll_pwait05.c
--
2.17.1
PATCH 1/2 epoll_pwait: Add invalid sigmask test for epoll_pwait04
Verify that, epoll_pwait() and epoll_pwait2() return -1 and set errno to EFAULT with a sigmask points outside user's accessible address space.
--- runtest/syscalls | 1 + .../kernel/syscalls/epoll_pwait/.gitignore | 1 + .../syscalls/epoll_pwait/epoll_pwait04.c | 61 +++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 testcases/kernel/syscalls/epoll_pwait/epoll_pwait04.c
runtest/syscalls +1 -0
@@ -168,6 +168,7 @@ epoll_wait03 epoll_wait03 epoll_pwait01 epoll_pwait01 epoll_pwait02 epoll_pwait02 epoll_pwait03 epoll_pwait03 +epoll_pwait04 epoll_pwait04 eventfd01 eventfd01
testcases/kernel/syscalls/epoll_pwait/.gitignore +1 -0
@@ -1,3 +1,4 @@ epoll_pwait01 epoll_pwait02 epoll_pwait03 +epoll_pwait04
testcases/kernel/syscalls/epoll_pwait/epoll_pwait04.c new file +61 -0
61 lines not on this page · raw message
--
2.17.1
PATCH 1/2 epoll_pwait: Add invalid sigmask test for epoll_pwait04
Hi!
testcases/kernel/syscalls/epoll_pwait/epoll_pwait04.c line 25
Quoted 4 lines
testcases/kernel/syscalls/epoll_pwait/epoll_pwait04.c new file +4
-0+static void run (void ) +{ +TST_EXP_FAIL (do_epoll_pwait (efd, &e,1 ,-1 ,tst_get_bad_addr (NULL )), +EFAULT ,"with an invalid sigmask pointer" );
The tst_get_bad_addr() allocates memory so I've moved it to the test setup() so that the test does not get out of memory with large enough -i option.
Patchset pushed, good work, thanks.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 2/2 epoll_pwait: Add invalid timespec test for epoll_pwait05
In reply to Xie ZiyaoVerify that, epoll_pwait2() return -1 and set errno to EINVAL with an invalid timespec.
--- runtest/syscalls | 1 + .../kernel/syscalls/epoll_pwait/.gitignore | 1 + .../syscalls/epoll_pwait/epoll_pwait05.c | 70 +++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 testcases/kernel/syscalls/epoll_pwait/epoll_pwait05.c
runtest/syscalls +1 -0
@@ -169,6 +169,7 @@ epoll_pwait01 epoll_pwait01 epoll_pwait02 epoll_pwait02 epoll_pwait03 epoll_pwait03 epoll_pwait04 epoll_pwait04 +epoll_pwait05 epoll_pwait05 eventfd01 eventfd01
testcases/kernel/syscalls/epoll_pwait/.gitignore +1 -0
@@ -2,3 +2,4 @@ epoll_pwait01 epoll_pwait02 epoll_pwait03 epoll_pwait04 +epoll_pwait05
testcases/kernel/syscalls/epoll_pwait/epoll_pwait05.c new file +70 -0
70 lines not on this page · raw message
--
2.17.1