Releases: libcgroup/libcgroup
v3.2.0
Changelog
- Add
cgroup_get_cgroup_name()
to exported symbols map - Add
cgroup_is_systemd_enabled()
to exported symbols map - Add
cgroup_attach_thread_tid()
to exported symbols map - Add
cgroup_get_threads()
to exported symbols map - Add
cgroup_attach_thread_tid()
to exported symbols map - Add recursive option, '-R', to
cgset
andcgxset
- Add
ignore_rt
option tocgrulesengd
- Add support for any whitespace characters in cgrules configuration files
- Fix issue where cgroup creation failed due to disabled controllers
- Various cleanups in the systemd code, especially for when it is undefined
- Various changes in the continuous integration actions
- Switch to using Github-hosted runners
- Add a checkpatch Github action
- Various fixes for issues reported by Coverity
Checksum
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
9a0fc2d6c377215c3e0d849f9189ecd91fd075f1da0a24b73f56c8892e86bdfe libcgroup-3.2.0.tar.gz
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEE8YWRUDkotilu7UiC4FC3nVspDQMFAmf3o+IACgkQ4FC3nVsp
DQN6xg/6A5X64+hI4KJ/l/2lR2kLsE+Wih7LmDD/1TaBLyZQPworn/u84xOumex+
ELEIxH0D97qrGv2mDXnYjBZZrND/O4PEF3AOOUCTPX8fHUl/RuD8MosDjn8/9uXt
KojO3zBCJ2VPaUKBBbLA9ItAIABqgA4pJBTR0LT3NYcpyJoq/35mxXvjuyCga7mb
SPUzJ4/qDARbCPr8RqnUKIgUFi/KYgf45VXFfzLap59vSHhIDfVZ+F8/ee/BS2H7
L4KNaYwJ5W2rEKv5g61hC9l6ap81DaSa/TPkMtybwti+4oziJYZLkpU3QQ2jMiBt
1JWOdoksfJXXC5JDTfungrjahrJCWqANNQFd11OynmZByb12234CrhOqr0mgocRs
4I84dhs569a934VmjraM9e1h0OdHFj52ssk2zu8GNFeRwqx25BUF16n0pr1NwnKW
VVPfEB8PR/bbmorFbEJzlJqMxbqIhTv2nY4DwUOV0m1WCHw3ELbphqLR14eFLe4z
q53HrPSXxSJ1fIUv1H2K7jzDX8MIAp5jcE7SEybFk2gihTda7Eju5TjAwi7ZMtTB
xZ+eqb8Jd4iQDDUmFybDt0RVcmWr4yFjhMExcAWcBYJoSoR0BPmqfUtazi25QOXk
VuowesegAB9FUmpz4ZHCfvq7uHVe7pO0011nzyrF1XKBAn3mPVI=
=uGnO
-----END PGP SIGNATURE-----
v3.1.0
This release is no longer supported upstream, please use a more recent release
NOTE - this release is not guaranteed to be backward compatible with previous releases
Libcgroup v3.1.0 adds systemd support to the libcgroup library. Users can now create
systemd scopes via the libcgroup C APIs, command line tools, and (experimental) Python
bindings. These scopes can be "delegated" (or not), which is systemd parlance for a
cgroup hierarchy that is being managed by another entity. Systemd will not modify
settings or processes within a delegated hierarchy.
Note that libcgroup v3.1.0 is still capable of modifying cgroups and processes anywhere
in the cgroup hierarchy, including the root cgroup and its children (which are owned
by systemd). Modifying cgroups and processes owned by systemd is a violation of the
cgroup single-writer rule, and systemd reserves the right to undo any changes made by
other processes. The libcgroup team strongly discourages modifying systemd-managed
cgroups - especially on production systems - but it can be useful during prototyping
and on experimental systems.
Three libcgroup/systemd examples have been added to the repository:
If you do not utilize systemd, libcgroup will still operate as before. Our continuous
integration is setup to ensure the library compiles and runs without systemd support,
but testing is currently limited. Please open an issue in our Github if you have any
problems or questions. (And, of course, pull requests are always welcome.)
ChangeLog
- Version 3.1.0 - July 28, 2023
- Add systemd C APIs
- Add systemd support to all command line tools, including cgcreate, cgconfigparser,
cgexec, and cgclassify. Note the usage of the-b
flag in many tools to ignore
the default systemd hierarchy and operate from the root of the cgroup hierarchy - Add python systemd APIs
- Improved handling of legacy (cgroup v1), hybrid (v1/v2), and unified (v2) cgroup
hierarchies - Add several new C APIs, including:
cg_setup_mode_t()
- A function that returns the current cgroup setup mode (legacy,
hybrid, or unified)- Various functions for better traversal through a
struct cgroup
cgroup_create_scope()
andcgroup_create_scope2()
for creating systemd scopes
- cgconfigparser now supports a
systemd
section - Libcgroup python bindings have matured greatly but are still considered experimental
and subject to change. Community feedback here would be greatly appreciated- Add rudimentary logging support
- Add systemd support
- Add setup mode (legacy, hybrid, unified) support
- Add several APIs for operating on
struct cgroup
in a Pythonic manner - Add methods for moving processes within cgroups
- Rename
blacklist
todenylist
- Rename
whitelist
toallowlist
- Add many functional tests
v2.0.3
This release is no longer supported upstream, please use a more recent release
Note
This is scheduled to be the last release in the release-2.0
branch of libcgroup. Users are recommended to transition to the next release of the release-3.0
branch once v3.0.1
is available. (I am anticipating v3.0.1
being released in early spring 2023.) v3.0.1
will have systemd support, full cgroup v2 support, cgroup v1/v2 abstraction layer, and much more automated testing and code coverage. Note that v3.0.x
is not guaranteed to be backward compatible with v2.0.x
, but at this time I don't know of any changes that have broken backward compatibility. Caveat emptor as always :).
ChangeLog
- Version 2.0.3 - January 20, 2023
- Fix many issues identified by Coverity static analysis
- Fix potential segfault in
cgroup_attach_task_pid()
- Add man page updates for tools (lscgroup and lssubsys) that are only supported on cgroup v1
- Fix controller name collisions (e.g. cpuset vs cpu) when analyzing cgroup v1 mounts
- Implement minor automake improvements like using the DIST_SUBDIRS directive
Checksum
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
b29b5704de3d0fadf199fe4e17eeeaecba7f0dd1b85569c96eec37c7672e3026 libcgroup-2.0.3.tar.gz
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEER6aPzjfH1wJP1l4RNWzmLCtSQJkFAmPK22wACgkQNWzmLCtS
QJk/WA//brAOLBXM8/I6+lbE/CGvFQFBeyIeyPQyaTSxOXJVcJfCu6qLZ7D2MQCD
iqHXb+bx9O6WywkoVwU+3Ljng1f8wTEW8MmW3fvXMR5+sSO5wffe7jLaECjFkR5m
i9qDkhoz+iu2gHmCREv3pWLw6HKZ0wWX8pR9rbGEO+veHM3brDQ0IXT7n/rcUOdO
iBmKiTYoXyK2Mq9iIYmeKDhMvj/xbIHJWt/Bbhz/9ckPF8CpoGt21mUSF8h9k/Wo
f+KYXjB7WJM3Wy3dRNRfYLGZAAKOwMy4F6KdWDDYk8rp67Hdkb+7t9ZTl1lAmTuH
fy9fDJjpJkT1nseVT5LVUQqH1ZKnhTtrAQ/ZzTWTgHVygiMcUi2yDn46+FXYPcY5
kPUKevXl+pPAs75cKw3GxLYO+Ca4bzR3feqEQqOgNQbY2dHTpLSaf0Z1Y8zGSYIA
XX6Az1UBSQLrYE0A4be5WMWa1RQXpwH1PMprVwiiOEOi2o6uuPx2rfdT2HIVxgvl
uv34hqlCa61SWkYWjonMZQnuNIQNaez4JhddjrdJg1WecVq6e4lNaoD0O6izRHQ5
Nz2y5W0MtducNWAC5YaIUXRKw12Pmal+OZwgTPTadCcMixaBrvAzYKFOqTg5fuT1
6UAldkeL171e/YvD2tWMCvnF5xGFnkR4wiwOVlVrA9ivCOpd9aw=
=wFeG
-----END PGP SIGNATURE-----
Note while building:
This release utilizes both unit and functional tests - googletest for unit testing and a small python framework for functional testing. The functional tests can be run in a container or on a bare-metal machine. By default, all unit and all functional tests are enabled. The bare metal tests will alter your cgroup hierarchy, and I strongly encourage running them on a temporary VM or other "disposable" machine. They should not be destructive, but cgroups are obviously a critical building block of a Linux system, and I would hate to see a critical machine harmed.
To completely disable the containerized functional tests:
- Comment out the
./ftests.py
line in ftests.sh
To completely disable the bare-metal functional tests:
- Comment out the
./ftests.py
line in ftests-nocontainer.sh
To disable a failing test (in either a container or on bare metal):
- Tests can be skipped by providing the
--skip
flag to ftests.py. Currently test number 28 is being skipped in ftests-nocontainer.sh
To skip a single test, then use the format--skip 9
To skip multiple tests, then use the format--skip 9,10,13
./configure && make
should succeed on all distributions. If there is a failure with these steps, please email the libcgroup development team via our mailing list - libcg-devel@lists.sourceforge.net - or open a Github issue here - https://github.com/libcgroup/libcgroup/issues
make check
may fail on some distributions and some machines. You are welcome to send any failures to our mailing list or open a Github issue, but note that some failures may be expected. The functional tests are currently focused on our continuous integration machines on Github Actions. Tests that enumerate all cgroup settings for a given controller may produce different results on other machines - especially if a different distro or kernel is being used. See below for details on potential failures:
-
Functional tests fail - lxd: command not found - Some of the functional tests use LXD containers to safely encapsulate cgroup changes that would otherwise be destructive on a live system, but not all distributions currently support LXD. If so, feel free to bypass running the LXD functional tests. See the comment above on how to disable the containerized tests
-
Various functional tests fail - As outlined above, this is likely due to differences in system capabilities. For example, if your system has real time cgroups enabled, then you will likely see functional test number 9 fail. I would recommend adding it to the skip list in ftests.sh and/or ftests-nocontainer.sh. See the comment above on how to skip individual tests
-
Unit tests fail - version GLIBCXX_3.4.20 not found - version CXXABI_1.3.9 not found - version GLIBCXX_3.4.21 not found To facilitate long-term stability and testability, we have bundled a compiled version of googletest with this release of libcgroup. On older distributions, this could cause errors during make check` due to the googletest *.so files being dependent upon a newer version of glibc than is available. This can be easily remedied by re-compiling googletest and replacing the provided *.so files. The rough steps are outlined below:
$ git clone https://github.com/google/googletest.git googletest
$ cd googletest
$ git checkout release-1.8.0
$ cd googletest
$ cmake -DBUILD_SHARED_LIBS=ON .
$ make
$ cp *.so {path_where_you_extracted_libcgroup}/googletest/googletest
$ cd {path_where_you_extracted_libcgroup}/tests/gunit
$ make clean
$ make check
v3.0
This release is no longer supported upstream, please use a more recent release
NOTE - this release is not guaranteed to be backward compatible with previous releases
ChangeLog
- Version 3.0 - August 5, 2022
- Introduce cgxget and cgxset - tools to abstract cgroup v1 and v2 systems
- Introduce new C APIs that abstract the cgroup v1 and v2 interfaces for the user
- Remove the cgclear tool
- Introduce modern Cython-based Python bindings, replacing the old bindings
- Add spdx license tags across the files
- Introduce a process for handling security-related vulnerabilities
- Fix many warnings and errors reported by coverity
- Add full cgroup v2 support to continuous integration
- Add code quality analysis to continuous integration
- Add Linux kernel syntax style and add checking to continuous integration
Checksum
Hash: SHA256
8d284d896fca1c981b55850e92acd3ad9648a69227c028dda7ae3402af878edd libcgroup-3.0.0.tar.gz
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEER6aPzjfH1wJP1l4RNWzmLCtSQJkFAmLsOzsACgkQNWzmLCtS
QJkENhAAzWVgGYIcVtT66zby4Tc1o5RWoEzJBGnKsoobo45oA7if65wUKYfxhMZz
/VZNT2nZ6QlnwtFXMMRgBFxmbHB/Y+/5k9zQSOS+vLSfYkN/kCY+uJHpTYuXiH0H
KlCwPvoUU/deAub0M08cKvPMkvPXKBChYDJvQcxpNLt1wig6Mxgey120NrfTrTCe
hOHh7gNqTRS/qA8VH8bvhfrmRgCdAmAIC6NYhS9RvNwUnkNKpTwFAClGOCv70wHf
tF+jTcRZ+xvHw1r6GL7cngsj7LQiZZ2RWsNGJ0Ynr1UfpwX+8qMtBYpV0YOAEei5
BYepi5vVnc/wC1KMQFRJgpl6hR1pQiz+nlwvUuJW9nge6zWedcKiX0QUWIHixWXw
JfMFNR/A8hX8L1AhNpzUbrYsCeIIo7K55qgNWR7QOaJVp6CJVU0Vu3Ww350AOOHN
nWOPvrzRu8DpwXIJK02o7cU/NbCANDHgFvCTkmXxskDDiOTVw+RcFeWtQfwptbyj
u55ZQTkvZxvE661abFX7gbnZTYp3Cla4UmIjjqBCJI2VLS5J/j5O8G0GwyGppyZt
G114iNB2DYebPhV9qOrekN5ICbWPKQXPT22DR0GA1TPWl6b10LqkEUxmqPR9kUEA
y7AREB3PAspXffPckboSIfmq5KNDUhLo17NfGr+L0qM3iPbOkPQ=
=gtT8
-----END PGP SIGNATURE-----
Note while building:
This release utilizes both unit and functional tests - googletest for unit testing and a small python framework for functional testing. The functional tests can be run in a container or on a bare-metal machine. By default, all unit and all functional tests are enabled. The bare metal tests will alter your cgroup hierarchy, and I strongly encourage running them on a temporary VM or other "disposable" machine. They should not be destructive, but cgroups are obviously a critical building block of a Linux system, and I would hate to see a critical machine harmed.
To completely disable the containerized functional tests:
- Comment out the
./ftests.py
line in ftests.sh
To completely disable the bare-metal functional tests:
- Comment out the
./ftests.py
line in ftests-nocontainer.sh
To disable a failing test (in either a container or on bare metal):
- Tests can be skipped by providing the
--skip
flag to ftests.py. Currently test number 28 is being skipped in ftests-nocontainer.sh
To skip a single test, then use the format--skip 9
To skip multiple tests, then use the format--skip 9,10,13
./configure && make
should succeed on all distributions. If there is a failure with these steps, please email the libcgroup development team via our mailing list - libcg-devel@lists.sourceforge.net - or open a Github issue here - https://github.com/libcgroup/libcgroup/issues
make check
may fail on some distributions and some machines. You are welcome to send any failures to our mailing list or open a Github issue, but note that some failures may be expected. The functional tests are currently focused on our continuous integration machines on Github Actions. Tests that enumerate all cgroup settings for a given controller may produce different results on other machines - especially if a different distro or kernel is being used. See below for details on potential failures:
-
Functional tests fail - lxd: command not found - Some of the functional tests use LXD containers to safely encapsulate cgroup changes that would otherwise be destructive on a live system, but not all distributions currently support LXD. If so, feel free to bypass running the LXD functional tests. See the comment above on how to disable the containerized tests
-
Various functional tests fail - As outlined above, this is likely due to differences in system capabilities. For example, if your system has real time cgroups enabled, then you will likely see functional test number 9 fail. I would recommend adding it to the skip list in ftests.sh and/or ftests-nocontainer.sh. See the comment above on how to skip individual tests
-
Unit tests fail - version GLIBCXX_3.4.20 not found - version CXXABI_1.3.9 not found - version GLIBCXX_3.4.21 not found To facilitate long-term stability and testability, we have bundled a compiled version of googletest with this release of libcgroup. On older distributions, this could cause errors during make check` due to the googletest *.so files being dependent upon a newer version of glibc than is available. This can be easily remedied by re-compiling googletest and replacing the provided *.so files. The rough steps are outlined below:
$ git clone https://github.com/google/googletest.git googletest
$ cd googletest
$ git checkout release-1.8.0
$ cd googletest
$ cmake -DBUILD_SHARED_LIBS=ON .
$ make
$ cp *.so {path_where_you_extracted_libcgroup}/googletest/googletest
$ cd {path_where_you_extracted_libcgroup}/tests/gunit
$ make clean
$ make check
v2.0.2
This release is no longer supported upstream, please use a more recent release
ChangeLog
- Version 2.0.2 - May 12, 2022
- Fix extra spaces in configure.ac's --enable-bindings
- Fix potential segfault if there are more than 100 cgroup mount points
Checksum
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
8ef63b32e0aff619547dbb8a25e1f6bab152d7c4864795cf915571a5994d0cf8 libcgroup-2.0.2.tar.gz
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEER6aPzjfH1wJP1l4RNWzmLCtSQJkFAmJ9E1kACgkQNWzmLCtS
QJlYtRAAh8CRalrmzzWuGc8nkEzspTF41IsJKx1j3qWO/raLy/8j2rqzgDwBvUhy
QHIHEmQz0LAsjJkcv9DSH91ZKriU4n3Pe3WhhKkj78NPr8JpQ1APH/zZ/IiHdJ7O
dazZ6PmhKE7XvJWDdGGMY+nTzm64WFEOqq9qvAk5gE6ZsjroyE9ka1saPcywLqvp
TYRYE39JmtYpDryMDZ9+tCCQjPwPNz2l2wImv27kGEFNtO2OVPI/aJPY7+A4PW1n
iLSxRjJuhx7q1KkNwAopw4zXXk1xnrf3qq9ALOnSbmmO75V0fRBiezr0LH686VGE
Fdc+5iQH3lOcwrjyMFCpRNwQmnSuOwb+xUZfZ8BX5+RfIKdUHTfjJbcTkuN6fO1b
T7cFtBD6x8mQQQjZvXj41JfsvDnIxLSUXcYdYY9M2aAtCK57exCNgRsDb8eH4g/y
eiDu8sBHKfu7N/pdC9HBhsNFCHo1trHvmAQ4TwiiwYg3qgowK8x6izaL7vprv2ET
5S5jLTdC2sjG9vHwtc/D9UG/44X85iZDa/B6Jxud5Nr6vBRsh/tlV/Ye5V8g8mNf
EIf9/r0J6pYAVfMdlCECOq9XuQiHSdnDJd1Pt/v/BnglMS1J+GMH5qhG3UuBS3F8
pLbIyP1ChZzTDNADNxwvAhf6OZnunm89BqOimA+XLukNf/fG4wY=
=24JD
-----END PGP SIGNATURE-----
Note while building:
This release utilizes both unit and functional tests - googletest for unit testing and a small python framework for functional testing. The functional tests can be run in a container or on a bare-metal machine. By default, all unit and all functional tests are enabled. The bare metal tests will alter your cgroup hierarchy, and I strongly encourage running them on a temporary VM or other "disposable" machine. They should not be destructive, but cgroups are obviously a critical building block of a Linux system, and I would hate to see a critical machine harmed.
To completely disable the containerized functional tests:
- Comment out the
./ftests.py
line in ftests.sh
To completely disable the bare-metal functional tests:
- Comment out the
./ftests.py
line in ftests-nocontainer.sh
To disable a failing test (in either a container or on bare metal):
- Tests can be skipped by providing the
--skip
flag to ftests.py. Currently test number 28 is being skipped in ftests-nocontainer.sh
To skip a single test, then use the format--skip 9
To skip multiple tests, then use the format--skip 9,10,13
./configure && make
should succeed on all distributions. If there is a failure with these steps, please email the libcgroup development team via our mailing list - libcg-devel@lists.sourceforge.net - or open a Github issue here - https://github.com/libcgroup/libcgroup/issues
make check
may fail on some distributions and some machines. You are welcome to send any failures to our mailing list or open a Github issue, but note that some failures may be expected. The functional tests are currently focused on our continuous integration machines on Github Actions. Tests that enumerate all cgroup settings for a given controller may produce different results on other machines - especially if a different distro or kernel is being used. See below for details on potential failures:
-
Functional tests fail - lxd: command not found - Some of the functional tests use LXD containers to safely encapsulate cgroup changes that would otherwise be destructive on a live system, but not all distributions currently support LXD. If so, feel free to bypass running the LXD functional tests. See the comment above on how to disable the containerized tests
-
Various functional tests fail - As outlined above, this is likely due to differences in system capabilities. For example, if your system has real time cgroups enabled, then you will likely see functional test number 9 fail. I would recommend adding it to the skip list in ftests.sh and/or ftests-nocontainer.sh. See the comment above on how to skip individual tests
-
Unit tests fail - version GLIBCXX_3.4.20 not found - version CXXABI_1.3.9 not found - version GLIBCXX_3.4.21 not found To facilitate long-term stability and testability, we have bundled a compiled version of googletest with this release of libcgroup. On older distributions, this could cause errors during make check` due to the googletest *.so files being dependent upon a newer version of glibc than is available. This can be easily remedied by re-compiling googletest and replacing the provided *.so files. The rough steps are outlined below:
$ git clone https://github.com/google/googletest.git googletest
$ cd googletest
$ git checkout release-1.8.0
$ cd googletest
$ cmake -DBUILD_SHARED_LIBS=ON .
$ make
$ cp *.so {path_where_you_extracted_libcgroup}/googletest/googletest
$ cd {path_where_you_extracted_libcgroup}/tests/gunit
$ make clean
$ make check
v2.0.1
This release is no longer supported upsteam, please use a more recent release
ChangeLog
- Version 2.0.1 - March 10, 2022
- Allow reading/writing from
cgroup.*
files in cgroup v2 - Add support for cgroup v2's
cgroup.threads
file - Fix issue where libcgroup/pam wasn't working properly when
cgrulesengd is disabled - Fix a bug where the cgroup version wasn't initialized in a
named cgroup v1 hierarchy - Various automake bug fixes
- Build PAM module as unversioned DSO
- Fix build issues with musl libc
- Fix potential TOCTOU race in
cgroup_get_procs()
- Allow reading/writing from
Checksum
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
2dd9c566a90a053e7a5f47607e225648ba7aa9bb7763514dd4778e2ed530fe90 libcgroup-2.0.1.tar.gz
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEER6aPzjfH1wJP1l4RNWzmLCtSQJkFAmIqPvUACgkQNWzmLCtS
QJmaZQ/+MejsFT6mCLbXtS3T2eF+dyqhlp1sYof1UgAK0yGzTx1CGEyjG1ahgQ66
R29HGbgkyUSQsVKsG9OT0XpRObl6SmID641oODQD6KQl5Glif3UD4IUJ8nXV9xZd
SGGqzlyEJ26kvSwCqvJGR3Rig+1tu9id7iAvj7gIO/q2jug7MVVJAHwGqq8VeFVL
osSAMFfPcubKaWKCkgMsy9gz4dVapBVrMyIC+hCL4bTiZyUOqEKDgze/aYEKM9jc
ySKKtpL7OwBqDAsed0v7lkAjQBbOh4noB4JmSTn7znjvsKXliUsqvf+ERqljVaBU
u8VVaQr2GUgy1ecnpJMfU8nATzkKNT15IFVGUgICvK2aahvqRcs9l8OOff7gfDgq
s00Rs3MYTuR+vOIDzlYrkPCMadxpsd3VUCWhORc1aboFU/E2vvkU/GGKo3L/Frjy
scBecVL4CyKb2MnS++yopwbh1KIhDy62u5pdNYWKlDrb+eDY+Sfev0qTeFM7Anby
FUeVzpNWTaC5uo0++7q5+ZuzKI+qTJT8t4xlz9tRI8z+T97yNjI/jRYamnhivTuU
KphgczsAfT2LjiohNisjYfGdmswGTDWSbDuThdsM9amp3Q4IIvUY3Lxx+ayke9RZ
S8ttbbxzo+JVkIshcY+hD8tMv980w8Ue47wxMccvk3CpgIhYZc8=
=MsSi
-----END PGP SIGNATURE-----
Note while building:
This release utilizes both unit and functional tests - googletest for unit testing and a small python framework for functional testing. The functional tests can be run in a container or on a bare-metal machine. By default, all unit and all functional tests are enabled. The bare metal tests will alter your cgroup hierarchy, and I strongly encourage running them on a temporary VM or other "disposable" machine. They should not be destructive, but cgroups are obviously a critical building block of a Linux system, and I would hate to see a critical machine harmed.
To completely disable the containerized functional tests:
- Comment out the
./ftests.py
line in ftests.sh
To completely disable the bare-metal functional tests:
- Comment out the
./ftests.py
line in ftests-nocontainer.sh
To disable a failing test (in either a container or on bare metal):
- Tests can be skipped by providing the
--skip
flag to ftests.py. Currently test number 28 is being skipped in ftests-nocontainer.sh
To skip a single test, then use the format--skip 9
To skip multiple tests, then use the format--skip 9,10,13
./configure && make
should succeed on all distributions. If there is a failure with these steps, please email the libcgroup development team via our mailing list - libcg-devel@lists.sourceforge.net - or open a Github issue here - https://github.com/libcgroup/libcgroup/issues
make check
may fail on some distributions and some machines. You are welcome to send any failures to our mailing list or open a Github issue, but note that some failures may be expected. The functional tests are currently focused on our continuous integration machines on Github Actions. Tests that enumerate all cgroup settings for a given controller may produce different results on other machines - especially if a different distro or kernel is being used. See below for details on potential failures:
-
Functional tests fail - lxd: command not found - Some of the functional tests use LXD containers to safely encapsulate cgroup changes that would otherwise be destructive on a live system, but not all distributions currently support LXD. If so, feel free to bypass running the LXD functional tests. See the comment above on how to disable the containerized tests
-
Various functional tests fail - As outlined above, this is likely due to differences in system capabilities. For example, if your system has real time cgroups enabled, then you will likely see functional test number 9 fail. I would recommend adding it to the skip list in ftests.sh and/or ftests-nocontainer.sh. See the comment above on how to skip individual tests
-
Unit tests fail - version GLIBCXX_3.4.20 not found - version CXXABI_1.3.9 not found - version GLIBCXX_3.4.21 not found To facilitate long-term stability and testability, we have bundled a compiled version of googletest with this release of libcgroup. On older distributions, this could cause errors during make check` due to the googletest *.so files being dependent upon a newer version of glibc than is available. This can be easily remedied by re-compiling googletest and replacing the provided *.so files. The rough steps are outlined below:
$ git clone https://github.com/google/googletest.git googletest
$ cd googletest
$ git checkout release-1.8.0
$ cd googletest
$ cmake -DBUILD_SHARED_LIBS=ON .
$ make
$ cp *.so {path_where_you_extracted_libcgroup}/googletest/googletest
$ cd {path_where_you_extracted_libcgroup}/tests/gunit
$ make clean
$ make check
v2.0
This release is no longer supported upsteam, please use a more recent release
Version 2.0 - May 6, 2021
- Add cgroup v2 support to all libcgroup tools - cgclassify, cgclear, cgconfigparser, cgcreate, cgdelete, cgexec, cgget, cgrulesengd, cgset, cgsnapshot, lscgroup, lssubsys. See github issue #12.
- Fix an issue with parallel builds
- Add extensive functional tests
- Remove .libs from Makefile.am files
- Major refactor of cgget to make it more closely align with the other tools
- Fix many string truncation and possible buffer overflow warnings
Note while building:
This release utilizes both unit and functional tests - googletest for unit testing and a small python framework for functional testing. The functional tests can be run in a container or on a bare-metal machine. By default, all unit and all functional tests are enabled. The bare metal tests will alter your cgroup hierarchy, and I strongly encourage running them on a temporary VM or other "disposable" machine. They should not be destructive, but cgroups are obviously a critical building block of a Linux system, and I would hate to see a critical machine harmed.
To completely disable the containerized functional tests:
- Comment out the
./ftests.py
line in ftests.sh
To completely disable the bare-metal functional tests:
- Comment out the
./ftests.py
line in ftests-nocontainer.sh
To disable a failing test (in either a container or on bare metal):
- Tests can be skipped by providing the
--skip
flag to ftests.py. Currently test number 28 is being skipped in ftests-nocontainer.sh
To skip a single test, then use the format--skip 9
To skip multiple tests, then use the format--skip 9,10,13
./configure && make
should succeed on all distributions. If there is a failure with these steps, please email the libcgroup development team via our mailing list - libcg-devel@lists.sourceforge.net - or open a Github issue here - https://github.com/libcgroup/libcgroup/issues
make check
may fail on some distributions and some machines. You are welcome to send any failures to our mailing list or open a Github issue, but note that some failures may be expected. The functional tests are currently focused on our continuous integration machines on Github Actions. Tests that enumerate all cgroup settings for a given controller may produce different results on other machines - especially if a different distro or kernel is being used. See below for details on potential failures:
-
Functional tests fail - lxd: command not found - Some of the functional tests use LXD containers to safely encapsulate cgroup changes that would otherwise be destructive on a live system, but not all distributions currently support LXD. If so, feel free to bypass running the LXD functional tests. See the comment above on how to disable the containerized tests
-
Various functional tests fail - As outlined above, this is likely due to differences in system capabilities. For example, if your system has real time cgroups enabled, then you will likely see functional test number 9 fail. I would recommend adding it to the skip list in ftests.sh and/or ftests-nocontainer.sh. See the comment above on how to skip individual tests
-
Unit tests fail - version GLIBCXX_3.4.20' not found - version CXXABI_1.3.9' not found - version GLIBCXX_3.4.21' not found To facilitate long-term stability and testability, we have bundled a compiled version of googletest with this release of libcgroup. On older distributions, this could cause errors during make check` due to the googletest *.so files being dependent upon a newer version of glibc than is available. This can be easily remedied by re-compiling googletest and replacing the provided *.so files. The rough steps are outlined below:
$ git clone https://github.com/google/googletest.git googletest
$ cd googletest
$ git checkout release-1.8.0
$ cd googletest
$ cmake -DBUILD_SHARED_LIBS=ON .
$ make
$ cp *.so {path_where_you_extracted_libcgroup}/googletest/googletest
$ cd {path_where_you_extracted_libcgroup}/tests/gunit
$ make clean
$ make check
v2.0.rc1
v0.42.2
Version 0.42.2 - February 4, 2020
- Fix issue where lscgroup or cgdelete may fail when multiple controllers
are mounted on the same path - Add support for loading rules from /etc/cgrules.d/
- Add wildcard matching for process names
- Fix bug where child threads of a process may not get reassigned to the
requested cgroup - Fix CVE-2018-14348 where the cgred logfile permissions were too permissive
- Add support for nosuid, noexec, and nodev
- Fix bug where double-forking daemon processes do not get properly
classified by cgrules - Fix bug in cgconfig parsing that could cause cgrules or cgengd to crash
on platforms where the pointer size exceeds the size of an int - Add googletest framework to facilitate unit testing
- Add functional test framework using LXD containers
Note while building - This release adds two built-in testing suites -
googletest for unit testing and a small python framework utilizing LXD for
functional testing.
./configure && make
should succeed on all distributions. If there is
a failure with these steps, please email the libcgroup development team via
our mailing list - libcg-devel@lists.sourceforge.net.
- Note that GCC 8 and newer will raise a few warnings about string
truncations and similar warnings duringstrncpy()
andstrncat()
. In most
of these cases, a string truncation would only occur if the path is 4096
characters or longer. At this time, I don't believe this is a critical
issue, but it is on the agenda to be cleaned up for the next release.
Again, please email libcg-devel@lists.sourceforge.net with questions or
concerns.
./configure && make check
may fail on some distributions. You are welcome
to send any failures to our mailing list, but note that some failures may be
expected on some distributions. See below for details on potential failures:
-
Functional tests fail - lxd: command not found -
The functional tests use LXD containers to safely encapsulate cgroup
changes that would otherwise be destructive on a live system. But not
all distributions currently support LXD. If so, feel free to bypass
running the functional tests. The current libcgroup functional test
status is available on TravisCI - https://travis-ci.org/libcgroup/libcgroup -
Unit tests fail - version
GLIBCXX_3.4.20' not found - version
CXXABI_1.3.9' not found
- versionGLIBCXX_3.4.21' not found To facilitate long-term stability and testability, we have bundled a compiled version of googletest with this release of libcgroup. On older distributions, this could cause errors during
make check` due to the
googletest *.so files being dependent upon a newer version of glibc than
is available. This can be easily remedied by re-compiling googletest
and replacing the provided *.so files. The rough steps are outlined
below:$ git clone https://github.com/google/googletest.git googletest $ cd googletest $ git checkout release-1.8.0 $ cd googletest $ cmake -DBUILD_SHARED_LIBS=ON . $ make $ cp *.so {path_where_you_extracted_libcgroup}/googletest/googletest $ cd path_where_you_extracted_libcgroup}/tests/gunit $ make clean $ make check