You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specerror/config.go
+3
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,8 @@ const (
46
46
PosixProcRlimitsTypeGeneError="The runtime MUST [generate an error](runtime.md#errors) for any values which cannot be mapped to a relevant kernel interface."
47
47
// PosixProcRlimitsTypeGet represents "For each entry in `rlimits`, a [`getrlimit(3)`][getrlimit.3] on `type` MUST succeed."
48
48
PosixProcRlimitsTypeGet="For each entry in `rlimits`, a [`getrlimit(3)`][getrlimit.3] on `type` MUST succeed."
49
+
// PosixProcRlimitsTypeValueError represents "valid values are defined in the ... man page"
50
+
PosixProcRlimitsTypeValueError="valid values are defined in the ... man page"
49
51
// PosixProcRlimitsSoftMatchCur represents "`rlim.rlim_cur` MUST match the configured value."
50
52
PosixProcRlimitsSoftMatchCur="`rlim.rlim_cur` MUST match the configured value."
51
53
// PosixProcRlimitsHardMatchMax represents "`rlim.rlim_max` MUST match the configured value."
errs=multierror.Append(errs, fmt.Errorf("rlimit type %q is invalid", rlimit.Type))
877
+
errs=multierror.Append(errs, specerror.NewError(specerror.PosixProcRlimitsTypeValueError, fmt.Errorf("rlimit type %q may not be valid", rlimit.Type), v.spec.Version))
874
878
} elseifv.platform=="solaris" {
875
879
for_, val:=rangeposixRlimits {
876
880
ifval==rlimit.Type {
877
881
return
878
882
}
879
883
}
880
-
errs=multierror.Append(errs, fmt.Errorf("rlimit type %q is invalid", rlimit.Type))
884
+
errs=multierror.Append(errs, specerror.NewError(specerror.PosixProcRlimitsTypeValueError, fmt.Errorf("rlimit type %q may not be valid", rlimit.Type), v.spec.Version))
881
885
} else {
882
886
logrus.Warnf("process.rlimits validation not yet implemented for platform %q", v.platform)
0 commit comments