Replies: 6 comments 8 replies
-
Searching for While this helps, I think the current situation is not very confusing. At least not for runtimes that do not support all the Wasm proposal until Wasm 3.0. It would be great if the Wasm spec testsuite had a better structure to be a decent solution for all the Wasm runtimes, not just the most up-to-date ones. Otherwise it is getting harder and harder for new Wasm runtimes to start compete with existing ones. |
Beta Was this translation helpful? Give feedback.
-
The memory64 has been merged in the wasm-3.0 branch so that is where you will find all tests for memory64. We should remove memory64 from the list of ongoing proposals. Also, the wasm-3.0 branch is IIUC due to be merged into the main branch so I think the wasm-3.0 directory will be gone soon too. (@dschuff @rossberg I thought maybe the merge had already happened but I guess not?) For now, wasm-3.0 is where to find the memory64 tests, and they are combined with all the other wasm-3.0 proposals so I think you would need to support at least some of the other wasm-3.0 proposals to get memory64 tests running. The test-suite repo tracks individual proposal while they are ongoing but I doesn't continue to track them separately once they are have been merged (IIUC). |
Beta Was this translation helpful? Give feedback.
-
There are a couple of remaining editorial TODOs that I have to resolve before I can merge the 3.0 branch into main. Hoping to get to that soon. @sbc100, would it make sense to move at least the tests specific to this proposal to their own subdirectory? (That said, it won't work to organise the test suite entirely by proposals, since there generally are various interactions and intersections between different features and proposals.) |
Beta Was this translation helpful? Give feedback.
-
Yeah inter-dependency of test cases is a big problem in the grand scheme of the Wasm spec testsuite for Wasm runtimes that do not (yet) support all of the proposals such as Wasmi. I hope this won't mean that writing a new Wasm runtime in the future is getting even harder and harder. It should be in the interest of a specification such as Wasm to have a great variety of implementers and future implementations. A file-tree structure is not great for test cases that depend on multiple Wasm proposals. From the perspective of a Wasm runtime implementer this is certainly very important to keep in mind. Otherwise, we are going to lose valuable implementers over time; or lose out on potential ones. |
Beta Was this translation helpful? Give feedback.
-
I wonder if the effort is actually so big in our case. We'd mostly only have to change the If we come up with a design that allows existing engines to simply ignore whatever changes we introduce while also allowing other engines to know which tests they can afford to run and which not we'd already be in a good position.
I personally don't know of any specs. I don't think that JS is a good candidate to take inspiration from and RISC-V with its modular design also does not fit Wasm's non-modular nature and use cases. I think we are in a decent position to come up with our own solutions at this point. We do not even need to flag single isolated test cases because it is not difficult to detect their used Wasm feature set and simply skip them in a Wasm implementation. What we do need is a way to group test cases together that depend on previous test runs and only run them together or not at all. This does not even need to be tied to the concept of Wasm proposals. Instead we'd already have a solution if we were able to group Then if a Wasm implementation runs the Wast directives and stumbles upon such a group it can run the directives one by one and as soon as one of them fails due to unsupported Wasm features it can ignore the rest. This would require minimal support from the Wasm implementations to detect Wasm features (which should be simple, I hope?) but won't put the burden of Wasm features on the Wasm spec itself. Such a design could look as follows: (group
(module ..)
(invoke ..)
(assert_unlikable ..)
;; etc..
) And a Wast parser would provide Wast directives as follows:
Existing up-to-date Wasm implementations could simply ignore |
Beta Was this translation helpful? Give feedback.
-
It would generally be helpful if at the very least new spec tests introduced by a proposal are in new files, so that existing spec test files are stable. AFAICT most engines are working around the organization of spec tests by having their own additional suites, either in .wast or using internal mechanisms. |
Beta Was this translation helpful? Give feedback.
-
I am trying to implement Wasm
memory64
support in Wasmi. However, I am a bit confused about where to find the correct test cases in the Wasm spec testsuite for it. Wasmi does not (yet) support all of Wasm 3.0, and not even all of Wasm 2.0. So far I have identified the following test cases, however, they are spread around the entire directory structure and not isolated anywhere as it is usually the case with proposals:proposals/custom-page-sizes/memory_max_i64
proposals/memory64/float_exprs
proposals/wasm-3.0/address64
proposals/wasm-3.0/align64
proposals/wasm-3.0/endianess64
proposals/wasm-3.0/float_memory64
proposals/wasm-3.0/memory_grow64
proposals/wasm-3.0/memory_trap64
proposals/wasm-3.0/memory64
proposals/wasm-3.0/table_copy_mixed
In this list I am still missing
table64
,store64
etc. Also some.wast
files seem to have distinctmemory32
andmemory64
tests in different files and other files merge the two. This is kinda inconsistent. What is the general structure of this?Beta Was this translation helpful? Give feedback.
All reactions