validation: add tests for NSNewNSWithoutPath & NSInheritWithoutType#620
Conversation
40f829c to
efd51d0
Compare
|
Pushed a new commit for adding a validation test for |
2c2cd61 to
d7985e3
Compare
This test is to check for NSNewNSWithoutPath, i.e. "If path is not specified, the runtime MUST create a new container namespace of the given type" See also opencontainers#572 Signed-off-by: Dongsu Park <dongsu@kinvolk.io>
This test is to check for NSInheritWithoutType, i.e. "If a namespace type is not specified in the namespaces array, the container MUST inherit the runtime namespace of that type". See also opencontainers#572 Signed-off-by: Dongsu Park <dongsu@kinvolk.io>
|
Testing with This one works fine for me, but I have SELinux warnings in the journal: I guess we can ignore that. The other one fails with runc because of opencontainers/runc#1184: The output is not valid TAP output. @wking Should we generate a TAP "not ok" output for this error, or should we continue to use @dongsupark Except those remarks, LGTM (but I'm not a maintainer) |
Your wording on this in #621 looks good to me. However the spec currently allows |
|
@dongsupark Changes LGTM overall, As they said, maybe you need to change the TAP output. |
To be able to deal with diagnostics in a general way, split out the diagnostics handling code into a new function `pringDiag()`, which will be normally called from the defer function's context. This way we can simplify the error handling routines. Signed-off-by: Dongsu Park <dongsu@kinvolk.io>
|
@q384566678 As you noted, I made these two tests print out diagnostics for every possible case. I hope it could address your review. BTW travis builds suddenly started getting broken, because of this error: That looks like a totally unrelated issue. EDIT: the golint issue is now fixed. Travis builds work fine. |
763c8a8 to
e830fa3
Compare
To be able to deal with diagnostics in a general way, split out the diagnostics handling code into a new function `pringDiag()`, which will be normally called from the defer function's context. This way we can simplify the error handling routines. Signed-off-by: Dongsu Park <dongsu@kinvolk.io>
|
LGTM |
|
@q384566678 Thanks for merging! |
This PR is to check for tests
NSNewNSWithoutPathas well asNSInheritWithoutType.NSNewNSWithoutPath: "If path is not specified, the runtime MUST create a new container namespace of the given type."NSInheritWithoutType: "If a namespace type is not specified in the namespaces array, the container MUST inherit the runtime namespace of that type."See also #572
Signed-off-by: Dongsu Park dongsu@kinvolk.io
/cc @alban