Skip to content

Commit

Permalink
merge branch 'pr-2067'
Browse files Browse the repository at this point in the history
  libcontainer: change seccomp test for clone syscall

LGTMs: @crosbymichael @cyphar
Closes #2067
  • Loading branch information
cyphar committed Jun 5, 2019
2 parents 5ef781c + b54fd85 commit a77c319
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libcontainer/specconv/spec_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"strings"
"testing"

"golang.org/x/sys/unix"

"github.com/opencontainers/runc/libcontainer/configs"
"github.com/opencontainers/runc/libcontainer/configs/validate"
"github.com/opencontainers/runtime-spec/specs-go"
Expand Down Expand Up @@ -104,7 +106,7 @@ func TestSetupSeccomp(t *testing.T) {
Args: []specs.LinuxSeccompArg{
{
Index: 0,
Value: 2080505856,
Value: unix.CLONE_NEWNS | unix.CLONE_NEWUTS | unix.CLONE_NEWIPC | unix.CLONE_NEWUSER | unix.CLONE_NEWPID | unix.CLONE_NEWNET | unix.CLONE_NEWCGROUP,
ValueTwo: 0,
Op: "SCMP_CMP_MASKED_EQ",
},
Expand Down Expand Up @@ -154,7 +156,7 @@ func TestSetupSeccomp(t *testing.T) {
expectedCloneSyscallArgs := configs.Arg{
Index: 0,
Op: 7, // SCMP_CMP_MASKED_EQ
Value: 2080505856,
Value: unix.CLONE_NEWNS | unix.CLONE_NEWUTS | unix.CLONE_NEWIPC | unix.CLONE_NEWUSER | unix.CLONE_NEWPID | unix.CLONE_NEWNET | unix.CLONE_NEWCGROUP,
ValueTwo: 0,
}
if expectedCloneSyscallArgs != *call.Args[0] {
Expand Down

0 comments on commit a77c319

Please sign in to comment.