Skip to content
This repository has been archived by the owner on Mar 28, 2018. It is now read-only.

Fail a test if a container, cc-shim or qemu is left behind #647

Closed
dlespiau opened this issue Feb 3, 2017 · 1 comment
Closed

Fail a test if a container, cc-shim or qemu is left behind #647

dlespiau opened this issue Feb 3, 2017 · 1 comment
Assignees

Comments

@dlespiau
Copy link
Contributor

dlespiau commented Feb 3, 2017

We need to tighten a bit our tests by failing if something unexpected happens to better understand where the bugs are. It's not enough to say "at the end of the test run, we have processes left behind".

Tests need to ensure:

  • setup(): no qemu(-lite) process is running on the system

  • setup(): no cc-shim is running on the system

  • setup(): there's no running container on the system

  • teardown(): no qemu(-lite) process is running on the system

  • teardown(): no cc-shim is running on the system

  • teardown(): there's no running container on the system

at teardown(), if we detect a problem, we fail the test. That way we'll know which test failed. We should then try to clean up the environment for the next test (kill container, qemu, cc-shim).

@jodh-intel
Copy link
Contributor

Agreed, although we can tighten up the checks further:

  • "function(): no $thing is running on the system as the user running the tests".

@chavafg chavafg self-assigned this Feb 3, 2017
chavafg added a commit to chavafg/cc-oci-runtime that referenced this issue Feb 9, 2017
This commit enhances the tests to verify that the
containers and all subprocesses (cc-shim and qemu)
are killed properly.

Fixes intel#647

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
chavafg added a commit to chavafg/cc-oci-runtime that referenced this issue Feb 27, 2017
This commit enhances the tests to verify that the
containers and all subprocesses (cc-shim and qemu)
are finished properly.

Fixes intel#647

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
chavafg added a commit to chavafg/cc-oci-runtime that referenced this issue Feb 27, 2017
This commit enhances the tests to verify that the
containers and all subprocesses (cc-shim and qemu)
are finished properly.

Fixes intel#647

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants