Skip to content

Commit 89d0205

Browse files
Kenta TadaKenta Tada
authored andcommitted
libcontainer: change seccomp test for clone syscall
This commit changes the value of seccomp test for clone syscall. Also hardcoded values should be changed because it is unclear to understand what flags are tested. Related issues: * containerd/containerd#3314 * moby/moby#39308 * opencontainers/runtime-tools#694 Signed-off-by: Kenta Tada <Kenta.Tada@sony.com>
1 parent 5ef781c commit 89d0205

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libcontainer/specconv/spec_linux_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import (
77
"strings"
88
"testing"
99

10+
"golang.org/x/sys/unix"
11+
1012
"github.com/opencontainers/runc/libcontainer/configs"
1113
"github.com/opencontainers/runc/libcontainer/configs/validate"
1214
"github.com/opencontainers/runtime-spec/specs-go"
@@ -104,7 +106,7 @@ func TestSetupSeccomp(t *testing.T) {
104106
Args: []specs.LinuxSeccompArg{
105107
{
106108
Index: 0,
107-
Value: 2080505856,
109+
Value: unix.CLONE_NEWNS | unix.CLONE_NEWUTS | unix.CLONE_NEWIPC | unix.CLONE_NEWUSER | unix.CLONE_NEWPID | unix.CLONE_NEWNET | unix.CLONE_NEWCGROUP,
108110
ValueTwo: 0,
109111
Op: "SCMP_CMP_MASKED_EQ",
110112
},
@@ -154,7 +156,7 @@ func TestSetupSeccomp(t *testing.T) {
154156
expectedCloneSyscallArgs := configs.Arg{
155157
Index: 0,
156158
Op: 7, // SCMP_CMP_MASKED_EQ
157-
Value: 2080505856,
159+
Value: 2114060288,
158160
ValueTwo: 0,
159161
}
160162
if expectedCloneSyscallArgs != *call.Args[0] {

0 commit comments

Comments
 (0)