From ec40989dfb9bc38b09ab524b23d73a820e8e4567 Mon Sep 17 00:00:00 2001 From: Levi Zim Date: Tue, 11 Nov 2025 20:54:04 +0800 Subject: [PATCH] test: fix test-strace-openat-openssl for RISC-V Recent architectures like RISC-V does not support open syscall, which will cause strace to fail and thus test failure. AssertionError [ERR_ASSERTION]: strace: invalid system call 'open' This patch disables tracing open syscall for RISC-V in the test to fix the test failure. PR-URL: https://github.com/nodejs/node/pull/60588 Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Richard Lau --- test/parallel/test-strace-openat-openssl.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-strace-openat-openssl.js b/test/parallel/test-strace-openat-openssl.js index 13882e67aec..8e4a38fc6e7 100644 --- a/test/parallel/test-strace-openat-openssl.js +++ b/test/parallel/test-strace-openat-openssl.js @@ -19,9 +19,13 @@ if (spawnSync('strace').error !== undefined) { const allowedOpenCalls = new Set([ '/etc/ssl/openssl.cnf', ]); + const syscalls = ['openat']; + if (process.arch !== 'riscv64' && process.arch !== 'riscv32') { + syscalls.push('open'); + } const strace = spawn('strace', [ '-f', '-ff', - '-e', 'trace=open,openat', + '-e', `trace=${syscalls.join(',')}`, '-s', '512', '-D', process.execPath, '-e', 'require("crypto")', ]);