Remove VFS2 test dimension
The default is VFS2 enabled, so the tests setting VFS2 are redundant. Updates #1624 PiperOrigin-RevId: 431827013
This commit is contained in:
parent
53385a9dc7
commit
c6bb9ceb66
|
@ -205,23 +205,23 @@ steps:
|
|||
# Runtime tests.
|
||||
- <<: *common
|
||||
label: ":php: PHP runtime tests"
|
||||
command: make php7.3.6-runtime-tests_vfs2
|
||||
command: make php7.3.6-runtime-tests
|
||||
parallelism: 10
|
||||
- <<: *common
|
||||
label: ":java: Java runtime tests"
|
||||
command: make java11-runtime-tests_vfs2
|
||||
command: make java11-runtime-tests
|
||||
parallelism: 40
|
||||
- <<: *common
|
||||
label: ":golang: Go runtime tests"
|
||||
command: make go1.12-runtime-tests_vfs2
|
||||
command: make go1.12-runtime-tests
|
||||
parallelism: 10
|
||||
- <<: *common
|
||||
label: ":node: NodeJS runtime tests"
|
||||
command: make nodejs12.4.0-runtime-tests_vfs2
|
||||
command: make nodejs12.4.0-runtime-tests
|
||||
parallelism: 10
|
||||
- <<: *common
|
||||
label: ":python: Python runtime tests"
|
||||
command: make python3.7.3-runtime-tests_vfs2
|
||||
command: make python3.7.3-runtime-tests
|
||||
parallelism: 10
|
||||
|
||||
# ARM tests.
|
||||
|
|
13
Makefile
13
Makefile
|
@ -158,9 +158,8 @@ dev: $(RUNTIME_BIN) ## Installs a set of local runtimes. Requires sudo.
|
|||
@$(call configure_noreload,$(RUNTIME),--net-raw)
|
||||
@$(call configure_noreload,$(RUNTIME)-d,--net-raw --debug --strace --log-packets)
|
||||
@$(call configure_noreload,$(RUNTIME)-p,--net-raw --profile)
|
||||
@$(call configure_noreload,$(RUNTIME)-vfs2-d,--net-raw --debug --strace --log-packets --vfs2)
|
||||
@$(call configure_noreload,$(RUNTIME)-vfs2-fuse-d,--net-raw --debug --strace --log-packets --vfs2 --fuse)
|
||||
@$(call configure_noreload,$(RUNTIME)-vfs2-cgroup-d,--net-raw --debug --strace --log-packets --vfs2 --cgroupfs)
|
||||
@$(call configure_noreload,$(RUNTIME)-fuse-d,--net-raw --debug --strace --log-packets --fuse)
|
||||
@$(call configure_noreload,$(RUNTIME)-cgroup-d,--net-raw --debug --strace --log-packets --cgroupfs)
|
||||
@$(call reload_docker)
|
||||
.PHONY: dev
|
||||
|
||||
|
@ -235,10 +234,6 @@ packetimpact-tests:
|
|||
@$(call install_runtime,$(RUNTIME),) # Ensure flags are cleared.
|
||||
@$(call test_runtime,$(RUNTIME),--test_timeout=10800 //test/runtimes:$*)
|
||||
|
||||
%-runtime-tests_vfs2: load-runtimes_% $(RUNTIME_BIN)
|
||||
@$(call install_runtime,$(RUNTIME),--vfs2)
|
||||
@$(call test_runtime,$(RUNTIME),--test_timeout=10800 //test/runtimes:$*)
|
||||
|
||||
do-tests: $(RUNTIME_BIN)
|
||||
@$(RUNTIME_BIN) --rootless do true
|
||||
@$(RUNTIME_BIN) --rootless -network=none do true
|
||||
|
@ -262,8 +257,6 @@ INTEGRATION_TARGETS := //test/image:image_test //test/e2e:integration_test
|
|||
docker-tests: load-basic $(RUNTIME_BIN)
|
||||
@$(call install_runtime,$(RUNTIME),) # Clear flags.
|
||||
@$(call test_runtime,$(RUNTIME),$(INTEGRATION_TARGETS))
|
||||
@$(call install_runtime,$(RUNTIME),--vfs2)
|
||||
@$(call test_runtime,$(RUNTIME),$(INTEGRATION_TARGETS))
|
||||
.PHONY: docker-tests
|
||||
|
||||
overlay-tests: load-basic $(RUNTIME_BIN)
|
||||
|
@ -306,7 +299,7 @@ packetdrill-tests: load-packetdrill $(RUNTIME_BIN)
|
|||
.PHONY: packetdrill-tests
|
||||
|
||||
fsstress-test: load-basic $(RUNTIME_BIN)
|
||||
@$(call install_runtime,$(RUNTIME),--vfs2)
|
||||
@$(call install_runtime,$(RUNTIME))
|
||||
@$(call test_runtime,$(RUNTIME),//test/fsstress:fsstress_test)
|
||||
.PHONY: fsstress-test
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ import (
|
|||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"os/exec"
|
||||
"regexp"
|
||||
"strconv"
|
||||
|
@ -34,7 +35,7 @@ var (
|
|||
// runtime is the runtime to use for tests. This will be applied to all
|
||||
// containers. Note that the default here ("runsc") corresponds to the
|
||||
// default used by the installations.
|
||||
runtime = flag.String("runtime", "runsc", "specify which runtime to use")
|
||||
runtime = flag.String("runtime", os.Getenv("RUNTIME"), "specify which runtime to use")
|
||||
|
||||
// config is the default Docker daemon configuration path.
|
||||
config = flag.String("config_path", "/etc/docker/daemon.json", "configuration file for reading paths")
|
||||
|
@ -91,27 +92,6 @@ func RuntimePath() (string, error) {
|
|||
return p, nil
|
||||
}
|
||||
|
||||
// UsingVFS2 returns true if the 'runtime' has the vfs2 flag set.
|
||||
// TODO(gvisor.dev/issue/1624): Remove.
|
||||
func UsingVFS2() (bool, error) {
|
||||
rMap, err := runtimeMap()
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
list, ok := rMap["runtimeArgs"].([]interface{})
|
||||
if !ok {
|
||||
return false, fmt.Errorf("unexpected format: %v", rMap)
|
||||
}
|
||||
|
||||
for _, element := range list {
|
||||
if element == "--vfs2" {
|
||||
return true, nil
|
||||
}
|
||||
}
|
||||
return false, nil
|
||||
}
|
||||
|
||||
func runtimeMap() (map[string]interface{}, error) {
|
||||
// Read the configuration data; the file must exist.
|
||||
configBytes, err := ioutil.ReadFile(*config)
|
||||
|
|
|
@ -469,12 +469,6 @@ func TestTmpMount(t *testing.T) {
|
|||
// Test that it is allowed to mount a file on top of /dev files, e.g.
|
||||
// /dev/random.
|
||||
func TestMountOverDev(t *testing.T) {
|
||||
if vfs2, err := dockerutil.UsingVFS2(); err != nil {
|
||||
t.Fatalf("Failed to read config for runtime %s: %v", dockerutil.Runtime(), err)
|
||||
} else if !vfs2 {
|
||||
t.Skip("VFS1 doesn't allow /dev/random to be mounted.")
|
||||
}
|
||||
|
||||
random, err := ioutil.TempFile(testutil.TmpDir(), "random")
|
||||
if err != nil {
|
||||
t.Fatal("ioutil.TempFile() failed:", err)
|
||||
|
@ -603,22 +597,10 @@ func TestPing6Loopback(t *testing.T) {
|
|||
// can always delete its file when the file is inside a sticky directory owned
|
||||
// by another user.
|
||||
func TestStickyDir(t *testing.T) {
|
||||
if vfs2Used, err := dockerutil.UsingVFS2(); err != nil {
|
||||
t.Fatalf("failed to read config for runtime %s: %v", dockerutil.Runtime(), err)
|
||||
} else if !vfs2Used {
|
||||
t.Skip("sticky bit test fails on VFS1.")
|
||||
}
|
||||
|
||||
runIntegrationTest(t, nil, "./test_sticky")
|
||||
}
|
||||
|
||||
func TestHostFD(t *testing.T) {
|
||||
if vfs2Used, err := dockerutil.UsingVFS2(); err != nil {
|
||||
t.Fatalf("failed to read config for runtime %s: %v", dockerutil.Runtime(), err)
|
||||
} else if !vfs2Used {
|
||||
t.Skip("test fails on VFS1.")
|
||||
}
|
||||
|
||||
runIntegrationTest(t, nil, "./host_fd")
|
||||
}
|
||||
|
||||
|
@ -664,12 +646,6 @@ func TestBindOverlay(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestStdios(t *testing.T) {
|
||||
if vfs2, err := dockerutil.UsingVFS2(); err != nil {
|
||||
t.Fatalf("Failed to read config for runtime %s: %v", dockerutil.Runtime(), err)
|
||||
} else if !vfs2 {
|
||||
t.Skip("VFS1 doesn't adjust stdios user")
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
d := dockerutil.MakeContainer(ctx, t)
|
||||
defer d.CleanUp(ctx)
|
||||
|
@ -685,12 +661,6 @@ func TestStdios(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestStdiosExec(t *testing.T) {
|
||||
if vfs2, err := dockerutil.UsingVFS2(); err != nil {
|
||||
t.Fatalf("Failed to read config for runtime %s: %v", dockerutil.Runtime(), err)
|
||||
} else if !vfs2 {
|
||||
t.Skip("VFS1 doesn't adjust stdios user")
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
d := dockerutil.MakeContainer(ctx, t)
|
||||
defer d.CleanUp(ctx)
|
||||
|
@ -748,12 +718,6 @@ func testStdios(t *testing.T, run func(string, ...string) (string, error)) {
|
|||
}
|
||||
|
||||
func TestStdiosChown(t *testing.T) {
|
||||
if vfs2, err := dockerutil.UsingVFS2(); err != nil {
|
||||
t.Fatalf("Failed to read config for runtime %s: %v", dockerutil.Runtime(), err)
|
||||
} else if !vfs2 {
|
||||
t.Skip("VFS1 doesn't adjust stdios user")
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
d := dockerutil.MakeContainer(ctx, t)
|
||||
defer d.CleanUp(ctx)
|
||||
|
|
Loading…
Reference in New Issue