[LTP] [PATCH 0/6] Expand Cgroup shell library

Luke Nowakowski-Krijger luke.nowakowskikrijger@canonical.com
Wed Jan 5 11:00:01 CET 2022


This patchset aims to expand the cgroup_lib shell library to simplify
and centralize the whole mounting and cleanup process that, with all the
different versions and mounting schemes, can get confusing and rather
redundant.

So the aim here is to centralize all the functionality to the already
existing cgroup C API which handles a lot of the corner cases and
complexity while still getting to use it from a shell environment which
some developers probably prefer to write their tests in. This also
seems important to make it easier to reconfigure the current tests
to work under cgroup v2 controllers, as well as for developers to write
tests for cgroup v2 controllers for which there doesen't seem to be very
much coverage at the moment.

Luke Nowakowski-Krijger (6):
  API/cgroup: Modify tst_cgroup_print_config for easier parsing and
    consumption
  API/cgroup: Add cgroup_find_root helper function
  API/cgroup: Add option for specific pid to tst_cgroup_opts
  API/cgroup: Implement tst_cgroup_load_config()
  tools: Implement tst_cgctl binary utility
  controllers: Expand cgroup_lib shell library

 include/tst_cgroup.h                       |   7 +-
 lib/tst_cgroup.c                           | 165 ++++++++++++++++++++-
 testcases/kernel/controllers/cgroup_lib.sh | 129 ++++++++++++++--
 tools/cgroup/Makefile                      |   7 +
 tools/cgroup/tst_cgctl.c                   |  69 +++++++++
 5 files changed, 355 insertions(+), 22 deletions(-)
 create mode 100644 tools/cgroup/Makefile
 create mode 100644 tools/cgroup/tst_cgctl.c

-- 
2.32.0



More information about the ltp mailing list