mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #23073 from justincormack/splitseccomptest
Split the Seccomp tests into two
This commit is contained in:
commit
8a26b1dd61
1 changed files with 18 additions and 3 deletions
|
@ -1032,12 +1032,12 @@ func (s *DockerSuite) TestRunSeccompAllowSetrlimit(c *check.C) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerSuite) TestRunSeccompDefaultProfile(c *check.C) {
|
func (s *DockerSuite) TestRunSeccompDefaultProfileAcct(c *check.C) {
|
||||||
testRequires(c, SameHostDaemon, seccompEnabled, NotUserNamespace)
|
testRequires(c, SameHostDaemon, seccompEnabled, NotUserNamespace)
|
||||||
|
|
||||||
var group sync.WaitGroup
|
var group sync.WaitGroup
|
||||||
group.Add(11)
|
group.Add(5)
|
||||||
errChan := make(chan error, 11)
|
errChan := make(chan error, 5)
|
||||||
go func() {
|
go func() {
|
||||||
out, _, err := dockerCmdWithError("run", "syscall-test", "acct-test")
|
out, _, err := dockerCmdWithError("run", "syscall-test", "acct-test")
|
||||||
if err == nil || !strings.Contains(out, "Operation not permitted") {
|
if err == nil || !strings.Contains(out, "Operation not permitted") {
|
||||||
|
@ -1078,6 +1078,21 @@ func (s *DockerSuite) TestRunSeccompDefaultProfile(c *check.C) {
|
||||||
group.Done()
|
group.Done()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
group.Wait()
|
||||||
|
close(errChan)
|
||||||
|
|
||||||
|
for err := range errChan {
|
||||||
|
c.Assert(err, checker.IsNil)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *DockerSuite) TestRunSeccompDefaultProfileNS(c *check.C) {
|
||||||
|
testRequires(c, SameHostDaemon, seccompEnabled, NotUserNamespace)
|
||||||
|
|
||||||
|
var group sync.WaitGroup
|
||||||
|
group.Add(6)
|
||||||
|
errChan := make(chan error, 6)
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
out, _, err := dockerCmdWithError("run", "syscall-test", "ns-test", "echo", "hello0")
|
out, _, err := dockerCmdWithError("run", "syscall-test", "ns-test", "echo", "hello0")
|
||||||
if err == nil || !strings.Contains(out, "Operation not permitted") {
|
if err == nil || !strings.Contains(out, "Operation not permitted") {
|
||||||
|
|
Loading…
Reference in a new issue