These patches add nondestructive functional test support. In the test setup phase, an lxc container is created with cgroups mounted in the cgroup:mixed configuration. This allows the container read/write access to its own cgroup while providing read-only access to its parent cgroups.
The tests can be run in a single lxc container or for more isolation between tests, the container can be destroyed and recreated for each test. And of course, the container is destroyed in the teardown phase. TODO - I still need to add support for cgsnapshot, cgclear, and cgconfigparser, but I feel like that would be better in a subsequent patch set. Tom Hromatka (2): tests: Add functional test suite tests: Add functional test for basic cgget operations configure.in | 1 + tests/Makefile.am | 2 +- tests/ftests/.gitignore | 5 + tests/ftests/001-cgget-basic_cgget.py | 68 ++++++ tests/ftests/Makefile.am | 27 +++ tests/ftests/__init__.py | 0 tests/ftests/cgroup.py | 186 ++++++++++++++++ tests/ftests/config.py | 56 +++++ tests/ftests/consts.py | 49 +++++ tests/ftests/container.py | 236 ++++++++++++++++++++ tests/ftests/default.conf | 29 +++ tests/ftests/ftests.py | 301 ++++++++++++++++++++++++++ tests/ftests/log.py | 67 ++++++ tests/ftests/run.py | 73 +++++++ 14 files changed, 1099 insertions(+), 1 deletion(-) create mode 100644 tests/ftests/.gitignore create mode 100755 tests/ftests/001-cgget-basic_cgget.py create mode 100644 tests/ftests/Makefile.am create mode 100644 tests/ftests/__init__.py create mode 100644 tests/ftests/cgroup.py create mode 100644 tests/ftests/config.py create mode 100644 tests/ftests/consts.py create mode 100644 tests/ftests/container.py create mode 100644 tests/ftests/default.conf create mode 100755 tests/ftests/ftests.py create mode 100644 tests/ftests/log.py create mode 100644 tests/ftests/run.py -- 2.21.0 _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel