Skip to content
This repository was archived by the owner on Apr 21, 2021. It is now read-only.

Commit 444b996

Browse files
authored
Merge pull request opencontainers#587 from q384566678/process-cur-max
Implement PosixProcRlimitsSoftMatchCur and PosixProcRlimitsHardMatchMax
2 parents 209e9f8 + 536b713 commit 444b996

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/runtimetest/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,10 @@ func validateRlimits(spec *rspec.Spec) error {
279279
}
280280

281281
if rlimit.Cur != r.Soft {
282-
return fmt.Errorf("%v rlimit soft expected: %v, actual: %v", r.Type, r.Soft, rlimit.Cur)
282+
return specerror.NewError(specerror.PosixProcRlimitsSoftMatchCur, fmt.Errorf("%v rlimit soft expected: %v, actual: %v", r.Type, r.Soft, rlimit.Cur), rspec.Version)
283283
}
284284
if rlimit.Max != r.Hard {
285-
return fmt.Errorf("%v rlimit hard expected: %v, actual: %v", r.Type, r.Hard, rlimit.Max)
285+
return specerror.NewError(specerror.PosixProcRlimitsHardMatchMax, fmt.Errorf("%v rlimit hard expected: %v, actual: %v", r.Type, r.Hard, rlimit.Max), rspec.Version)
286286
}
287287
}
288288
return nil

0 commit comments

Comments
 (0)