Skip to content

Commit 2746c06

Browse files
author
Zhou Hao
committed
move validateRlimits to defaultValidations
Signed-off-by: Zhou Hao <[email protected]>
1 parent e2ffaf1 commit 2746c06

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
@@ -269,6 +269,11 @@ func validateRlimits(spec *rspec.Spec) error {
269269
return nil
270270
}
271271

272+
if runtime.GOOS != "linux" && runtime.GOOS != "solaris" {
273+
logrus.Warnf("process.rlimits validation not yet implemented for OS %q", runtime.GOOS)
274+
return nil
275+
}
276+
272277
for _, r := range spec.Process.Rlimits {
273278
rl, err := strToRlimit(r.Type)
274279
if err != nil {
@@ -727,6 +732,10 @@ func run(context *cli.Context) error {
727732
test: validateMounts,
728733
description: "mounts",
729734
},
735+
{
736+
test: validateRlimits,
737+
description: "rlimits",
738+
},
730739
}
731740

732741
linuxValidations := []validation{
@@ -766,10 +775,6 @@ func run(context *cli.Context) error {
766775
test: validateROPaths,
767776
description: "read only paths",
768777
},
769-
{
770-
test: validateRlimits,
771-
description: "rlimits",
772-
},
773778
{
774779
test: validateSysctls,
775780
description: "sysctls",

0 commit comments

Comments
 (0)