Tolerate EINTR from fallocate() in inotify test.

PiperOrigin-RevId: 325472312
This commit is contained in:
Jamie Liu
2020-08-07 11:26:20 -07:00
committed by gVisor bot
parent 4fa1c304a1
commit 8c1573ebab
+1 -1
View File
@@ -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)}));