From 2746c06e9b69dd91074909848bbe808c4d0dec82 Mon Sep 17 00:00:00 2001 From: Zhou Hao Date: Fri, 3 Nov 2017 11:10:21 +0800 Subject: [PATCH] move validateRlimits to defaultValidations Signed-off-by: Zhou Hao --- cmd/runtimetest/main.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/cmd/runtimetest/main.go b/cmd/runtimetest/main.go index 124b46856..ebede9399 100644 --- a/cmd/runtimetest/main.go +++ b/cmd/runtimetest/main.go @@ -269,6 +269,11 @@ func validateRlimits(spec *rspec.Spec) error { return nil } + if runtime.GOOS != "linux" && runtime.GOOS != "solaris" { + logrus.Warnf("process.rlimits validation not yet implemented for OS %q", runtime.GOOS) + return nil + } + for _, r := range spec.Process.Rlimits { rl, err := strToRlimit(r.Type) if err != nil { @@ -727,6 +732,10 @@ func run(context *cli.Context) error { test: validateMounts, description: "mounts", }, + { + test: validateRlimits, + description: "rlimits", + }, } linuxValidations := []validation{ @@ -766,10 +775,6 @@ func run(context *cli.Context) error { test: validateROPaths, description: "read only paths", }, - { - test: validateRlimits, - description: "rlimits", - }, { test: validateSysctls, description: "sysctls",