Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(475)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Issue 5617051: code review 5617051: net: replace implementatin of file/test parseProcNetIGMP

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 11 months ago by borman
Modified:
13 years, 11 months ago
Reviewers:
rsc1, mikio
CC:
golang-dev
Visibility:
Public.
net: replace implementatin of file/test parseProcNetIGMP Changed the internal file type to implement a new interface called readStringer that bytes.Buffer also implements. Fixed issue with parseProcNetIGMP incorrectly parsing /proc/net/igmp and panicing. Added test case to test the condition. The old version is still there to demonstrate the problem. The simplest fix, but providing no testing, is to just adopt the parsing logic in interface_linux.c. Alternatively this CL can go in with the _oldParseProcNetIGMP function removed and the igmp_test.go file named in such a way it will only run on linux (to late to research that tonight). Note that for me the net test still fails. The panic was masking a different failure (the igmp_tet.go failure is expected): --- FAIL: TestOldParseProcNetIGMP (0.00 seconds) igmp_test.go:35: paniced --- FAIL: TestListenMulticastUDP (0.00 seconds) multicast_test.go:126: IPv4 multicast interface: <nil> multicast_test.go:136: IPv4 multicast TTL: 1 multicast_test.go:146: IPv4 multicast loopback: false multicast_test.go:82: "224.0.0.254:12345" not found in RIB fixes issue 2826

Patch Set 1 #

Patch Set 2 : diff -r f79343c8a479 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r f79343c8a479 https://go.googlecode.com/hg/ #

Total comments: 4
Created: 13 years, 11 months ago
Download [raw] [tar.bz2]
Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -66 lines) Patch
M src/pkg/net/dnsconfig.go View 1 3 chunks +2 lines, -2 lines 1 comment Download
M src/pkg/net/hosts.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
A src/pkg/net/igmp_test.go View 1 2 1 chunk +29 lines, -0 lines 0 comments Download
M src/pkg/net/interface_linux.go View 1 2 2 chunks +14 lines, -11 lines 0 comments Download
M src/pkg/net/interface_test.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/net/lookup_unix.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/net/parse.go View 1 2 chunks +34 lines, -43 lines 3 comments Download
M src/pkg/net/parse_test.go View 1 2 chunks +2 lines, -1 line 0 comments Download
M src/pkg/net/port.go View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/net/sock_linux.go View 1 1 chunk +2 lines, -2 lines 0 comments Download
Total messages: 6
|
borman
13 years, 11 months ago (2012年02月06日 21:48:26 UTC) #1
Sign in to reply to this message.
borman
Hello mikioh.mikioh@gmail.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 11 months ago (2012年02月10日 01:29:53 UTC) #2
Hello mikioh.mikioh@gmail.com (cc: golang-dev@googlegroups.com),
I'd like you to review this change to
https://go.googlecode.com/hg/ 
Sign in to reply to this message.
borman
On 2012年02月10日 01:29:53, borman wrote: > Hello mailto:mikioh.mikioh@gmail.com (cc: mailto:golang-dev@googlegroups.com), > > I'd like you ...
13 years, 11 months ago (2012年02月10日 01:30:58 UTC) #3
On 2012年02月10日 01:29:53, borman wrote:
> Hello mailto:mikioh.mikioh@gmail.com (cc: mailto:golang-dev@googlegroups.com),
> 
> I'd like you to review this change to
> https://go.googlecode.com/hg/
I remove the demonstration of the panic.
igmp_test is linux specific. I am not sure how to make platform specific tests.
Sign in to reply to this message.
rsc1
Thanks for working on this. Can we get the delta down a bit smaller? http://codereview.appspot.com/5617051/diff/4011/src/pkg/net/dnsconfig.go ...
13 years, 11 months ago (2012年02月10日 03:13:17 UTC) #4
Thanks for working on this. Can we get the delta down a bit smaller?
http://codereview.appspot.com/5617051/diff/4011/src/pkg/net/dnsconfig.go
File src/pkg/net/dnsconfig.go (right):
http://codereview.appspot.com/5617051/diff/4011/src/pkg/net/dnsconfig.go#newc...
src/pkg/net/dnsconfig.go:29: defer file.Close()
I'm sorry, I appreciate the effort to clean things up, but this kind of
minor churn needs not to happen this close to Go 1. This new code
looks fine but the old code was fine too and more importantly had
been running for months without problems. Please revert all 
changes that are not directly addressing the bug you are trying to fix.
http://codereview.appspot.com/5617051/diff/4011/src/pkg/net/parse.go
File src/pkg/net/parse.go (right):
http://codereview.appspot.com/5617051/diff/4011/src/pkg/net/parse.go#newcode1
src/pkg/net/parse.go:1: // Copyright 2012 The Go Authors. All rights reserved.
The convention is to leave copyright years alone. Thanks.
http://codereview.appspot.com/5617051/diff/4011/src/pkg/net/parse.go#newcode11
src/pkg/net/parse.go:11: "bytes"
Package net is supposed to have as few dependencies as possible.
In particular, it should not depend on bytes. If you need a helper,
please add one. It looks like you only use IndexByte, which is trivial
to write, or maybe you can use splitAtBytes, defined below.
http://codereview.appspot.com/5617051/diff/4011/src/pkg/net/parse.go#newcode23
src/pkg/net/parse.go:23: type readStringer interface {
Please don't refactor this code. This is fundamental piece of code and
we are very close to Go 1. If the change cannot be made in a precise
manner that touches few lines of code, we'll postpone it until after Go 1.
If this is for testing, it should be easy for the test to write a temporary
file that can be read back in.
Sign in to reply to this message.
mikio
On Fri, Feb 10, 2012 at 12:13 PM, <rsc@google.com> wrote: > http://codereview.appspot.com/5617051/diff/4011/src/pkg/net/parse.go#newcode11 > src/pkg/net/parse.go:11: "bytes" ...
13 years, 11 months ago (2012年02月10日 04:02:54 UTC) #5
On Fri, Feb 10, 2012 at 12:13 PM, <rsc@google.com> wrote:
> http://codereview.appspot.com/5617051/diff/4011/src/pkg/net/parse.go#newcode11
> src/pkg/net/parse.go:11: "bytes"
> Package net is supposed to have as few dependencies as possible.
> In particular, it should not depend on bytes. If you need a helper,
> please add one. It looks like you only use IndexByte, which is trivial
> to write, or maybe you can use splitAtBytes, defined below.
Ah... well... I've already embedded bytes dependency in
interface.go and sockopt.go. Is it worth to remove all of
these dependencies before Go 1 release?
Sign in to reply to this message.
rsc1
On Thu, Feb 9, 2012 at 23:02, Mikio Hara <mikioh.mikioh@gmail.com> wrote: > Ah... well... I've ...
13 years, 11 months ago (2012年02月10日 04:23:36 UTC) #6
On Thu, Feb 9, 2012 at 23:02, Mikio Hara <mikioh.mikioh@gmail.com> wrote:
> Ah... well... I've already embedded bytes dependency in
> interface.go and sockopt.go. Is it worth to remove all of
> these dependencies before Go 1 release?
Perhaps not but let's not strengthen the links.
Russ
Sign in to reply to this message.
|
Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b

AltStyle によって変換されたページ (->オリジナル) /