summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/timers.cc
diff options
context:
space:
mode:
authorNicolas Lacasse <nlacasse@google.com>2020-11-06 12:53:49 -0800
committergVisor bot <gvisor-bot@google.com>2020-11-06 12:55:29 -0800
commit53eeb06ef14915eee799e9d7d59603ed2a0fe1c1 (patch)
tree038f56ca3f0c464d61a4b2ca6f482127c01c613c /test/syscalls/linux/timers.cc
parent955e09dfbdb8a4cdae0a0b625001a567f6f15758 (diff)
Fix infinite loop when splicing to pipes/eventfds.
Writes to pipes of size < PIPE_BUF are guaranteed to be atomic, so writes larger than that will return EAGAIN if the pipe has capacity < PIPE_BUF. Writes to eventfds will return EAGAIN if the write would cause the eventfd value to go over the max. In both such cases, calling Ready() on the FD will return true (because it is possible to write), but specific kinds of writes will in fact return EAGAIN. This CL fixes an infinite loop in splice and sendfile (VFS1 and VFS2) by forcing skipping the readiness check for the outfile in send, splice, and tee. PiperOrigin-RevId: 341102260
Diffstat (limited to 'test/syscalls/linux/timers.cc')
-rw-r--r--test/syscalls/linux/timers.cc5
1 files changed, 0 insertions, 5 deletions
diff --git a/test/syscalls/linux/timers.cc b/test/syscalls/linux/timers.cc
index cac94d9e1..93a98adb1 100644
--- a/test/syscalls/linux/timers.cc
+++ b/test/syscalls/linux/timers.cc
@@ -322,11 +322,6 @@ TEST(IntervalTimerTest, PeriodicGroupDirectedSignal) {
EXPECT_GE(counted_signals.load(), kCycles);
}
-// From Linux's include/uapi/asm-generic/siginfo.h.
-#ifndef sigev_notify_thread_id
-#define sigev_notify_thread_id _sigev_un._tid
-#endif
-
TEST(IntervalTimerTest, PeriodicThreadDirectedSignal) {
constexpr int kSigno = SIGUSR1;
constexpr int kSigvalue = 42;