diff --git a/lib/internal/debugger/inspect_probe.js b/lib/internal/debugger/inspect_probe.js index fc9f3056f52341..608fe1ab668175 100644 --- a/lib/internal/debugger/inspect_probe.js +++ b/lib/internal/debugger/inspect_probe.js @@ -505,6 +505,7 @@ class ProbeInspectorSession { onChildOutput(text, which) { if (which !== 'stderr') { return; } + debug('child stderr: %j', text); this.childStderr += text; @@ -512,6 +513,7 @@ class ProbeInspectorSession { // Detect the disconnect sentinel. if (this.connected && StringPrototypeIncludes(combined, kProbeDisconnectSentinel)) { + debug('disconnect sentinel detected, resetting client'); this.disconnectRequested = true; this.client.reset(); } @@ -587,6 +589,7 @@ class ProbeInspectorSession { } onPaused(params) { + debug('paused: finished=%d, reason=%s hitBreakpoints=%j', this.finished, params.reason, params.hitBreakpoints); this.handlePaused(params).catch((error) => { if (error === kInspectorFailedSentinel) { return; } this.recordInspectorFailure({ @@ -837,6 +840,9 @@ class ProbeInspectorSession { } onScriptParsed(params) { + if (params.url && !StringPrototypeStartsWith(params.url, 'node:')) { + debug('scriptParsed: scriptId=%s url=%s, length=%d', params.scriptId, params.url, params.length); + } // This map grows by the number of scripts parsed, which is limited, and is just a // small string -> string map. The lifetime is bounded by probe timeout etc. so cleanup is overkill. this.scriptIdToUrl.set(params.scriptId, params.url); @@ -879,6 +885,8 @@ class ProbeInspectorSession { } const result = await this.callCdp('Debugger.setBreakpointByUrl', params); + debug('breakpoint set: id=%s urlRegex=%s locations=%j', + result.breakpointId, params.urlRegex, result.locations); this.breakpointDefinitions.set(result.breakpointId, { probeIndices }); } } diff --git a/lib/internal/streams/iter/pull.js b/lib/internal/streams/iter/pull.js index 95871e99037d58..a6ba6d59e69e39 100644 --- a/lib/internal/streams/iter/pull.js +++ b/lib/internal/streams/iter/pull.js @@ -13,6 +13,7 @@ const { ArrayPrototypePush, ArrayPrototypeSlice, PromisePrototypeThen, + PromiseResolve, SymbolAsyncIterator, SymbolIterator, TypedArrayPrototypeGetByteLength, @@ -922,7 +923,14 @@ async function pipeTo(source, ...args) { return waitForSyncBackpressure(); } const opts = signal ? { __proto__: null, signal } : undefined; - return PromisePrototypeThen(writer.writev(batch, opts), () => { + const result = writer.writev(batch, opts); + if (result === undefined) { + for (let i = 0; i < batch.length; i++) { + totalBytes += TypedArrayPrototypeGetByteLength(batch[i]); + } + return; + } + return PromisePrototypeThen(PromiseResolve(result), () => { for (let i = 0; i < batch.length; i++) { totalBytes += TypedArrayPrototypeGetByteLength(batch[i]); } diff --git a/test/fixtures/wpt/README.md b/test/fixtures/wpt/README.md index b8486fc5705fc3..c889fd59f32f06 100644 --- a/test/fixtures/wpt/README.md +++ b/test/fixtures/wpt/README.md @@ -34,7 +34,7 @@ Last update: - wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/288c467d35/wasm/jsapi - wasm/webapi: https://github.com/web-platform-tests/wpt/tree/fd1b23eeaa/wasm/webapi - web-locks: https://github.com/web-platform-tests/wpt/tree/10a122a6bc/web-locks -- WebCryptoAPI: https://github.com/web-platform-tests/wpt/tree/97bbc7247a/WebCryptoAPI +- WebCryptoAPI: https://github.com/web-platform-tests/wpt/tree/0c413fb56b/WebCryptoAPI - webidl: https://github.com/web-platform-tests/wpt/tree/63ca529a02/webidl - webidl/ecmascript-binding/es-exceptions: https://github.com/web-platform-tests/wpt/tree/2f96fa1996/webidl/ecmascript-binding/es-exceptions - webmessaging/broadcastchannel: https://github.com/web-platform-tests/wpt/tree/6495c91853/webmessaging/broadcastchannel diff --git a/test/fixtures/wpt/WebCryptoAPI/getPublicKey.tentative.https.any.js b/test/fixtures/wpt/WebCryptoAPI/getPublicKey.tentative.https.any.js index 1b151345c3416d..73e4ad8231b04c 100644 --- a/test/fixtures/wpt/WebCryptoAPI/getPublicKey.tentative.https.any.js +++ b/test/fixtures/wpt/WebCryptoAPI/getPublicKey.tentative.https.any.js @@ -61,6 +61,42 @@ const algorithms = [ generateKeyParams: { name: "X25519" }, usages: ["deriveKey", "deriveBits"], publicKeyUsages: [] + }, + { + name: "ML-DSA-44", + generateKeyParams: { name: "ML-DSA-44" }, + usages: ["sign", "verify"], + publicKeyUsages: ["verify"] + }, + { + name: "ML-DSA-65", + generateKeyParams: { name: "ML-DSA-65" }, + usages: ["sign", "verify"], + publicKeyUsages: ["verify"] + }, + { + name: "ML-DSA-87", + generateKeyParams: { name: "ML-DSA-87" }, + usages: ["sign", "verify"], + publicKeyUsages: ["verify"] + }, + { + name: "ML-KEM-512", + generateKeyParams: { name: "ML-KEM-512" }, + usages: ["encapsulateBits", "encapsulateKey", "decapsulateBits", "decapsulateKey"], + publicKeyUsages: ["encapsulateBits", "encapsulateKey"] + }, + { + name: "ML-KEM-768", + generateKeyParams: { name: "ML-KEM-768" }, + usages: ["encapsulateBits", "encapsulateKey", "decapsulateBits", "decapsulateKey"], + publicKeyUsages: ["encapsulateBits", "encapsulateKey"] + }, + { + name: "ML-KEM-1024", + generateKeyParams: { name: "ML-KEM-1024" }, + usages: ["encapsulateBits", "encapsulateKey", "decapsulateBits", "decapsulateKey"], + publicKeyUsages: ["encapsulateBits", "encapsulateKey"] } ]; diff --git a/test/fixtures/wpt/WebCryptoAPI/supports-modern.tentative.https.any.js b/test/fixtures/wpt/WebCryptoAPI/supports-modern.tentative.https.any.js index 709ffcd43e2962..ca23b782317762 100644 --- a/test/fixtures/wpt/WebCryptoAPI/supports-modern.tentative.https.any.js +++ b/test/fixtures/wpt/WebCryptoAPI/supports-modern.tentative.https.any.js @@ -6,30 +6,30 @@ const modernAlgorithms = { // Asymmetric algorithms 'ML-DSA-44': { - operations: ['generateKey', 'importKey', 'sign', 'verify'], + operations: ['generateKey', 'importKey', 'sign', 'verify', 'getPublicKey'], }, 'ML-DSA-65': { - operations: ['generateKey', 'importKey', 'sign', 'verify'], + operations: ['generateKey', 'importKey', 'sign', 'verify', 'getPublicKey'], }, 'ML-DSA-87': { - operations: ['generateKey', 'importKey', 'sign', 'verify'], + operations: ['generateKey', 'importKey', 'sign', 'verify', 'getPublicKey'], }, 'ML-KEM-512': { operations: [ 'generateKey', 'importKey', 'encapsulateKey', 'encapsulateBits', - 'decapsulateKey', 'decapsulateBits' + 'decapsulateKey', 'decapsulateBits', 'getPublicKey' ], }, 'ML-KEM-768': { operations: [ 'generateKey', 'importKey', 'encapsulateKey', 'encapsulateBits', - 'decapsulateKey', 'decapsulateBits' + 'decapsulateKey', 'decapsulateBits', 'getPublicKey' ], }, 'ML-KEM-1024': { operations: [ 'generateKey', 'importKey', 'encapsulateKey', 'encapsulateBits', - 'decapsulateKey', 'decapsulateBits' + 'decapsulateKey', 'decapsulateBits', 'getPublicKey' ], }, @@ -54,6 +54,7 @@ const operations = [ 'encapsulateBits', 'decapsulateKey', 'decapsulateBits', + 'getPublicKey', ]; // Test that supports method exists and is a static method diff --git a/test/fixtures/wpt/WebCryptoAPI/supports.tentative.https.any.js b/test/fixtures/wpt/WebCryptoAPI/supports.tentative.https.any.js index 921212a0c21dfa..ac3a32c741000c 100644 --- a/test/fixtures/wpt/WebCryptoAPI/supports.tentative.https.any.js +++ b/test/fixtures/wpt/WebCryptoAPI/supports.tentative.https.any.js @@ -6,7 +6,7 @@ const standardAlgorithms = { // Asymmetric algorithms 'RSASSA-PKCS1-v1_5': { - operations: ['generateKey', 'importKey', 'sign', 'verify'], + operations: ['generateKey', 'importKey', 'sign', 'verify', 'getPublicKey'], keyGenParams: { name: 'RSASSA-PKCS1-v1_5', modulusLength: 2048, @@ -17,7 +17,7 @@ const standardAlgorithms = { signParams: { name: 'RSASSA-PKCS1-v1_5' }, }, 'RSA-PSS': { - operations: ['generateKey', 'importKey', 'sign', 'verify'], + operations: ['generateKey', 'importKey', 'sign', 'verify', 'getPublicKey'], keyGenParams: { name: 'RSA-PSS', modulusLength: 2048, @@ -28,7 +28,7 @@ const standardAlgorithms = { signParams: { name: 'RSA-PSS', saltLength: 32 }, }, 'RSA-OAEP': { - operations: ['generateKey', 'importKey', 'encrypt', 'decrypt'], + operations: ['generateKey', 'importKey', 'encrypt', 'decrypt', 'getPublicKey'], keyGenParams: { name: 'RSA-OAEP', modulusLength: 2048, @@ -39,13 +39,13 @@ const standardAlgorithms = { encryptParams: { name: 'RSA-OAEP' }, }, ECDSA: { - operations: ['generateKey', 'importKey', 'sign', 'verify'], + operations: ['generateKey', 'importKey', 'sign', 'verify', 'getPublicKey'], keyGenParams: { name: 'ECDSA', namedCurve: 'P-256' }, importParams: { name: 'ECDSA', namedCurve: 'P-256' }, signParams: { name: 'ECDSA', hash: 'SHA-256' }, }, ECDH: { - operations: ['generateKey', 'importKey', 'deriveBits'], + operations: ['generateKey', 'importKey', 'deriveBits', 'getPublicKey'], keyGenParams: { name: 'ECDH', namedCurve: 'P-256' }, importParams: { name: 'ECDH', namedCurve: 'P-256' }, deriveBitsParams: { @@ -58,12 +58,12 @@ const standardAlgorithms = { }, }, Ed25519: { - operations: ['generateKey', 'importKey', 'sign', 'verify'], + operations: ['generateKey', 'importKey', 'sign', 'verify', 'getPublicKey'], keyGenParams: null, signParams: { name: 'Ed25519' }, }, X25519: { - operations: ['generateKey', 'importKey', 'deriveBits'], + operations: ['generateKey', 'importKey', 'deriveBits', 'getPublicKey'], keyGenParams: null, deriveBitsParams: { name: 'X25519', @@ -152,6 +152,7 @@ const operations = [ 'decrypt', 'deriveBits', 'digest', + 'getPublicKey', ]; // Test that supports method exists and is a static method diff --git a/test/fixtures/wpt/versions.json b/test/fixtures/wpt/versions.json index 8d1f153c4104b6..216dd0edf5c798 100644 --- a/test/fixtures/wpt/versions.json +++ b/test/fixtures/wpt/versions.json @@ -96,7 +96,7 @@ "path": "web-locks" }, "WebCryptoAPI": { - "commit": "97bbc7247a16231f4744a47a1d9b3d29633d5292", + "commit": "0c413fb56b9da8bf27502c866a3d60f93981804d", "path": "WebCryptoAPI" }, "webidl": { diff --git a/test/parallel/test-debugger-probe-bound-never-hit.js b/test/parallel/test-debugger-probe-bound-never-hit.js index 2dc8b5a5e9d921..cc3ef278d27f92 100644 --- a/test/parallel/test-debugger-probe-bound-never-hit.js +++ b/test/parallel/test-debugger-probe-bound-never-hit.js @@ -16,7 +16,7 @@ spawnSyncAndAssert(process.execPath, [ '--probe', 'probe-bound-never-hit.js:4', '--expr', '1', 'probe-bound-never-hit.js', -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { stdout(output) { assertProbeJson(output, { v: 2, diff --git a/test/parallel/test-debugger-probe-child-inspect-port-zero.js b/test/parallel/test-debugger-probe-child-inspect-port-zero.js index 468f7fdccba83a..5de3b78a104f3b 100644 --- a/test/parallel/test-debugger-probe-child-inspect-port-zero.js +++ b/test/parallel/test-debugger-probe-child-inspect-port-zero.js @@ -19,7 +19,7 @@ spawnSyncAndAssert(process.execPath, [ '--', '--inspect-port=0', 'probe.js', -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { stdout(output) { assertProbeJson(output, { v: 2, diff --git a/test/parallel/test-debugger-probe-explicit-column.js b/test/parallel/test-debugger-probe-explicit-column.js index ac65b572a37847..523777a8ad54fd 100644 --- a/test/parallel/test-debugger-probe-explicit-column.js +++ b/test/parallel/test-debugger-probe-explicit-column.js @@ -24,7 +24,7 @@ spawnSyncAndAssert(process.execPath, [ '--probe', 'probe-multi-statement.js:5:29', '--expr', 'acc.length', 'probe-multi-statement.js', -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { stdout(output) { assertProbeJson(output, { v: 2, diff --git a/test/parallel/test-debugger-probe-expression-throws.js b/test/parallel/test-debugger-probe-expression-throws.js index a5447fe0a0f590..97c5e94d0485e2 100644 --- a/test/parallel/test-debugger-probe-expression-throws.js +++ b/test/parallel/test-debugger-probe-expression-throws.js @@ -23,7 +23,7 @@ spawnSyncAndExit(process.execPath, [ '--probe', `${fixture}:16`, '--expr', probes[0].expr, '--probe', `${fixture}:17`, '--expr', probes[1].expr, fixture, -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { status: 0, signal: null, stdout(output) { diff --git a/test/parallel/test-debugger-probe-failure-hang-during-evaluate.js b/test/parallel/test-debugger-probe-failure-hang-during-evaluate.js index 332b519d393fcd..82ff78ca6f78ad 100644 --- a/test/parallel/test-debugger-probe-failure-hang-during-evaluate.js +++ b/test/parallel/test-debugger-probe-failure-hang-during-evaluate.js @@ -24,7 +24,7 @@ spawnSyncAndExit(process.execPath, [ '--probe', `${fixture}:10`, '--expr', probes[0].expr, '--probe', `${fixture}:11`, '--expr', probes[1].expr, fixture, -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { status: 1, signal: null, stdout(output) { diff --git a/test/parallel/test-debugger-probe-failure-process-exit.js b/test/parallel/test-debugger-probe-failure-process-exit.js index 1e14c8b2b81842..f7c9d4abc92e5a 100644 --- a/test/parallel/test-debugger-probe-failure-process-exit.js +++ b/test/parallel/test-debugger-probe-failure-process-exit.js @@ -18,7 +18,7 @@ spawnSyncAndExit(process.execPath, [ 'inspect', '--json', '--probe', `${fixture}:8`, '--expr', probes[0].expr, fixture, -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { status: 1, signal: null, stdout(output) { diff --git a/test/parallel/test-debugger-probe-global-option-order.js b/test/parallel/test-debugger-probe-global-option-order.js index 33e9b688f2e0d8..35606e83cac4d2 100644 --- a/test/parallel/test-debugger-probe-global-option-order.js +++ b/test/parallel/test-debugger-probe-global-option-order.js @@ -17,7 +17,7 @@ spawnSyncAndAssert(process.execPath, [ '--expr', 'finalValue', '--json', 'probe.js', -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { stdout(output) { assertProbeJson(output, { v: 2, diff --git a/test/parallel/test-debugger-probe-json-preview.js b/test/parallel/test-debugger-probe-json-preview.js index acfd5bbbc7804b..96897400deecd8 100644 --- a/test/parallel/test-debugger-probe-json-preview.js +++ b/test/parallel/test-debugger-probe-json-preview.js @@ -24,7 +24,7 @@ spawnSyncAndAssert(process.execPath, [ '--probe', probeArg, '--expr', 'errorValue', 'probe-types.js', -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { stdout(output) { assertProbeJson(output, { v: 2, diff --git a/test/parallel/test-debugger-probe-json-special-values.js b/test/parallel/test-debugger-probe-json-special-values.js index e24ea5b3080b8b..cd530bd8600b64 100644 --- a/test/parallel/test-debugger-probe-json-special-values.js +++ b/test/parallel/test-debugger-probe-json-special-values.js @@ -39,7 +39,7 @@ spawnSyncAndAssert(process.execPath, [ '--probe', probeArg, '--expr', 'errorValue', 'probe-types.js', -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { stdout(output) { assertProbeJson(output, { v: 2, diff --git a/test/parallel/test-debugger-probe-json.js b/test/parallel/test-debugger-probe-json.js index 559392cc69d9b5..f0808d1f6259e5 100644 --- a/test/parallel/test-debugger-probe-json.js +++ b/test/parallel/test-debugger-probe-json.js @@ -23,7 +23,7 @@ spawnSyncAndAssert(process.execPath, [ '--probe', 'probe.js:12', '--expr', 'finalValue', 'probe.js', -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { stdout(output) { assertProbeJson(output, { v: 2, diff --git a/test/parallel/test-debugger-probe-late-resolution.js b/test/parallel/test-debugger-probe-late-resolution.js index 202019122c45b8..a66dd15a15f3ef 100644 --- a/test/parallel/test-debugger-probe-late-resolution.js +++ b/test/parallel/test-debugger-probe-late-resolution.js @@ -21,7 +21,7 @@ spawnSyncAndAssert(process.execPath, [ '--probe', 'probe-late-target.cjs:5', '--expr', 'value', 'probe-late-entry.js', -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { stdout(output) { assertProbeJson(output, { v: 2, diff --git a/test/parallel/test-debugger-probe-launch.js b/test/parallel/test-debugger-probe-launch.js index 24b299ac227453..92a7a215941ac9 100644 --- a/test/parallel/test-debugger-probe-launch.js +++ b/test/parallel/test-debugger-probe-launch.js @@ -17,7 +17,7 @@ spawnSyncAndExit(process.execPath, [ '--', '--not-a-real-node-flag', 'probe.js', -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { signal: null, status: 1, stderr(output) { diff --git a/test/parallel/test-debugger-probe-miss.js b/test/parallel/test-debugger-probe-miss.js index 4fd4824ed0c1d3..99ccbd72a4d8aa 100644 --- a/test/parallel/test-debugger-probe-miss.js +++ b/test/parallel/test-debugger-probe-miss.js @@ -15,7 +15,7 @@ spawnSyncAndAssert(process.execPath, [ '--probe', 'probe-miss.js:99', '--expr', '42', 'probe-miss.js', -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { stdout(output) { assertProbeJson(output, { v: 2, diff --git a/test/parallel/test-debugger-probe-missing-expr.js b/test/parallel/test-debugger-probe-missing-expr.js index 3011bc51f587e4..a653a86875b41e 100644 --- a/test/parallel/test-debugger-probe-missing-expr.js +++ b/test/parallel/test-debugger-probe-missing-expr.js @@ -13,7 +13,7 @@ spawnSyncAndExit(process.execPath, [ 'inspect', '--probe', 'probe.js:12', 'probe.js', -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { signal: null, status: 9, stderr: /Each --probe must be followed immediately by --expr/, diff --git a/test/parallel/test-debugger-probe-multi-location.js b/test/parallel/test-debugger-probe-multi-location.js index 15638f880ed421..88970aca1d53a8 100644 --- a/test/parallel/test-debugger-probe-multi-location.js +++ b/test/parallel/test-debugger-probe-multi-location.js @@ -19,7 +19,7 @@ spawnSyncAndAssert(process.execPath, [ '--probe', 'utils.js:5', '--expr', 'b', 'probe-multi-entry.js', -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { stdout(output) { assertProbeJson(output, { v: 2, diff --git a/test/parallel/test-debugger-probe-narrow-suffix.js b/test/parallel/test-debugger-probe-narrow-suffix.js index 194ddfbdc5d4f7..423fc1c831c409 100644 --- a/test/parallel/test-debugger-probe-narrow-suffix.js +++ b/test/parallel/test-debugger-probe-narrow-suffix.js @@ -17,7 +17,7 @@ spawnSyncAndAssert(process.execPath, [ '--probe', 'probe-multi-a/utils.js:5', '--expr', 'b', 'probe-multi-entry.js', -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { stdout(output) { assertProbeJson(output, { v: 2, diff --git a/test/parallel/test-debugger-probe-no-column-indent.js b/test/parallel/test-debugger-probe-no-column-indent.js index 351f1b89e79a3f..9f4d6c2bc74433 100644 --- a/test/parallel/test-debugger-probe-no-column-indent.js +++ b/test/parallel/test-debugger-probe-no-column-indent.js @@ -17,7 +17,7 @@ spawnSyncAndAssert(process.execPath, [ '--probe', 'probe-indented.js:6', // No `:col` '--expr', 'x', 'probe-indented.js', -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { stdout(output) { assertProbeJson(output, { v: 2, diff --git a/test/parallel/test-debugger-probe-requires-separator.js b/test/parallel/test-debugger-probe-requires-separator.js index efc81fda4d69fd..533fe426cf2deb 100644 --- a/test/parallel/test-debugger-probe-requires-separator.js +++ b/test/parallel/test-debugger-probe-requires-separator.js @@ -15,7 +15,7 @@ spawnSyncAndExit(process.execPath, [ '--expr', 'finalValue', '--inspect-port=0', 'probe.js', -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { signal: null, status: 9, stderr: /Use -- before child Node\.js flags in probe mode/, diff --git a/test/parallel/test-debugger-probe-script-throws.js b/test/parallel/test-debugger-probe-script-throws.js index 0df67adb6a862a..f0ed99542a4d2f 100644 --- a/test/parallel/test-debugger-probe-script-throws.js +++ b/test/parallel/test-debugger-probe-script-throws.js @@ -33,7 +33,7 @@ spawnSyncAndExit(process.execPath, [ '--probe', `${fixture}:7`, '--expr', probes[0].expr, '--probe', `${fixture}:4`, '--expr', probes[1].expr, fixture, -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { // probe_target_exit: probing process exits 0 (hits trustworthy). status: 0, signal: null, diff --git a/test/parallel/test-debugger-probe-target-syntax-error.js b/test/parallel/test-debugger-probe-target-syntax-error.js index 905bcd0b6ce3e3..6b0280266649e0 100644 --- a/test/parallel/test-debugger-probe-target-syntax-error.js +++ b/test/parallel/test-debugger-probe-target-syntax-error.js @@ -27,7 +27,7 @@ spawnSyncAndExit(process.execPath, [ 'inspect', '--json', '--probe', `${fixture}:3`, '--expr', probes[0].expr, fixture, -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { // probe_target_exit: probing process exits 0. status: 0, signal: null, diff --git a/test/parallel/test-debugger-probe-text-special-values.js b/test/parallel/test-debugger-probe-text-special-values.js index ea62c45970a1e4..3a3b5a716f8243 100644 --- a/test/parallel/test-debugger-probe-text-special-values.js +++ b/test/parallel/test-debugger-probe-text-special-values.js @@ -36,7 +36,7 @@ spawnSyncAndAssert(process.execPath, [ '--probe', probeArg, '--expr', 'errorValue', 'probe-types.js', -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { stdout(output) { assertProbeText(output, [ `Hit 1 at ${hitText}`, diff --git a/test/parallel/test-debugger-probe-text.js b/test/parallel/test-debugger-probe-text.js index f6752741a223d6..38810dfc7d27b7 100644 --- a/test/parallel/test-debugger-probe-text.js +++ b/test/parallel/test-debugger-probe-text.js @@ -15,7 +15,7 @@ spawnSyncAndAssert(process.execPath, [ '--probe', 'probe.js:12', '--expr', 'finalValue', 'probe.js', -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { stdout(output) { assertProbeText(output, `Hit 1 at ${probeUrl}:12:1\n` + diff --git a/test/parallel/test-debugger-probe-timeout.js b/test/parallel/test-debugger-probe-timeout.js index de9309c3f60b94..291690b5fdd7a7 100644 --- a/test/parallel/test-debugger-probe-timeout.js +++ b/test/parallel/test-debugger-probe-timeout.js @@ -17,7 +17,7 @@ spawnSyncAndExit(process.execPath, [ '--probe', 'probe-timeout.js:99', '--expr', '1', 'probe-timeout.js', -], { cwd }, { +], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, { signal: null, status: 1, stdout(output) { diff --git a/test/parallel/test-stream-iter-pipeto-writev.js b/test/parallel/test-stream-iter-pipeto-writev.js index 71a691dd6627b7..5c220318253ebf 100644 --- a/test/parallel/test-stream-iter-pipeto-writev.js +++ b/test/parallel/test-stream-iter-pipeto-writev.js @@ -46,6 +46,26 @@ async function testWritevAsyncFallback() { assert.ok(batches.some((b) => b.length > 1)); } +// Multi-chunk batch with synchronous writev success (returns undefined) +async function testWritevSyncUndefinedSuccess() { + const chunks = []; + const writer = { + write(chunk) { + chunks.push(chunk); + }, + writev(batch) { + chunks.push(...batch); + }, + end() {}, + }; + async function* source() { + yield [new Uint8Array([65]), new Uint8Array([66])]; + } + const total = await pipeTo(source(), writer); + assert.strictEqual(total, 2); + assert.strictEqual(Buffer.concat(chunks).toString(), 'AB'); +} + // writevSync returns false — falls through to async writev async function testWritevSyncFails() { const asyncCalls = []; @@ -190,6 +210,7 @@ async function testPipeToSyncWriteFallback() { Promise.all([ testWritevSyncSuccess(), testWritevAsyncFallback(), + testWritevSyncUndefinedSuccess(), testWritevSyncFails(), testWriteSyncFailsMidBatch(), testWriteSyncAlwaysFails(), diff --git a/test/wpt/status/WebCryptoAPI.cjs b/test/wpt/status/WebCryptoAPI.cjs index c31831a6ea6a12..20b8f1ed8f650a 100644 --- a/test/wpt/status/WebCryptoAPI.cjs +++ b/test/wpt/status/WebCryptoAPI.cjs @@ -62,6 +62,7 @@ if (!hasOpenSSL(3, 5) && !process.features.openssl_is_boringssl) { 'sign_verify/mldsa.tentative.https.any.js'); skipSubtests( + ['getPublicKey.tentative.https.any.js', /ml-(?:kem|dsa)/i], ['supports-modern.tentative.https.any.js', /ml-(?:kem|dsa)/i]); } @@ -88,6 +89,7 @@ if (process.features.openssl_is_boringssl) { ['encap_decap/encap_decap_keys.tentative.https.any.js', /ml-kem-512/i], ['generateKey/failures_ML-KEM.tentative.https.any.js', /ml-kem-512/i], ['generateKey/successes_ML-KEM.tentative.https.any.js', /ml-kem-512/i], + ['getPublicKey.tentative.https.any.js', /ml-kem-512/i], ['import_export/ML-KEM_importKey.tentative.https.any.js', /ml-kem-512/i], ['serialization/mlkem.tentative.https.any.js', /ml-kem-512/i], ['supports-modern.tentative.https.any.js', /ml-kem-512/i]);