Browse code

test/integration: Remove checks for "not arm" in tests

We no longer have any arm (not 64) CI.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>

Djordje Lukic authored on 2023/08/31 00:57:11
Showing 7 changed files
... ...
@@ -80,7 +80,7 @@ func (s *DockerCLIEventSuite) TestEventsOOMDisableFalse(c *testing.T) {
80 80
 }
81 81
 
82 82
 func (s *DockerCLIEventSuite) TestEventsOOMDisableTrue(c *testing.T) {
83
-	testRequires(c, DaemonIsLinux, oomControl, memoryLimitSupport, NotArm, swapMemorySupport, NotPpc64le)
83
+	testRequires(c, DaemonIsLinux, oomControl, memoryLimitSupport, swapMemorySupport, NotPpc64le)
84 84
 	skip.If(c, GitHubActions, "FIXME: https://github.com/moby/moby/pull/36541")
85 85
 
86 86
 	errChan := make(chan error, 1)
... ...
@@ -838,7 +838,6 @@ func (s *DockerDaemonSuite) TestDockerNetworkNoDiscoveryDefaultBridgeNetwork(c *
838 838
 }
839 839
 
840 840
 func (s *DockerNetworkSuite) TestDockerNetworkAnonymousEndpoint(c *testing.T) {
841
-	testRequires(c, NotArm)
842 841
 	hostsFile := "/etc/hosts"
843 842
 	cstmBridgeNw := "custom-bridge-nw"
844 843
 	cstmBridgeNw1 := "custom-bridge-nw1"
... ...
@@ -1140,7 +1139,6 @@ func (s *DockerNetworkSuite) TestDockerNetworkDisconnectFromHost(c *testing.T) {
1140 1140
 }
1141 1141
 
1142 1142
 func (s *DockerNetworkSuite) TestDockerNetworkConnectWithPortMapping(c *testing.T) {
1143
-	testRequires(c, NotArm)
1144 1143
 	dockerCmd(c, "network", "create", "test1")
1145 1144
 	dockerCmd(c, "run", "-d", "--name", "c1", "-p", "5000:5000", "busybox", "top")
1146 1145
 	assert.Assert(c, waitRun("c1") == nil)
... ...
@@ -1161,7 +1159,6 @@ func (s *DockerNetworkSuite) TestDockerNetworkConnectDisconnectWithPortMapping(c
1161 1161
 	// host port mapping to/from networks which do cause and do not cause
1162 1162
 	// the container default gateway to change, and verify docker port cmd
1163 1163
 	// returns congruent information
1164
-	testRequires(c, NotArm)
1165 1164
 	cnt := "c1"
1166 1165
 	dockerCmd(c, "network", "create", "aaa")
1167 1166
 	dockerCmd(c, "network", "create", "ccc")
... ...
@@ -1419,7 +1416,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkConnectLinkLocalIP(c *testing.T) {
1419 1419
 }
1420 1420
 
1421 1421
 func (s *DockerCLINetworkSuite) TestUserDefinedNetworkConnectDisconnectLink(c *testing.T) {
1422
-	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
1422
+	testRequires(c, DaemonIsLinux, NotUserNamespace)
1423 1423
 	dockerCmd(c, "network", "create", "-d", "bridge", "foo1")
1424 1424
 	dockerCmd(c, "network", "create", "-d", "bridge", "foo2")
1425 1425
 
... ...
@@ -1480,7 +1477,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkDisconnectDefault(c *testing.T) {
1480 1480
 }
1481 1481
 
1482 1482
 func (s *DockerNetworkSuite) TestDockerNetworkConnectWithAliasOnDefaultNetworks(c *testing.T) {
1483
-	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
1483
+	testRequires(c, DaemonIsLinux, NotUserNamespace)
1484 1484
 
1485 1485
 	defaults := []string{"bridge", "host", "none"}
1486 1486
 	out, _ := dockerCmd(c, "run", "-d", "--net=none", "busybox", "top")
... ...
@@ -1493,7 +1490,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkConnectWithAliasOnDefaultNetworks(
1493 1493
 }
1494 1494
 
1495 1495
 func (s *DockerCLINetworkSuite) TestUserDefinedNetworkConnectDisconnectAlias(c *testing.T) {
1496
-	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
1496
+	testRequires(c, DaemonIsLinux, NotUserNamespace)
1497 1497
 	dockerCmd(c, "network", "create", "-d", "bridge", "net1")
1498 1498
 	dockerCmd(c, "network", "create", "-d", "bridge", "net2")
1499 1499
 
... ...
@@ -283,7 +283,6 @@ func (s *DockerSchema1RegistrySuite) TestPullNoLayers(c *testing.T) {
283 283
 }
284 284
 
285 285
 func (s *DockerRegistrySuite) TestPullManifestList(c *testing.T) {
286
-	testRequires(c, NotArm)
287 286
 	pushDigest, err := setupImage(c)
288 287
 	assert.NilError(c, err, "error setting up image")
289 288
 
... ...
@@ -92,7 +92,7 @@ func (s *DockerCLIRestartSuite) TestRestartWithVolumes(c *testing.T) {
92 92
 }
93 93
 
94 94
 func (s *DockerCLIRestartSuite) TestRestartDisconnectedContainer(c *testing.T) {
95
-	testRequires(c, DaemonIsLinux, testEnv.IsLocalDaemon, NotUserNamespace, NotArm)
95
+	testRequires(c, DaemonIsLinux, testEnv.IsLocalDaemon, NotUserNamespace)
96 96
 
97 97
 	// Run a container on the default bridge network
98 98
 	out, _ := dockerCmd(c, "run", "-d", "--name", "c0", "busybox", "top")
... ...
@@ -213,7 +213,7 @@ func (s *DockerCLIRestartSuite) TestRestartContainerSuccess(c *testing.T) {
213 213
 
214 214
 func (s *DockerCLIRestartSuite) TestRestartWithPolicyUserDefinedNetwork(c *testing.T) {
215 215
 	// TODO Windows. This may be portable following HNS integration post TP5.
216
-	testRequires(c, DaemonIsLinux, testEnv.IsLocalDaemon, NotUserNamespace, NotArm)
216
+	testRequires(c, DaemonIsLinux, testEnv.IsLocalDaemon, NotUserNamespace)
217 217
 	dockerCmd(c, "network", "create", "-d", "bridge", "udNet")
218 218
 
219 219
 	dockerCmd(c, "run", "-d", "--net=udNet", "--name=first", "busybox", "top")
... ...
@@ -81,7 +81,7 @@ func (s *DockerCLIRunSuite) TestRunLeakyFileDescriptors(c *testing.T) {
81 81
 // it should be possible to lookup Google DNS
82 82
 // this will fail when Internet access is unavailable
83 83
 func (s *DockerCLIRunSuite) TestRunLookupGoogleDNS(c *testing.T) {
84
-	testRequires(c, Network, NotArm)
84
+	testRequires(c, Network)
85 85
 	if testEnv.DaemonInfo.OSType == "windows" {
86 86
 		// nslookup isn't present in Windows busybox. Is built-in. Further,
87 87
 		// nslookup isn't present in nanoserver. Hence just use PowerShell...
... ...
@@ -216,7 +216,7 @@ func (s *DockerCLIRunSuite) TestRunLinksContainerWithContainerID(c *testing.T) {
216 216
 }
217 217
 
218 218
 func (s *DockerCLIRunSuite) TestUserDefinedNetworkLinks(c *testing.T) {
219
-	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
219
+	testRequires(c, DaemonIsLinux, NotUserNamespace)
220 220
 	dockerCmd(c, "network", "create", "-d", "bridge", "udlinkNet")
221 221
 
222 222
 	dockerCmd(c, "run", "-d", "--net=udlinkNet", "--name=first", "busybox", "top")
... ...
@@ -252,7 +252,7 @@ func (s *DockerCLIRunSuite) TestUserDefinedNetworkLinks(c *testing.T) {
252 252
 }
253 253
 
254 254
 func (s *DockerCLIRunSuite) TestUserDefinedNetworkLinksWithRestart(c *testing.T) {
255
-	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
255
+	testRequires(c, DaemonIsLinux, NotUserNamespace)
256 256
 	dockerCmd(c, "network", "create", "-d", "bridge", "udlinkNet")
257 257
 
258 258
 	dockerCmd(c, "run", "-d", "--net=udlinkNet", "--name=first", "busybox", "top")
... ...
@@ -290,7 +290,7 @@ func (s *DockerCLIRunSuite) TestUserDefinedNetworkLinksWithRestart(c *testing.T)
290 290
 }
291 291
 
292 292
 func (s *DockerCLIRunSuite) TestRunWithNetAliasOnDefaultNetworks(c *testing.T) {
293
-	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
293
+	testRequires(c, DaemonIsLinux, NotUserNamespace)
294 294
 
295 295
 	defaults := []string{"bridge", "host", "none"}
296 296
 	for _, net := range defaults {
... ...
@@ -301,7 +301,7 @@ func (s *DockerCLIRunSuite) TestRunWithNetAliasOnDefaultNetworks(c *testing.T) {
301 301
 }
302 302
 
303 303
 func (s *DockerCLIRunSuite) TestUserDefinedNetworkAlias(c *testing.T) {
304
-	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
304
+	testRequires(c, DaemonIsLinux, NotUserNamespace)
305 305
 	dockerCmd(c, "network", "create", "-d", "bridge", "net1")
306 306
 
307 307
 	cid1, _ := dockerCmd(c, "run", "-d", "--net=net1", "--name=first", "--net-alias=foo1", "--net-alias=foo2", "busybox:glibc", "top")
... ...
@@ -753,7 +753,7 @@ func (s *DockerCLIRunSuite) TestRunUserByID(c *testing.T) {
753 753
 func (s *DockerCLIRunSuite) TestRunUserByIDBig(c *testing.T) {
754 754
 	// TODO Windows: This test cannot run on a Windows daemon as Windows does
755 755
 	// not support the use of -u
756
-	testRequires(c, DaemonIsLinux, NotArm)
756
+	testRequires(c, DaemonIsLinux)
757 757
 	out, _, err := dockerCmdWithError("run", "-u", "2147483648", "busybox", "id")
758 758
 	if err == nil {
759 759
 		c.Fatal("No error, but must be.", out)
... ...
@@ -1115,7 +1115,7 @@ func (s *DockerCLIRunSuite) TestRunUnprivilegedCannotMount(c *testing.T) {
1115 1115
 
1116 1116
 func (s *DockerCLIRunSuite) TestRunSysNotWritableInNonPrivilegedContainers(c *testing.T) {
1117 1117
 	// Not applicable for Windows as there is no concept of unprivileged
1118
-	testRequires(c, DaemonIsLinux, NotArm)
1118
+	testRequires(c, DaemonIsLinux)
1119 1119
 	if _, code, err := dockerCmdWithError("run", "busybox", "touch", "/sys/kernel/profiling"); err == nil || code == 0 {
1120 1120
 		c.Fatal("sys should not be writable in a non privileged container")
1121 1121
 	}
... ...
@@ -1123,7 +1123,7 @@ func (s *DockerCLIRunSuite) TestRunSysNotWritableInNonPrivilegedContainers(c *te
1123 1123
 
1124 1124
 func (s *DockerCLIRunSuite) TestRunSysWritableInPrivilegedContainers(c *testing.T) {
1125 1125
 	// Not applicable for Windows as there is no concept of unprivileged
1126
-	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
1126
+	testRequires(c, DaemonIsLinux, NotUserNamespace)
1127 1127
 	if _, code, err := dockerCmdWithError("run", "--privileged", "busybox", "touch", "/sys/kernel/profiling"); err != nil || code != 0 {
1128 1128
 		c.Fatalf("sys should be writable in privileged container")
1129 1129
 	}
... ...
@@ -1410,7 +1410,7 @@ func (s *DockerCLIRunSuite) TestRunDNSOptionsBasedOnHostResolvConf(c *testing.T)
1410 1410
 // check if the container resolv.conf file has at least 0644 perm.
1411 1411
 func (s *DockerCLIRunSuite) TestRunNonRootUserResolvName(c *testing.T) {
1412 1412
 	// Not applicable on Windows as Windows does not support --user
1413
-	testRequires(c, testEnv.IsLocalDaemon, Network, DaemonIsLinux, NotArm)
1413
+	testRequires(c, testEnv.IsLocalDaemon, Network, DaemonIsLinux)
1414 1414
 
1415 1415
 	dockerCmd(c, "run", "--name=testperm", "--user=nobody", "busybox", "nslookup", "example.com")
1416 1416
 
... ...
@@ -3436,7 +3436,7 @@ func (s *DockerCLIRunSuite) TestTwoContainersInNetHost(c *testing.T) {
3436 3436
 }
3437 3437
 
3438 3438
 func (s *DockerCLIRunSuite) TestContainersInUserDefinedNetwork(c *testing.T) {
3439
-	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
3439
+	testRequires(c, DaemonIsLinux, NotUserNamespace)
3440 3440
 	dockerCmd(c, "network", "create", "-d", "bridge", "testnetwork")
3441 3441
 	dockerCmd(c, "run", "-d", "--net=testnetwork", "--name=first", "busybox", "top")
3442 3442
 	assert.Assert(c, waitRun("first") == nil)
... ...
@@ -3444,7 +3444,7 @@ func (s *DockerCLIRunSuite) TestContainersInUserDefinedNetwork(c *testing.T) {
3444 3444
 }
3445 3445
 
3446 3446
 func (s *DockerCLIRunSuite) TestContainersInMultipleNetworks(c *testing.T) {
3447
-	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
3447
+	testRequires(c, DaemonIsLinux, NotUserNamespace)
3448 3448
 	// Create 2 networks using bridge driver
3449 3449
 	dockerCmd(c, "network", "create", "-d", "bridge", "testnetwork1")
3450 3450
 	dockerCmd(c, "network", "create", "-d", "bridge", "testnetwork2")
... ...
@@ -3463,7 +3463,7 @@ func (s *DockerCLIRunSuite) TestContainersInMultipleNetworks(c *testing.T) {
3463 3463
 }
3464 3464
 
3465 3465
 func (s *DockerCLIRunSuite) TestContainersNetworkIsolation(c *testing.T) {
3466
-	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
3466
+	testRequires(c, DaemonIsLinux, NotUserNamespace)
3467 3467
 	// Create 2 networks using bridge driver
3468 3468
 	dockerCmd(c, "network", "create", "-d", "bridge", "testnetwork1")
3469 3469
 	dockerCmd(c, "network", "create", "-d", "bridge", "testnetwork2")
... ...
@@ -3508,7 +3508,7 @@ func (s *DockerCLIRunSuite) TestNetworkRmWithActiveContainers(c *testing.T) {
3508 3508
 }
3509 3509
 
3510 3510
 func (s *DockerCLIRunSuite) TestContainerRestartInMultipleNetworks(c *testing.T) {
3511
-	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
3511
+	testRequires(c, DaemonIsLinux, NotUserNamespace)
3512 3512
 	// Create 2 networks using bridge driver
3513 3513
 	dockerCmd(c, "network", "create", "-d", "bridge", "testnetwork1")
3514 3514
 	dockerCmd(c, "network", "create", "-d", "bridge", "testnetwork2")
... ...
@@ -80,7 +80,7 @@ func (s *DockerCLIRunSuite) TestRunWithVolumesIsRecursive(c *testing.T) {
80 80
 }
81 81
 
82 82
 func (s *DockerCLIRunSuite) TestRunDeviceDirectory(c *testing.T) {
83
-	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm)
83
+	testRequires(c, DaemonIsLinux, NotUserNamespace)
84 84
 	if _, err := os.Stat("/dev/snd"); err != nil {
85 85
 		c.Skip("Host does not have /dev/snd")
86 86
 	}
... ...
@@ -890,7 +890,7 @@ func (s *DockerCLIRunSuite) TestRunSysctls(c *testing.T) {
890 890
 
891 891
 // TestRunSeccompProfileDenyUnshare checks that 'docker run --security-opt seccomp=/tmp/profile.json debian:bullseye-slim unshare' exits with operation not permitted.
892 892
 func (s *DockerCLIRunSuite) TestRunSeccompProfileDenyUnshare(c *testing.T) {
893
-	testRequires(c, testEnv.IsLocalDaemon, seccompEnabled, NotArm, Apparmor)
893
+	testRequires(c, testEnv.IsLocalDaemon, seccompEnabled, Apparmor)
894 894
 	jsonData := `{
895 895
 	"defaultAction": "SCMP_ACT_ALLOW",
896 896
 	"syscalls": [
... ...
@@ -954,7 +954,7 @@ func (s *DockerCLIRunSuite) TestRunSeccompProfileDenyChmod(c *testing.T) {
954 954
 // TestRunSeccompProfileDenyUnshareUserns checks that 'docker run debian:bullseye-slim unshare --map-root-user --user sh -c whoami' with a specific profile to
955 955
 // deny unshare of a userns exits with operation not permitted.
956 956
 func (s *DockerCLIRunSuite) TestRunSeccompProfileDenyUnshareUserns(c *testing.T) {
957
-	testRequires(c, testEnv.IsLocalDaemon, seccompEnabled, NotArm, Apparmor)
957
+	testRequires(c, testEnv.IsLocalDaemon, seccompEnabled, Apparmor)
958 958
 	// from sched.h
959 959
 	jsonData := fmt.Sprintf(`{
960 960
 	"defaultAction": "SCMP_ACT_ALLOW",
... ...
@@ -1343,7 +1343,7 @@ func (s *DockerCLIRunSuite) TestRunSeccompWithDefaultProfile(c *testing.T) {
1343 1343
 
1344 1344
 // TestRunDeviceSymlink checks run with device that follows symlink (#13840 and #22271)
1345 1345
 func (s *DockerCLIRunSuite) TestRunDeviceSymlink(c *testing.T) {
1346
-	testRequires(c, DaemonIsLinux, NotUserNamespace, NotArm, testEnv.IsLocalDaemon)
1346
+	testRequires(c, DaemonIsLinux, NotUserNamespace, testEnv.IsLocalDaemon)
1347 1347
 	if _, err := os.Stat("/dev/zero"); err != nil {
1348 1348
 		c.Skip("Host does not have /dev/zero")
1349 1349
 	}
... ...
@@ -53,10 +53,6 @@ func IsAmd64() bool {
53 53
 	return os.Getenv("DOCKER_ENGINE_GOARCH") == "amd64"
54 54
 }
55 55
 
56
-func NotArm() bool {
57
-	return ArchitectureIsNot("arm")
58
-}
59
-
60 56
 func NotArm64() bool {
61 57
 	return ArchitectureIsNot("arm64")
62 58
 }