From 035e44c7cb990d91e77b57b146b8dc78ad064b95 Mon Sep 17 00:00:00 2001 From: Ayush Ranjan Date: Tue, 12 Oct 2021 12:44:53 -0700 Subject: Make DoubleLayerEpoll use non blocking pipes. We don't want the read to block and want to test that epoll_wait returns only when there is data available in rfd to be read. PiperOrigin-RevId: 402631091 --- test/syscalls/linux/epoll.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/syscalls/linux/epoll.cc b/test/syscalls/linux/epoll.cc index b1760b7d6..c2dc8174c 100644 --- a/test/syscalls/linux/epoll.cc +++ b/test/syscalls/linux/epoll.cc @@ -499,7 +499,7 @@ TEST(EpollTest, PipeReaderHupAfterWriterClosed) { TEST(EpollTest, DoubleLayerEpoll) { int pipefds[2]; - ASSERT_THAT(pipe(pipefds), SyscallSucceeds()); + ASSERT_THAT(pipe2(pipefds, O_NONBLOCK), SyscallSucceeds()); FileDescriptor rfd(pipefds[0]); FileDescriptor wfd(pipefds[1]); -- cgit v1.2.3