Repository navigation
Import jsapi tests from WPT. - #883
Conversation
199962e to
6187f68
Compare
| builder => { | ||
| builder.addImport("module", "fn", kSig_v_v); | ||
| }, | ||
| value); |
| const bytes2 = [74, 83, 65, 80, 73]; | ||
|
|
||
| const binary = new Binary; | ||
| binary.emit_section(kUnknownSectionCode, section => { |
There was a problem hiding this comment.
Probably should rename to kCustomSectionCode
There was a problem hiding this comment.
I'd like to bring the module builder code in sync with the other copy in this repo, but I'd rather not block this PR on that.
| assert_sections(WebAssembly.Module.customSections(module, "na\uFFFDme"), [ | ||
| bytes, | ||
| ]); | ||
| assert_sections(WebAssembly.Module.customSections(module, "na\uDC01me"), [ |
There was a problem hiding this comment.
This is a bit surprising to me, since the customSections algorithm says it uses UTF-8 decode without BOM or fail, which doesn't seem to convert the 0xdc01 to a 0xfffd (though I see that elsewhere in the spec). Does the replacement happen somewhere else?
There was a problem hiding this comment.
customSections takes a USVString, which introduces the replacement character; the "UTF-8 decode without BOM or fail" algorithm is only applied to the bytes in the module, which contain an explicit U+FFFD from the emit_string call.
| let kElementSectionCode = 9; // Elements section | ||
| let kCodeSectionCode = 10; // Function code | ||
| let kDataSectionCode = 11; // Data segments | ||
| let kNameSectionCode = 12; // Name section (encoded as string) |
| "invalid index into function table" | ||
| ]; | ||
|
|
||
| function assertTraps(trap, code) { |
| let kTrapFuncSigMismatch = 7; | ||
| let kTrapInvalidIndex = 8; | ||
|
|
||
| let kTrapMsgs = [ |
|
Before landing this patch, please verify that it works with the procedures used in at least one browser Wasm implementation to regularly update from this repository (last time I checked, all four take the tests from here, in a manual pull process). |
|
(There will be no need to import from here into SpiderMonkey, as these tests already run there.) |
|
@Ms2ger maybe you could try with another one? It test it out with SpiderMonkey's old procedure? |
|
cc @titzer for trying these tests on v8 |
Add documentation and use the correct argument in one set of tests.
46e2e05 to
2baa839
Compare
|
I started running these in v8. It seems this uses a number of new functions from the https://web-platform-tests.org/writing-tests/testharness-api.html, so we should probably add these to
See the WIP changes here: https://chromium-review.googlesource.com/c/v8/v8/+/1277724 |
|
Thanks! Please let me know if you have any more comments; I'll update the readme some time this week. |
|
OK, I have these tests running (but not yet all passing) in v8. Since they also run in spidermonkey, I think this is good to land. We can address other concerns in future CLs. FYI @kmiller68 @Cellule |
These changes were necessary to run with the new style of jsapi tests introduced in WebAssembly/spec#883. Change-Id: I4629dd48d595ed97ed0607dec9e7d9808c706a7e Reviewed-on: https://chromium-review.googlesource.com/c/1277724 Commit-Queue: Ben Smith <[email protected]> Reviewed-by: Andreas Haas <[email protected]> Reviewed-by: Michael Achenbach <[email protected]> Reviewed-by: Mathias Bynens <[email protected]> Cr-Commit-Position: refs/heads/master@{#56745}
This reverts commit a12203c. Reason for revert: Breaks isolate_tests https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20builder/36777 Original change's description: > [wasm] Add a new wasm-js testsuite to run js-api tests > > These changes were necessary to run with the new style of jsapi tests > introduced in WebAssembly/spec#883. > > Change-Id: I4629dd48d595ed97ed0607dec9e7d9808c706a7e > Reviewed-on: https://chromium-review.googlesource.com/c/1277724 > Commit-Queue: Ben Smith <[email protected]> > Reviewed-by: Andreas Haas <[email protected]> > Reviewed-by: Michael Achenbach <[email protected]> > Reviewed-by: Mathias Bynens <[email protected]> > Cr-Commit-Position: refs/heads/master@{#56745} [email protected],[email protected],[email protected],[email protected],[email protected],[email protected] Change-Id: I2edd0ca94cb5990322571879c81671fa835f3ecd No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/1286526 Reviewed-by: Bill Budge <[email protected]> Commit-Queue: Bill Budge <[email protected]> Cr-Commit-Position: refs/heads/master@{#56746}
This is a reland of a12203c Original change's description: > [wasm] Add a new wasm-js testsuite to run js-api tests > > These changes were necessary to run with the new style of jsapi tests > introduced in WebAssembly/spec#883. > > Change-Id: I4629dd48d595ed97ed0607dec9e7d9808c706a7e > Reviewed-on: https://chromium-review.googlesource.com/c/1277724 > Commit-Queue: Ben Smith <[email protected]> > Reviewed-by: Andreas Haas <[email protected]> > Reviewed-by: Michael Achenbach <[email protected]> > Reviewed-by: Mathias Bynens <[email protected]> > Cr-Commit-Position: refs/heads/master@{#56745} Change-Id: I25fcd95bfc1aee1d21da390359423e5dfed112a4 Reviewed-on: https://chromium-review.googlesource.com/c/1286952 Commit-Queue: Ben Smith <[email protected]> Reviewed-by: Ben Smith <[email protected]> Reviewed-by: Michael Achenbach <[email protected]> Cr-Commit-Position: refs/heads/master@{#56791}
No description provided.