From 11800311a537bf1286f71ab419fa251a1e81e54f Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Fri, 17 Aug 2018 13:05:59 -0700 Subject: [PATCH] Add nonExclusiveFS dimension to more tests The ones using 'kvm' actually mean that they don't want overlay. PiperOrigin-RevId: 209194318 Change-Id: I941a443cb6d783e2c80cf66eb8d8630bcacdb574 --- runsc/container/container_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/runsc/container/container_test.go b/runsc/container/container_test.go index 10b10d100..843b7f6f8 100644 --- a/runsc/container/container_test.go +++ b/runsc/container/container_test.go @@ -215,6 +215,7 @@ const ( ) var all = []configOption{overlay, kvm, nonExclusiveFS} +var noOverlay = []configOption{kvm, nonExclusiveFS} // configs generates different configurations to run tests. func configs(opts ...configOption) []*boot.Config { @@ -557,7 +558,7 @@ func TestExec(t *testing.T) { // be the next consecutive number after the last number from the checkpointed container. func TestCheckpointRestore(t *testing.T) { // Skip overlay because test requires writing to host file. - for _, conf := range configs(kvm) { + for _, conf := range configs(noOverlay...) { t.Logf("Running test with conf: %+v", conf) dir, err := ioutil.TempDir("", "checkpoint-test") @@ -716,7 +717,7 @@ func TestUnixDomainSockets(t *testing.T) { ) // Skip overlay because test requires writing to host file. - for _, conf := range configs(kvm) { + for _, conf := range configs(noOverlay...) { t.Logf("Running test with conf: %+v", conf) dir, err := ioutil.TempDir("", "uds-test") @@ -852,7 +853,7 @@ func TestUnixDomainSockets(t *testing.T) { // It will then unpause and confirm that both processes are running. Then it will // wait until one sleep completes and check to make sure the other is running. func TestPauseResume(t *testing.T) { - for _, conf := range configs(kvm) { + for _, conf := range configs(noOverlay...) { t.Logf("Running test with conf: %+v", conf) const uid = 343 spec := testutil.NewSpecWithArgs("sleep", "20") @@ -1208,7 +1209,7 @@ func TestConsoleSocket(t *testing.T) { // TestRunNonRoot checks that sandbox can be configured when running as // non-privileged user. func TestRunNonRoot(t *testing.T) { - for _, conf := range configs(kvm) { + for _, conf := range configs(noOverlay...) { t.Logf("Running test with conf: %+v", conf) spec := testutil.NewSpecWithArgs("/bin/true")