-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
cmd/go/internal/fsys: TestWalk fails on Plan 9 #42115
Comments
This appears to be due to a difference in the behavior of On other platforms, Is that difference intentional? |
What does the program in https://play.golang.org/p/OHAkKG-4Tp- output when run on Plan 9? (I can't run it myself due to #42117.) |
It reflects the underlying semantics of Plan 9 file system. Plan 9 doesn't have separate directories and inodes, or links - the filesystem is a tree, not an arbitrary graph. The directory entry contains the name of the file element as well as the usual 'inode' information, and that's what stat returns in the name field. No resolving needed. |
I copied it into /tmp, and did 'go run' from there. It outputs "tmp". |
go doc os.FileInfo says that the Name field is "base name of the file". On Plan 9 that's unambiguous because files have only one name. (You can dynamically bind other names to it, but that's something else.) On other systems with hard links, it can only give "a base name" because "the base name" doesn't seem to have a meaning. |
Hmm. On other systems, there is one obvious base name to choose for Given your argument above, I suppose that the |
Hrm. The
I guess this is just a plain old platform variation. 😞 |
Change https://golang.org/cl/264177 mentions this issue: |
CL 262617 has a test which fails on Plan 9.
The text was updated successfully, but these errors were encountered: