Fix some typos in `*.wast` tests
Most of the tests' $Check modules imported from "mem" which was failing when I integrated this into Wasmtime. This may very well be a bug in my understanding of the *.wast format, however, but currently via (module $Mem ...) that defines the name "Mem" for modules to use but not "mem". If this is supposed to work as-is I can update Wasmtime instead.
Additionally some tests' comments were checking L_1 but were actually checking against local.get 0 so I've updated them to local.get 1 which fixed some failing tests on Wasmtime.
I agree that the import from "mem" should fail – no module is registered under that name on the main thread. But likewise "Mem" shouldn't work either – FWIW, the symbolic module name $Mem is unrelated to import names. The correct fix is to add a (register "mem" $Mem) to the main thread.
It's a bug that this works in the interpreter as is (I failed to make the registry per-thread correctly). I'll prepare a fix.
It also seems odd that some test succeeds while checking the wrong local. @conrad-watt, any idea?
It's a bug that this works in the interpreter as is (I failed to make the registry per-thread correctly). I'll prepare a fix.
Thanks!
It also seems odd that some test succeeds while checking the wrong local. @conrad-watt, any idea?
If I'm reading correctly, there are executions where those tests would succeed. I think I simply didn't run those three tests enough times :)
Yes of the tests I fixed they were nondeterministically failing locally as well, so can confirm that some executions succeed and others don't
See #219 for the import issue (and others).
Hi @alexcrichton, I just wanted to drop in to apologise for not working through this PR and the related https://github.com/WebAssembly/threads/pull/219 more quickly. I should have bandwidth to tackle these next week.
No worries! No rush on my end