Files
nodejs16/fix_ci_tests.patch
Adam Majer 1a094d51e7 - Update to version 16.20.1 (security fixes only). The following
CVEs are fixed in this release:
  * (CVE-2023-30581, bsc#1212574): mainModule.__proto__ Bypass
    Experimental Policy Mechanism (High)
  * (CVE-2023-30585, bsc#1212579): Privilege escalation via
    Malicious Registry Key manipulation during Node.js
    installer repair process (Medium)
  * (CVE-2023-30588, bsc#1212581): Process interuption due to invalid
    Public Key information in x509 certificates (Medium)
  * (CVE-2023-30589, bsc#1212582): HTTP Request Smuggling via
    Empty headers separated by CR (Medium)
  * (CVE-2023-30590, bsc#1212583): DiffieHellman does not
    generate keys after setting a private key (Medium)
  * deps: update c-ares to 1.19.1: c-ares security issues fixed:
    + CVE-2023-32067. High. 0-byte UDP payload causes Denial of Service
      (bsc#1211604)
    + CVE-2023-31147 Moderate. Insufficient randomness in generation
      of DNS query IDs (bsc#1211605)
    + CVE-2023-31130. Moderate. Buffer Underwrite in
      ares_inet_net_pton() (bsc#1211606)
    + CVE-2023-31124. Low. AutoTools does not set CARES_RANDOM_FILE
      during cross compilation (bsc#1211607)
- fix_ci_tests.patch: increase default timeout on unit tests
  to 20min from 2min. This seems to have lead to build failures
  on some platforms, like s390x in Factory. (bsc#1211407)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs16?expand=0&rev=96
2023-06-21 12:37:39 +00:00

97 lines
4.0 KiB
Diff

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-v20.1.0/test/parallel/test-module-loading-globalpaths.js
===================================================================
--- node-v20.1.0.orig/test/parallel/test-module-loading-globalpaths.js
+++ node-v20.1.0/test/parallel/test-module-loading-globalpaths.js
@@ -11,6 +11,9 @@ const { addLibraryPath } = require('../c
addLibraryPath(process.env);
+common.skip('hardcoded global paths');
+return;
+
if (process.argv[2] === 'child') {
console.log(require(pkgName).string);
} else {
Index: node-v20.1.0/test/parallel/test-tls-passphrase.js
===================================================================
--- node-v20.1.0.orig/test/parallel/test-tls-passphrase.js
+++ node-v20.1.0/test/parallel/test-tls-passphrase.js
@@ -223,7 +223,7 @@ server.listen(0, common.mustCall(functio
}, onSecureConnect());
})).unref();
-const errMessageDecrypt = /bad decrypt/;
+const errMessageDecrypt = /bad (decrypt|password read)/;
// Missing passphrase
assert.throws(function() {
Index: node-v20.1.0/test/parallel/test-repl-envvars.js
===================================================================
--- node-v20.1.0.orig/test/parallel/test-repl-envvars.js
+++ node-v20.1.0/test/parallel/test-repl-envvars.js
@@ -2,7 +2,9 @@
// Flags: --expose-internals
-require('../common');
+const common = require('../common');
+common.skip('Not running test in OBS');
+
const stream = require('stream');
const REPL = require('internal/repl');
const assert = require('assert');
Index: node-v20.1.0/Makefile
===================================================================
--- node-v20.1.0.orig/Makefile
+++ node-v20.1.0/Makefile
@@ -545,7 +545,8 @@ test-ci-js: | clear-stalled
.PHONY: test-ci
# Related CI jobs: most CI tests, excluding node-test-commit-arm-fanned
test-ci: LOGLEVEL := info
-test-ci: | clear-stalled bench-addons-build build-addons build-js-native-api-tests build-node-api-tests doc-only
+test-ci: | clear-stalled bench-addons-build build-addons build-js-native-api-tests build-node-api-tests
+ strip $(NODE_EXE)
out/Release/cctest --gtest_output=xml:out/junit/cctest.xml
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
@@ -726,7 +727,8 @@ apidocs_json = $(addprefix out/,$(apidoc
apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
tools/doc/node_modules: tools/doc/package.json
- @if [ "$(shell $(node_use_openssl))" != "true" ]; then \
+ echo "Skipping tools/doc/node_modules"
+# @if [ "$(shell $(node_use_openssl))" != "true" ]; then \
echo "Skipping tools/doc/node_modules (no crypto)"; \
else \
cd tools/doc && $(call available-node,$(run-npm-ci)) \
Index: node-v20.1.0/test/parallel/test-crypto-dh.js
===================================================================
--- node-v20.1.0.orig/test/parallel/test-crypto-dh.js
+++ node-v20.1.0/test/parallel/test-crypto-dh.js
@@ -167,7 +167,7 @@ assert.throws(() => {
dh3.computeSecret('');
}, { message: common.hasOpenSSL3 ?
'error:02800080:Diffie-Hellman routines::invalid secret' :
- 'Supplied key is too small' });
+ /Supplied key is too small|error:05066066:Diffie-Hellman routines:compute_key:invalid public key/ });
// Invalid test: curve argument is undefined
assert.throws(
Index: node-v20.1.0/tools/test.py
===================================================================
--- node-v20.1.0.orig/tools/test.py
+++ node-v20.1.0/tools/test.py
@@ -1355,7 +1355,7 @@ def BuildOptions():
result.add_option("-s", "--suite", help="A test suite",
default=[], action="append")
result.add_option("-t", "--timeout", help="Timeout in seconds",
- default=120, type="int")
+ default=1200, type="int")
result.add_option("--arch", help='The architecture to run tests for',
default='none')
result.add_option("--snapshot", help="Run the tests with snapshot turned on",