From c26d6b4944c41e3a16802bd68583f8b8bcd1bcda Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Thu, 29 Mar 2018 10:45:43 -0700 Subject: [PATCH] copy: remove kernel version test Signed-off-by: Tonis Tiigi Upstream-commit: 4d6b8f73a89abf715fa33b3f553884c575a3b136 Component: engine --- .../daemon/graphdriver/copy/copy_test.go | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/components/engine/daemon/graphdriver/copy/copy_test.go b/components/engine/daemon/graphdriver/copy/copy_test.go index a09bb2637e..b41348827d 100644 --- a/components/engine/daemon/graphdriver/copy/copy_test.go +++ b/components/engine/daemon/graphdriver/copy/copy_test.go @@ -12,32 +12,12 @@ import ( "testing" "time" - "github.com/docker/docker/pkg/parsers/kernel" "github.com/docker/docker/pkg/system" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" "golang.org/x/sys/unix" ) -func TestIsCopyFileRangeSyscallAvailable(t *testing.T) { - // Verifies: - // 1. That copyFileRangeEnabled is being set to true when copy_file_range syscall is available - // 2. That isCopyFileRangeSyscallAvailable() works on "new" kernels - v, err := kernel.GetKernelVersion() - assert.NilError(t, err) - - copyWithFileRange := true - copyWithFileClone := false - doCopyTest(t, ©WithFileRange, ©WithFileClone) - - if kernel.CompareKernelVersion(*v, kernel.VersionInfo{Kernel: 4, Major: 5, Minor: 0}) < 0 { - assert.Check(t, !copyWithFileRange) - } else { - assert.Check(t, copyWithFileRange) - } - -} - func TestCopy(t *testing.T) { copyWithFileRange := true copyWithFileClone := true