summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls
diff options
context:
space:
mode:
authorJamie Liu <jamieliu@google.com>2020-08-07 11:24:09 -0700
committergVisor bot <gvisor-bot@google.com>2020-08-07 11:26:20 -0700
commit8c1573ebab260a2a40c41265918df3533bd93b3d (patch)
tree538c2c3c7bd8504e12e628b26bc341a5f42a2b98 /test/syscalls
parent4fa1c304a133297bc6895729d74aa35a015e759e (diff)
Tolerate EINTR from fallocate() in inotify test.
PiperOrigin-RevId: 325472312
Diffstat (limited to 'test/syscalls')
-rw-r--r--test/syscalls/linux/inotify.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/syscalls/linux/inotify.cc b/test/syscalls/linux/inotify.cc
index 6cf398097..5cb325a9e 100644
--- a/test/syscalls/linux/inotify.cc
+++ b/test/syscalls/linux/inotify.cc
@@ -1693,7 +1693,7 @@ TEST(Inotify, Fallocate) {
InotifyAddWatch(inotify_fd.get(), file.path(), IN_ALL_EVENTS));
// Do an arbitrary modification with fallocate.
- ASSERT_THAT(fallocate(fd.get(), 0, 0, 123), SyscallSucceeds());
+ ASSERT_THAT(RetryEINTR(fallocate)(fd.get(), 0, 0, 123), SyscallSucceeds());
std::vector<Event> events =
ASSERT_NO_ERRNO_AND_VALUE(DrainEvents(inotify_fd.get()));
EXPECT_THAT(events, Are({Event(IN_MODIFY, wd)}));