validation-tests: fix several tests#687
Merged
zhouhao3 merged 8 commits intoopencontainers:masterfrom Mar 6, 2019
Merged
Conversation
AddProcessCapabilityBounding() checks if the capability is correct before adding it, so the invalid capability won't be added. Add it directly to the list, avoiding the validity check in AddProcessCapabilityBounding(). Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
otherwise all the tests will get assigned the incorrect OCI version and fail. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
it is not supported on all the types of file systems so it makes no sense to check that it is present on all the mounts. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
the OCI specs state that it is valid to delete a container only when it is in the "stopped" state. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
if we don't clean it up, the next test cannot re-use the same container ID and it will fail. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
reduce waiting time from 10 seconds to 3 seconds when we check for "delete" effects. The test would be very slow otherwise and cause the TAP driver to timeout. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
mrunalp
reviewed
Mar 5, 2019
| util.Fatal(err) | ||
| } | ||
| g.AddProcessCapabilityBounding("CAP_TEST") | ||
| g.Config.Process.Capabilities.Bounding = append(g.Config.Process.Capabilities.Bounding, "CAP_TEST") |
Contributor
There was a problem hiding this comment.
Is there a bug in the helper function that we should fix?
Member
Author
There was a problem hiding this comment.
no, I think it is fine that the helper function checks whether the input is valid and rejects unknown capabilities
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.
this PR includes several minor fixes to the validation tests. I've found these issues while preparing
crunto be fully OCI compliant: https://github.com/giuseppe/crun/pull/16More details are included in the commit message for each patch.
I've added a patch for the Makefile to print what validation-tests are used. I want to use it on Travis to easily read the list of the tests and disabling some of them, namely some cgroup tests that require a special configuration (I could just repeat the same find query, but I'd prefer to keep this logic in the runtime-tools Makefile)