Skip to content

Commit dd292a0

Browse files
committed
while we are at it, test that epoll actually uses ET semantics
1 parent 30b56c3 commit dd292a0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/pass-dep/libc/libc-epoll.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ fn test_epoll_socketpair() {
9191
let expected_event = u32::try_from(libc::EPOLLRDHUP | libc::EPOLLIN | libc::EPOLLOUT).unwrap();
9292
let expected_value = u64::try_from(fds[1]).unwrap();
9393
assert!(check_epoll_wait::<8>(epfd, vec![(expected_event, expected_value)]));
94+
95+
// Check that this is indeed using "ET" (edge-trigger) semantics: a second epoll should return nothing.
96+
assert!(check_epoll_wait::<8>(epfd, vec![]));
9497
}
9598

9699
fn test_epoll_ctl_mod() {

0 commit comments

Comments
 (0)