From eb7c7c71e21bdff485ba54666c12a72c0bd4792c Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Mon, 22 Mar 2021 17:49:20 -0700 Subject: [PATCH] Fix oom tests on non Linux Signed-off-by: Maksym Pavlenko --- sys/{oom_unix.go => oom_linux.go} | 2 -- sys/{oom_unix_test.go => oom_linux_test.go} | 2 -- sys/{oom_windows.go => oom_unsupported.go} | 6 +++++- 3 files changed, 5 insertions(+), 5 deletions(-) rename sys/{oom_unix.go => oom_linux.go} (98%) rename sys/{oom_unix_test.go => oom_linux_test.go} (99%) rename sys/{oom_windows.go => oom_unsupported.go} (86%) diff --git a/sys/oom_unix.go b/sys/oom_linux.go similarity index 98% rename from sys/oom_unix.go rename to sys/oom_linux.go index e5b8dbcef..f24e9af97 100644 --- a/sys/oom_unix.go +++ b/sys/oom_linux.go @@ -1,5 +1,3 @@ -// +build !windows - /* Copyright The containerd Authors. diff --git a/sys/oom_unix_test.go b/sys/oom_linux_test.go similarity index 99% rename from sys/oom_unix_test.go rename to sys/oom_linux_test.go index e6be852bc..2b824eb70 100644 --- a/sys/oom_unix_test.go +++ b/sys/oom_linux_test.go @@ -1,5 +1,3 @@ -// +build !windows - /* Copyright The containerd Authors. diff --git a/sys/oom_windows.go b/sys/oom_unsupported.go similarity index 86% rename from sys/oom_windows.go rename to sys/oom_unsupported.go index 215c171f6..558340790 100644 --- a/sys/oom_windows.go +++ b/sys/oom_unsupported.go @@ -1,3 +1,5 @@ +// +build !linux + /* Copyright The containerd Authors. @@ -17,7 +19,9 @@ package sys const ( - // OOMScoreAdjMax is not implemented on Windows + // OOMScoreMaxKillable is not implemented on non Linux + OOMScoreMaxKillable = 0 + // OOMScoreAdjMax is not implemented on non Linux OOMScoreAdjMax = 0 )