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

net/http: skip TestDirJoin on Windows, even if /etc/hosts exists #5460

Closed
shivakumargn opened this issue May 14, 2013 · 6 comments
Closed

net/http: skip TestDirJoin on Windows, even if /etc/hosts exists #5460

shivakumargn opened this issue May 14, 2013 · 6 comments
Milestone

Comments

@shivakumargn
Copy link
Contributor

Multiple test failures occur while building Go sources on Win7/64bit.

go test output for net/http package is attached.

Attachments:

  1. out.txt (9830 bytes)
@alexbrainman
Copy link
Member

Comment 1:

TestDirJoin is meant to be skipped on windows:
C:\>go test -v -run=DirJoin net/http
=== RUN TestDirJoin
--- SKIP: TestDirJoin (0.00 seconds)
        fs_test.go:264: skipping test; no /etc/hosts file
PASS
ok      net/http        0.734s
C:\>
How did you manage to run this test?
Alex

Status changed to WaitingForReply.

@shivakumargn
Copy link
Contributor Author

Comment 2:

I have D:\etc\hosts present in my filesystem.
The test skip rule depends on os.Stat("/etc/hosts") returning an error.
On windows os.Stat return is based on GetFileAttributesEx() which seems to use drive of
working directory as the "/"
os.Stat() may need to be fixed for windows so that path starting with "/" is not
considered valid.
Will prepare a patch.

@alexbrainman
Copy link
Member

Comment 3:

Ahhaaa!!! Good detective work. Please, send a fix.
As to your other failures, I didn't get chance to look at then yet. But here is
https://golang.org/issue/5263 something similar. Perhaps it is just
a matter of you debugging to see why it breaks.
Alex

@rsc
Copy link
Contributor

rsc commented Jul 30, 2013

Comment 4:

Labels changed: added priority-later, go1.2, removed priority-triage.

Status changed to Accepted.

@shivakumargn
Copy link
Contributor Author

Comment 5:

CL submitted https://golang.org/cl/12123043

@bradfitz
Copy link
Contributor

Comment 6:

This issue was closed by revision 3abaf5c.

Status changed to Fixed.

@rsc rsc added this to the Go1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.2 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants