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: TestDevNullFile failing on Plan 9 #24534

Closed
0intro opened this issue Mar 26, 2018 · 7 comments
Closed

os: TestDevNullFile failing on Plan 9 #24534

0intro opened this issue Mar 26, 2018 · 7 comments

Comments

@0intro
Copy link
Member

0intro commented Mar 26, 2018

CL 102457 added TestDevNullFile. This test is failing on Plan 9.

--- FAIL: TestDevNullFile (0.00s)
	os_test.go:1813: f.Stat("/dev/null"): wrong file mode "Drw-rw-rw-": ModeCharDevice is not set
	os_test.go:1813: Stat("/dev/null"): wrong file mode "Drw-rw-rw-": ModeCharDevice is not set
	os_test.go:1813: Lstat("/dev/null"): wrong file mode "Drw-rw-rw-": ModeCharDevice is not set
FAIL
FAIL	os	1.586s

See https://build.golang.org/log/add543f3681f4c7f89e62c0d40c8eebfafd71b72

@0intro 0intro added this to the Go1.11 milestone Mar 26, 2018
@0intro 0intro self-assigned this Mar 26, 2018
@alexbrainman
Copy link
Member

Sorry for breaking the build. I looked at plan9-386 log

https://build.golang.org/log/ce0f0c918a1dc458c6f5913e1259f80f53f0f34d

and I did not see TestDevNullFile failure, so I assumed plan9 is OK. I will send a CL to adjust TestDevNullFile.

Alex

@0intro
Copy link
Member Author

0intro commented Mar 26, 2018

Don't worry, I'll send a CL.

@alexbrainman
Copy link
Member

I also need to fix Solaris.

Alex

@0intro
Copy link
Member Author

0intro commented Mar 26, 2018

For Plan 9 specifically, I think we can change Stat to set ModeCharDevice on files served by the console device, like we did for ModeDevice. I'll propose a CL that does that.

I'll let you change the TestDevNullFile test for Solaris.

@gopherbot
Copy link

Change https://golang.org/cl/102424 mentions this issue: os: fix TestDevNullFile on Plan 9

@0intro
Copy link
Member Author

0intro commented Mar 26, 2018

I propose CL 102424, but if that's not a good solution we'll just skip the ModeCharDevice test for Plan 9 in TestDevNullFile.

@alexbrainman
Copy link
Member

but if that's not a good solution we'll just skip the ModeCharDevice test for Plan 9 in TestDevNullFile.

Sounds like a plan.

I would just remove ModeCharDevice test in TestDevNullFile altogether. I have added ModeCharDevice test in CL 102456, because windows code had ModeCharDevice set for DevNull. I don't even know if that is intended. But if you think ModeCharDevice makes sense for DevNull, I am happy for you to change plan9 code.

Alex

@golang golang locked and limited conversation to collaborators Mar 27, 2019
@rsc rsc unassigned 0intro Jun 23, 2022
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

3 participants