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

os: TestRemoveDevNull fails on openbsd and netbsd builders #28549

Closed
alexbrainman opened this issue Nov 2, 2018 · 3 comments
Closed

os: TestRemoveDevNull fails on openbsd and netbsd builders #28549

alexbrainman opened this issue Nov 2, 2018 · 3 comments

Comments

@alexbrainman
Copy link
Member

@alexbrainman alexbrainman commented Nov 2, 2018

I submitted https://go-review.googlesource.com/c/go/+/145220 and it broke all openbsd and netbsd builders. From https://build.golang.org/log/0f1815b49113f97b32f8858e590fd50701fc6eb1

--- FAIL: TestRemoveDevNull (0.00s)
    build_test.go:29: Lstat(/dev/null).Mode().IsRegular() = true; expected false
    build_test.go:34: mayberemovefile(/dev/null) did remove it; oops
FAIL
FAIL	cmd/go/internal/work	0.061s

But CL 145220 did not changed TestRemoveDevNull or code that it calls. I do not even know how to debug this. Perhaps my new test_devnull.txt somehow interfers with TestRemoveDevNull.

I am looking for help. If nothing else I will skip the test or revert CL 145220 tomorrow.

Thank you.

Alex

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Nov 2, 2018

It's a bug in go test -o /dev/null -c when run as root.

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 2, 2018

Change https://golang.org/cl/146901 mentions this issue: cmd/go: don't let "go test -c -o /dev/null" overwrite /dev/null

@alexbrainman

This comment has been minimized.

Copy link
Member Author

@alexbrainman alexbrainman commented Nov 2, 2018

It's a bug in go test -o /dev/null -c

Thank you for fixing that.

In my sleep, I remembered we had some code to handle os.DevNull in go build, but not in go test. Now we have 2 copies of that code.

Alex

@golang golang locked and limited conversation to collaborators Nov 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.