integration: add hypervisor kill test#1839
Conversation
|
/test @GabyCT updated. PTAL. |
chavafg
left a comment
There was a problem hiding this comment.
Should we add this to the make test recipe? Right now this is not being called anywhere/
c36153a to
e197b9f
Compare
|
/retest PR updated. PTAL, thanks! |
| @@ -0,0 +1,52 @@ | |||
| #!/bin/bash | |||
| # | |||
| # Copyright (c) 2019 HyperHQ Inc. | |||
There was a problem hiding this comment.
OOI, Is the company name still correct?
There was a problem hiding this comment.
We are still using hyper.sh for kata containers development so far ;)
| clean_env | ||
| sudo docker run --runtime=$RUNTIME -d --name $CONTAINER_NAME $IMAGE $PAYLOAD_ARGS | ||
| num=$(ps aux | grep ${HYPERVISOR_PATH} | grep -v grep | wc -l) | ||
| [[ ${num} -eq 1 ]] || die "hypervisor count:${num} expected:1" |
There was a problem hiding this comment.
Nit: I think for the tests this script is performing, you can use a single square bracket, which is slightly clearer to read:
[ ${num} -eq 1 ] || ...| [[ ${num} -eq 1 ]] || die "hypervisor count:${num} expected:1" | ||
| } | ||
|
|
||
| killhypervisor() { |
There was a problem hiding this comment.
Nit: CamelCase or snake_case would make this function name easier to read.
Kill hypervisor and then force remove the container. We should be able to handle the exceptional case properly. Fixes: kata-containers#1838 Depends-on: github.com/kata-containers/runtime#1897 Signed-off-by: Peng Tao <bergwolf@hyper.sh>
|
/test |
| @@ -0,0 +1,52 @@ | |||
| #!/bin/bash | |||
| # | |||
| # Copyright (c) 2019 HyperHQ Inc. | |||
|
oh, it depends on github.com/kata-containers/runtime#1897 and that one is blocked due to a last minute merge conflict. |
Kill hypervisor and then force remove the container.
We should be able to handle the exceptional case properly.
Fixes: #1838
Depends-on: github.com/kata-containers/runtime#1897