Skip to content

Commit 60c8fc0

Browse files
anonrigtargos
authored andcommitted
test: remove unnecessary syscall to cpuinfo
PR-URL: #56968 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Jake Yuesong Li <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 8e6c191 commit 60c8fc0

12 files changed

+14
-14
lines changed

test/common/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ const isMacOS = process.platform === 'darwin';
124124
const isASan = process.config.variables.asan === 1;
125125
const isRiscv64 = process.arch === 'riscv64';
126126
const isDebug = process.features.debug;
127-
const isPi = (() => {
127+
function isPi() {
128128
try {
129129
// Normal Raspberry Pi detection is to find the `Raspberry Pi` string in
130130
// the contents of `/sys/firmware/devicetree/base/model` but that doesn't
@@ -136,7 +136,7 @@ const isPi = (() => {
136136
} catch {
137137
return false;
138138
}
139-
})();
139+
}
140140

141141
// When using high concurrency or in the CI we need much more time for each connection attempt
142142
net.setDefaultAutoSelectFamilyAttemptTimeout(platformTimeout(net.getDefaultAutoSelectFamilyAttemptTimeout() * 10));
@@ -256,7 +256,7 @@ function platformTimeout(ms) {
256256
if (exports.isAIX || exports.isIBMi)
257257
return multipliers.two * ms; // Default localhost speed is slower on AIX
258258

259-
if (isPi)
259+
if (isPi())
260260
return multipliers.two * ms; // Raspberry Pi devices
261261

262262
if (isRiscv64) {

test/pummel/test-crypto-dh-hash.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if (!common.hasCrypto) {
2626
common.skip('node compiled without OpenSSL.');
2727
}
2828

29-
if (common.isPi) {
29+
if (common.isPi()) {
3030
common.skip('Too slow for Raspberry Pi devices');
3131
}
3232

test/pummel/test-crypto-dh-keys.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if (!common.hasCrypto) {
2626
common.skip('node compiled without OpenSSL.');
2727
}
2828

29-
if (common.isPi) {
29+
if (common.isPi()) {
3030
common.skip('Too slow for Raspberry Pi devices');
3131
}
3232

test/pummel/test-dh-regr.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if (!common.hasCrypto) {
2626
common.skip('missing crypto');
2727
}
2828

29-
if (common.isPi) {
29+
if (common.isPi()) {
3030
common.skip('Too slow for Raspberry Pi devices');
3131
}
3232

test/pummel/test-fs-watch-system-limit.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if (!common.isLinux) {
99
common.skip('The fs watch limit is OS-dependent');
1010
}
1111

12-
if (common.isPi) {
12+
if (common.isPi()) {
1313
common.skip('Too slow for Raspberry Pi devices');
1414
}
1515

test/pummel/test-hash-seed.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Check that spawn child doesn't create duplicated entries
44
const common = require('../common');
55

6-
if (common.isPi) {
6+
if (common.isPi()) {
77
common.skip('Too slow for Raspberry Pi devices');
88
}
99

test/pummel/test-heapsnapshot-near-heap-limit-bounded.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const common = require('../common');
44

5-
if (common.isPi) {
5+
if (common.isPi()) {
66
common.skip('Too slow for Raspberry Pi devices');
77
}
88

test/pummel/test-heapsnapshot-near-heap-limit-by-api.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
const common = require('../common');
55

6-
if (common.isPi) {
6+
if (common.isPi()) {
77
common.skip('Too slow for Raspberry Pi devices');
88
}
99

test/pummel/test-heapsnapshot-near-heap-limit.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const common = require('../common');
44

5-
if (common.isPi) {
5+
if (common.isPi()) {
66
common.skip('Too slow for Raspberry Pi devices');
77
}
88

test/pummel/test-next-tick-infinite-calls.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
'use strict';
2323
const common = require('../common');
2424

25-
if (common.isPi) {
25+
if (common.isPi()) {
2626
common.skip('Too slow for Raspberry Pi devices');
2727
}
2828

test/pummel/test-webcrypto-derivebits-pbkdf2.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if (!common.hasCrypto) {
66
common.skip('missing crypto');
77
}
88

9-
if (common.isPi) {
9+
if (common.isPi()) {
1010
common.skip('Too slow for Raspberry Pi devices');
1111
}
1212

test/sequential/test-child-process-pass-fd.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const common = require('../common');
99
// This test is basically `test-cluster-net-send` but creating lots of workers
1010
// so the issue reproduces on OS X consistently.
1111

12-
if (common.isPi) {
12+
if (common.isPi()) {
1313
common.skip('Too slow for Raspberry Pi devices');
1414
}
1515

0 commit comments

Comments
 (0)