From 35705b119eb223b255adb23e9ce0000176b70e2d Mon Sep 17 00:00:00 2001 From: Levi Zim Date: Wed, 5 Nov 2025 20:07:32 +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. --- 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 13882e67aec0f2..8e4a38fc6e7eaf 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")', ]);