Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
net: some tests are skipped on Windows due to os.Getuid() always returns -1 #40886
Does this issue reproduce with the latest release?
What did you do?
What did you expect to see?
Run all tests that are applicable.
What did you see instead?
@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?
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.