diff --git a/test/inspector/debugger/wasm-script-code-offset-expected.txt b/test/inspector/debugger/wasm-script-code-offset-expected.txt deleted file mode 100644 index 03dfb61a12..0000000000 --- a/test/inspector/debugger/wasm-script-code-offset-expected.txt +++ /dev/null @@ -1,9 +0,0 @@ -Tests reported code offsets on wasm scripts -Wasm script parsed: ID 0, startColumn: 0, endColumn: 29, codeOffset: 0 -Wasm script parsed: ID 1, startColumn: 0, endColumn: 29, codeOffset: 0 -Wasm script parsed: ID 2, startColumn: 0, endColumn: 32, codeOffset: 31 -Wasm script parsed: ID 3, startColumn: 0, endColumn: 32, codeOffset: 31 -Wasm script parsed: ID 4, startColumn: 0, endColumn: 40, codeOffset: 36 -Wasm script parsed: ID 5, startColumn: 0, endColumn: 40, codeOffset: 36 -Wasm script parsed: ID 6, startColumn: 0, endColumn: 44, codeOffset: 36 -Wasm script parsed: ID 7, startColumn: 0, endColumn: 44, codeOffset: 36 diff --git a/test/inspector/debugger/wasm-script-code-offset-streaming-expected.txt b/test/inspector/debugger/wasm-script-code-offset-streaming-expected.txt deleted file mode 100644 index ed57c7bd62..0000000000 --- a/test/inspector/debugger/wasm-script-code-offset-streaming-expected.txt +++ /dev/null @@ -1,9 +0,0 @@ -Tests reported code offsets on wasm scripts -Wasm script parsed: ID 0, startColumn: 0, endColumn: 29, codeOffset: 0 -Wasm script parsed: ID 1, startColumn: 0, endColumn: 29, codeOffset: 0 -Wasm script parsed: ID 2, startColumn: 0, endColumn: 32, codeOffset: 31 -Wasm script parsed: ID 3, startColumn: 0, endColumn: 32, codeOffset: 0 -Wasm script parsed: ID 4, startColumn: 0, endColumn: 40, codeOffset: 36 -Wasm script parsed: ID 5, startColumn: 0, endColumn: 40, codeOffset: 36 -Wasm script parsed: ID 6, startColumn: 0, endColumn: 44, codeOffset: 36 -Wasm script parsed: ID 7, startColumn: 0, endColumn: 44, codeOffset: 40 diff --git a/test/inspector/debugger/wasm-script-code-offset-streaming.js b/test/inspector/debugger/wasm-script-code-offset-streaming.js deleted file mode 100644 index a207e45034..0000000000 --- a/test/inspector/debugger/wasm-script-code-offset-streaming.js +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020 the V8 project authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Flags: --wasm-test-streaming - -utils.load('test/inspector/debugger/wasm-script-code-offset.js'); diff --git a/test/inspector/debugger/wasm-script-code-offset.js b/test/inspector/debugger/wasm-script-code-offset.js deleted file mode 100644 index b688c26f29..0000000000 --- a/test/inspector/debugger/wasm-script-code-offset.js +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright 2020 the V8 project authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -utils.load('test/inspector/wasm-inspector-test.js'); - -let {session, contextGroup, Protocol} = - InspectorTest.start('Tests reported code offsets on wasm scripts'); - -// Include a sentinel in every module to avoid re-using a cached module. -let sentinel = 0; - -function addHeader(binary, num_functions) { - binary.emit_header(); - - // Add a custom section with the sentinel. - var custom_section = new Binary(); - custom_section.emit_u8(0); // section code - custom_section.emit_u8(10); // section length - custom_section.emit_string('sentinel'); // name - custom_section.emit_bytes([sentinel]); // payload - ++sentinel; - binary.emit_bytes(custom_section.trunc_buffer()); - - // Type section with a single function type with no params and no returns. - binary.emit_section(kTypeSectionCode, section => { - section.emit_u32v(1); // count - section.emit_u8(kWasmFunctionTypeForm); - section.emit_u32v(0); // params - section.emit_u32v(0); // results - }); - - // Function section with {num_functions} many functions. - binary.emit_section(kFunctionSectionCode, section => { - section.emit_u32v(num_functions); - for (let i = 0; i < num_functions; ++i) { - section.emit_u32v(0); // type index - } - }); -} - -function createModuleWithNoCodeSection() { - let binary = new Binary; - addHeader(binary, 0); - return binary.trunc_buffer(); -} - -function createModuleWithEmptyCodeSection() { - let binary = new Binary; - addHeader(binary, 0); - - // Section code. - binary.emit_u8(kCodeSectionCode); - // Section length (1). - binary.emit_u32v(1); - // Payload (functions count: 0). - binary.emit_u32v(0); - - return binary.trunc_buffer(); -} - -function createModuleWithFiveByteSectionLength() { - let binary = new Binary; - addHeader(binary, 1); - - // Section code. - binary.emit_u8(kCodeSectionCode); - // Section length (4 as 5-byte LEB). - binary.emit_bytes([0x84, 0x80, 0x80, 0x80, 0x00]); - binary.emit_u32v(1); // functions count - binary.emit_u32v(2); // body size - binary.emit_u32v(0); // num locals - binary.emit_bytes([kExprEnd]); // body - - return binary.trunc_buffer(); -} - -function createModuleWithFiveBytePayload() { - let binary = new Binary; - addHeader(binary, 1); - - // Section code. - binary.emit_u8(kCodeSectionCode); - // Section length (8). - binary.emit_bytes([0x88, 0x80, 0x80, 0x80, 0x00]); - // Functions count (1 as 5-byte LEB). - binary.emit_bytes([0x81, 0x80, 0x80, 0x80, 0x00]); - binary.emit_u32v(2); // body size - binary.emit_u32v(0); // num locals - binary.emit_bytes([kExprEnd]); // body - - return binary.trunc_buffer(); -} - -function compileSync(bytes) { - new WebAssembly.Module(new Uint8Array(bytes)); -} -function compileAsync(bytes) { - WebAssembly.compile(new Uint8Array(bytes)); -} - -contextGroup.addScript( - `${compileSync}${compileAsync}`, 0, 0, 'v8://test/compileFunctions'); - -(async function test() { - Protocol.Debugger.enable(); - let script_ids = new Map(); - let generators = [ - createModuleWithNoCodeSection, createModuleWithEmptyCodeSection, - createModuleWithFiveByteSectionLength, createModuleWithFiveBytePayload - ]; - for (let generator of generators) { - session.Protocol.Runtime.evaluate({ - 'expression': ` - compileSync([${generator()}]); - compileAsync([${generator()}]); - ` - }); - - // Wait for both wasm scripts to be there and print their information. - for (let wasm_scripts = 0; wasm_scripts < 2;) { - ({params} = await Protocol.Debugger.onceScriptParsed()); - if (!params.url.startsWith('wasm://')) continue; - if (!script_ids.has(params.scriptId)) { - script_ids.set(params.scriptId, script_ids.size); - } - // Print script IDs to ensure that script are not deduplicated (via - // cache). - let stable_id = script_ids.get(params.scriptId); - InspectorTest.log(`Wasm script parsed: ID ${stable_id}, startColumn: ${ - params.startColumn}, endColumn: ${params.endColumn}, codeOffset: ${ - params.codeOffset}`); - ++wasm_scripts; - } - } - - InspectorTest.completeTest(); -})(); diff --git a/test/inspector/inspector.status b/test/inspector/inspector.status index 3d30d25d02..dead726043 100644 --- a/test/inspector/inspector.status +++ b/test/inspector/inspector.status @@ -146,14 +146,6 @@ 'type-profiler/type-profile-start-stop': [SKIP], }], # gc_stress -############################################################################## -['variant == stress_incremental_marking', { - # Because of https://crbug.com/v8/10748 we skip pumping the message loop - # in inspector tests, which makes this test fail. - 'debugger/wasm-script-code-offset': [SKIP], - 'debugger/wasm-script-code-offset-streaming': [SKIP], -}], # variant == stress_incremental_marking - ############################################################################## ['variant == stress_js_bg_compile_wasm_code_gc', { # Skip tests that fail with GC stress: https://crbug.com/v8/10748 diff --git a/test/inspector/task-runner.cc b/test/inspector/task-runner.cc index f35e73a792..6bdc4e93bc 100644 --- a/test/inspector/task-runner.cc +++ b/test/inspector/task-runner.cc @@ -86,10 +86,7 @@ void TaskRunner::RunMessageLoop(bool only_protocol) { // tests are fixed. if (!i::FLAG_stress_incremental_marking) { while (v8::platform::PumpMessageLoop( - v8::internal::V8::GetCurrentPlatform(), isolate(), - isolate()->HasPendingBackgroundTasks() - ? platform::MessageLoopBehavior::kWaitForWork - : platform::MessageLoopBehavior::kDoNotWait)) { + v8::internal::V8::GetCurrentPlatform(), isolate())) { } } }