diff options
-rw-r--r-- | tests/54-live-binary_tree.c | 4 | ||||
-rwxr-xr-x | tests/54-live-binary_tree.py | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/tests/54-live-binary_tree.c b/tests/54-live-binary_tree.c index cd4e9e4..16378dc 100644 --- a/tests/54-live-binary_tree.c +++ b/tests/54-live-binary_tree.c @@ -30,7 +30,6 @@ #include "util.h" -/* arbitrary list of syscalls to force seccomp to generate a binary tree */ static const int denylist[] = { SCMP_SYS(times), SCMP_SYS(ptrace), @@ -87,6 +86,9 @@ int main(int argc, char *argv[]) if (ctx == NULL) return ENOMEM; + rc = seccomp_attr_set(ctx, SCMP_FLTATR_CTL_OPTIMIZE, 2); + if (rc < 0) + goto out; rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(write), 1, SCMP_A0(SCMP_CMP_EQ, fd)); if (rc != 0) diff --git a/tests/54-live-binary_tree.py b/tests/54-live-binary_tree.py index 2250938..2bc7386 100755 --- a/tests/54-live-binary_tree.py +++ b/tests/54-live-binary_tree.py @@ -62,6 +62,7 @@ def test(): util.install_trap() f = SyscallFilter(TRAP) f.set_attr(Attr.CTL_TSYNC, 1) + f.set_attr(Attr.CTL_OPTIMIZE, 2) # NOTE: additional syscalls required for python f.add_rule(ALLOW, "stat") f.add_rule(ALLOW, "fstat") |