filesystem: ErrorCode::IsDirectory when opening directory with WRITE#12136
Conversation
|
In all honesty I haven't tested on Windows, it's just that this patch should fix the issue. To repro, check out the |
2e830ac to
6cd0e89
Compare
|
Rebased to fix the rustfmt error |
On Windows, it was possible to return a directory descriptor if READ wasn't in the permissions. Fixes wasmtime for WebAssembly/wasi-testsuite#176.
6cd0e89 to
a7831bf
Compare
|
My goodness, there are many CI checks in this project :) Patch fixes unused-variable warning/error when compiling for Windows. |
You can add |
|
Test-wise this is something that'll be caught when updating to the latest wasi-testsuite, right? If so, I think it's ok to skip a test here. Mind leaving a comment though on this match arm explaining that this is sync'ing windows semantics to unix semantics? |
I had misremembered the nature of this incompatibility. Fixed (hopefully) with a reference to POSIX. prtest:full
|
I had misremembered the nature of this error, my apologies. The problem is not the lack of READ, it's the presence of WRITE; see the |
prtest:full
path_open_preopen is now working on Windows.
prtest:full
c62ec38 to
a010fbe
Compare
|
Lordie me, this PR has been an education for me, thanks all for patience. Ready now (again). |
|
Anything in particular we could make easier on our end? Or more of a "lots of stuff to discover" kind of education? |
Oh, I think things are pretty good on the wasmtime side, just that there were a number of considerations that I didn't fully grasp (the history of wasi versions and their implementations, the layers of error codes (std::io vs ErrorCode etc), the specificities of how CI works here...). So things are good. Marginal improvements can be made tho:
But like I say things are good, and thank you and Roman for your help & patience <3
|
|
Heh all very good points! (and thanks for writing them out) To a large degree we're subject to the whims of github/github actions here insofar as that's only but so configurable. Otherwise addressing much of what you lay out (which I agree would all be great to have...) would require a bot/webhooks/etc with Wasmtime-specific integration. We haven't quite crossed such a threshold yet so we don't have such a bot ready to go (e.g. I've seen similar bots in the Rust/LLVM projects), and I at least don't personally know how to set up such a bot easily-ish alas :( |

On Windows, it was possible to return a directory descriptor even if WRITE was in the permissions. Fixes wasmtime for
WebAssembly/wasi-testsuite#176.