Skip to content

Commit d870650

Browse files
committed
integration: verify syscall compatibility after seccomp enforcement
Signed-off-by: lifubang <[email protected]>
1 parent 75188fa commit d870650

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/integration/seccomp.bats

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,16 @@ function flags_value() {
185185
[[ "$output" == *"error running startContainer hook"* ]]
186186
[[ "$output" == *"bad system call"* ]]
187187
}
188+
189+
@test "runc run [seccomp] (verify syscall compatibility after seccomp enforcement)" {
190+
update_config ' .process.args = ["true"]
191+
| .process.noNewPrivileges = false
192+
| .linux.seccomp = {
193+
"defaultAction":"SCMP_ACT_ALLOW",
194+
"architectures":["SCMP_ARCH_X86","SCMP_ARCH_X32","SCMP_ARCH_X86_64","SCMP_ARCH_AARCH64","SCMP_ARCH_ARM"],
195+
"syscalls":[{"names":["close_range", "fsopen", "fsconfig", "fspick", "openat2", "open_tree", "move_mount", "mount_setattr"], "action":"SCMP_ACT_ERRNO", "errnoRet": 38}]
196+
}'
197+
198+
runc run test_busybox
199+
[ "$status" -eq 0 ]
200+
}

0 commit comments

Comments
 (0)