From 691eb142561818b0ca2255e2e340cbea6b91d80c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 28 Jun 2019 11:48:00 +0200 Subject: [PATCH 1/2] Integration: remove redundant kernel version check for MACVlan The daemon requires kernel 3.10 or up to start, so there's no need to check if the daemon is kernel 3.8 or up. Signed-off-by: Sebastiaan van Stijn --- integration/network/macvlan/macvlan_test.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/integration/network/macvlan/macvlan_test.go b/integration/network/macvlan/macvlan_test.go index cb1f70a78f..12ff8c91b0 100644 --- a/integration/network/macvlan/macvlan_test.go +++ b/integration/network/macvlan/macvlan_test.go @@ -20,7 +20,6 @@ import ( func TestDockerNetworkMacvlanPersistance(t *testing.T) { // verify the driver automatically provisions the 802.1q link (dm-dummy0.60) skip.If(t, testEnv.IsRemoteDaemon) - skip.If(t, !macvlanKernelSupport(), "Kernel doesn't support macvlan") d := daemon.New(t) d.StartWithBusybox(t) @@ -43,7 +42,6 @@ func TestDockerNetworkMacvlanPersistance(t *testing.T) { func TestDockerNetworkMacvlan(t *testing.T) { skip.If(t, testEnv.IsRemoteDaemon) - skip.If(t, !macvlanKernelSupport(), "Kernel doesn't support macvlan") for _, tc := range []struct { name string @@ -271,8 +269,3 @@ func testMacvlanAddressing(client client.APIClient) func(*testing.T) { assert.Check(t, strings.Contains(result.Combined(), "default via 2001:db8:abca::254 dev eth0")) } } - -// ensure Kernel version is >= v3.9 for macvlan support -func macvlanKernelSupport() bool { - return n.CheckKernelMajorVersionGreaterOrEqualThen(3, 9) -} From 316e16618f8c794b8e56e223ed0bed15e1f4be24 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 28 Jun 2019 11:58:11 +0200 Subject: [PATCH 2/2] Integration: MACVlan add missing import comment and build-tag Signed-off-by: Sebastiaan van Stijn --- integration/network/macvlan/macvlan_test.go | 2 +- integration/network/macvlan/main_test.go | 2 ++ integration/network/macvlan/main_windows_test.go | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 integration/network/macvlan/main_windows_test.go diff --git a/integration/network/macvlan/macvlan_test.go b/integration/network/macvlan/macvlan_test.go index 12ff8c91b0..b734cad82e 100644 --- a/integration/network/macvlan/macvlan_test.go +++ b/integration/network/macvlan/macvlan_test.go @@ -1,6 +1,6 @@ // +build !windows -package macvlan +package macvlan // import "github.com/docker/docker/integration/network/macvlan" import ( "context" diff --git a/integration/network/macvlan/main_test.go b/integration/network/macvlan/main_test.go index 31cf111b22..15bdc323b5 100644 --- a/integration/network/macvlan/main_test.go +++ b/integration/network/macvlan/main_test.go @@ -1,3 +1,5 @@ +// +build !windows + package macvlan // import "github.com/docker/docker/integration/network/macvlan" import ( diff --git a/integration/network/macvlan/main_windows_test.go b/integration/network/macvlan/main_windows_test.go new file mode 100644 index 0000000000..367cd2c540 --- /dev/null +++ b/integration/network/macvlan/main_windows_test.go @@ -0,0 +1 @@ +package macvlan // import "github.com/docker/docker/integration/network/macvlan"