mirror of
https://github.com/nodejs/node.git
synced 2026-10-10 18:59:49 -04:00
test: skip wasm allocation tests in workers
Refs: https://github.com/nodejs/node/issues/62870 PR-URL: https://github.com/nodejs/node/pull/61898 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
2 files changed
+14
-2
No files matched your search
@@ -4,13 +4,19 @@
|
||||
// wasm memory64 with guard regions reserves 16GB of virtual address space.
|
||||
'use strict';
|
||||
|
||||
require('../common');
|
||||
const common = require('../common');
|
||||
const assert = require('assert');
|
||||
const { isMainThread } = require('worker_threads');
|
||||
|
||||
// The first allocation should succeed.
|
||||
const first = new WebAssembly.Memory({ address: 'i64', initial: 10n, maximum: 100n });
|
||||
assert(first);
|
||||
|
||||
if (!isMainThread) {
|
||||
// https://github.com/nodejs/node/issues/62870
|
||||
common.skip('Workers terminate instead of throwing');
|
||||
}
|
||||
|
||||
// Subsequent allocations should eventually fail due to running out of
|
||||
// virtual address space. memory64 reserves 16GB per allocation (vs 8GB for
|
||||
// memory32), so the limit is reached even faster.
|
||||
|
||||
@@ -4,13 +4,19 @@
|
||||
// wasm memory32 with guard regions reserves 8GB of virtual address space.
|
||||
'use strict';
|
||||
|
||||
require('../common');
|
||||
const common = require('../common');
|
||||
const assert = require('assert');
|
||||
const { isMainThread } = require('worker_threads');
|
||||
|
||||
// The first allocation should succeed.
|
||||
const first = new WebAssembly.Memory({ initial: 10, maximum: 100 });
|
||||
assert(first);
|
||||
|
||||
if (!isMainThread) {
|
||||
// https://github.com/nodejs/node/issues/62870
|
||||
common.skip('Workers terminate instead of throwing');
|
||||
}
|
||||
|
||||
// Subsequent allocations should eventually fail due to running out of
|
||||
// virtual address space.
|
||||
assert.throws(() => {
|
||||
|
||||
Reference in new issue
Block a user