Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cranelift-wasm: Remove wasmtests test suite
The cranelift/wasm/wasmtests suite verifies that the given WebAssembly modules compile without errors using cranelift-wasm's DummyEnvironment. That environment is not particularly representative of how we actually compile WebAssembly modules in Wasmtime, so it's better to perform these tests in Wasmtime itself. The rust_fannkuch test can move to Wasmtime's misc test suite because it can be both compiled and instantiated without any extra setup. This tests more than was tested in cranelift-wasm, which didn't try to instantiate the module. By moving it to a wast test we could also choose to add assertions about the execution of this module, but I don't think that's necessary. I'm just deleting the embenchen tests because they can't be instantiated without setting up a bunch of imports, and it's not clear to me that testing that they can be compiled offers any value for helping us find bugs or regressions. Finally, I'm also deleting the test case which was extracted from a fuzz bug in 2019, before Cranelift was merged into the Wasmtime repo: bytecodealliance/cranelift#1306 That test is interesting, but running it here only tests code in DummyEnvironment, not anything reachable from Wasmtime. There was a report of exactly the same bug in Wasmtime two years later, and the fix included tests in tests/misc_testsuite/empty.wast to cover this case. bytecodealliance#3509 The `empty.wast` test is better than this one because it has minimal and well-commented binary modules which I've verified still trigger the same bug if the fix is reverted. By contrast, since this older test was produced by a fuzzer, it is larger than necessary and the end of its name section is malformed and unparseable.
- Loading branch information