Skip to content

Commit 60c8fc0

Browse files
anonrigtargos
authored andcommitted
test: remove unnecessary syscall to cpuinfo
PR-URL: #56968 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 8e6c191 commit 60c8fc0

12 files changed

+14
-14
lines changed

test/common/index.js

Lines changed: 3 additions & 3 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy