Skip to content
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

Initial code of runtimetest command #10

Closed
zenlint opened this issue Jan 21, 2016 · 6 comments
Closed

Initial code of runtimetest command #10

zenlint opened this issue Jan 21, 2016 · 6 comments

Comments

@zenlint
Copy link
Contributor

zenlint commented Jan 21, 2016

I have add the initial cod of runtimetest command, to replace runtime_test.sh.
Reference issuses:
Support test cases #7
Convert test_runtime.sh into a go program #8

Now, the result shows as below:

# ./ocitools runtimetest -r runc -o all
INFO[0001] successful Details:                          
INFO[0001] =============================================================================================== 
INFO[0001] 
BundleName:
  process1
BundleDir:
  bundles/process1
CaseArgs:
  --args=./runtimetest --rootfs=rootfs --read-only=true
TestResult:
  SUCCESS

INFO[0001] 
BundleName:
  hostname0
BundleDir:
  bundles/hostname0
CaseArgs:
  --args=./runtimetest --rootfs=rootfs --hostname=zenlin
TestResult:
  SUCCESS

INFO[0001] 
BundleName:
  process0
BundleDir:
  bundles/process0
CaseArgs:
  --args=./runtimetest --rootfs=rootfs --read-only=false
TestResult:
  SUCCESS

INFO[0001] failure Details:                             
INFO[0001] =============================================================================================== 
INFO[0001] =============================================================================================== 
INFO[0001] statistics:  3 bundles success, 0 bundles failed

My plan as below,

  1. Reach cases in cases.conf
  2. Support different runtime
    what is your suggestion about this? @mrunalp
@mrunalp
Copy link
Contributor

mrunalp commented Jan 26, 2016

We can add more test cases and support other runtimes if they have wrappers to CLI similar to runc.

@zenlint
Copy link
Contributor Author

zenlint commented Jan 29, 2016

@mrunalp
yes, quite agree with u, I am just adding more testcases with my local test, once the PR Add initial version of runtimetest command: #9 is merged, I will add them to cases.conf.

To "if they have wrappers to CLI similar to runc", do u mean by a lib like factory created in ocitools repo or a 3rd tools? Any reference disscution about this?

@wking
Copy link
Contributor

wking commented Jan 29, 2016

On Thu, Jan 28, 2016 at 11:20:07PM -0800, LinZhinan(Zen Lin) wrote:

And what do u mean by "if they have wrappers to CLI similar to
runc"? Any reference disscution about this?

My preference here would be to use 1 to define the command line API
that the test suite uses to drive runtimes. In places where that
differs from runC, and runC wants to stick with their difference, we
can either PR the command-line API or write a shell wrapper around
runC to give it the API-defined interface.

@zenlint
Copy link
Contributor Author

zenlint commented Jan 30, 2016

@wking I am going to pay close attention on [1]: https://github.com/wking/oci-command-line-api.

@zenlint
Copy link
Contributor Author

zenlint commented Jan 30, 2016

@mrunalp
To support different runtimes, there are two ways to reach,

  1. Best final way,
    Support different runtimes after there is a official command-line API for runtimes or a official conversion tool(official means accepted by opencontainers here).
  2. Temporary way,
    Just support different runtimes with abstract factrory like https://github.com/huawei-openlab/oct/tree/master/factory and conversion tools for temporary, and finally change to [1].

What do u think about these two ways?

@liangchenye
Copy link
Member

@zenlinTechnofreak close since we have another PR to work on this.

wking pushed a commit to wking/ocitools-v2 that referenced this issue Nov 17, 2016
…mmary-limit

CONTRIBUTING: Don't specify a 50-char limit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants