Lines Matching defs:pipe
26 Pipe pipe;
28 ASSERT_THAT_ERROR(pipe.CreateWithUniqueName("PipeTest-CreateWithUniqueName",
38 Pipe pipe;
40 ASSERT_THAT_ERROR(pipe.CreateWithUniqueName("PipeTest-OpenAsReader",
51 pipe.OpenAsReader(name_ref, /*child_process_inherit=*/false).ToError(),
54 ASSERT_TRUE(pipe.CanRead());
61 Pipe pipe;
62 ASSERT_THAT_ERROR(pipe.CreateNew(false).ToError(), llvm::Succeeded());
64 // The pipe buffer is 1024 for PipeWindows and at least 512 on Darwin.
65 // In Linux versions before 2.6.11, the capacity of a pipe was the same as the
67 // Since Linux 2.6.11, the pipe capacity is 16 pages (i.e., 65,536 bytes in a
69 // Since Linux 2.6.35, the default pipe capacity is 16 pages, but the capacity
74 ::fcntl(pipe.GetWriteFileDescriptor(), F_SETPIPE_SZ, 4096);
79 // Note write_chunk_size must be less than the pipe buffer.
92 // Write to the pipe until it is full.
95 pipe.WriteWithTimeout(write_ptr + write_bytes, write_chunk_size,
106 ASSERT_THAT_ERROR(pipe.WriteWithTimeout(write_ptr + write_bytes,
117 pipe.WriteWithTimeout(write_ptr + write_bytes, write_chunk_size,
125 // Drain the pipe.
128 pipe.ReadWithTimeout(read_ptr + read_bytes, write_bytes - read_bytes,
135 // Be sure the pipe is empty.
136 ASSERT_THAT_ERROR(pipe.ReadWithTimeout(read_ptr + read_bytes, 100,
148 // Write to the pipe again and check that it succeeds.
149 ASSERT_THAT_ERROR(pipe.WriteWithTimeout(write_ptr, write_chunk_size,