From 8c1573ebab260a2a40c41265918df3533bd93b3d Mon Sep 17 00:00:00 2001 From: Jamie Liu Date: Fri, 7 Aug 2020 11:24:09 -0700 Subject: Tolerate EINTR from fallocate() in inotify test. PiperOrigin-RevId: 325472312 --- test/syscalls/linux/inotify.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 events = ASSERT_NO_ERRNO_AND_VALUE(DrainEvents(inotify_fd.get())); EXPECT_THAT(events, Are({Event(IN_MODIFY, wd)})); -- cgit v1.2.3