Skip to content

Commit

Permalink
tests: only use bogus syscall numbers in test 29
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Moore <[email protected]>
  • Loading branch information
pcmoore committed Sep 5, 2024
1 parent 2847f10 commit 0db57e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
11 changes: 2 additions & 9 deletions tests/29-sim-pseudo_syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,8 @@ int main(int argc, char *argv[])
if (rc < 0)
goto out;

/* SCMP_SYS(sysmips) == 4294957190 (unsigned) */
rc = seccomp_rule_add(ctx, SCMP_ACT_KILL, SCMP_SYS(sysmips), 0);
if (rc < 0)
goto out;
rc = seccomp_rule_add_exact(ctx, SCMP_ACT_KILL, SCMP_SYS(sysmips), 0);
if (rc == 0)
goto out;
/* -10001 == 4294957295 (unsigned) */
rc = seccomp_rule_add_exact(ctx, SCMP_ACT_KILL, -10001, 0);
/* -100001 == 4294867295 (unsigned) */
rc = seccomp_rule_add_exact(ctx, SCMP_ACT_KILL, -100001, 0);
if (rc == 0)
goto out;

Expand Down
7 changes: 1 addition & 6 deletions tests/29-sim-pseudo_syscall.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,8 @@ def test(args):
f = SyscallFilter(ALLOW)
f.remove_arch(Arch())
f.add_arch(Arch("x86"))
f.add_rule(KILL, "sysmips")
try:
f.add_rule_exactly(KILL, "sysmips")
except RuntimeError:
pass
try:
f.add_rule_exactly(KILL, -10001)
f.add_rule_exactly(KILL, -100001)
except RuntimeError:
pass
return f
Expand Down

0 comments on commit 0db57e1

Please sign in to comment.