Skip to content

Commit 502b569

Browse files
author
Ma Shimiao
authored
Merge pull request opencontainers#506 from q384566678/posix-rlimits-runtiemtest
move validateRlimits to defaultValidations
2 parents 11c0459 + 2746c06 commit 502b569

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

cmd/runtimetest/main.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,11 @@ func validateRlimits(spec *rspec.Spec) error {
271271
return nil
272272
}
273273

274+
if runtime.GOOS != "linux" && runtime.GOOS != "solaris" {
275+
logrus.Warnf("process.rlimits validation not yet implemented for OS %q", runtime.GOOS)
276+
return nil
277+
}
278+
274279
for _, r := range spec.Process.Rlimits {
275280
rl, err := strToRlimit(r.Type)
276281
if err != nil {
@@ -729,6 +734,10 @@ func run(context *cli.Context) error {
729734
test: validateMounts,
730735
description: "mounts",
731736
},
737+
{
738+
test: validateRlimits,
739+
description: "rlimits",
740+
},
732741
}
733742

734743
linuxValidations := []validation{
@@ -768,10 +777,6 @@ func run(context *cli.Context) error {
768777
test: validateROPaths,
769778
description: "read only paths",
770779
},
771-
{
772-
test: validateRlimits,
773-
description: "rlimits",
774-
},
775780
{
776781
test: validateSysctls,
777782
description: "sysctls",

0 commit comments

Comments
 (0)