net: some tests are skipped on Windows due to os.Getuid() always returns -1 #40886
Comments
@gopherbot add OS-Windows |
@zhangyoufu that is unfortunately how things are: os.Getuid is not implemented on Windows, and we have to skip tests that require os.Getuid to work. We all know that. Why did you create this issue? Do you propose to fix os.Getuid? Do you propose something else? Thank you. Alex |
No. I think that uid and sid are totally different. We can't just map SYSTEM/Administrators to uid 0.
I think that the some test cases can be run on Windows, instead of just skip because os.Getuid is not implemented.
I propose that these test cases should not consult os.Getuid on Windows. We can have helper functions in testenv, judging whether we have enough privilege to perform such test cases. |
Sounds good to me. But I don't plan to work on it. I will be happy to review someone else's code. Alex |
/cc @mikioh |
Does this issue reproduce with the latest release?
Yes
What did you do?
go test -v net
What did you expect to see?
Run all tests that are applicable.
What did you see instead?
Related code
go/src/net/platform_test.go
Lines 34 to 48 in d5e1b7c
go/src/net/listen_test.go
Lines 603 to 620 in d3a411b
The text was updated successfully, but these errors were encountered: