Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(90)

Issue 21360043: code review 21360043: go.net/ipv4: fix flaky test cases (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 5 months ago by mikio
Modified:
9 years, 11 months ago
Reviewers:
dfc
CC:
dfc, golang-codereviews
Visibility:
Public.

Description

go.net/ipv4: fix flaky test cases Fixes issue 5709. Fixes issue 5811.

Patch Set 1 : diff -r 8788a70cbed8 https://code.google.com/p/go.net #

Patch Set 2 : diff -r 127da548775d https://code.google.com/p/go.net #

Total comments: 36

Patch Set 3 : diff -r 5d2d1fb8de5a https://code.google.com/p/go.net #

Patch Set 4 : diff -r b6d56582945d https://code.google.com/p/go.net #

Unified diffs Side-by-side diffs Delta from patch set Stats (+430 lines, -327 lines) Patch
M ipv4/mocktransponder_test.go View 1 2 chunks +11 lines, -64 lines 0 comments Download
M ipv4/multicast_test.go View 1 2 3 6 chunks +122 lines, -36 lines 0 comments Download
M ipv4/multicastsockopt_test.go View 1 2 3 3 chunks +78 lines, -93 lines 0 comments Download
M ipv4/unicast_test.go View 1 2 3 8 chunks +113 lines, -18 lines 0 comments Download
M ipv4/unicastsockopt_test.go View 1 2 3 1 chunk +106 lines, -116 lines 0 comments Download

Messages

Total messages: 16
mikio
Hello dave@cheney.net (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go.net
10 years, 5 months ago (2013-11-17 06:26:10 UTC) #1
mikio
ping
10 years, 5 months ago (2013-11-20 03:15:09 UTC) #2
mikio
ping
10 years, 4 months ago (2013-12-08 11:40:17 UTC) #3
gobot
Replacing golang-dev with golang-codereviews.
10 years, 4 months ago (2013-12-20 16:26:05 UTC) #4
dfc
Sorry it took so long to review this, re issue 5709: i am seeing this ...
10 years, 4 months ago (2013-12-20 22:43:02 UTC) #5
mikio
On Sat, Dec 21, 2013 at 7:43 AM, <dave@cheney.net> wrote: > re issue 5709: i ...
10 years, 4 months ago (2013-12-20 23:30:00 UTC) #6
dfc
On Sat, Dec 21, 2013 at 10:30 AM, Mikio Hara <mikioh.mikioh@gmail.com> wrote: > On Sat, ...
10 years, 4 months ago (2013-12-20 23:31:24 UTC) #7
mikio
ptal
10 years, 3 months ago (2013-12-24 07:08:21 UTC) #8
mikio
ping
10 years, 3 months ago (2013-12-31 08:21:34 UTC) #9
dfc
On 2013/12/31 08:21:34, mikio wrote: > ping Reviewing now. I'm sorry that it has taken ...
10 years, 3 months ago (2013-12-31 10:23:32 UTC) #10
dfc
LGTM. Thank you for your patience. There are a whole bunch of little nits which ...
10 years, 3 months ago (2013-12-31 10:48:05 UTC) #11
mikio
On Tue, Dec 31, 2013 at 7:48 PM, <dave@cheney.net> wrote: https://codereview.appspot.com/21360043/diff/140001/ipv4/multicastsockopt_test.go#newcode20 > ipv4/multicastsockopt_test.go:20: {"ip4", ":icmp", ...
10 years, 3 months ago (2013-12-31 13:26:07 UTC) #12
dfc
Oh, maybe it was on the ipv6 review. Basically if you are not root then ...
10 years, 3 months ago (2013-12-31 13:34:08 UTC) #13
mikio
On Tue, Dec 31, 2013 at 10:34 PM, Dave Cheney <dave@cheney.net> wrote: > Oh, maybe ...
10 years, 3 months ago (2013-12-31 13:45:34 UTC) #14
dfc
Maybe try, t.Errorf ; continue and see how that looks. > On 1 Jan 2014, ...
10 years, 3 months ago (2013-12-31 13:48:39 UTC) #15
mikio
9 years, 11 months ago (2014-04-27 10:27:08 UTC) #16
*** Submitted as
https://code.google.com/p/go/source/detail?r=c74c376caac2&repo=net ***

go.net/ipv4: fix flaky test cases

Fixes issue 5709.
Fixes issue 5811.

LGTM=dave
R=dave
CC=golang-codereviews
https://codereview.appspot.com/21360043

https://codereview.appspot.com/21360043/diff/140001/ipv4/multicastsockopt_tes...
File ipv4/multicastsockopt_test.go (right):

https://codereview.appspot.com/21360043/diff/140001/ipv4/multicastsockopt_tes...
ipv4/multicastsockopt_test.go:20: {"ip4", ":icmp", "0.0.0.0", &net.IPAddr{IP:
net.IPv4(224, 0, 0, 250)}},  // see RFC 4727
will address in the following cls, once cls for dragonfly landed

https://codereview.appspot.com/21360043/diff/140001/ipv4/multicastsockopt_tes...
ipv4/multicastsockopt_test.go:28: ifi := loopbackInterface()
ditto

https://codereview.appspot.com/21360043/diff/140001/ipv4/multicastsockopt_tes...
ipv4/multicastsockopt_test.go:55: ifi := loopbackInterface()
ditto

https://codereview.appspot.com/21360043/diff/140001/ipv4/multicastsockopt_tes...
ipv4/multicastsockopt_test.go:84: ttl := 255
On 2013/12/31 10:48:05, dfc wrote:
> const ttl = 255

Done.

https://codereview.appspot.com/21360043/diff/140001/ipv4/unicast_test.go
File ipv4/unicast_test.go (right):

https://codereview.appspot.com/21360043/diff/140001/ipv4/unicast_test.go#newc...
ipv4/unicast_test.go:92: ifi := loopbackInterface()
thanks but no thanks, ifi will be used in later cls; for specifying output
interface

https://codereview.appspot.com/21360043/diff/140001/ipv4/unicast_test.go#newc...
ipv4/unicast_test.go:116: if err :=
p.SetWriteDeadline(time.Now().Add(time.Millisecond * 100)); err != nil {
On 2013/12/31 10:48:05, dfc wrote:
> nit: could you please write this as 100 * time.Millisecond.

Done.

https://codereview.appspot.com/21360043/diff/140001/ipv4/unicast_test.go#newc...
ipv4/unicast_test.go:120: t.Fatalf("ipv4.PacketConn.WriteTo failed: %v", err)
in another cl

https://codereview.appspot.com/21360043/diff/140001/ipv4/unicast_test.go#newc...
ipv4/unicast_test.go:123: if err :=
p.SetReadDeadline(time.Now().Add(time.Millisecond * 100)); err != nil {
ditto

https://codereview.appspot.com/21360043/diff/140001/ipv4/unicast_test.go#newc...
ipv4/unicast_test.go:182: b := make([]byte, 128)
On 2013/12/31 10:48:05, dfc wrote:
> rb := make(...) // this is what the ipv6 tests are moving too.

Done.

https://codereview.appspot.com/21360043/diff/140001/ipv4/unicast_test.go#newc...
ipv4/unicast_test.go:200: t.Fatalf("got type=%v, code=%v; expected type=%v,
code=%v", m.Type, m.Code, ipv4.ICMPTypeEchoReply, 0)
applying s/expected/want/ to all messages would be in another cl

https://codereview.appspot.com/21360043/diff/140001/ipv4/unicast_test.go#newc...
ipv4/unicast_test.go:214: ifi := loopbackInterface()
ditto

https://codereview.appspot.com/21360043/diff/140001/ipv4/unicastsockopt_test.go
File ipv4/unicastsockopt_test.go (right):

https://codereview.appspot.com/21360043/diff/140001/ipv4/unicastsockopt_test....
ipv4/unicastsockopt_test.go:20: ifi := loopbackInterface()
ditto

https://codereview.appspot.com/21360043/diff/140001/ipv4/unicastsockopt_test....
ipv4/unicastsockopt_test.go:49: {"ip4", ":icmp", "127.0.0.1"},
ditto

https://codereview.appspot.com/21360043/diff/140001/ipv4/unicastsockopt_test....
ipv4/unicastsockopt_test.go:57: ifi := loopbackInterface()
ditto

https://codereview.appspot.com/21360043/diff/140001/ipv4/unicastsockopt_test....
ipv4/unicastsockopt_test.go:84: ifi := loopbackInterface()
ditto

https://codereview.appspot.com/21360043/diff/140001/ipv4/unicastsockopt_test....
ipv4/unicastsockopt_test.go:115: t.Logf("skipping IP_TOS test on %q",
runtime.GOOS)
On 2013/12/31 10:48:05, dfc wrote:
> t.Skipf 

Done.

https://codereview.appspot.com/21360043/diff/140001/ipv4/unicastsockopt_test....
ipv4/unicastsockopt_test.go:117: if err := c.SetTOS(tos); err != nil {
On 2013/12/31 10:48:05, dfc wrote:
> does this need to be a default block ? can't it just be in the outer scope ?

Done.

https://codereview.appspot.com/21360043/diff/140001/ipv4/unicastsockopt_test....
ipv4/unicastsockopt_test.go:127: ttl := 255
On 2013/12/31 10:48:05, dfc wrote:
> const ttl = 255

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b