-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move all tests out of cranelift-wasm
#8147
Move all tests out of cranelift-wasm
#8147
Conversation
Move these up to Wasmtime's misc testsuite to get translated and instantiated by Wasmtime. Note that the max-function-index-in-name-section test was removed here as that's tested by the support added in bytecodealliance#3509.
This is pretty thoroughly tested elsewhere in Wasmtime that we respect the name section, for example many of the trap tests assert that the name of the function comes from the text format.
Instead add them to the disassembly test suite to ensure we don't generate dead code. Additionally this has a lot of coverage via fuzzing too.
Move them into `tests/disas` so we can easily see the CLIF.
I was too slow to make these changes and you got to them first 😆 I had done a bit more historical research about the issue-1306 test case which I'll throw here in case anyone wonders later: This test case was extracted from a fuzz bug in 2019, before Cranelift was merged into the Wasmtime repo: 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 (#3509), and the fix included tests in The Also, I had concluded that the reachability tests were pretty well covered by |
After bytecodealliance#8147 this code isn't used anywhere.
After #8147 this code isn't used anywhere.
This commit moves all remaining tests out of the
cranelift-wasm
crate into other various test suites. My end goal is to eventually remove theDummy*
trait for wasm translation so we don't have to keep updating that over time, but for now these tests I think reside in a more appropriate location nowadays.