cgget.c does not utilize struct cgroup and other fundamental
building blocks that are central to libcgroup; rather it uses
aarrays of strings.  This is problematic as we continue to
make progress toward a cgroup v1/v2 abstraction layer because
the building blocks within cgget are so disparate from the
rest of the code base.

This patchset adds extensive cgget functional tests to ensure
that we don't break core functionality.  It is envisioned
that these exact tests should pass for the rewritten cgget.

No changes have been made to the libcgroup code base, but
this patchset is based upon the latest cgrules patchset here:
https://github.com/drakenclimber/libcgroup/tree/issues/cgrules4

Test code is available here:
https://github.com/drakenclimber/libcgroup-tests/tree/issues/cgget-tests

Automated test results are available here:
https://github.com/drakenclimber/libcgroup/runs/1882894399

Code coverage increased 1.7% to 45.0%:
https://coveralls.io/builds/37071338

Tom Hromatka (13):
  ftests: Clean up handling of bytes vs string
  ftests: Throw an exception if len(stderr) > 0
  ftests: Add support for getting cgget help string
  ftests: Add cgget test with multiple '-r' flags
  ftests: Add cgget test with '-g' <controller> flag
  ftests: Add cgget test with '-g' <controller>:<cgroup> flag
  ftests: Add cgget test with '-r' flag and two cgroups
  ftests: Add cgget test with multiple '-r' flags and multiple cgroups
  ftests: Add cgget test with multiple '-g' flags
  ftests: Add multiline cgget test
  ftests: Add cgget '-a' test
  ftests: Add cgget invalid parameter test
  ftests: Add pydoc documentation to Cgroup.get()

 ftests/008-cgget-multiple_r_flags.py          |  93 ++++++++
 ftests/009-cgget-g_flag_controller_only.py    |  85 ++++++++
 .../010-cgget-g_flag_controller_and_cgroup.py |  85 ++++++++
 ftests/011-cgget-r_flag_two_cgroups.py        |  90 ++++++++
 ftests/012-cgget-multiple_r_flags2.py         |  97 +++++++++
 ftests/013-cgget-multiple_g_flags.py          |  92 ++++++++
 ftests/014-cgget-a_flag.py                    |  90 ++++++++
 ftests/015-cgget-multiline_r_flag.py          |  86 ++++++++
 ftests/016-cgget-invalid_options.py           | 203 ++++++++++++++++++
 ftests/cgroup.py                              |  70 +++---
 ftests/container.py                           |   2 +-
 ftests/process.py                             |   6 +-
 ftests/run.py                                 |   6 +-
 13 files changed, 974 insertions(+), 31 deletions(-)
 create mode 100755 ftests/008-cgget-multiple_r_flags.py
 create mode 100755 ftests/009-cgget-g_flag_controller_only.py
 create mode 100755 ftests/010-cgget-g_flag_controller_and_cgroup.py
 create mode 100755 ftests/011-cgget-r_flag_two_cgroups.py
 create mode 100755 ftests/012-cgget-multiple_r_flags2.py
 create mode 100755 ftests/013-cgget-multiple_g_flags.py
 create mode 100755 ftests/014-cgget-a_flag.py
 create mode 100755 ftests/015-cgget-multiline_r_flag.py
 create mode 100755 ftests/016-cgget-invalid_options.py

-- 
2.26.2



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

Reply via email to