go/src/net
Andrei Tudor Călin bd49b3d580 net: refactor readerAtEOF splice test
Refactor TestSplice/readerAtEOF to handle cases where we disable
splice on older kernels better.

If splice is disabled, net.splice and poll.Splice do not get to
observe EOF on the reader, because poll.Splice returns immediately
with EINVAL. The test fails unexpectedly, because the splice operation
is reported as not handled.

This change refactors the test to handle the aforementioned case
correctly, by not calling net.splice directly, but using a higher
level check.

Fixes #27355.

Change-Id: I0d5606b4775213f2dbbb84ef82ddfc3bab662a31
Reviewed-on: https://go-review.googlesource.com/132096
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-08-30 20:24:01 +00:00
..
http net/http: add example for http.HandleFunc 2018-08-30 19:02:30 +00:00
internal/socktest net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
mail net/mail: lazily initialize dateLayouts 2018-08-22 16:08:20 +00:00
rpc net/rpc: clarify requirements for connections and codecs 2018-07-24 09:23:08 +00:00
smtp net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
testdata
textproto all: update comment URLs from HTTP to HTTPS, where possible 2018-06-01 21:52:00 +00:00
url net/url: escape URL.RawQuery on Parse if it contains invalid characters 2018-08-21 14:05:03 +00:00
addrselect.go
addrselect_test.go
cgo_android.go
cgo_bsd.go
cgo_linux.go
cgo_netbsd.go
cgo_openbsd.go
cgo_resnew.go
cgo_resold.go
cgo_socknew.go
cgo_sockold.go
cgo_solaris.go
cgo_stub.go
cgo_unix.go net: parse IPv6 address with zone using DefaultResolver.Lookup{Host,IPAddr} 2018-06-27 21:37:24 +00:00
cgo_unix_test.go net: avoid race on test hooks with DNS goroutines 2017-12-08 05:12:13 +00:00
cgo_windows.go
conf.go net: use internal/bytealg insetad of linkname tricks 2018-08-21 22:09:23 +00:00
conf_netcgo.go
conf_test.go all: update comment URLs from HTTP to HTTPS, where possible 2018-06-01 21:52:00 +00:00
conn_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
dial.go net: add ListenConfig, Dialer.Control to permit socket opts before listen/dial 2018-05-30 22:54:22 +00:00
dial_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
dial_unix_test.go net: map context errors from aborted dial to internal net package errors 2018-03-29 23:39:53 +00:00
dnsclient.go net: combine append calls in reverseaddr 2018-08-20 05:23:29 +00:00
dnsclient_test.go net: use golang.org/x/net/dns/dnsmessage for DNS resolution 2018-03-15 04:18:11 +00:00
dnsclient_unix.go net: fix handling of Conns created by Resolver.Dial 2018-07-24 23:54:08 +00:00
dnsclient_unix_test.go net: fix handling of Conns created by Resolver.Dial 2018-07-24 23:54:08 +00:00
dnsconfig_unix.go net: use internal/bytealg insetad of linkname tricks 2018-08-21 22:09:23 +00:00
dnsconfig_unix_test.go
dnsname_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
error_nacl.go net, syscall: make ECONNRESET/ECONNABORTED only temporary for Accept 2018-05-01 14:50:33 +00:00
error_plan9.go net, syscall: make ECONNRESET/ECONNABORTED only temporary for Accept 2018-05-01 14:50:33 +00:00
error_plan9_test.go
error_posix.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
error_posix_test.go
error_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
error_unix.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
error_unix_test.go
error_windows.go net, syscall: make ECONNRESET/ECONNABORTED only temporary for Accept 2018-05-01 14:50:33 +00:00
error_windows_test.go
example_test.go net: improve ExampleUDPConn_WriteTo docs 2018-06-26 21:30:43 +00:00
external_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
fd_plan9.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
fd_unix.go net: improve ExampleUDPConn_WriteTo docs 2018-06-26 21:30:43 +00:00
fd_windows.go net: improve ExampleUDPConn_WriteTo docs 2018-06-26 21:30:43 +00:00
file.go net: update docs for unimplemented methods and functions 2018-08-03 15:08:42 +00:00
file_plan9.go
file_stub.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
file_test.go os, net: avoid races between dup, set-blocking-mode, and closing 2018-06-22 14:27:22 +00:00
file_unix.go os, net: avoid races between dup, set-blocking-mode, and closing 2018-06-22 14:27:22 +00:00
file_windows.go
hook.go
hook_plan9.go
hook_unix.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
hook_windows.go net: use WSASocket instead of socket call 2017-11-07 22:04:15 +00:00
hosts.go net: use internal/bytealg insetad of linkname tricks 2018-08-21 22:09:23 +00:00
hosts_test.go all: change github.com issue links to golang.org 2017-11-04 04:13:41 +00:00
interface.go net: update docs for unimplemented methods and functions 2018-08-03 15:08:42 +00:00
interface_bsd.go
interface_bsd_test.go
interface_bsdvar.go
interface_darwin.go
interface_freebsd.go
interface_linux.go
interface_linux_test.go
interface_plan9.go
interface_solaris.go
interface_stub.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
interface_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
interface_unix_test.go net: skip test in full test mode when running in a container 2018-05-24 19:45:22 +00:00
interface_windows.go doc: update the minimum support Windows version 2018-07-11 22:05:38 +00:00
ip.go net: use internal/bytealg insetad of linkname tricks 2018-08-21 22:09:23 +00:00
ip_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
iprawsock.go net: update docs for unimplemented methods and functions 2018-08-03 15:08:42 +00:00
iprawsock_plan9.go net: move dial and listen functions under sysDialer, sysListener 2018-05-29 23:57:04 +00:00
iprawsock_posix.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
iprawsock_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
ipsock.go net: use internal/bytealg insetad of linkname tricks 2018-08-21 22:09:23 +00:00
ipsock_plan9.go net: use internal/bytealg insetad of linkname tricks 2018-08-21 22:09:23 +00:00
ipsock_posix.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
ipsock_test.go
listen_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
lookup.go net: parse IPv6 address with zone using DefaultResolver.Lookup{Host,IPAddr} 2018-06-27 21:37:24 +00:00
lookup_fake.go net: limit concurrent threads to limit on file descriptors 2018-06-27 16:59:22 +00:00
lookup_plan9.go net: use internal/bytealg insetad of linkname tricks 2018-08-21 22:09:23 +00:00
lookup_test.go net: parse IPv6 address with zone using DefaultResolver.Lookup{Host,IPAddr} 2018-06-27 21:37:24 +00:00
lookup_unix.go net: use internal/bytealg insetad of linkname tricks 2018-08-21 22:09:23 +00:00
lookup_windows.go net: limit concurrent threads to limit on file descriptors 2018-06-27 16:59:22 +00:00
lookup_windows_test.go
mac.go
mac_test.go
main_cloexec_test.go net, internal/poll, net/internal/socktest: use SOCK_{CLOEXEC,NONBLOCK} accept4/socket flags on OpenBSD 2018-02-26 16:59:38 +00:00
main_conf_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
main_noconf_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
main_plan9_test.go
main_posix_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
main_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
main_unix_test.go
main_windows_test.go net: use WSASocket instead of socket call 2017-11-07 22:04:15 +00:00
mockserver_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
net.go net: lazily look up the listenerBacklog value on first use 2018-08-21 04:39:22 +00:00
net_fake.go net: improve ExampleUDPConn_WriteTo docs 2018-06-26 21:30:43 +00:00
net_test.go net: skip flaky TestNotTemporaryRead on FreeBSD 2018-08-03 17:21:10 +00:00
net_windows_test.go all: drop support for Windows Vista or below (Windows XP) 2018-02-15 17:24:42 +00:00
netgo_unix_test.go net: avoid race on test hooks with DNS goroutines 2017-12-08 05:12:13 +00:00
nss.go net: use internal/bytealg insetad of linkname tricks 2018-08-21 22:09:23 +00:00
nss_test.go
packetconn_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
parse.go net: use internal/bytealg insetad of linkname tricks 2018-08-21 22:09:23 +00:00
parse_test.go
pipe.go net: return io.ErrClosedPipe when possible from net.Pipe 2017-12-05 18:44:28 +00:00
pipe_test.go net: return io.ErrClosedPipe when possible from net.Pipe 2017-12-05 18:44:28 +00:00
platform_test.go net: skip unixpacket tests on netbsd/386 2017-11-29 19:24:24 +00:00
port.go net: fix typo in parsePort documentation 2017-11-21 17:31:56 +00:00
port_test.go
port_unix.go net: use internal/bytealg insetad of linkname tricks 2018-08-21 22:09:23 +00:00
protoconn_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
rawconn.go net: update docs for unimplemented methods and functions 2018-08-03 15:08:42 +00:00
rawconn_stub_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
rawconn_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
rawconn_unix_test.go net: add ListenConfig, Dialer.Control to permit socket opts before listen/dial 2018-05-30 22:54:22 +00:00
rawconn_windows_test.go net: add ListenConfig, Dialer.Control to permit socket opts before listen/dial 2018-05-30 22:54:22 +00:00
sendfile_linux.go
sendfile_stub.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
sendfile_test.go internal/poll, net: fix sendfile on Windows, add test 2018-08-22 21:12:00 +00:00
sendfile_unix_alt.go net: update file read position after sendfile syscall 2018-06-12 13:41:58 +00:00
sendfile_windows.go
server_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
sock_bsd.go net: fix the kernel state name for TCP listen queue on FreeBSD 2018-02-02 00:04:20 +00:00
sock_cloexec.go net, internal/poll, net/internal/socktest: use SOCK_{CLOEXEC,NONBLOCK} accept4/socket flags on OpenBSD 2018-02-26 16:59:38 +00:00
sock_linux.go
sock_plan9.go
sock_posix.go net: lazily look up the listenerBacklog value on first use 2018-08-21 04:39:22 +00:00
sock_stub.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
sock_windows.go net: use WSASocket instead of socket call 2017-11-07 22:04:15 +00:00
sockaddr_posix.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
sockopt_bsd.go
sockopt_linux.go
sockopt_plan9.go
sockopt_posix.go net: use internal/bytealg insetad of linkname tricks 2018-08-21 22:09:23 +00:00
sockopt_solaris.go
sockopt_stub.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
sockopt_windows.go
sockoptip_bsdvar.go
sockoptip_linux.go
sockoptip_posix.go
sockoptip_stub.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
sockoptip_windows.go
splice_linux.go net: add support for splice(2) in (*TCPConn).ReadFrom on Linux 2018-04-24 14:14:56 +00:00
splice_stub.go net: add support for splice(2) in (*TCPConn).ReadFrom on Linux 2018-04-24 14:14:56 +00:00
splice_test.go net: refactor readerAtEOF splice test 2018-08-30 20:24:01 +00:00
sys_cloexec.go net, internal/poll, net/internal/socktest: use SOCK_{CLOEXEC,NONBLOCK} accept4/socket flags on OpenBSD 2018-02-26 16:59:38 +00:00
tcpsock.go net: update docs for unimplemented methods and functions 2018-08-03 15:08:42 +00:00
tcpsock_plan9.go net: move dial and listen functions under sysDialer, sysListener 2018-05-29 23:57:04 +00:00
tcpsock_posix.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
tcpsock_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
tcpsock_unix_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
tcpsockopt_darwin.go net: drop special case for macOS 10.7 and earlier 2018-06-04 18:40:49 +00:00
tcpsockopt_dragonfly.go
tcpsockopt_openbsd.go
tcpsockopt_plan9.go
tcpsockopt_posix.go
tcpsockopt_solaris.go
tcpsockopt_stub.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
tcpsockopt_unix.go
tcpsockopt_windows.go
timeout_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
udpsock.go net: update docs for unimplemented methods and functions 2018-08-03 15:08:42 +00:00
udpsock_plan9.go net: move dial and listen functions under sysDialer, sysListener 2018-05-29 23:57:04 +00:00
udpsock_plan9_test.go
udpsock_posix.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
udpsock_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
unixsock.go net: update docs for unimplemented methods and functions 2018-08-03 15:08:42 +00:00
unixsock_linux_test.go net: move some Linux-specific tests to unixsock_linux_test.go file 2017-09-28 03:00:34 +00:00
unixsock_plan9.go net: move dial and listen functions under sysDialer, sysListener 2018-05-29 23:57:04 +00:00
unixsock_posix.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
unixsock_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
unixsock_windows_test.go syscall: implement Unix Socket for Windows 2018-08-28 09:26:45 +00:00
write_unix_test.go runtime: for kqueue treat EVFILT_READ with EV_EOF as permitting a write 2017-10-20 22:26:30 +00:00
writev_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
writev_unix.go