-
Notifications
You must be signed in to change notification settings - Fork 18k
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
testing/fstest: TestFS fails on valid FS if it contains any symlinks #44113
Comments
A symlink is not a file in the sense of the FS interface, so a decision must be made about what a symlink's behavior should be. One can suggest that the symlink should evaluated, and that the resulting object be referenced, but one can also argue that a symlink is an error because it does not honor the simple FS semantics. The second case is what we see here. I am not sure what the right answer is, but whatever it is, it should be documented. There is no documentation today and that should be addressed once the decision is made. |
Understood. For context, I got this while looking into replacing The main usage of Maybe that's not a use case |
I don't think it makes sense for For now, I think |
I agree about skipping the Stat consistency check if ModeSymlink is set in the directory listing. |
Change https://golang.org/cl/290009 mentions this issue: |
What version of Go are you using (
go version
)?Also tried with go 1.16 rc1
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Example reproducible:
Seems like it compares the stat of the file vs the stat of the link to the file... which fails (as it should).
Maybe I shouldn't use it against anything but
MapFS
? I'm not sure.What did you expect to see?
Test should pass.
What did you see instead?
The text was updated successfully, but these errors were encountered: