stack-switching icon indicating copy to clipboard operation
stack-switching copied to clipboard

Spec testsuite

Open dhil opened this issue 1 year ago • 3 comments

We should develop the spec testsuite for the stack switching proposal. We have something implemented already in (cont.wast, validation.wast, validation_gc.wast), however it does not thoroughly test switch and it could do a better job of testing interactions with other proposals (exception handling and gc would be of particular interest, I think).

dhil avatar Aug 28 '24 07:08 dhil

Good idea. We should structure it along the lines of other proposals, i.e., a cont/ (or stack/) subdirectory, and separate wast files per instruction tested, where possible.

rossberg avatar Aug 28 '24 13:08 rossberg

Do the tests for other proposals usually separate the tests for validation from those for execution in some way? We do have some tests that attempt to cover every aspect of the validation of wasmfx instructions here and here.

I'm happy to split these into per-instruction files, but I'm wondering about the file structure beyond that. For example, the existing file structure makes sure that everything depending on GC lives in its own file, so we can use these files to also use these tests on engines that don't implement GC yet.

frank-emrich avatar Aug 28 '24 13:08 frank-emrich

So far, validation and execution isn't split anywhere.

rossberg avatar Aug 28 '24 15:08 rossberg