Skip to content

Commit

Permalink
test: remove unnecessary skipIf32Bits calls
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig committed Feb 9, 2025
1 parent a2aa6ca commit db365dc
Show file tree
Hide file tree
Showing 14 changed files with 1 addition and 37 deletions.
5 changes: 0 additions & 5 deletions test/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -458,11 +458,6 @@ at `tools/eslint/node_modules/eslint`
Skip the rest of the tests in the current file when the Inspector
was disabled at compile time.

### `skipIf32Bits()`

Skip the rest of the tests in the current file when the Node.js executable
was compiled with a pointer size smaller than 64 bits.

## ArrayStream module

The `ArrayStream` module provides a simple `Stream` that pushes elements from
Expand Down
9 changes: 0 additions & 9 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ const { inspect, getCallSites } = require('util');
const { isMainThread } = require('worker_threads');

const tmpdir = require('./tmpdir');
const bits = ['arm64', 'loong64', 'mips', 'mipsel', 'ppc64', 'riscv64', 's390x', 'x64']
.includes(process.arch) ? 64 : 32;
const hasIntl = !!process.config.variables.v8_enable_i18n_support;

const {
Expand Down Expand Up @@ -676,12 +674,6 @@ function skipIfInspectorDisabled() {
}
}

function skipIf32Bits() {
if (bits < 64) {
skip('The tested feature is not available in 32bit builds');
}
}

function getArrayBufferViews(buf) {
const { buffer, byteOffset, byteLength } = buf;

Expand Down Expand Up @@ -897,7 +889,6 @@ const common = {
requireNoPackageJSONAbove,
runWithInvalidFD,
skip,
skipIf32Bits,
skipIfEslintMissing,
skipIfInspectorDisabled,
spawnPromisified,
Expand Down
2 changes: 0 additions & 2 deletions test/common/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ const {
printSkipMessage,
runWithInvalidFD,
skip,
skipIf32Bits,
skipIfEslintMissing,
skipIfInspectorDisabled,
spawnPromisified,
Expand Down Expand Up @@ -89,7 +88,6 @@ export {
printSkipMessage,
runWithInvalidFD,
skip,
skipIf32Bits,
skipIfEslintMissing,
skipIfInspectorDisabled,
spawnPromisified,
Expand Down
5 changes: 1 addition & 4 deletions test/parallel/test-buffer-tostring-range.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const common = require('../common');
require('../common');
const assert = require('assert');

const rangeBuffer = Buffer.from('abc');
Expand Down Expand Up @@ -100,9 +100,6 @@ assert.throws(() => {
});

// Must not throw when start and end are within kMaxLength
// Cannot test on 32bit machine as we are testing the case
// when start and end are above the threshold
common.skipIf32Bits();
const threshold = 0xFFFFFFFF;
const largeBuffer = Buffer.alloc(threshold + 20);
largeBuffer.toString('utf8', threshold, threshold + 20);
4 changes: 0 additions & 4 deletions test/parallel/test-fs-write-buffer-large.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ const fs = require('fs');
const tmpdir = require('../common/tmpdir');
tmpdir.refresh();

// fs.write with length > INT32_MAX

common.skipIf32Bits();

let buf;
try {
buf = Buffer.allocUnsafe(0x7FFFFFFF + 1);
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-inspect-async-hook-setup-at-inspect.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
common.skipIf32Bits();
const { NodeInstance } = require('../common/inspector-helper.js');
const assert = require('assert');

Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-inspector-async-call-stack-abort.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
common.skipIf32Bits();

const { strictEqual } = require('assert');
const eyecatcher = 'nou, houdoe he?';
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-inspector-async-call-stack.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
common.skipIf32Bits();

const assert = require('assert');
const { inspect } = require('util');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
common.skipIf32Bits();
const { NodeInstance } = require('../common/inspector-helper.js');
const assert = require('assert');

Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-inspector-async-hook-setup-at-signal.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
common.skipIf32Bits();
const { NodeInstance } = require('../common/inspector-helper.js');
const assert = require('assert');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
common.skipIf32Bits();
const { NodeInstance } = require('../common/inspector-helper');
const assert = require('assert');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
common.skipIf32Bits();
const { NodeInstance } = require('../common/inspector-helper');
const assert = require('assert');

Expand Down
3 changes: 0 additions & 3 deletions test/pummel/test-blob-slice-with-large-size.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
'use strict';
const common = require('../common');

// Buffer with size > INT32_MAX
common.skipIf32Bits();

const assert = require('assert');

const size = 2 ** 31;
Expand Down
3 changes: 0 additions & 3 deletions test/pummel/test-string-decoder-large-buffer.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
'use strict';
const common = require('../common');

// Buffer with size > INT32_MAX
common.skipIf32Bits();

const assert = require('assert');
const { StringDecoder } = require('node:string_decoder');
const kStringMaxLength = require('buffer').constants.MAX_STRING_LENGTH;
Expand Down

0 comments on commit db365dc

Please sign in to comment.