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 <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
This commit is contained in:
Levi Zim authored and Antoine du Hamel committed 2026-01-19 19:19:02 +01:00
1 parent b09129df18
commit ec40989dfb
1 file changed
+5 -1
+5 -1
View File
@@ -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")',
]);