Browse code

Skip failing tests on ARM to get red/green feedback from Jenkins

Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>

Stefan Scherer authored on 2015/11/26 08:38:33
Showing 10 changed files
... ...
@@ -145,7 +145,7 @@ ORIG_BUILDFLAGS=( -a -tags "autogen netgo static_build sqlite_omit_load_extensio
145 145
 # see https://github.com/golang/go/issues/9369#issuecomment-69864440 for why -installsuffix is necessary here
146 146
 BUILDFLAGS=( $BUILDFLAGS "${ORIG_BUILDFLAGS[@]}" )
147 147
 # Test timeout.
148
-: ${TIMEOUT:=120m}
148
+: ${TIMEOUT:=180m}
149 149
 TESTFLAGS+=" -test.timeout=${TIMEOUT}"
150 150
 
151 151
 LDFLAGS_STATIC_DOCKER="
... ...
@@ -128,6 +128,7 @@ type DockerTrustSuite struct {
128 128
 }
129 129
 
130 130
 func (s *DockerTrustSuite) SetUpTest(c *check.C) {
131
+	testRequires(c, NotArm)
131 132
 	s.reg = setupRegistry(c, false)
132 133
 	s.not = setupNotary(c)
133 134
 }
... ...
@@ -76,7 +76,7 @@ func (s *DockerSuite) TestEventsOOMDisableFalse(c *check.C) {
76 76
 }
77 77
 
78 78
 func (s *DockerSuite) TestEventsOOMDisableTrue(c *check.C) {
79
-	testRequires(c, DaemonIsLinux, oomControl, memoryLimitSupport, NotGCCGO)
79
+	testRequires(c, DaemonIsLinux, oomControl, memoryLimitSupport, NotGCCGO, NotArm)
80 80
 
81 81
 	errChan := make(chan error)
82 82
 	go func() {
... ...
@@ -690,7 +690,7 @@ func (s *DockerDaemonSuite) TestDockerNetworkNoDiscoveryDefaultBridgeNetwork(c *
690 690
 }
691 691
 
692 692
 func (s *DockerNetworkSuite) TestDockerNetworkAnonymousEndpoint(c *check.C) {
693
-	testRequires(c, ExecSupport)
693
+	testRequires(c, ExecSupport, NotArm)
694 694
 	hostsFile := "/etc/hosts"
695 695
 	cstmBridgeNw := "custom-bridge-nw"
696 696
 	cstmBridgeNw1 := "custom-bridge-nw1"
... ...
@@ -968,6 +968,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkDisconnectFromHost(c *check.C) {
968 968
 }
969 969
 
970 970
 func (s *DockerNetworkSuite) TestDockerNetworkConnectWithPortMapping(c *check.C) {
971
+	testRequires(c, NotArm)
971 972
 	dockerCmd(c, "network", "create", "test1")
972 973
 	dockerCmd(c, "run", "-d", "--name", "c1", "-p", "5000:5000", "busybox", "top")
973 974
 	c.Assert(waitRun("c1"), check.IsNil)
... ...
@@ -1113,7 +1114,7 @@ func verifyIPAddresses(c *check.C, cName, nwname, ipv4, ipv6 string) {
1113 1113
 }
1114 1114
 
1115 1115
 func (s *DockerSuite) TestUserDefinedNetworkConnectDisconnectLink(c *check.C) {
1116
-	testRequires(c, DaemonIsLinux, NotUserNamespace)
1116
+	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
1117 1117
 	dockerCmd(c, "network", "create", "-d", "bridge", "foo1")
1118 1118
 	dockerCmd(c, "network", "create", "-d", "bridge", "foo2")
1119 1119
 
... ...
@@ -1196,7 +1197,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkDisconnectDefault(c *check.C) {
1196 1196
 }
1197 1197
 
1198 1198
 func (s *DockerSuite) TestUserDefinedNetworkConnectDisconnectAlias(c *check.C) {
1199
-	testRequires(c, DaemonIsLinux, NotUserNamespace)
1199
+	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
1200 1200
 	dockerCmd(c, "network", "create", "-d", "bridge", "net1")
1201 1201
 	dockerCmd(c, "network", "create", "-d", "bridge", "net2")
1202 1202
 
... ...
@@ -292,6 +292,7 @@ func (s *DockerRegistrySuite) TestPullFallbackOn404(c *check.C) {
292 292
 }
293 293
 
294 294
 func (s *DockerRegistrySuite) TestPullManifestList(c *check.C) {
295
+	testRequires(c, NotArm)
295 296
 	pushDigest, err := setupImage(c)
296 297
 	c.Assert(err, checker.IsNil, check.Commentf("error setting up image"))
297 298
 
... ...
@@ -148,6 +148,7 @@ func (s *DockerSchema1RegistrySuite) TestPushEmptyLayer(c *check.C) {
148 148
 }
149 149
 
150 150
 func (s *DockerRegistrySuite) TestCrossRepositoryLayerPush(c *check.C) {
151
+	testRequires(c, NotArm)
151 152
 	sourceRepoName := fmt.Sprintf("%v/dockercli/busybox", privateRegistryURL)
152 153
 	// tag the image to upload it to the private registry
153 154
 	dockerCmd(c, "tag", "busybox", sourceRepoName)
... ...
@@ -155,7 +155,7 @@ func (s *DockerSuite) TestContainerRestartSuccess(c *check.C) {
155 155
 }
156 156
 
157 157
 func (s *DockerSuite) TestUserDefinedNetworkWithRestartPolicy(c *check.C) {
158
-	testRequires(c, DaemonIsLinux, SameHostDaemon, NotUserNamespace)
158
+	testRequires(c, DaemonIsLinux, SameHostDaemon, NotUserNamespace, NotArm)
159 159
 	dockerCmd(c, "network", "create", "-d", "bridge", "udNet")
160 160
 
161 161
 	dockerCmd(c, "run", "-d", "--net=udNet", "--name=first", "busybox", "top")
... ...
@@ -57,7 +57,7 @@ func (s *DockerSuite) TestRunLeakyFileDescriptors(c *check.C) {
57 57
 // it should be possible to lookup Google DNS
58 58
 // this will fail when Internet access is unavailable
59 59
 func (s *DockerSuite) TestRunLookupGoogleDns(c *check.C) {
60
-	testRequires(c, Network)
60
+	testRequires(c, Network, NotArm)
61 61
 	image := DefaultImage
62 62
 	if daemonPlatform == "windows" {
63 63
 		// nslookup isn't present in Windows busybox. Is built-in.
... ...
@@ -200,7 +200,7 @@ func (s *DockerSuite) TestRunLinksContainerWithContainerId(c *check.C) {
200 200
 }
201 201
 
202 202
 func (s *DockerSuite) TestUserDefinedNetworkLinks(c *check.C) {
203
-	testRequires(c, DaemonIsLinux, NotUserNamespace)
203
+	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
204 204
 	dockerCmd(c, "network", "create", "-d", "bridge", "udlinkNet")
205 205
 
206 206
 	dockerCmd(c, "run", "-d", "--net=udlinkNet", "--name=first", "busybox", "top")
... ...
@@ -236,7 +236,7 @@ func (s *DockerSuite) TestUserDefinedNetworkLinks(c *check.C) {
236 236
 }
237 237
 
238 238
 func (s *DockerSuite) TestUserDefinedNetworkLinksWithRestart(c *check.C) {
239
-	testRequires(c, DaemonIsLinux, NotUserNamespace)
239
+	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
240 240
 	dockerCmd(c, "network", "create", "-d", "bridge", "udlinkNet")
241 241
 
242 242
 	dockerCmd(c, "run", "-d", "--net=udlinkNet", "--name=first", "busybox", "top")
... ...
@@ -274,7 +274,7 @@ func (s *DockerSuite) TestUserDefinedNetworkLinksWithRestart(c *check.C) {
274 274
 }
275 275
 
276 276
 func (s *DockerSuite) TestUserDefinedNetworkAlias(c *check.C) {
277
-	testRequires(c, DaemonIsLinux, NotUserNamespace)
277
+	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
278 278
 	dockerCmd(c, "network", "create", "-d", "bridge", "net1")
279 279
 
280 280
 	dockerCmd(c, "run", "-d", "--net=net1", "--name=first", "--net-alias=foo1", "--net-alias=foo2", "busybox", "top")
... ...
@@ -660,7 +660,7 @@ func (s *DockerSuite) TestRunUserByID(c *check.C) {
660 660
 func (s *DockerSuite) TestRunUserByIDBig(c *check.C) {
661 661
 	// TODO Windows: This test cannot run on a Windows daemon as Windows does
662 662
 	// not support the use of -u
663
-	testRequires(c, DaemonIsLinux)
663
+	testRequires(c, DaemonIsLinux, NotArm)
664 664
 	out, _, err := dockerCmdWithError("run", "-u", "2147483648", "busybox", "id")
665 665
 	if err == nil {
666 666
 		c.Fatal("No error, but must be.", out)
... ...
@@ -1038,7 +1038,7 @@ func (s *DockerSuite) TestRunUnprivilegedCannotMount(c *check.C) {
1038 1038
 
1039 1039
 func (s *DockerSuite) TestRunSysNotWritableInNonPrivilegedContainers(c *check.C) {
1040 1040
 	// Not applicable for Windows as there is no concept of unprivileged
1041
-	testRequires(c, DaemonIsLinux)
1041
+	testRequires(c, DaemonIsLinux, NotArm)
1042 1042
 	if _, code, err := dockerCmdWithError("run", "busybox", "touch", "/sys/kernel/profiling"); err == nil || code == 0 {
1043 1043
 		c.Fatal("sys should not be writable in a non privileged container")
1044 1044
 	}
... ...
@@ -1046,7 +1046,7 @@ func (s *DockerSuite) TestRunSysNotWritableInNonPrivilegedContainers(c *check.C)
1046 1046
 
1047 1047
 func (s *DockerSuite) TestRunSysWritableInPrivilegedContainers(c *check.C) {
1048 1048
 	// Not applicable for Windows as there is no concept of unprivileged
1049
-	testRequires(c, DaemonIsLinux, NotUserNamespace)
1049
+	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
1050 1050
 	if _, code, err := dockerCmdWithError("run", "--privileged", "busybox", "touch", "/sys/kernel/profiling"); err != nil || code != 0 {
1051 1051
 		c.Fatalf("sys should be writable in privileged container")
1052 1052
 	}
... ...
@@ -1334,7 +1334,7 @@ func (s *DockerSuite) TestRunDnsOptionsBasedOnHostResolvConf(c *check.C) {
1334 1334
 // check if the container resolv.conf file has at least 0644 perm.
1335 1335
 func (s *DockerSuite) TestRunNonRootUserResolvName(c *check.C) {
1336 1336
 	// Not applicable on Windows as Windows does not support --user
1337
-	testRequires(c, SameHostDaemon, Network, DaemonIsLinux)
1337
+	testRequires(c, SameHostDaemon, Network, DaemonIsLinux, NotArm)
1338 1338
 
1339 1339
 	dockerCmd(c, "run", "--name=testperm", "--user=nobody", "busybox", "nslookup", "apt.dockerproject.org")
1340 1340
 
... ...
@@ -3615,7 +3615,7 @@ func (s *DockerSuite) TestTwoContainersInNetHost(c *check.C) {
3615 3615
 }
3616 3616
 
3617 3617
 func (s *DockerSuite) TestContainersInUserDefinedNetwork(c *check.C) {
3618
-	testRequires(c, DaemonIsLinux, NotUserNamespace)
3618
+	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
3619 3619
 	dockerCmd(c, "network", "create", "-d", "bridge", "testnetwork")
3620 3620
 	dockerCmd(c, "run", "-d", "--net=testnetwork", "--name=first", "busybox", "top")
3621 3621
 	c.Assert(waitRun("first"), check.IsNil)
... ...
@@ -3623,7 +3623,7 @@ func (s *DockerSuite) TestContainersInUserDefinedNetwork(c *check.C) {
3623 3623
 }
3624 3624
 
3625 3625
 func (s *DockerSuite) TestContainersInMultipleNetworks(c *check.C) {
3626
-	testRequires(c, DaemonIsLinux, NotUserNamespace)
3626
+	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
3627 3627
 	// Create 2 networks using bridge driver
3628 3628
 	dockerCmd(c, "network", "create", "-d", "bridge", "testnetwork1")
3629 3629
 	dockerCmd(c, "network", "create", "-d", "bridge", "testnetwork2")
... ...
@@ -3642,7 +3642,7 @@ func (s *DockerSuite) TestContainersInMultipleNetworks(c *check.C) {
3642 3642
 }
3643 3643
 
3644 3644
 func (s *DockerSuite) TestContainersNetworkIsolation(c *check.C) {
3645
-	testRequires(c, DaemonIsLinux, NotUserNamespace)
3645
+	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
3646 3646
 	// Create 2 networks using bridge driver
3647 3647
 	dockerCmd(c, "network", "create", "-d", "bridge", "testnetwork1")
3648 3648
 	dockerCmd(c, "network", "create", "-d", "bridge", "testnetwork2")
... ...
@@ -3687,7 +3687,7 @@ func (s *DockerSuite) TestNetworkRmWithActiveContainers(c *check.C) {
3687 3687
 }
3688 3688
 
3689 3689
 func (s *DockerSuite) TestContainerRestartInMultipleNetworks(c *check.C) {
3690
-	testRequires(c, DaemonIsLinux, NotUserNamespace)
3690
+	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
3691 3691
 	// Create 2 networks using bridge driver
3692 3692
 	dockerCmd(c, "network", "create", "-d", "bridge", "testnetwork1")
3693 3693
 	dockerCmd(c, "network", "create", "-d", "bridge", "testnetwork2")
... ...
@@ -76,7 +76,7 @@ func (s *DockerSuite) TestRunWithVolumesIsRecursive(c *check.C) {
76 76
 }
77 77
 
78 78
 func (s *DockerSuite) TestRunDeviceDirectory(c *check.C) {
79
-	testRequires(c, DaemonIsLinux, NotUserNamespace)
79
+	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
80 80
 	if _, err := os.Stat("/dev/snd"); err != nil {
81 81
 		c.Skip("Host does not have /dev/snd")
82 82
 	}
... ...
@@ -726,7 +726,7 @@ func (s *DockerSuite) TestRunTmpfsMounts(c *check.C) {
726 726
 
727 727
 // TestRunSeccompProfileDenyUnshare checks that 'docker run --security-opt seccomp:/tmp/profile.json debian:jessie unshare' exits with operation not permitted.
728 728
 func (s *DockerSuite) TestRunSeccompProfileDenyUnshare(c *check.C) {
729
-	testRequires(c, SameHostDaemon, seccompEnabled)
729
+	testRequires(c, SameHostDaemon, seccompEnabled, NotArm)
730 730
 	jsonData := `{
731 731
 	"defaultAction": "SCMP_ACT_ALLOW",
732 732
 	"syscalls": [
... ...
@@ -783,7 +783,7 @@ func (s *DockerSuite) TestRunSeccompProfileDenyChmod(c *check.C) {
783 783
 // TestRunSeccompProfileDenyUnshareUserns checks that 'docker run debian:jessie unshare --map-root-user --user sh -c whoami' with a specific profile to
784 784
 // deny unhare of a userns exits with operation not permitted.
785 785
 func (s *DockerSuite) TestRunSeccompProfileDenyUnshareUserns(c *check.C) {
786
-	testRequires(c, SameHostDaemon, seccompEnabled)
786
+	testRequires(c, SameHostDaemon, seccompEnabled, NotArm)
787 787
 	// from sched.h
788 788
 	jsonData := fmt.Sprintf(`{
789 789
 	"defaultAction": "SCMP_ACT_ALLOW",
... ...
@@ -29,6 +29,10 @@ var (
29 29
 		func() bool { return daemonPlatform == "linux" },
30 30
 		"Test requires a Linux daemon",
31 31
 	}
32
+	NotArm = testRequirement{
33
+		func() bool { return os.Getenv("DOCKER_ENGINE_GOARCH") == "arm" },
34
+		"Test requires a daemon not running on ARM",
35
+	}
32 36
 	SameHostDaemon = testRequirement{
33 37
 		func() bool { return isLocalDaemon },
34 38
 		"Test requires docker daemon to run on the same machine as CLI",