Skip to content

Commit

Permalink
Merge pull request #587 from q384566678/process-cur-max
Browse files Browse the repository at this point in the history
Implement PosixProcRlimitsSoftMatchCur and PosixProcRlimitsHardMatchMax
  • Loading branch information
liangchenye authored Mar 5, 2018
2 parents 209e9f8 + 536b713 commit 444b996
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/runtimetest/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,10 @@ func validateRlimits(spec *rspec.Spec) error {
}

if rlimit.Cur != r.Soft {
return fmt.Errorf("%v rlimit soft expected: %v, actual: %v", r.Type, r.Soft, rlimit.Cur)
return specerror.NewError(specerror.PosixProcRlimitsSoftMatchCur, fmt.Errorf("%v rlimit soft expected: %v, actual: %v", r.Type, r.Soft, rlimit.Cur), rspec.Version)
}
if rlimit.Max != r.Hard {
return fmt.Errorf("%v rlimit hard expected: %v, actual: %v", r.Type, r.Hard, rlimit.Max)
return specerror.NewError(specerror.PosixProcRlimitsHardMatchMax, fmt.Errorf("%v rlimit hard expected: %v, actual: %v", r.Type, r.Hard, rlimit.Max), rspec.Version)
}
}
return nil
Expand Down

0 comments on commit 444b996

Please sign in to comment.