GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: skip experimental test with pointer compression · nodejs/node@e01cce5

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-experimental-shared-value-conveyor.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-experimental-shared-value-conveyor.js‎

Copy file name to clipboard
+29-16Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,38 @@
11
'use strict';
2-
3-
// Flags: --harmony-struct
4-
52
const common = require('../common');
63
const assert = require('assert');
4+
const { spawnSync } = require('child_process');
75
const { Worker, parentPort } = require('worker_threads');
86

9-
// Do not use isMainThread so that this test itself can be run inside a Worker.
10-
if (!process.env.HAS_STARTED_WORKER) {
11-
process.env.HAS_STARTED_WORKER = 1;
12-
const m = new globalThis.SharedArray(16);
7+
if (process.env.TEST_CHILD_PROCESS === '1') {
8+
// Do not use isMainThread so that this test itself can be run inside a Worker.
9+
if (!process.env.HAS_STARTED_WORKER) {
10+
process.env.HAS_STARTED_WORKER = 1;
11+
const m = new globalThis.SharedArray(16);
1312

14-
const worker = new Worker(__filename);
15-
worker.once('message', common.mustCall((message) => {
16-
assert.strictEqual(message, m);
17-
}));
13+
const worker = new Worker(__filename);
14+
worker.once('message', common.mustCall((message) => {
15+
assert.strictEqual(message, m);
16+
}));
1817

19-
worker.postMessage(m);
18+
worker.postMessage(m);
19+
} else {
20+
parentPort.once('message', common.mustCall((message) => {
21+
// Simple echo.
22+
parentPort.postMessage(message);
23+
}));
24+
}
2025
} else {
21-
parentPort.once('message', common.mustCall((message) => {
22-
// Simple echo.
23-
parentPort.postMessage(message);
24-
}));
26+
if (process.config.variables.v8_enable_pointer_compression === 1) {
27+
common.skip('--harmony-struct cannot be used with pointer compression');
28+
}
29+
30+
const args = ['--harmony-struct', __filename];
31+
const options = { env: { TEST_CHILD_PROCESS: '1', ...process.env } };
32+
const child = spawnSync(process.execPath, args, options);
33+
34+
assert.strictEqual(child.stderr.toString().trim(), '');
35+
assert.strictEqual(child.stdout.toString().trim(), '');
36+
assert.strictEqual(child.status, 0);
37+
assert.strictEqual(child.signal, null);
2538
}

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.