Package: docker.io
Version: 1.13.0~ds1-3
Followup-For: Bug #858269
Hi Tim,
I've extended the patches so they fix the testsuite errors.
Attached are the new two patches for debian/patches. With them, docker.io
builds with a non-priviledged user.
Jordi
-- System Information:
Debian Release: 9.0
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'), (1,
'experimental')
Architecture: amd64
(x86_64)
Foreign Architectures: i386
Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=ca_ES.UTF-8, LC_CTYPE=ca_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages docker.io depends on:
ii adduser 3.115
ii containerd 0.2.3~git20161117.78.03e5862~ds1-2+b1
ii golang-libnetwork 0.8.0~dev.2+git20161130.568.fd27f22-4+b1
ii init-system-helpers 1.48
ii iptables 1.6.0+snapshot20161117-6
ii libapparmor1 2.11.0-3
ii libc6 2.24-10
ii libdevmapper1.02.1 2:1.02.137-2
ii libsqlite3-0 3.16.2-3
ii libsystemd0 232-23
ii lsb-base 9.20161125
ii runc 1.0.0~rc2+git20161109.131.5137186-2+b1
Versions of packages docker.io recommends:
ii ca-certificates 20161130
ii cgroupfs-mount 1.4
ii git 1:2.11.0-2
ii xz-utils 5.2.2-1.2+b1
Versions of packages docker.io suggests:
pn aufs-tools <none>
ii btrfs-progs 4.9.1-1
ii debootstrap 1.0.90
pn docker-doc <none>
pn rinse <none>
pn zfs-fuse | zfsutils <none>
-- no debconf information
Index: docker.io-1.13.0~ds1/profiles/seccomp/seccomp.go
===================================================================
--- docker.io-1.13.0~ds1.orig/profiles/seccomp/seccomp.go
+++ docker.io-1.13.0~ds1/profiles/seccomp/seccomp.go
@@ -17,7 +17,7 @@ import (
// GetDefaultProfile returns the default seccomp profile.
func GetDefaultProfile(rs *specs.Spec) (*specs.Seccomp, error) {
- return setupSeccomp(DefaultProfile(), rs)
+ return setupSeccomp(DefaultProfile(rs), rs)
}
// LoadProfile takes a file path and decodes the seccomp profile.
Description: allow skipping "privileged" tests with "-test.short"
Author: Tianon Gravi <[email protected]>
Forwarded: no
Index: docker.io-1.13.0~ds1/daemon/daemon_test.go
===================================================================
--- docker.io-1.13.0~ds1.orig/daemon/daemon_test.go
+++ docker.io-1.13.0~ds1/daemon/daemon_test.go
@@ -158,6 +158,10 @@ func TestValidContainerNames(t *testing.
}
func TestContainerInitDNS(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
tmp, err := ioutil.TempDir("", "docker-container-test-")
if err != nil {
t.Fatal(err)
Index: docker.io-1.13.0~ds1/daemon/graphdriver/aufs/aufs_test.go
===================================================================
--- docker.io-1.13.0~ds1.orig/daemon/graphdriver/aufs/aufs_test.go
+++ docker.io-1.13.0~ds1/daemon/graphdriver/aufs/aufs_test.go
@@ -28,6 +28,10 @@ func init() {
}
func testInit(dir string, t testing.TB) graphdriver.Driver {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
d, err := Init(dir, nil, nil, nil)
if err != nil {
if err == graphdriver.ErrNotSupported {
Index: docker.io-1.13.0~ds1/daemon/graphdriver/devmapper/devmapper_test.go
===================================================================
--- docker.io-1.13.0~ds1.orig/daemon/graphdriver/devmapper/devmapper_test.go
+++ docker.io-1.13.0~ds1/daemon/graphdriver/devmapper/devmapper_test.go
@@ -11,50 +11,70 @@ import (
"github.com/docker/docker/daemon/graphdriver/graphtest"
)
-func init() {
+func shortSkip(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+}
+
+// This avoids creating a new driver for each test if all tests are run
+// Make sure to put new tests between TestDevmapperSetup and
TestDevmapperTeardown
+func TestDevmapperSetup(t *testing.T) {
+ shortSkip(t)
+
// Reduce the size the the base fs and loopback for the tests
defaultDataLoopbackSize = 300 * 1024 * 1024
defaultMetaDataLoopbackSize = 200 * 1024 * 1024
defaultBaseFsSize = 300 * 1024 * 1024
defaultUdevSyncOverride = true
if err := graphtest.InitLoopbacks(); err != nil {
- panic(err)
+ t.Fatal(err)
}
-}
-// This avoids creating a new driver for each test if all tests are run
-// Make sure to put new tests between TestDevmapperSetup and
TestDevmapperTeardown
-func TestDevmapperSetup(t *testing.T) {
graphtest.GetDriver(t, "devicemapper")
}
func TestDevmapperCreateEmpty(t *testing.T) {
+ shortSkip(t)
+
graphtest.DriverTestCreateEmpty(t, "devicemapper")
}
func TestDevmapperCreateBase(t *testing.T) {
+ shortSkip(t)
+
graphtest.DriverTestCreateBase(t, "devicemapper")
}
func TestDevmapperCreateSnap(t *testing.T) {
+ shortSkip(t)
+
graphtest.DriverTestCreateSnap(t, "devicemapper")
}
func TestDevmapperTeardown(t *testing.T) {
+ shortSkip(t)
+
graphtest.PutDriver(t)
}
func TestDevmapperReduceLoopBackSize(t *testing.T) {
+ shortSkip(t)
+
tenMB := int64(10 * 1024 * 1024)
testChangeLoopBackSize(t, -tenMB, defaultDataLoopbackSize,
defaultMetaDataLoopbackSize)
}
func TestDevmapperIncreaseLoopBackSize(t *testing.T) {
+ shortSkip(t)
+
tenMB := int64(10 * 1024 * 1024)
testChangeLoopBackSize(t, tenMB, defaultDataLoopbackSize+tenMB,
defaultMetaDataLoopbackSize+tenMB)
}
func testChangeLoopBackSize(t *testing.T, delta, expectDataSize,
expectMetaDataSize int64) {
+ shortSkip(t)
+
driver := graphtest.GetDriver(t,
"devicemapper").(*graphtest.Driver).Driver.(*graphdriver.NaiveDiffDriver).ProtoDriver.(*Driver)
defer graphtest.PutDriver(t)
// make sure data or metadata loopback size are the default size
@@ -83,6 +103,8 @@ func testChangeLoopBackSize(t *testing.T
// Make sure devices.Lock() has been release upon return from
cleanupDeletedDevices() function
func TestDevmapperLockReleasedDeviceDeletion(t *testing.T) {
+ shortSkip(t)
+
driver := graphtest.GetDriver(t,
"devicemapper").(*graphtest.Driver).Driver.(*graphdriver.NaiveDiffDriver).ProtoDriver.(*Driver)
defer graphtest.PutDriver(t)
Index: docker.io-1.13.0~ds1/daemon/graphdriver/vfs/vfs_test.go
===================================================================
--- docker.io-1.13.0~ds1.orig/daemon/graphdriver/vfs/vfs_test.go
+++ docker.io-1.13.0~ds1/daemon/graphdriver/vfs/vfs_test.go
@@ -10,28 +10,42 @@ import (
"github.com/docker/docker/pkg/reexec"
)
-func init() {
- reexec.Init()
+func shortSkip(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
}
// This avoids creating a new driver for each test if all tests are run
// Make sure to put new tests between TestVfsSetup and TestVfsTeardown
func TestVfsSetup(t *testing.T) {
+ shortSkip(t)
+
+ reexec.Init()
+
graphtest.GetDriver(t, "vfs")
}
func TestVfsCreateEmpty(t *testing.T) {
+ shortSkip(t)
+
graphtest.DriverTestCreateEmpty(t, "vfs")
}
func TestVfsCreateBase(t *testing.T) {
+ shortSkip(t)
+
graphtest.DriverTestCreateBase(t, "vfs")
}
func TestVfsCreateSnap(t *testing.T) {
+ shortSkip(t)
+
graphtest.DriverTestCreateSnap(t, "vfs")
}
func TestVfsTeardown(t *testing.T) {
+ shortSkip(t)
+
graphtest.PutDriver(t)
}
Index: docker.io-1.13.0~ds1/pkg/archive/archive_test.go
===================================================================
--- docker.io-1.13.0~ds1.orig/pkg/archive/archive_test.go
+++ docker.io-1.13.0~ds1/pkg/archive/archive_test.go
@@ -317,6 +317,10 @@ func TestUntarPathWithInvalidSrc(t *test
}
func TestUntarPath(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
tmpFolder, err := ioutil.TempDir("", "docker-archive-test")
if err != nil {
t.Fatal(err)
@@ -451,6 +455,10 @@ func TestCopyWithTarInvalidSrc(t *testin
}
func TestCopyWithTarInexistentDestWillCreateIt(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
tempFolder, err := ioutil.TempDir("", "docker-archive-test")
if err != nil {
t.Fatal(nil)
@@ -937,6 +945,11 @@ func TestUntarHardlinkToSymlink(t *testi
if runtime.GOOS == "windows" {
t.Skip("hardlinks on Windows")
}
+
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
for i, headers := range [][]*tar.Header{
{
{
Index: docker.io-1.13.0~ds1/pkg/archive/archive_unix_test.go
===================================================================
--- docker.io-1.13.0~ds1.orig/pkg/archive/archive_unix_test.go
+++ docker.io-1.13.0~ds1/pkg/archive/archive_unix_test.go
@@ -151,6 +151,10 @@ func getInode(path string) (uint64, erro
}
func TestTarWithBlockCharFifo(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
origin, err := ioutil.TempDir("", "docker-test-tar-hardlink")
if err != nil {
t.Fatal(err)
@@ -204,6 +208,10 @@ func TestTarWithBlockCharFifo(t *testing
// TestTarUntarWithXattr is Unix as Lsetxattr is not supported on Windows
func TestTarUntarWithXattr(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
if runtime.GOOS == "solaris" {
t.Skip()
}
Index: docker.io-1.13.0~ds1/pkg/archive/changes_test.go
===================================================================
--- docker.io-1.13.0~ds1.orig/pkg/archive/changes_test.go
+++ docker.io-1.13.0~ds1/pkg/archive/changes_test.go
@@ -146,6 +146,10 @@ func TestChangesWithNoChanges(t *testing
}
func TestChangesWithChanges(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
// TODO Windows. There may be a way of running this, but turning off
for now
// as createSampleDir uses symlinks.
if runtime.GOOS == "windows" {
@@ -202,6 +206,11 @@ func TestChangesWithChangesGH13590(t *te
if runtime.GOOS == "windows" {
t.Skip("symlinks on Windows")
}
+
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
baseLayer, err := ioutil.TempDir("", "docker-changes-test.")
defer os.RemoveAll(baseLayer)
Index: docker.io-1.13.0~ds1/pkg/idtools/idtools_unix_test.go
===================================================================
--- docker.io-1.13.0~ds1.orig/pkg/idtools/idtools_unix_test.go
+++ docker.io-1.13.0~ds1/pkg/idtools/idtools_unix_test.go
@@ -17,6 +17,10 @@ type node struct {
}
func TestMkdirAllAs(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
dirName, err := ioutil.TempDir("", "mkdirall")
if err != nil {
t.Fatalf("Couldn't create temp dir: %v", err)
@@ -77,6 +81,9 @@ func TestMkdirAllAs(t *testing.T) {
}
func TestMkdirAllNewAs(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
dirName, err := ioutil.TempDir("", "mkdirnew")
if err != nil {
@@ -137,6 +144,9 @@ func TestMkdirAllNewAs(t *testing.T) {
}
func TestMkdirAs(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
dirName, err := ioutil.TempDir("", "mkdir")
if err != nil {
Index: docker.io-1.13.0~ds1/pkg/mount/mount_unix_test.go
===================================================================
--- docker.io-1.13.0~ds1.orig/pkg/mount/mount_unix_test.go
+++ docker.io-1.13.0~ds1/pkg/mount/mount_unix_test.go
@@ -25,6 +25,10 @@ func TestMountOptionsParsing(t *testing.
}
func TestMounted(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
tmp := path.Join(os.TempDir(), "mount-tests")
if err := os.MkdirAll(tmp, 0777); err != nil {
t.Fatal(err)
@@ -76,6 +80,10 @@ func TestMounted(t *testing.T) {
}
func TestMountReadonly(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
tmp := path.Join(os.TempDir(), "mount-tests")
if err := os.MkdirAll(tmp, 0777); err != nil {
t.Fatal(err)
@@ -121,6 +129,9 @@ func TestMountReadonly(t *testing.T) {
}
func TestGetMounts(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
mounts, err := GetMounts()
if err != nil {
t.Fatal(err)
Index: docker.io-1.13.0~ds1/pkg/mount/sharedsubtree_linux_test.go
===================================================================
--- docker.io-1.13.0~ds1.orig/pkg/mount/sharedsubtree_linux_test.go
+++ docker.io-1.13.0~ds1/pkg/mount/sharedsubtree_linux_test.go
@@ -11,6 +11,10 @@ import (
// nothing is propagated in or out
func TestSubtreePrivate(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
tmp := path.Join(os.TempDir(), "mount-tests")
if err := os.MkdirAll(tmp, 0777); err != nil {
t.Fatal(err)
@@ -109,6 +113,10 @@ func TestSubtreePrivate(t *testing.T) {
// Testing that when a target is a shared mount,
// then child mounts propagate to the source
func TestSubtreeShared(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
tmp := path.Join(os.TempDir(), "mount-tests")
if err := os.MkdirAll(tmp, 0777); err != nil {
t.Fatal(err)
@@ -177,6 +185,10 @@ func TestSubtreeShared(t *testing.T) {
// testing that mounts to a shared source show up in the slave target,
// and that mounts into a slave target do _not_ show up in the shared source
func TestSubtreeSharedSlave(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
tmp := path.Join(os.TempDir(), "mount-tests")
if err := os.MkdirAll(tmp, 0777); err != nil {
t.Fatal(err)
@@ -281,6 +293,10 @@ func TestSubtreeSharedSlave(t *testing.T
}
func TestSubtreeUnbindable(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
tmp := path.Join(os.TempDir(), "mount-tests")
if err := os.MkdirAll(tmp, 0777); err != nil {
t.Fatal(err)
Index: docker.io-1.13.0~ds1/pkg/sysinfo/sysinfo_linux_test.go
===================================================================
--- docker.io-1.13.0~ds1.orig/pkg/sysinfo/sysinfo_linux_test.go
+++ docker.io-1.13.0~ds1/pkg/sysinfo/sysinfo_linux_test.go
@@ -9,6 +9,10 @@ import (
)
func TestReadProcBool(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
tmpDir, err := ioutil.TempDir("", "test-sysinfo-proc")
if err != nil {
t.Fatal(err)
Index: docker.io-1.13.0~ds1/volume/local/local_test.go
===================================================================
--- docker.io-1.13.0~ds1.orig/volume/local/local_test.go
+++ docker.io-1.13.0~ds1/volume/local/local_test.go
@@ -29,6 +29,10 @@ func TestGetAddress(t *testing.T) {
}
func TestRemove(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
// TODO Windows: Investigate why this test fails on Windows under CI
// but passes locally.
if runtime.GOOS == "windows" {
@@ -76,6 +80,10 @@ func TestRemove(t *testing.T) {
}
func TestInitializeWithVolumes(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
rootDir, err := ioutil.TempDir("", "local-volume-test")
if err != nil {
t.Fatal(err)
@@ -108,6 +116,10 @@ func TestInitializeWithVolumes(t *testin
}
func TestCreate(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
rootDir, err := ioutil.TempDir("", "local-volume-test")
if err != nil {
t.Fatal(err)
@@ -180,6 +192,10 @@ func TestValidateName(t *testing.T) {
}
func TestCreateWithOpts(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
if runtime.GOOS == "windows" || runtime.GOOS == "solaris" {
t.Skip()
}
@@ -286,6 +302,10 @@ func TestCreateWithOpts(t *testing.T) {
}
func TestRealodNoOpts(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
rootDir, err := ioutil.TempDir("", "volume-test-reload-no-opts")
if err != nil {
t.Fatal(err)
Index: docker.io-1.13.0~ds1/daemon/graphdriver/overlay/overlay_test.go
===================================================================
--- docker.io-1.13.0~ds1.orig/daemon/graphdriver/overlay/overlay_test.go
+++ docker.io-1.13.0~ds1/daemon/graphdriver/overlay/overlay_test.go
@@ -19,22 +19,37 @@ func init() {
// This avoids creating a new driver for each test if all tests are run
// Make sure to put new tests between TestOverlaySetup and TestOverlayTeardown
func TestOverlaySetup(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
graphtest.GetDriver(t, "overlay")
}
func TestOverlayCreateEmpty(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
graphtest.DriverTestCreateEmpty(t, "overlay")
}
func TestOverlayCreateBase(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
graphtest.DriverTestCreateBase(t, "overlay")
}
func TestOverlayCreateSnap(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
graphtest.DriverTestCreateSnap(t, "overlay")
}
func TestOverlay50LayerRead(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
graphtest.DriverTestDeepLayerRead(t, 50, "overlay")
}
Index: docker.io-1.13.0~ds1/pkg/chrootarchive/archive_test.go
===================================================================
--- docker.io-1.13.0~ds1.orig/pkg/chrootarchive/archive_test.go
+++ docker.io-1.13.0~ds1/pkg/chrootarchive/archive_test.go
@@ -23,6 +23,10 @@ func init() {
}
func TestChrootTarUntar(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
tmpdir, err := ioutil.TempDir("", "docker-TestChrootTarUntar")
if err != nil {
t.Fatal(err)
@@ -54,6 +58,10 @@ func TestChrootTarUntar(t *testing.T) {
// gh#10426: Verify the fix for having a huge excludes list (like on `docker
load` with large # of
// local images)
func TestChrootUntarWithHugeExcludesList(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
tmpdir, err := ioutil.TempDir("", "docker-TestChrootUntarHugeExcludes")
if err != nil {
t.Fatal(err)
@@ -152,6 +160,10 @@ func compareFiles(src string, dest strin
}
func TestChrootTarUntarWithSymlink(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
// TODO Windows: Figure out why this is failing
if runtime.GOOS == "windows" {
t.Skip("Failing on Windows")
@@ -178,6 +190,10 @@ func TestChrootTarUntarWithSymlink(t *te
}
func TestChrootCopyWithTar(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
// TODO Windows: Figure out why this is failing
if runtime.GOOS == "windows" || runtime.GOOS == "solaris" {
t.Skip("Failing on Windows and Solaris")
@@ -228,6 +244,10 @@ func TestChrootCopyWithTar(t *testing.T)
}
func TestChrootCopyFileWithTar(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
tmpdir, err := ioutil.TempDir("", "docker-TestChrootCopyFileWithTar")
if err != nil {
t.Fatal(err)
@@ -271,6 +291,10 @@ func TestChrootCopyFileWithTar(t *testin
}
func TestChrootUntarPath(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
// TODO Windows: Figure out why this is failing
if runtime.GOOS == "windows" {
t.Skip("Failing on Windows")
@@ -336,6 +360,10 @@ func (s *slowEmptyTarReader) Read(p []by
}
func TestChrootUntarEmptyArchiveFromSlowReader(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
tmpdir, err := ioutil.TempDir("",
"docker-TestChrootUntarEmptyArchiveFromSlowReader")
if err != nil {
t.Fatal(err)
@@ -352,6 +380,10 @@ func TestChrootUntarEmptyArchiveFromSlow
}
func TestChrootApplyEmptyArchiveFromSlowReader(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
tmpdir, err := ioutil.TempDir("",
"docker-TestChrootApplyEmptyArchiveFromSlowReader")
if err != nil {
t.Fatal(err)
@@ -368,6 +400,10 @@ func TestChrootApplyEmptyArchiveFromSlow
}
func TestChrootApplyDotDotFile(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
tmpdir, err := ioutil.TempDir("", "docker-TestChrootApplyDotDotFile")
if err != nil {
t.Fatal(err)
Index: docker.io-1.13.0~ds1/builder/remote_test.go
===================================================================
--- docker.io-1.13.0~ds1.orig/builder/remote_test.go
+++ docker.io-1.13.0~ds1/builder/remote_test.go
@@ -152,6 +152,10 @@ func TestInspectResponseEmptyContentType
}
func TestMakeRemoteContext(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
contextDir, cleanup := createTestTempDir(t, "", "builder-tarsum-test")
defer cleanup()
Index: docker.io-1.13.0~ds1/builder/tarsum_test.go
===================================================================
--- docker.io-1.13.0~ds1.orig/builder/tarsum_test.go
+++ docker.io-1.13.0~ds1/builder/tarsum_test.go
@@ -193,6 +193,10 @@ func TestRemoveDirectory(t *testing.T) {
}
func TestMakeTarSumContext(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
contextDir, cleanup := createTestTempDir(t, "", "builder-tarsum-test")
defer cleanup()
Index: docker.io-1.13.0~ds1/builder/dockerfile/evaluator_test.go
===================================================================
--- docker.io-1.13.0~ds1.orig/builder/dockerfile/evaluator_test.go
+++ docker.io-1.13.0~ds1/builder/dockerfile/evaluator_test.go
@@ -131,6 +131,10 @@ func initDispatchTestCases() []dispatchT
}
func TestDispatch(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
testCases := initDispatchTestCases()
for _, testCase := range testCases {
Index: docker.io-1.13.0~ds1/builder/dockerfile/internals_test.go
===================================================================
--- docker.io-1.13.0~ds1.orig/builder/dockerfile/internals_test.go
+++ docker.io-1.13.0~ds1/builder/dockerfile/internals_test.go
@@ -11,6 +11,10 @@ import (
)
func TestEmptyDockerfile(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
contextDir, cleanup := createTestTempDir(t, "",
"builder-dockerfile-test")
defer cleanup()
@@ -20,6 +24,10 @@ func TestEmptyDockerfile(t *testing.T) {
}
func TestSymlinkDockerfile(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
contextDir, cleanup := createTestTempDir(t, "",
"builder-dockerfile-test")
defer cleanup()
@@ -35,6 +43,10 @@ func TestSymlinkDockerfile(t *testing.T)
}
func TestDockerfileOutsideTheBuildContext(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
contextDir, cleanup := createTestTempDir(t, "",
"builder-dockerfile-test")
defer cleanup()
@@ -44,6 +56,10 @@ func TestDockerfileOutsideTheBuildContex
}
func TestNonExistingDockerfile(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
contextDir, cleanup := createTestTempDir(t, "",
"builder-dockerfile-test")
defer cleanup()
Index: docker.io-1.13.0~ds1/daemon/daemon_unix_test.go
===================================================================
--- docker.io-1.13.0~ds1.orig/daemon/daemon_unix_test.go
+++ docker.io-1.13.0~ds1/daemon/daemon_unix_test.go
@@ -204,6 +204,10 @@ func TestNetworkOptions(t *testing.T) {
}
func TestMigratePre17Volumes(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
rootDir, err := ioutil.TempDir("", "test-daemon-volumes")
if err != nil {
t.Fatal(err)
Index: docker.io-1.13.0~ds1/pkg/archive/archive_linux_test.go
===================================================================
--- docker.io-1.13.0~ds1.orig/pkg/archive/archive_linux_test.go
+++ docker.io-1.13.0~ds1/pkg/archive/archive_linux_test.go
@@ -92,6 +92,10 @@ func checkFileMode(t *testing.T, path st
}
func TestOverlayTarUntar(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
oldmask, err := system.Umask(0)
if err != nil {
t.Fatal(err)
@@ -140,6 +144,10 @@ func TestOverlayTarUntar(t *testing.T) {
}
func TestOverlayTarAUFSUntar(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
oldmask, err := system.Umask(0)
if err != nil {
t.Fatal(err)
Index: docker.io-1.13.0~ds1/pkg/authorization/authz_unix_test.go
===================================================================
--- docker.io-1.13.0~ds1.orig/pkg/authorization/authz_unix_test.go
+++ docker.io-1.13.0~ds1/pkg/authorization/authz_unix_test.go
@@ -28,6 +28,10 @@ const (
)
func TestAuthZRequestPluginError(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
server := authZPluginTestServer{t: t}
server.start()
defer server.stop()
@@ -59,6 +63,10 @@ func TestAuthZRequestPluginError(t *test
}
func TestAuthZRequestPlugin(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
server := authZPluginTestServer{t: t}
server.start()
defer server.stop()
@@ -91,6 +99,10 @@ func TestAuthZRequestPlugin(t *testing.T
}
func TestAuthZResponsePlugin(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
+
server := authZPluginTestServer{t: t}
server.start()
defer server.stop()
Index: docker.io-1.13.0~ds1/daemon/graphdriver/overlay2/overlay_test.go
===================================================================
--- docker.io-1.13.0~ds1.orig/daemon/graphdriver/overlay2/overlay_test.go
+++ docker.io-1.13.0~ds1/daemon/graphdriver/overlay2/overlay_test.go
@@ -49,22 +49,37 @@ func skipIfNaive(t *testing.T) {
// This avoids creating a new driver for each test if all tests are run
// Make sure to put new tests between TestOverlaySetup and TestOverlayTeardown
func TestOverlaySetup(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
graphtest.GetDriver(t, driverName)
}
func TestOverlayCreateEmpty(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
graphtest.DriverTestCreateEmpty(t, driverName)
}
func TestOverlayCreateBase(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
graphtest.DriverTestCreateBase(t, driverName)
}
func TestOverlayCreateSnap(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
graphtest.DriverTestCreateSnap(t, driverName)
}
func TestOverlay128LayerRead(t *testing.T) {
+ if testing.Short() {
+ t.Skip("Skipping privileged test in short mode")
+ }
graphtest.DriverTestDeepLayerRead(t, 128, driverName)
}