summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorAyush Ranjan <ayushranjan@google.com>2021-10-12 12:44:53 -0700
committergVisor bot <gvisor-bot@google.com>2021-10-12 12:47:18 -0700
commit035e44c7cb990d91e77b57b146b8dc78ad064b95 (patch)
treefbf72deb08809834720c095b301d3daf9a560942 /test
parent98a694eebc0b50e2e591da3af4a0ac280bf411d0 (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/syscalls/linux/epoll.cc2
1 files changed, 1 insertions, 1 deletions
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]);