pchickey opened PR #6236 from bytecodealliance:pch/delete_truncation_rights_test
to bytecodealliance:main
:
This test was not meaningfully executing, because wasi-common never provides rights containing RIGHTS_PATH_FILESTAT_SET_SIZE - this flag is not even defined in wasi-common/srd/dir.rs as one of the DirCaps flags.
Even when you get rid of that guard that skips the meat of the test, path_open was being called with OFLAGS_TRUNC but without RIGHTS_FD_WRITE, which boils down to an
open(2)
with OFLAGS_TRUNC set and none of the access modes set, so it will always fail with EINVAL.So, it doesn't look like this test ever would have meaningfully passed, even in pre-wiggle-rewrite version of wasi-common it landed in back in late 2019. Late 2019! before the pandemic! our eyes were so full of stars and dreams of the future!
The behavior we really care about for truncation are taken care of by the fd_filestat_set test, which shows fd_filestat_set_size works correctly, and the file_truncation test, which shows that opening with OFLAGS_TRUNC will truncate the file.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
pchickey requested jameysharp for a review on PR #6236.
pchickey requested wasmtime-core-reviewers for a review on PR #6236.
pchickey requested sunfishcode for a review on PR #6236.
jameysharp submitted PR review.
pchickey merged PR #6236.
Last updated: Dec 23 2024 at 13:07 UTC