validate: add the verification content#327
Merged
liangchenye merged 1 commit intoopencontainers:masterfrom Mar 8, 2017
Merged
Conversation
wking
reviewed
Feb 20, 2017
Contributor
wking
left a comment
There was a problem hiding this comment.
There may be work in flight for the rlimit type check too, but I couldn't turn one up with a quick grep.
validate/validate.go
Outdated
| if v.spec.Linux.Devices[index].Type == v.spec.Linux.Devices[i].Type && | ||
| v.spec.Linux.Devices[index].Major == v.spec.Linux.Devices[i].Major && | ||
| v.spec.Linux.Devices[index].Minor == v.spec.Linux.Devices[i].Minor { | ||
| fmt.Println("WARNING: The same type, major and minor should not be used for multiple devices.") |
Contributor
There was a problem hiding this comment.
This check duplicates some work in flight with #297.
1b31170 to
421f08f
Compare
Mashimiao
reviewed
Feb 21, 2017
validate/validate.go
Outdated
| msgs = append(msgs, fmt.Sprintf("hard limit of rlimit %s should not be less than soft limit.", process.Rlimits[index].Type)) | ||
| } | ||
| for i := index + 1; i < len(process.Rlimits); i++ { | ||
| if strings.EqualFold(process.Rlimits[index].Type, process.Rlimits[i].Type) { |
There was a problem hiding this comment.
There is no need to use EqualFold, just == is fine
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
421f08f to
f40b202
Compare
Author
|
@mrunalp @liangchenye PTAL |
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
According to this.
Signed-off-by: zhouhao zhouhao@cn.fujitsu.com