diff options
author | Tamir Duberstein <tamird@google.com> | 2021-01-15 15:47:13 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-01-15 15:49:15 -0800 |
commit | 12d9790833cc2f6a9b197066a5ecbeb434f74164 (patch) | |
tree | e9eec8e4c755c33c5a30c1912422b28380ed1f53 /pkg/tcpip/network/ipv4 | |
parent | f37ace6661dfed8acae7e22ed0eb9ad78bdeab34 (diff) |
Remove count argument from tcpip.Endpoint.Read
The same intent can be specified via the io.Writer.
PiperOrigin-RevId: 352098747
Diffstat (limited to 'pkg/tcpip/network/ipv4')
-rw-r--r-- | pkg/tcpip/network/ipv4/ipv4_test.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/tcpip/network/ipv4/ipv4_test.go b/pkg/tcpip/network/ipv4/ipv4_test.go index 1c4919b1e..a9e137c24 100644 --- a/pkg/tcpip/network/ipv4/ipv4_test.go +++ b/pkg/tcpip/network/ipv4/ipv4_test.go @@ -2410,10 +2410,9 @@ func TestReceiveFragments(t *testing.T) { t.Errorf("got UDP Rx Packets = %d, want = %d", got, want) } - const rcvSize = 65536 // Account for reassembled packets. for i, expectedPayload := range test.expectedPayloads { var buf bytes.Buffer - result, err := ep.Read(&buf, rcvSize, tcpip.ReadOptions{}) + result, err := ep.Read(&buf, tcpip.ReadOptions{}) if err != nil { t.Fatalf("(i=%d) Read: %s", i, err) } @@ -2428,7 +2427,7 @@ func TestReceiveFragments(t *testing.T) { } } - if res, err := ep.Read(ioutil.Discard, rcvSize, tcpip.ReadOptions{}); err != tcpip.ErrWouldBlock { + if res, err := ep.Read(ioutil.Discard, tcpip.ReadOptions{}); err != tcpip.ErrWouldBlock { t.Fatalf("(last) got Read = (%v, %v), want = (_, %s)", res, err, tcpip.ErrWouldBlock) } }) |