mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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:
@@ -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")',
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user