test: fix

- Address sanitizer may call sigaltstack().
  Add it to the syscall whitelist (debug only).
- Fix args count checking for `check-bookmarkfs-util watcher`.
This commit is contained in:
CismonX 2025-03-01 12:14:53 +08:00
parent 3a0f435572
commit f3f522ae63
No known key found for this signature in database
GPG key ID: 3094873E29A482FB
2 changed files with 5 additions and 0 deletions

View file

@ -178,6 +178,10 @@ sandbox_enter (
// signals
SCMP_RULE_NOARG(sigaction, 10),
#ifdef BOOKMARKFS_DEBUG
// Make ASAN happy...
SCMP_RULE_NOARG(sigaltstack, 0),
#endif
SCMP_RULE_NOARG(sigprocmask, 10),
SCMP_RULE_NOARG(sigreturn, 10),
SCMP_RULE_NOARG(restart_syscall, 10),

View file

@ -169,6 +169,7 @@ check_watcher (
default:
return -1;
}
argc -= optind;
if (argc < 1) {
return -1;
}