Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/sys/unix: TestSCMCredentials failing on Linux with Go 1.8 and Go 1.9 #22899

Closed
bradfitz opened this issue Nov 28, 2017 · 3 comments
Closed
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@bradfitz
Copy link
Contributor

Go supports the past two releases. https://build.golang.org/ shows that x/sys is broken on Linux for Go 1.8 and Go 1.9 due to:

?   	golang.org/x/sys/plan9	[no test files]
--- FAIL: TestSCMCredentials (0.00s)
	creds_test.go:112: ReadMsgUnix n = 1, want 0
FAIL
FAIL	golang.org/x/sys/unix	0.223s
?   	golang.org/x/sys/windows	[no test files]
?   	golang.org/x/sys/windows/registry	[no test files]

tests failed: exit status 1

@lucab, can you fix? Looks like it was from https://go-review.googlesource.com/c/sys/+/60190 perhaps?

@bradfitz bradfitz added help wanted NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure. labels Nov 28, 2017
@bradfitz bradfitz added this to the Unreleased milestone Nov 28, 2017
@lucab
Copy link
Contributor

lucab commented Nov 28, 2017

Oh yes, I caused the test regression with that commit, sorry.

However I think the test in there is inherently broken and I'm not sure how to proceed. The reason is that TestSCMCredentials is actually testing behavior which belongs to net.UnixConn.WriteMsgUnix(). As such, test result depends on whatever the stdlib is doing, and in particular whether https://go.googlesource.com/go/+/93da0b6e66f24c4c307e0df37ceb102a33306174 is present.

I'd like to get your input on how you would like this test to be amended. I can suggest two options:

  • drop this test completely, as it is an exact copy of the one in unix.
  • relax the length checking, as that behavior belongs to unix. This is probably better as it would keep coverage fo x/sys/unix.Parse*(), but I'm unsure how useful it is.

@gopherbot
Copy link

Change https://golang.org/cl/80275 mentions this issue: unix: skip TestSCMCredentials SOCK_DGRAM test before 1.10

@ianlancetaylor
Copy link
Contributor

I think we should just skip the test on earlier revisions. Sent https://golang.org/cl/80275.

@golang golang locked and limited conversation to collaborators Nov 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

4 participants