1
0
mirror of https://github.com/opencontainers/runc.git synced 2026-02-05 09:46:08 +01:00

integration: verify syscall compatibility after seccomp enforcement

Signed-off-by: lifubang <lifubang@acmcoder.com>
(cherry picked from commit d8706501cf)
Signed-off-by: lifubang <lifubang@acmcoder.com>
This commit is contained in:
lifubang
2025-11-14 02:56:50 +00:00
parent 34e84588af
commit ebea1f8553

View File

@@ -185,3 +185,16 @@ function flags_value() {
[[ "$output" == *"error running startContainer hook"* ]]
[[ "$output" == *"bad system call"* ]]
}
@test "runc run [seccomp] (verify syscall compatibility after seccomp enforcement)" {
update_config ' .process.args = ["true"]
| .process.noNewPrivileges = false
| .linux.seccomp = {
"defaultAction":"SCMP_ACT_ALLOW",
"architectures":["SCMP_ARCH_X86","SCMP_ARCH_X32","SCMP_ARCH_X86_64","SCMP_ARCH_AARCH64","SCMP_ARCH_ARM"],
"syscalls":[{"names":["close_range", "fsopen", "fsconfig", "fspick", "openat2", "open_tree", "move_mount", "mount_setattr"], "action":"SCMP_ACT_ERRNO", "errnoRet": 38}]
}'
runc run test_busybox
[ "$status" -eq 0 ]
}