Skip to content

Commit

Permalink
move validateRlimits to defaultValidations
Browse files Browse the repository at this point in the history
Signed-off-by: Zhou Hao <[email protected]>
  • Loading branch information
Zhou Hao committed Nov 3, 2017
1 parent e2ffaf1 commit 2746c06
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions cmd/runtimetest/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -727,6 +732,10 @@ func run(context *cli.Context) error {
test: validateMounts,
description: "mounts",
},
{
test: validateRlimits,
description: "rlimits",
},
}

linuxValidations := []validation{
Expand Down Expand Up @@ -766,10 +775,6 @@ func run(context *cli.Context) error {
test: validateROPaths,
description: "read only paths",
},
{
test: validateRlimits,
description: "rlimits",
},
{
test: validateSysctls,
description: "sysctls",
Expand Down

0 comments on commit 2746c06

Please sign in to comment.