-
Notifications
You must be signed in to change notification settings - Fork 160
add mount validation function in runtimetest #7
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
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.
I think this approach may be too simplistic.
subvol=${HOST_PATH_TO_PIVOT_ROOT}, so maybe it's not impossible).Instead of writing something that generically validates any bundle's mounts, it's probably easier and effective enough to write a few bundles that make specific mounts and then check for those after launching the bundle (e.g. does the container's
/filematch the bundle'sroofs/file? Is/read-only or not? …).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.
@wking thank you for your advice!
illegalspecsitems , so we need to cover the restrictions defined inspecs, liketypein mounts [1][1]https://github.com/opencontainers/specs/blob/master/runtime-config.md
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.
On Mon, Jan 25, 2016 at 03:18:48AM -0800, Wang Qilin wrote:
As I read opencontainers/runtime-spec#164, the runtime must supply those
mounts regardless of the user config (unless we specify an opt-out
mechanism, which we don't have yet). So it's a runtime-author problem
(not a bundle-author problem) if they're missing.
It doesn't seem possible to test different config permutations with a
single bundle. You could probably do it with a single rootfs and a
bunch of per-test configs (which was how I understood this repository
to work). If setting up a bundle to bind-mount a file from the host
into the container is too difficult to do, we should probably adjust
ocitools to make it easier ;).
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.
@wking @wangkirin
To [1],
When we test runtime's compliace, the input is the bundles, output is the runtime can have the behavior we expected or not with the input. So, agree with @wking
To [2],
That is what we need to do in ocitools, actually, we should have a scheduler and a cases manager in ocitools runtimetest/validate command.
A scheduler is whom to schedule the cases(input as bundles here).
A cases manager to manage cases, like TestUnit in PR "Add initial version of runtimetest command: #9". Through adding some elements into cases manger(like TestUnit), scheduler can easily schedule bundles to run on the platform/machine required.
Anyway, let us do effort step by step to reach the destination.