mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
The typed array Blob constructor tests expect little-endian byte order. Mark them as expected failures only on big-endian platforms, so failures on little-endian platforms remain visible. Signed-off-by: Filip Skokan <panva.ip@gmail.com> Assisted-by: Claude, Codex PR-URL: https://github.com/nodejs/node/pull/66322 Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
40 lines
1.3 KiB
JavaScript
40 lines
1.3 KiB
JavaScript
'use strict';
|
|
|
|
const os = require('node:os');
|
|
|
|
// On AIX, V8's OS::DecommitPages() has an inherent race condition caused by
|
|
// AIX's non-POSIX MAP_FIXED behavior. The implementation must munmap() then
|
|
// mmap(), and another thread can steal the address range in between. The
|
|
// Blob.arrayBuffer() tests trigger this by creating enough GC pressure
|
|
// (especially the concurrent reads test) to hit the race window.
|
|
// See deps/v8/src/base/platform/platform-aix.cc, lines 168-203.
|
|
const isAIX = os.type() === 'AIX';
|
|
|
|
const conditionalSkips = {};
|
|
|
|
if (isAIX) {
|
|
conditionalSkips['Blob-array-buffer.any.js'] = {
|
|
skip: 'V8 DecommitPages race condition on AIX (munmap/mmap non-atomic)',
|
|
};
|
|
}
|
|
|
|
module.exports = {
|
|
...conditionalSkips,
|
|
'Blob-constructor-dom.window.js': {
|
|
skip: 'Depends on DOM API',
|
|
},
|
|
...(os.endianness() === 'BE' ? {
|
|
'Blob-constructor.any.js': {
|
|
fail: {
|
|
note: 'The expected bytes assume a little-endian platform',
|
|
expected: [
|
|
'Passing typed arrays as elements of the blobParts array should work.',
|
|
'Passing a Float16Array as element of the blobParts array should work.',
|
|
'Passing a Float64Array as element of the blobParts array should work.',
|
|
'Passing BigInt typed arrays as elements of the blobParts array should work.',
|
|
],
|
|
},
|
|
},
|
|
} : {}),
|
|
};
|