From: Dmitry V. Levin Date: Sun, 10 Apr 2016 22:38:00 +0000 (+0000) Subject: tests/epoll_ctl.c: extend epoll_ctl coverage X-Git-Tag: v4.12~435 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2399a6031c879615c49dbfeef4b258b0546a3809;p=strace tests/epoll_ctl.c: extend epoll_ctl coverage * tests/epoll_ctl.c (main): Check EPOLL_CTL_DEL decoding. Check decoding of long int descriptors and NULL struct epoll_event pointer. --- diff --git a/tests/epoll_ctl.c b/tests/epoll_ctl.c index 4e985e0e..7237f0f7 100644 --- a/tests/epoll_ctl.c +++ b/tests/epoll_ctl.c @@ -21,6 +21,14 @@ main(void) ev->data.u32, ev->data.u64, rc, errno == ENOSYS ? "ENOSYS" : "EBADF"); + rc = syscall(__NR_epoll_ctl, -3, EPOLL_CTL_DEL, -4, ev); + printf("epoll_ctl(-3, EPOLL_CTL_DEL, -4, %p) = %d %s (%m)\n", + ev, rc, errno == ENOSYS ? "ENOSYS" : "EBADF"); + + rc = syscall(__NR_epoll_ctl, -1L, EPOLL_CTL_MOD, -16L, 0); + printf("epoll_ctl(-1, EPOLL_CTL_MOD, -16, NULL) = %d %s (%m)\n", + rc, errno == ENOSYS ? "ENOSYS" : "EFAULT"); + puts("+++ exited with 0 +++"); return 0; }