-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Summary
I propose that if there are failing tests related to the WASI preview 1 rights API, that we modify or delete those tests to remove those assertions.
Problem
Wasmtime fails some tests currently; #101. I am working on adding wasip3 tests, and I want to make sure I keep old tests working, and it's annoying to have some pre-existing failures, and I need to figure out what to do with them.
Background
In WASI preview 1, the wasi-filesystem interface had a concept of "rights", which tried to build an alternative capability-adjacent system that could work alongside the needed facilities to support compilation of POSIX programs to WASI. Ultimately this was deemed too complicated and was removed in WASI preview 2; see WebAssembly/wasi-filesystem#31.
wasi-testsuite was written with two kinds of tests: stdlib tests, and wasi tests.
A stdlib test, like fdopendir-with-access.c, is coded against a language's standard library (POSIX in this case); it's the standard library from the toolchain that uses WASI, not the end user. It's important to keep this kind of test working, and here I don't propose any changes.
But a wasi test like fd_fdstat_set_rights.rs is written directly against WASI interfaces. Unlike, say, POSIX, there were no users of the rights API before wasip1, and there have not been any since then, as it was removed in wasip2. This test fails on wasmtime currently.
We could ask wasmtime and other wasip1 implementations to ensure that the rights API continues to work, but this imposes costs on systems as they evolve to wasip2 and beyond, given that the rights system is no longer present in those versions.
Proposal
I propose that if a wasi test of an API that was removed after wasip1 fails on any WASI runtime, that we remove that test or remove the failing assertion, unless that API is used by some language's standard toolchain.
Concretely, following @alexcrichton's triage in #101 (comment), I would start with making the needed changes to the rust truncation_rights, path_link, and fd_fdstat_set_rights tests so that they pass on wasmtime.