Skip to content

Commit

Permalink
Merge pull request opencontainers#506 from q384566678/posix-rlimits-r…
Browse files Browse the repository at this point in the history
…untiemtest

move validateRlimits to defaultValidations
  • Loading branch information
Ma Shimiao authored Nov 3, 2017
2 parents 11c0459 + 2746c06 commit 502b569
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 @@ -271,6 +271,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 @@ -729,6 +734,10 @@ func run(context *cli.Context) error {
test: validateMounts,
description: "mounts",
},
{
test: validateRlimits,
description: "rlimits",
},
}

linuxValidations := []validation{
Expand Down Expand Up @@ -768,10 +777,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 502b569

Please sign in to comment.