-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
validation-tests: fix several tests #687
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>
@@ -20,7 +20,7 @@ func main() { | |||
if err != nil { | |||
util.Fatal(err) | |||
} | |||
g.AddProcessCapabilityBounding("CAP_TEST") | |||
g.Config.Process.Capabilities.Bounding = append(g.Config.Process.Capabilities.Bounding, "CAP_TEST") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a bug in the helper function that we should fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, I think it is fine that the helper function checks whether the input is valid and rejects unknown capabilities
this PR includes several minor fixes to the validation tests. I've found these issues while preparing
crun
to 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)