fix 32bit tests

This commit is contained in:
2025-12-11 20:22:36 +01:00
parent 891c7d89a3
commit f2ac3ef283
2 changed files with 81 additions and 29 deletions

View File

@@ -2,10 +2,10 @@ Author: Adam Majer <amajer@suse.de>
Date: Dec 20 09:18:49 UTC 2017
Summary: Fix CI unit tests framework for OBS building
Index: node-v24.11.1/test/parallel/test-module-loading-globalpaths.js
Index: node-v24.12.0/test/parallel/test-module-loading-globalpaths.js
===================================================================
--- node-v24.11.1.orig/test/parallel/test-module-loading-globalpaths.js
+++ node-v24.11.1/test/parallel/test-module-loading-globalpaths.js
--- node-v24.12.0.orig/test/parallel/test-module-loading-globalpaths.js
+++ node-v24.12.0/test/parallel/test-module-loading-globalpaths.js
@@ -11,6 +11,9 @@ const { addLibraryPath } = require('../c
addLibraryPath(process.env);
@@ -16,10 +16,10 @@ Index: node-v24.11.1/test/parallel/test-module-loading-globalpaths.js
if (process.argv[2] === 'child') {
console.log(require(pkgName).string);
} else {
Index: node-v24.11.1/test/parallel/test-tls-passphrase.js
Index: node-v24.12.0/test/parallel/test-tls-passphrase.js
===================================================================
--- node-v24.11.1.orig/test/parallel/test-tls-passphrase.js
+++ node-v24.11.1/test/parallel/test-tls-passphrase.js
--- node-v24.12.0.orig/test/parallel/test-tls-passphrase.js
+++ node-v24.12.0/test/parallel/test-tls-passphrase.js
@@ -223,7 +223,7 @@ server.listen(0, common.mustCall(functio
}, onSecureConnect());
})).unref();
@@ -29,10 +29,10 @@ Index: node-v24.11.1/test/parallel/test-tls-passphrase.js
// Missing passphrase
assert.throws(function() {
Index: node-v24.11.1/test/parallel/test-repl-envvars.js
Index: node-v24.12.0/test/parallel/test-repl-envvars.js
===================================================================
--- node-v24.11.1.orig/test/parallel/test-repl-envvars.js
+++ node-v24.11.1/test/parallel/test-repl-envvars.js
--- node-v24.12.0.orig/test/parallel/test-repl-envvars.js
+++ node-v24.12.0/test/parallel/test-repl-envvars.js
@@ -2,7 +2,9 @@
// Flags: --expose-internals
@@ -44,10 +44,10 @@ Index: node-v24.11.1/test/parallel/test-repl-envvars.js
const stream = require('stream');
const { describe, test } = require('node:test');
const REPL = require('internal/repl');
Index: node-v24.11.1/Makefile
Index: node-v24.12.0/Makefile
===================================================================
--- node-v24.11.1.orig/Makefile
+++ node-v24.11.1/Makefile
--- node-v24.12.0.orig/Makefile
+++ node-v24.12.0/Makefile
@@ -399,7 +399,6 @@ ADDONS_HEADERS_PREREQS := tools/install.
$(wildcard deps/uv/include/*/*.h) \
$(wildcard deps/v8/include/*.h) \
@@ -74,11 +74,11 @@ Index: node-v24.11.1/Makefile
echo "Skipping tools/doc/node_modules (no crypto and/or no ICU)"; \
else \
cd tools/doc && $(call available-node,$(run-npm-ci)) \
Index: node-v24.11.1/tools/test.py
Index: node-v24.12.0/tools/test.py
===================================================================
--- node-v24.11.1.orig/tools/test.py
+++ node-v24.11.1/tools/test.py
@@ -1398,7 +1398,7 @@ def BuildOptions():
--- node-v24.12.0.orig/tools/test.py
+++ node-v24.12.0/tools/test.py
@@ -1399,7 +1399,7 @@ def BuildOptions():
result.add_argument("-s", "--suite", help="A test suite",
default=[], action="append")
result.add_argument("-t", "--timeout", help="Timeout in seconds",
@@ -87,11 +87,11 @@ Index: node-v24.11.1/tools/test.py
result.add_argument("--arch", help='The architecture to run tests for',
default='none')
result.add_argument("--snapshot", help="Run the tests with snapshot turned on",
Index: node-v24.11.1/test/parallel/test-crypto-dh.js
Index: node-v24.12.0/test/parallel/test-crypto-dh.js
===================================================================
--- node-v24.11.1.orig/test/parallel/test-crypto-dh.js
+++ node-v24.11.1/test/parallel/test-crypto-dh.js
@@ -98,7 +98,7 @@ const {
--- node-v24.12.0.orig/test/parallel/test-crypto-dh.js
+++ node-v24.12.0/test/parallel/test-crypto-dh.js
@@ -97,7 +97,7 @@ const {
dh3.computeSecret('');
}, { message: hasOpenSSL3 && !hasOpenSSL3WithNewErrorMessage ?
'Unspecified validation error' :
@@ -100,10 +100,10 @@ Index: node-v24.11.1/test/parallel/test-crypto-dh.js
}
}
Index: node-v24.11.1/test/parallel/test-dns.js
Index: node-v24.12.0/test/parallel/test-dns.js
===================================================================
--- node-v24.11.1.orig/test/parallel/test-dns.js
+++ node-v24.11.1/test/parallel/test-dns.js
--- node-v24.12.0.orig/test/parallel/test-dns.js
+++ node-v24.12.0/test/parallel/test-dns.js
@@ -403,7 +403,7 @@ assert.throws(() => {
const server = dgram.createSocket('udp4');
@@ -113,10 +113,10 @@ Index: node-v24.11.1/test/parallel/test-dns.js
const parsed = dnstools.parseDNSPacket(msg);
const domain = parsed.questions[0].domain;
assert.strictEqual(domain, 'example.org');
Index: node-v24.11.1/test/wpt/test-webcrypto.js
Index: node-v24.12.0/test/wpt/test-webcrypto.js
===================================================================
--- node-v24.11.1.orig/test/wpt/test-webcrypto.js
+++ node-v24.11.1/test/wpt/test-webcrypto.js
--- node-v24.12.0.orig/test/wpt/test-webcrypto.js
+++ node-v24.12.0/test/wpt/test-webcrypto.js
@@ -1,7 +1,8 @@
'use strict';
@@ -127,10 +127,10 @@ Index: node-v24.11.1/test/wpt/test-webcrypto.js
common.skip('missing crypto');
const { WPTRunner } = require('../common/wpt');
Index: node-v24.11.1/test/parallel/test-sqlite.js
Index: node-v24.12.0/test/parallel/test-sqlite.js
===================================================================
--- node-v24.11.1.orig/test/parallel/test-sqlite.js
+++ node-v24.11.1/test/parallel/test-sqlite.js
--- node-v24.12.0.orig/test/parallel/test-sqlite.js
+++ node-v24.12.0/test/parallel/test-sqlite.js
@@ -230,6 +230,7 @@ suite('SQL APIs enabled at build time',
});
@@ -155,3 +155,54 @@ Index: node-v24.11.1/test/parallel/test-sqlite.js
const db = new DatabaseSync(':memory:');
db.exec(`
CREATE VIRTUAL TABLE t1 USING geopoly(a,b,c);
Index: node-v24.12.0/test/parallel/test-internal-util-construct-sab.js
===================================================================
--- node-v24.12.0.orig/test/parallel/test-internal-util-construct-sab.js
+++ node-v24.12.0/test/parallel/test-internal-util-construct-sab.js
@@ -1,7 +1,7 @@
// Flags: --enable-sharedarraybuffer-per-context --expose-internals
'use strict';
-require('../common');
+const { bits } = require('../common');
const assert = require('assert');
const { isSharedArrayBuffer } = require('util/types');
const { constructSharedArrayBuffer } = require('internal/util');
@@ -9,7 +9,12 @@ const { constructSharedArrayBuffer } = r
// We're testing that we can construct a SAB even when the global is not exposed.
assert.strictEqual(typeof SharedArrayBuffer, 'undefined');
-for (const length of [undefined, 0, 1, 2 ** 32]) {
+const lengths = [undefined, 0, 1];
+if (bits > 32) {
+ lengths.push(2**32);
+}
+
+for (const length of lengths) {
assert(isSharedArrayBuffer(constructSharedArrayBuffer(length)));
}
Index: node-v24.12.0/test/common/index.js
===================================================================
--- node-v24.12.0.orig/test/common/index.js
+++ node-v24.12.0/test/common/index.js
@@ -922,6 +922,7 @@ function sleepSync(ms) {
const common = {
allowGlobals,
+ bits,
buildType,
canCreateSymLink,
childShouldThrowAndAbort,
Index: node-v24.12.0/test/common/index.mjs
===================================================================
--- node-v24.12.0.orig/test/common/index.mjs
+++ node-v24.12.0/test/common/index.mjs
@@ -5,6 +5,7 @@ const common = require('./index.js');
const {
allowGlobals,
+ bits,
buildType,
canCreateSymLink,
childShouldThrowAndAbort,

View File

@@ -15,6 +15,7 @@ Thu Dec 11 11:43:06 UTC 2025 - Adam Majer <adam.majer@suse.de>
for details, see https://nodejs.org/en/blog/release/v24.12.0
- nodejs-libpath.patch: refreshed
- fix_ci_tests.patch: add fix on 32bit platforms
-------------------------------------------------------------------
Mon Dec 8 18:59:05 UTC 2025 - Adam Majer <adam.majer@suse.de>