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 entire test suite 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.

The patches are also available here:
https://github.com/drakenclimber/libcgroup/tree/issues/functional_tests_v4

Changes from v3 to v4:
* Fixed accidental breakage of python v3
* Added a README file
* Replaced usage of '%' with .format()
* Removed duplicate code from the config class and arg parsing
* Removed concatenate_controllers() method
* Removed shebang from most files
* Simplified some prints

Changes from v2 to v3:
* Added more descriptive git commit messages for the new
  classes
* Assigned the constants in consts.py to their respective
  patches
* Deleted LogError() exception class as it was not being used

Changes from v1 to v2:
* Removed SPDX license line from headers
* Split patchset up into seven patches

Tom Hromatka (7):
  tests: Add functional test folder
  tests: Add functional test logging class
  tests: Add functional test run class
  tests: Add functional test cgroup class
  tests: Add functional test LXC container class
  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 |  67 +++++++++
 tests/ftests/Makefile.am              |  27 ++++
 tests/ftests/README.md                |  65 ++++++++
 tests/ftests/__init__.py              |   0
 tests/ftests/cgroup.py                | 172 +++++++++++++++++++++
 tests/ftests/config.py                |  58 ++++++++
 tests/ftests/consts.py                |  47 ++++++
 tests/ftests/container.py             | 233 +++++++++++++++++++++++++++++
 tests/ftests/default.conf             |  28 ++++
 tests/ftests/ftests.py                | 273 ++++++++++++++++++++++++++++++++++
 tests/ftests/log.py                   |  56 +++++++
 tests/ftests/run.py                   |  74 +++++++++
 15 files changed, 1107 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/README.md
 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

-- 
1.8.3.1



_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to