-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: TestLongPath failing on Plan 9 #17855
Comments
The problem is that after the call to
If we replace the call of The problem seems to only happen on the Fossil file server and not on ramfs or cwfs. |
That seems like a Plan9 bug, no? If truncate doesn't work, the test is correctly failing... |
Yes, it seems to be an issue related to the Fossil file server. I'll investigate. |
This issue is caused by the devmnt cache in the Plan 9 kernel. The file content is cached when writing the file. When reading the file, the content is firstly read from the cache (12 bytes), then the remaining is read from the file server (offset=12 > length=0, so 0 bytes). So devmnt, returns the 12 bytes "hello world" from the cache. This is happening because the call to wstat, which sets the file length to zero, doesn't invalidate the cache. The fix would probably be to invalidate the cache on wstat when setting the length to zero. I can reproduce the issue with other file servers like ramfs by mounting with the cache enabled (-C). |
I've finally fixed the issue in the Fossil server by incrementing Qid.vers on wstat, so the next read will be done on a new version of the file instead of the cached one. Here is the change: fossil-wstat-qid |
CL 32451 added TestLongPath. However this test is failing on Plan 9.
See https://build.golang.org/log/6d7b8caa753adbea2d9c4520296ead1e88ab94d2
The text was updated successfully, but these errors were encountered: