this *should* reproduce the report at https://github.com/bytecodealliance/wasmtime/issues/2642 but it does not, so the problem has something to do with invoking via wasmtime cli?
This is the wasi-tests crate, which contains source code for the system-level WASI tests.
Building these tests requires that the wasm32-wasi target be installed.