Skip to content

Commit dbc6fa4

Browse files
committed
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 failure.
1 parent 8511902 commit dbc6fa4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/parallel/test-strace-openat-openssl.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,13 @@ if (spawnSync('strace').error !== undefined) {
1919
const allowedOpenCalls = new Set([
2020
'/etc/ssl/openssl.cnf',
2121
]);
22+
const syscalls = ['openat'];
23+
if (process.arch !== 'riscv64' && process.arch !== 'riscv32') {
24+
syscalls.push('open');
25+
}
2226
const strace = spawn('strace', [
2327
'-f', '-ff',
24-
'-e', 'trace=open,openat',
28+
'-e', `trace=${syscalls.join(',')}`,
2529
'-s', '512',
2630
'-D', process.execPath, '-e', 'require("crypto")',
2731
]);

0 commit comments

Comments
 (0)