@@ -546,10 +546,10 @@ fn test_epoll_lost_events() {
546546 // Register both fd to the same epoll instance.
547547 let mut ev = libc:: epoll_event { events : EPOLL_IN_OUT_ET , u64 : fds[ 0 ] as u64 } ;
548548 let res = unsafe { libc:: epoll_ctl ( epfd, libc:: EPOLL_CTL_ADD , fds[ 0 ] , & mut ev) } ;
549- assert_ne ! ( res, - 1 ) ;
549+ assert_eq ! ( res, 0 ) ;
550550 let mut ev = libc:: epoll_event { events : EPOLL_IN_OUT_ET , u64 : fds[ 1 ] as u64 } ;
551551 let res = unsafe { libc:: epoll_ctl ( epfd, libc:: EPOLL_CTL_ADD , fds[ 1 ] , & mut ev) } ;
552- assert_ne ! ( res, - 1 ) ;
552+ assert_eq ! ( res, 0 ) ;
553553
554554 //Two notification should be received. But we only provide buffer for one event.
555555 let expected_event0 = u32:: try_from ( libc:: EPOLLOUT ) . unwrap ( ) ;
@@ -578,10 +578,10 @@ fn test_ready_list_fetching_logic() {
578578 // Register both fd to the same epoll instance. At this point, both of them are on the ready list.
579579 let mut ev = libc:: epoll_event { events : EPOLL_IN_OUT_ET , u64 : fd0 as u64 } ;
580580 let res = unsafe { libc:: epoll_ctl ( epfd, libc:: EPOLL_CTL_ADD , fd0, & mut ev) } ;
581- assert_ne ! ( res, - 1 ) ;
581+ assert_eq ! ( res, 0 ) ;
582582 let mut ev = libc:: epoll_event { events : EPOLL_IN_OUT_ET , u64 : fd1 as u64 } ;
583583 let res = unsafe { libc:: epoll_ctl ( epfd, libc:: EPOLL_CTL_ADD , fd1, & mut ev) } ;
584- assert_ne ! ( res, - 1 ) ;
584+ assert_eq ! ( res, 0 ) ;
585585
586586 // Close fd0 so the first entry in the ready list will be empty.
587587 let res = unsafe { libc:: close ( fd0) } ;
0 commit comments