go/src/os/readfrom_linux_test.go

func TestSpliceFile(t *testing.T) {}

func testSpliceFile(t *testing.T, proto string, size, limit int64) {}

// Issue #59041.
func testSpliceToTTY(t *testing.T, proto string, size int64) {}

var copyFileTests

var copyFileHooks

func testCopyFiles(t *testing.T, size, limit int64) {}

func testCopyFileRange(t *testing.T, size int64, limit int64) {}

func testSendfileOverCopyFileRange(t *testing.T, size int64, limit int64) {}

// newCopyFileRangeTest initializes a new test for copy_file_range.
//
// It hooks package os' call to poll.CopyFileRange and returns the hook,
// so it can be inspected.
func newCopyFileRangeTest(t *testing.T, size int64) (dst, src *File, data []byte, hook *copyFileHook, name string) {}

// newSendfileOverCopyFileRangeTest initializes a new test for sendfile over copy_file_range.
// It hooks package os' call to poll.SendFile and returns the hook,
// so it can be inspected.
func newSendfileOverCopyFileRangeTest(t *testing.T, size int64) (dst, src *File, data []byte, hook *copyFileHook, name string) {}

// newSpliceFileTest initializes a new test for splice.
//
// It creates source sockets and destination file, and populates the source sockets
// with random data of the specified size. It also hooks package os' call
// to poll.Splice and returns the hook so it can be inspected.
func newSpliceFileTest(t *testing.T, proto string, size int64) (*File, net.Conn, []byte, *spliceFileHook, func()) {}

func hookCopyFileRange(t *testing.T) (hook *copyFileHook, name string) {}

func hookSendFileOverCopyFileRange(t *testing.T) (*copyFileHook, string) {}

func hookSendFileTB(tb testing.TB) *copyFileHook {}

func hookSpliceFile(t *testing.T) *spliceFileHook {}

type spliceFileHook

func (h *spliceFileHook) install() {}

func (h *spliceFileHook) uninstall() {}

// On some kernels copy_file_range fails on files in /proc.
func TestProcCopy(t *testing.T) {}

func TestGetPollFDAndNetwork(t *testing.T) {}

func testGetPollFDAndNetwork(t *testing.T, proto string) {}