test: enable 27 already-passing Node v26.3.0 upstream tests

Merged
CI
4mo ago
+1279-0

What

Enables 27 upstream Node v26.3.0 tests that already pass against current Bun but were never vendored, so they weren't counted and weren't protected against regression.

No source changes. No test edits. No expectations.txt entries.

How these were chosen

  1. Took every upstream test not already vendored on main and not claimed by an in-flight PR: 837 candidates.
  2. Ran each exactly the way scripts/runner.node.mjs does: bun run <file> (or bun test when the file references node:test), same env.
  3. Kept only tests passing 5/5 consecutive runs.
  4. Re-verified all survivors in a clean checkout against the repo's real fixtures, 3/3.
  5. Dropped 7 more after CI build #74354 / code review (see below).

Deliberately excluded:

  • tests that skip rather than execute (1..0 # Skipped): a skip is not a passing test
  • 3 flaky across local runs: test-macos-app-sandbox.js, test-pipe-stream.js, test-pipe-unref.js
  • test-permission-net-websocket.js, which only "passed" because an outbound WebSocket to an external host errored for the wrong reason
  • 7 dropped after CI / review:
    • test-webstorage-without-sqlite.js: typeof sessionStorage is 'undefined' in Bun (fails on every lane; only passed locally under bun test which defines it)
    • test-gc-net-timeout.js: hangs at 5/7 collected on x64-asan / x64-baseline
    • test-http2-ping-flood.js: timeout on Windows aarch64
    • test-worker-dns-terminate.js: heap-use-after-free under ASAN (real bug, tracked separately)
    • test-worker-fshandles-error-on-termination.js / test-worker-fshandles-open-close-on-termination.js: LeakSanitizer reports ConcurrentTask leak on worker termination under ASAN
    • test-queue-microtask-uncaught-asynchooks.js: passes for the wrong reason. Bun does not instrument Microtask in async_hooks so events stays []; the process.on('exit') assertion throws, but since a780f573a1 routes exit-listener throws through uncaughtException the test's own handler swallows it and the process exits 0

Every file is byte-identical to its v26.3.0 counterpart (verified with cmp). test-wasm.mjs needs fixtures/wasm/jspi.wasm (85 bytes), copied verbatim.

Several test-gc-* files declare // Flags: --expose-gc. The runner doesn't pass per-test flags, and Bun exposes global.gc by default, so they execute for real: test-gc-http-client.js collects 80/80 requests. test-promise-race-memory-leak.js and test-shadow-realm-gc.js declare // Flags: --max-old-space-size=... which has no Bun equivalent, so they don't guard the specific leak upstream wrote them for, but they still exercise 100k Promise.race / 100 ShadowRealm+Worker roundtrips (same shape as test-shadow-realm-gc-module.js already on main).

Tests added (27)

  • test-async-wrap-tlssocket-asyncreset.js
  • test-cpu-prof-exit.js
  • test-diagnostic-channel-http-request-created.js
  • test-eventtarget-custom-inspect-does-not-throw.js
  • test-gc-http-client-connaborted.js
  • test-gc-http-client-onerror.js
  • test-gc-http-client-timeout.js
  • test-gc-http-client.js
  • test-gc-tls-external-memory.js
  • test-http.js
  • test-listen-fd-ebadf.js
  • test-module-create-require-multibyte.js
  • test-performance-many-marks.js
  • test-permission-drop-not-enabled.js
  • test-pipe.js
  • test-promise-race-memory-leak.js
  • test-require-resolve-opts-paths-relative.js
  • test-set-incoming-message-header.js
  • test-shadow-realm-gc.js
  • test-socket-write-after-fin.js
  • test-source-map-invalid-url.js
  • test-structuredClone-domexception.js
  • test-tls-hello-parser-failure.js
  • test-ttywrap-stack.js
  • test-uncaught-exception-handler-stack-overflow-on-stack-overflow.js
  • test-uncaught-exception-handler-stack-overflow.js
  • test-wasm.mjs

no test proof · iteration 0 · docs-only change; test-proof not applicable