Commit 7d52b1d5 authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[v8][wasm] Fix WebAssembly streaming tests

This CL fixes a test that is checking the wrong behavior at the moment,
and disables the test until the fix in V8 lands.

Background:
The idea of the test is to create an invalid WebAssembly module, and
then check that the module is rejected by streaming compilation. The
invalid module was created by taking an empty module and adding two '0'
bytes at the end. However, two '0' bytes represent an empty unknown
section, which was originally accected by the streaming decoder. The
test, however, misinterpreted the test result (i.e. "FAIL Invalid code:
compileStreaming assert_unreached: Should have rejected: undefined
Reached unreachable decoder" a.k.a. FAIL, streaming compilation
succeeded unexpectedly) as the error message of the streaming compiler,
and then marked it in the test expectations as the expected behavior.

The CL changed the test now to add bytes that clearly create an invalid
module, and also deleted the invalid test expectations.

R=leszeks@chromium.org

Bug: v8:10126
Change-Id: Ie49a7a890abd841a85dc9f634308762ea07e5928
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2066907Reviewed-by: default avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#743908}
parent ab48fc09
...@@ -7588,3 +7588,9 @@ crbug.com/1050549 http/tests/devtools/unit/string-util.js [ Skip ] ...@@ -7588,3 +7588,9 @@ crbug.com/1050549 http/tests/devtools/unit/string-util.js [ Skip ]
crbug.com/1054916 [ Linux ] external/wpt/webxr/dom-overlay/ar_dom_overlay.https.html [ Pass Failure Timeout ] crbug.com/1054916 [ Linux ] external/wpt/webxr/dom-overlay/ar_dom_overlay.https.html [ Pass Failure Timeout ]
crbug.com/1055006 [ Linux ] external/wpt/std-toast/methods.html [ Pass Failure Timeout ] crbug.com/1055006 [ Linux ] external/wpt/std-toast/methods.html [ Pass Failure Timeout ]
crbug.com/1055006 [ Linux ] external/wpt/std-toast/options.html [ Pass Failure Timeout ] crbug.com/1055006 [ Linux ] external/wpt/std-toast/options.html [ Pass Failure Timeout ]
# These tests test invalid behavior, a fix in V8 is in flight.
crbug.com/v8/10126 external/wpt/wasm/webapi/invalid-code.any.html [ Skip ]
crbug.com/v8/10126 external/wpt/wasm/webapi/invalid-code.any.serviceworker.html [ Skip ]
crbug.com/v8/10126 external/wpt/wasm/webapi/invalid-code.any.sharedworker.html [ Skip ]
crbug.com/v8/10126 external/wpt/wasm/webapi/invalid-code.any.worker.html [ Skip ]
This is a testharness.js-based test.
FAIL Invalid code: compileStreaming assert_unreached: Should have rejected: undefined Reached unreachable code
FAIL Invalid code: instantiateStreaming assert_unreached: Should have rejected: undefined Reached unreachable code
Harness: the test ran to completion.
...@@ -8,7 +8,7 @@ setup(() => { ...@@ -8,7 +8,7 @@ setup(() => {
for (const method of ["compileStreaming", "instantiateStreaming"]) { for (const method of ["compileStreaming", "instantiateStreaming"]) {
promise_test(t => { promise_test(t => {
const buffer = new Uint8Array(Array.from(emptyModuleBinary).concat([0, 0])); const buffer = new Uint8Array(Array.from(emptyModuleBinary).concat([0xCA, 0xFE]));
const response = new Response(buffer, { headers: { "Content-Type": "application/wasm" } }); const response = new Response(buffer, { headers: { "Content-Type": "application/wasm" } });
return promise_rejects_js(t, WebAssembly.CompileError, WebAssembly[method](response)); return promise_rejects_js(t, WebAssembly.CompileError, WebAssembly[method](response));
}, `Invalid code: ${method}`); }, `Invalid code: ${method}`);
......
This is a testharness.js-based test.
FAIL Invalid code: compileStreaming assert_unreached: Should have rejected: undefined Reached unreachable code
FAIL Invalid code: instantiateStreaming assert_unreached: Should have rejected: undefined Reached unreachable code
Harness: the test ran to completion.
This is a testharness.js-based test.
FAIL Invalid code: compileStreaming assert_unreached: Should have rejected: undefined Reached unreachable code
FAIL Invalid code: instantiateStreaming assert_unreached: Should have rejected: undefined Reached unreachable code
Harness: the test ran to completion.
This is a testharness.js-based test.
FAIL Invalid code: compileStreaming assert_unreached: Should have rejected: undefined Reached unreachable code
FAIL Invalid code: instantiateStreaming assert_unreached: Should have rejected: undefined Reached unreachable code
Harness: the test ran to completion.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment