[Libcg-devel] libcgroup v2.0.1 released

2022-03-11 Thread Tom Hromatka
archy * Various automake bug fixes * Build PAM module as unversioned DSO * Fix build issues with musl libc * Fix potential TOCTOU race in cgroup_get_procs() Regards, Tom Hromatka ___ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.

[Libcg-devel] [PATCH 2/4] cgroup.py: Add support for cgcreate flags

2021-11-09 Thread Tom Hromatka
Add support for all of the cgcreate flags. Signed-off-by: Tom Hromatka --- ftests/cgroup.py | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/ftests/cgroup.py b/ftests/cgroup.py index 06ca45693ae9..8b8451ef55fb 100644 --- a/ftests/cgroup.py +++ b

[Libcg-devel] [PATCH 0/4] Functional tests for Python bindings

2021-11-09 Thread Tom Hromatka
: https://github.com/drakenclimber/libcgroup-tests/tree/issues/cgxget5-pybindings Code coverage increased to 53.5%: https://coveralls.io/builds/44100945 I added a few functional tests, and all automated tests are passing. Results are here: https://github.com/drakenclimber/libcgroup/runs/4143613675 Tom

[Libcg-devel] [PATCH 4/4] ftests: Add a test for the python bindings to library_version()

2021-11-09 Thread Tom Hromatka
0.00 Signed-off-by: Tom Hromatka --- ftests/039-pybindings-library_version.py | 77 1 file changed, 77 insertions(+) create mode 100755 ftests/039-pybindings-library_version.py diff --git a/ftests/039-pybindings-library_version.py b/ftests/039-pybindings

[Libcg-devel] [PATCH 1/4] ftests: Add a test for the python bindings to cgroup_cgxget()

2021-11-09 Thread Tom Hromatka
0.04 Signed-off-by: Tom Hromatka --- ftests/037-pybindings-cgxget.py | 130 1 file changed, 130 insertions(+) create mode 100755 ftests/037-pybindings-cgxget.py diff --git a/ftests/037-pybindings-cgxget.py b/ftests/037-pybindings-cgxget.py new file mode 100755

[Libcg-devel] [PATCH 3/4] ftests: Add a test for the python bindings to cgroup_cgxset()

2021-11-09 Thread Tom Hromatka
: Tom Hromatka --- ftests/038-pybindings-cgxset.py | 120 1 file changed, 120 insertions(+) create mode 100755 ftests/038-pybindings-cgxset.py diff --git a/ftests/038-pybindings-cgxset.py b/ftests/038-pybindings-cgxset.py new file mode 100755 index

[Libcg-devel] [PATCH 08/10] python: Add python bindings using Cython

2021-11-09 Thread Tom Hromatka
Add python bindings via the --enable-python configure flag. Signed-off-by: Tom Hromatka --- .github/actions/setup-libcgroup/action.yml | 6 +- .github/workflows/continuous-integration.yml | 9 + configure.ac | 16 ++ src/Makefile.am

[Libcg-devel] [PATCH 01/10] python: Delete old python bindings

2021-11-09 Thread Tom Hromatka
Remove the old python bindings. They will be replaced with Cython bindings in a subsequent commit. Signed-off-by: Tom Hromatka --- configure.ac | 13 - src/Makefile.am| 6 +- src/bindings/Makefile.am | 15 --- src/bindings/libcgroup.p

[Libcg-devel] [PATCH 04/10] cgxget: libcgroup.so: Add cgroup_cgxget() to library

2021-11-09 Thread Tom Hromatka
Add cgroup_cgxget() to libcgroup.so. Create a new header file, libcgroup/tools.h, to hold C APIs that are exported from the tools folder. Signed-off-by: Tom Hromatka --- include/Makefile.am | 4 +- include/libcgroup.h | 1 + include/libcgroup/tools.h | 57

[Libcg-devel] [PATCH 09/10] github: Add a code coverage action

2021-11-09 Thread Tom Hromatka
Add a code coverage action to the Github workflow. As part of this code coverage action, ignore the C file that is auto-generated from the Cython code. Also ignore a couple Python header files that were confusing lcov. Signed-off-by: Tom Hromatka --- .github/actions/code-coverage/action.yml

[Libcg-devel] [PATCH 06/10] libcgroup.so: Add a function to get the library version

2021-11-09 Thread Tom Hromatka
Add a function, cgroup_version(), that returns the current version of the libcgroup library. Signed-off-by: Tom Hromatka --- configure.ac| 1 + include/libcgroup/.gitignore| 1 + include/libcgroup/{init.h => init.h.in} | 19 +++

[Libcg-devel] [PATCH 03/10] libcgroup.so: Export cgroup_convert_cgroup()

2021-11-09 Thread Tom Hromatka
Add cgroup_convert_cgroup() to libcgroup/groups.h Signed-off-by: Tom Hromatka --- include/libcgroup/groups.h | 17 + src/abstraction-common.h | 17 - 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/include/libcgroup/groups.h b/include/libcgroup

[Libcg-devel] [PATCH 00/10] Add C and Python Binding for tools folder

2021-11-09 Thread Tom Hromatka
://sourceforge.net/p/libcg/mailman/message/37317688/ [2] https://gist.github.com/drakenclimber/b3a6b4031807b31bef8ec2c98025453f Tom Hromatka (10): python: Delete old python bindings groups.h: Move cg_version_t to groups.h libcgroup.so: Export cgroup_convert_cgroup() cgxget: libcgroup.so: Add

[Libcg-devel] [PATCH 10/10] git: tools: Ignore cgxget and cgxset

2021-11-09 Thread Tom Hromatka
Git ignore the executables cgxget and cgxset Signed-off-by: Tom Hromatka --- src/tools/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/.gitignore b/src/tools/.gitignore index 2293fcf34872..3df02b5eec4a 100644 --- a/src/tools/.gitignore +++ b/src/tools/.gitignore

[Libcg-devel] [PATCH 07/10] libcgroup.so: Add cgroup_get_controller_version() to groups.h

2021-11-09 Thread Tom Hromatka
cgroup_get_controller_version() was being exported via the libcgroup map, but its prototype wasn't available in libcgroup.h. Add cgroup_get_controller_version() to libcgroup/groups.h Signed-off-by: Tom Hromatka --- include/libcgroup/groups.h | 10 ++ src/libcgroup-internal.h

[Libcg-devel] [PATCH 05/10] cgxset: libcgroup.so: Add cgroup_cgxset() to library

2021-11-09 Thread Tom Hromatka
Add cgroup_cgxset() to libcgroup.so. Signed-off-by: Tom Hromatka --- include/libcgroup/tools.h | 13 + src/Makefile.am | 2 +- src/libcgroup.map | 1 + src/tools/cgset.c | 40 +++ 4 files changed, 55 insertions(+), 1

[Libcg-devel] [PATCH 02/10] groups.h: Move cg_version_t to groups.h

2021-11-09 Thread Tom Hromatka
Move cg_version_t to libcgroup/groups.h from libcgroup-internal.h Signed-off-by: Tom Hromatka --- include/libcgroup/groups.h | 7 +++ src/libcgroup-internal.h | 7 --- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/libcgroup/groups.h b/include/libcgroup

[Libcg-devel] [PATCH v2 1/3] ftests: Add support for cgxget to the Cgroup class

2021-07-09 Thread Tom Hromatka
Add support for cgxget to the Cgroup class The pydoc for Cgroup.xget() is available by running: $ python -c "from cgroup import Cgroup;help(Cgroup.xget)" Signed-off-by: Tom Hromatka --- ftests/cgroup.py | 82 +--- 1 file c

[Libcg-devel] [PATCH v2 3/3] ftests: Add a cgxget/cgxset test for the cpu controller

2021-07-09 Thread Tom Hromatka
-by: Tom Hromatka --- ftests/035-cgxget-cpu_settings.py | 86 +++ 1 file changed, 86 insertions(+) create mode 100755 ftests/035-cgxget-cpu_settings.py diff --git a/ftests/035-cgxget-cpu_settings.py b/ftests/035-cgxget-cpu_settings.py new file mode 100755 index

[Libcg-devel] [PATCH v2 2/3] ftests: Add support for cgxset to the Cgroup class

2021-07-09 Thread Tom Hromatka
Add support for cgxset to the Cgroup class The pydoc for Cgroup.xset() is available by running: $ python -c "from cgroup import Cgroup;help(Cgroup.xset)" Signed-off-by: Tom Hromatka --- ftests/cgroup.py | 69 1 file c

[Libcg-devel] [PATCH v2 0/3] Add cgxget/cgxset tests

2021-07-09 Thread Tom Hromatka
Tom Hromatka (3): ftests: Add support for cgxget to the Cgroup class ftests: Add support for cgxset to the Cgroup class ftests: Add a cgxget/cgxset test for the cpu controller ftests/035-cgxget-cpu_settings.py | 86 +++ ftests/cgroup.py | 137

[Libcg-devel] [PATCH v2 9/9] cgxset: Introduce cgxset

2021-07-09 Thread Tom Hromatka
MyCgroup Signed-off-by: Tom Hromatka --- src/tools/Makefile.am | 6 +- src/tools/cgset.c | 47 +++ 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/src/tools/Makefile.am b/src/tools/Makefile.am index bb00520be48b..54b548f77ed6 100644

[Libcg-devel] [PATCH v2 2/9] api.c: Remove static from cgroup_copy_controller_values()

2021-07-09 Thread Tom Hromatka
make heavy use of const and without these changes warnings (which continuous integration converts to errors) are thrown. Signed-off-by: Tom Hromatka --- src/api.c| 10 ++ src/libcgroup-internal.h | 11 +++ 2 files changed, 13 insertions(+), 8 deletions(-) diff

[Libcg-devel] [PATCH v2 6/9] abstraction: Add function to convert from one cgroup version to another

2021-07-09 Thread Tom Hromatka
Add a function - cgroup_convert_cgroup() - that can convert from one cgroup version to another. This function will be the building block for the libcgroup abstraction layer. Signed-off-by: Tom Hromatka --- src/abstraction-common.c | 103 +++ src/abstraction

[Libcg-devel] [PATCH v2 7/9] abstraction-map: Add cpu.shares <-> cpu.weight mapping

2021-07-09 Thread Tom Hromatka
Add a mapping from cpu.shares <-> cpu.weight. Signed-off-by: Tom Hromatka --- src/abstraction-map.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/abstraction-map.c b/src/abstraction-map.c index 91fdec0e8818..450ada02269b 100644 --- a/src/abstraction-map.c +++ b/src/abstraction

[Libcg-devel] [PATCH v2 3/9] abstraction: Add cgroup_strtol()

2021-07-09 Thread Tom Hromatka
Add two new files - abstraction-common.[ch] - and within them add a function - cgroup_strtol() - that can convert a string to a long. Signed-off-by: Tom Hromatka --- src/Makefile.am | 2 +- src/abstraction-common.c | 66 src/abstraction

[Libcg-devel] [PATCH v2 0/9] Introduce cgxget and cgxset

2021-07-09 Thread Tom Hromatka
/coveralls.io/builds/41251128 Automated tests are passing and the results are here: https://github.com/drakenclimber/libcgroup/runs/3030300300 Tom Hromatka (9): wrapper.c: Store the version in struct cgroup_controller api.c: Remove static from cgroup_copy_controller_values() abstraction: Add

[Libcg-devel] [PATCH v2 8/9] cgxget: Introduce cgxget

2021-07-09 Thread Tom Hromatka
The return value to the user will match the cgroup version requested. If the user requests a v1 setting, the return value will be a cgroup v1 setting. If the user requests a v2 setting, the return value will be a cgroup v2 setting. Signed-off-by: Tom Hromatka --- src/tools/Makefile.am | 8

[Libcg-devel] [PATCH v2 5/9] abstraction: Add integer conversion function

2021-07-09 Thread Tom Hromatka
Add a function to the abstraction layer that can convert from one integer setting to another. For example, this can be used for simple conversions like cpu.shares to cpu.weight and vice versa. Signed-off-by: Tom Hromatka --- src/abstraction-common.c | 44

[Libcg-devel] [PATCH v2 4/9] abstraction: Add mapping tables

2021-07-09 Thread Tom Hromatka
Add a table for cgroup v1 to v2 conversions - cgroup_v1_to_v2_map[] Add a table for cgroup v2 to v2 conversions - cgroup_v2_to_v1_map[] Signed-off-by: Tom Hromatka --- src/Makefile.am | 2 +- src/abstraction-map.c | 42 ++ src/abstraction

[Libcg-devel] [PATCH v2 1/9] wrapper.c: Store the version in struct cgroup_controller

2021-07-09 Thread Tom Hromatka
requires the cg_mount_table[] to be populated. Signed-off-by: Tom Hromatka --- src/libcgroup-internal.h | 13 +++-- src/tools/cgconfig.c | 7 +++ src/wrapper.c| 11 ++- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/src/libcgroup-internal.h b

[Libcg-devel] [PATCH v2 08/13] cgroup.py: Fix bug in delete with multiple controllers

2021-06-08 Thread Tom Hromatka
When multiple controllers are passed into Cgroup.delete() via a list, delete() was erroneously joining them without a comma separator. Add the comma separator. Signed-off-by: Tom Hromatka --- ftests/cgroup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ftests/cgroup.py

[Libcg-devel] [PATCH v2 13/13] ftests: Skip test 032 due to Github Issue #50

2021-06-08 Thread Tom Hromatka
a non-trivial rewrite of lscgroup since it doesn't use any of the common structures used elsewhere in libcgroup. Signed-off-by: Tom Hromatka --- ftests/032-lscgroup-multiple_g_flags.py | 15 +++ 1 file changed, 15 insertions(+) diff --git a/ftests/032-lscgroup-multiple_g_flags.py b/

[Libcg-devel] [PATCH v2 07/13] ftests: Modify functional test 012 to support cgroup v2

2021-06-08 Thread Tom Hromatka
Add cgroup v2 support to the 012-cgget-multiple_r_flags2.py functional test. It continues to support cgroup v1 as well. Signed-off-by: Tom Hromatka --- ftests/012-cgget-multiple_r_flags2.py | 32 +-- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/ftests

[Libcg-devel] [PATCH v2 09/13] ftests: Modify functional test 013 to support cgroup v2

2021-06-08 Thread Tom Hromatka
Add cgroup v2 support to the 013-cgget-multiple_g_flags.py functional test. It continues to support cgroup v1 as well. Signed-off-by: Tom Hromatka --- ftests/013-cgget-multiple_g_flags.py | 61 1 file changed, 52 insertions(+), 9 deletions(-) diff --git a/ftests

[Libcg-devel] [PATCH v2 10/13] ftests: Modify functional test 014 to support cgroup v2

2021-06-08 Thread Tom Hromatka
Add support for a full cgroup v2 system to the 014-cgget-a_flag.py functional test. It continues to support cgroup v1 as well. Signed-off-by: Tom Hromatka --- ftests/014-cgget-a_flag.py | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/ftests/014

[Libcg-devel] [PATCH v2 05/13] ftests: Modify functional test 010 to support cgroup v2

2021-06-08 Thread Tom Hromatka
Add cgroup v2 support to the 010-cgget-g_flag_controller_and_cgroup.py functional test. It continues to support cgroup v1 as well. Signed-off-by: Tom Hromatka --- .../010-cgget-g_flag_controller_and_cgroup.py | 39 +-- 1 file changed, 36 insertions(+), 3 deletions(-) diff

[Libcg-devel] [PATCH v2 01/13] run.py: Ignore LXD cgroup v2 warning

2021-06-08 Thread Tom Hromatka
On full cgroup v2 systems, LXD raises the following warning: WARNING: cgroup v2 is not fully supported yet Add logic to run.py to ignore this warning. A non-zero return code or other strings in stderr should still cause a RunError exception to be raised. Signed-off-by: Tom Hromatka

[Libcg-devel] [PATCH v2 11/13] ftests: Modify functional test 030 to support cgroup v2

2021-06-08 Thread Tom Hromatka
Add cgroup v2 support to the 030-lssubsys-lssubsys_all.py functional test. It continues to support cgroup v1 as well. Signed-off-by: Tom Hromatka --- ftests/030-lssubsys-lssubsys_all.py | 4 1 file changed, 4 insertions(+) diff --git a/ftests/030-lssubsys-lssubsys_all.py b/ftests/030

[Libcg-devel] [PATCH v2 12/13] ftests: Skip test 031 due to Github Issue #50

2021-06-08 Thread Tom Hromatka
ivial rewrite of lscgroup since it doesn't use any of the common structures used elsewhere in libcgroup. Signed-off-by: Tom Hromatka --- ftests/031-lscgroup-g_flag.py | 15 +++ 1 file changed, 15 insertions(+) diff --git a/ftests/031-lscgroup-g_flag.py b/ftests/031-lscgroup-g_fla

[Libcg-devel] [PATCH v2 00/13] Update the tests to run on a full v2 system

2021-06-08 Thread Tom Hromatka
ystem: https://github.com/drakenclimber/libcgroup/runs/2777036378 Code coverage increased slightly from 51.0% to 51.1%: https://coveralls.io/builds/40411811 Tom Hromatka (13): run.py: Ignore LXD cgroup v2 warning ftests: Modify functional test 005 to support cgroup v2 ftests: Modify functional

[Libcg-devel] [PATCH v2 04/13] ftests: Modify functional test 009 to support cgroup v2

2021-06-08 Thread Tom Hromatka
Add cgroup v2 support to the 009-cgget-g_flag_controller_only.py functional test. It continues to support cgroup v1 as well. Signed-off-by: Tom Hromatka --- ftests/009-cgget-g_flag_controller_only.py | 34 -- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a

[Libcg-devel] [PATCH v2 03/13] ftests: Modify functional test 008 to support cgroup v2

2021-06-08 Thread Tom Hromatka
Add cgroup v2 support to the 008-cgget-multiple_r_flags.py functional test. It continues to support cgroup v1 as well. Signed-off-by: Tom Hromatka --- ftests/008-cgget-multiple_r_flags.py | 35 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/ftests

[Libcg-devel] [PATCH v2 02/13] ftests: Modify functional test 005 to support cgroup v2

2021-06-08 Thread Tom Hromatka
Add support for a full cgroup v2 system to the 005-cgsnapshot-basic_snapshot_v2.py functional test. It continues to support cgroup v1 systems and mixed systems as well. Signed-off-by: Tom Hromatka --- ftests/005-cgsnapshot-basic_snapshot_v2.py | 3 ++- 1 file changed, 2 insertions(+), 1

[Libcg-devel] [PATCH v2 06/13] ftests: Modify functional test 011 to support cgroup v2

2021-06-08 Thread Tom Hromatka
Add cgroup v2 support to the 011-cgget-r_flag_two_cgroups.py functional test. It continues to support cgroup v1 as well. Signed-off-by: Tom Hromatka --- ftests/011-cgget-r_flag_two_cgroups.py | 38 +- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/ftests

Re: [Libcg-devel] [PATCH 04/13] ftests: Modify functional test 009 to support cgroup v2

2021-06-08 Thread Tom Hromatka
On 6/8/21 2:00 AM, Michal Koutný wrote: Hello. On Thu, Jun 03, 2021 at 10:04:12AM -0600, Tom Hromatka wrote: +++ b/ftests/009-cgget-g_flag_controller_only.py [...] +EXPECTED_OUT_V2 = '''009cgget: +cpu.weight: 100 +cpu.stat: usage_usec 0 +user_usec 0 +

[Libcg-devel] [PATCH 1/1] github: Add self-hosted runner

2021-06-03 Thread Tom Hromatka
Add a self-hosted runner to test full v2 functionality Signed-off-by: Tom Hromatka --- .github/workflows/continuous-integration.yml | 42 ++-- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows

[Libcg-devel] [PATCH 0/1] Run Continuous Integration on a v2 system also

2021-06-03 Thread Tom Hromatka
https://coveralls.io/jobs/81358830 Tom Hromatka (1): github: Add self-hosted runner .github/workflows/continuous-integration.yml | 42 ++-- 1 file changed, 39 insertions(+), 3 deletions(-) -- 2.26.3 ___ Libcg-devel mailing list

[Libcg-devel] [PATCH 07/13] ftests: Modify functional test 012 to support cgroup v2

2021-06-03 Thread Tom Hromatka
Add cgroup v2 support to the 012-cgget-multiple_r_flags2.py functional test. It continues to support cgroup v1 as well. Signed-off-by: Tom Hromatka --- ftests/012-cgget-multiple_r_flags2.py | 32 +-- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/ftests

[Libcg-devel] [PATCH 12/13] ftests: Skip test 031 due to Github Issue #50

2021-06-03 Thread Tom Hromatka
ivial rewrite of lscgroup since it doesn't use any of the common structures used elsewhere in libcgroup. Signed-off-by: Tom Hromatka --- ftests/031-lscgroup-g_flag.py | 15 +++ 1 file changed, 15 insertions(+) diff --git a/ftests/031-lscgroup-g_flag.py b/ftests/031-lscgroup-g_fla

[Libcg-devel] [PATCH 05/13] ftests: Modify functional test 010 to support cgroup v2

2021-06-03 Thread Tom Hromatka
Add cgroup v2 support to the 010-cgget-g_flag_controller_and_cgroup.py functional test. It continues to support cgroup v1 as well. Signed-off-by: Tom Hromatka --- .../010-cgget-g_flag_controller_and_cgroup.py | 36 +-- 1 file changed, 33 insertions(+), 3 deletions(-) diff

[Libcg-devel] [PATCH 10/13] ftests: Modify functional test 014 to support cgroup v2

2021-06-03 Thread Tom Hromatka
Add support for a full cgroup v2 system to the 014-cgget-a_flag.py functional test. It continues to support cgroup v1 as well. Signed-off-by: Tom Hromatka --- ftests/014-cgget-a_flag.py | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/ftests/014

[Libcg-devel] [PATCH 09/13] cgroup.py: Fix bug in delete with multiple controllers

2021-06-03 Thread Tom Hromatka
When multiple controllers are passed into Cgroup.delete() via a list, delete() was erroneously joining them without a comma separator. Add the comma separator. Signed-off-by: Tom Hromatka --- ftests/cgroup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ftests/cgroup.py

[Libcg-devel] [PATCH 13/13] ftests: Skip test 032 due to Github Issue #50

2021-06-03 Thread Tom Hromatka
a non-trivial rewrite of lscgroup since it doesn't use any of the common structures used elsewhere in libcgroup. Signed-off-by: Tom Hromatka --- ftests/032-lscgroup-multiple_g_flags.py | 15 +++ 1 file changed, 15 insertions(+) diff --git a/ftests/032-lscgroup-multiple_g_flags.py b/

[Libcg-devel] [PATCH 11/13] ftests: Modify functional test 030 to support cgroup v2

2021-06-03 Thread Tom Hromatka
Add cgroup v2 support to the 030-lssubsys-lssubsys_all.py functional test. It continues to support cgroup v1 as well. Signed-off-by: Tom Hromatka --- ftests/030-lssubsys-lssubsys_all.py | 4 1 file changed, 4 insertions(+) diff --git a/ftests/030-lssubsys-lssubsys_all.py b/ftests/030

[Libcg-devel] [PATCH 08/13] ftests: Modify functional test 013 to support cgroup v2

2021-06-03 Thread Tom Hromatka
Add cgroup v2 support to the 013-cgget-multiple_g_flags.py functional test. It continues to support cgroup v1 as well. Signed-off-by: Tom Hromatka --- ftests/013-cgget-multiple_g_flags.py | 56 +++- 1 file changed, 47 insertions(+), 9 deletions(-) diff --git a/ftests

[Libcg-devel] [PATCH 02/13] ftests: Modify functional test 005 to support cgroup v2

2021-06-03 Thread Tom Hromatka
Add support for a full cgroup v2 system to the 005-cgsnapshot-basic_snapshot_v2.py functional test. It continues to support cgroup v1 systems and mixed systems as well. Signed-off-by: Tom Hromatka --- ftests/005-cgsnapshot-basic_snapshot_v2.py | 3 ++- 1 file changed, 2 insertions(+), 1

[Libcg-devel] [PATCH 04/13] ftests: Modify functional test 009 to support cgroup v2

2021-06-03 Thread Tom Hromatka
Add cgroup v2 support to the 009-cgget-g_flag_controller_only.py functional test. It continues to support cgroup v1 as well. Signed-off-by: Tom Hromatka --- ftests/009-cgget-g_flag_controller_only.py | 31 +++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a

[Libcg-devel] [PATCH 00/13] Update the tests to run on a full v2 system

2021-06-03 Thread Tom Hromatka
group-tests/tree/issues/cgv2-tests Automated tests are passing on the v1, v1/v2, and the full v2 system: https://github.com/drakenclimber/libcgroup/runs/2738640883 Code coverage increased slightly from 51.02% to 51.15% https://coveralls.io/jobs/81358830 Tom Hromatka (13): run.py: Ignore LXD cgro

[Libcg-devel] [PATCH 06/13] ftests: Modify functional test 011 to support cgroup v2

2021-06-03 Thread Tom Hromatka
Add cgroup v2 support to the 011-cgget-r_flag_two_cgroups.py functional test. It continues to support cgroup v1 as well. Signed-off-by: Tom Hromatka --- ftests/011-cgget-r_flag_two_cgroups.py | 38 +- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/ftests

[Libcg-devel] [PATCH 01/13] run.py: Ignore LXD cgroup v2 warning

2021-06-03 Thread Tom Hromatka
On full cgroup v2 systems, LXD raises the following warning: WARNING: cgroup v2 is not fully supported yet Add logic to run.py to ignore this warning. A non-zero return code or other strings in stderr should still cause a RunError exception to be raised. Signed-off-by: Tom Hromatka

[Libcg-devel] [PATCH 03/13] ftests: Modify functional test 008 to support cgroup v2

2021-06-03 Thread Tom Hromatka
Add cgroup v2 support to the 008-cgget-multiple_r_flags.py functional test. It continues to support cgroup v1 as well. Signed-off-by: Tom Hromatka --- ftests/008-cgget-multiple_r_flags.py | 35 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/ftests

Re: [Libcg-devel] [PATCH 0/1] Delete cgclear

2021-05-24 Thread Tom Hromatka
On 5/24/21 12:39 PM, Dhaval Giani wrote: On Mon, 2021-05-24 at 10:40 -0600, Tom Hromatka wrote: With systemd managing the mounting and unmounting of controllers, cgclear doesn't make sense anymore.  This patch removes cgclear and all references to it. See this github issue [1]. Miss

[Libcg-devel] [PATCH] ftests: Delete the cgclear functional test

2021-05-24 Thread Tom Hromatka
Delete the cgclear functional test. cgclear has been removed from libcgroup. Signed-off-by: Tom Hromatka --- ftests/028-cgclear-basic_cgclear.py | 88 - 1 file changed, 88 deletions(-) delete mode 100755 ftests/028-cgclear-basic_cgclear.py diff --git a/ftests/028

[Libcg-devel] [PATCH 1/1] cgclear: Delete cgclear

2021-05-24 Thread Tom Hromatka
With systemd managing the mounting/unmounting of cgroups, cgclear no longer makes sense. Remove it. Signed-off-by: Tom Hromatka --- .github/workflows/continuous-integration.yml | 2 - README_systemd | 2 +- dist/cgconfig.service| 1

[Libcg-devel] [PATCH 0/1] Delete cgclear

2021-05-24 Thread Tom Hromatka
Test changes are available here: https://github.com/drakenclimber/libcgroup-tests/tree/issues/delete-cgclear Automated tests are passing and available here: https://github.com/drakenclimber/libcgroup/runs/2613411250 Code coverage is at 50.98% https://coveralls.io/builds/39790595 Tom Hromat

[Libcg-devel] [PATCH 1/1] docs: Add CONTRIBUTING.md

2021-05-24 Thread Tom Hromatka
Add a document that outlines the steps to contribute to libcgroup. Signed-off-by: Tom Hromatka --- CONTRIBUTING.md | 179 Makefile.am | 2 +- 2 files changed, 180 insertions(+), 1 deletion(-) create mode 100644 CONTRIBUTING.md diff --git

[Libcg-devel] [PATCH 0/1] Add contributing guidelines

2021-05-24 Thread Tom Hromatka
md [2] https://github.com/drakenclimber/libcgroup/blob/issues/contributing/CONTRIBUTING.md Tom Hromatka (1): docs: Add CONTRIBUTING.md CONTRIBUTING.md | 179 Makefile.am | 2 +- 2 files changed, 180 insertions(+), 1 deletion(-) create

[Libcg-devel] [PATCH 1/4] cgroup.py: Add support for cgexec

2021-05-17 Thread Tom Hromatka
Add support for cgexec to the Cgroup class. Signed-off-by: Tom Hromatka --- ftests/cgroup.py | 31 +++ 1 file changed, 31 insertions(+) diff --git a/ftests/cgroup.py b/ftests/cgroup.py index 31e06bd79b4a..32b9530ead31 100644 --- a/ftests/cgroup.py +++ b/ftests

[Libcg-devel] [PATCH 3/4] cgroup.py: Add method to get pids in a cgroup

2021-05-17 Thread Tom Hromatka
Add a method, get_pids_in_cgroup(), that will return the pids in a given cgroup. Signed-off-by: Tom Hromatka --- ftests/cgroup.py | 16 1 file changed, 16 insertions(+) diff --git a/ftests/cgroup.py b/ftests/cgroup.py index 32b9530ead31..dd9f0affe3a6 100644 --- a/ftests

[Libcg-devel] [PATCH 0/4] Add a cgexec functional test

2021-05-17 Thread Tom Hromatka
94693 Tom Hromatka (4): cgroup.py: Add support for cgexec process.py: Add support for cgexec'ing a new process cgroup.py: Add method to get pids in a cgroup ftests: Add a cgexec test ftests/034-cgexec-basic_cgexec.py | 93 +++ ftests/cgroup.py

[Libcg-devel] [PATCH 2/4] process.py: Add support for cgexec'ing a new process

2021-05-17 Thread Tom Hromatka
Add support for cgexec to create_process_in_cgroup(). cgclassify still remains as the default process assignment mechanism. Signed-off-by: Tom Hromatka --- ftests/process.py | 62 +++ 1 file changed, 47 insertions(+), 15 deletions(-) diff --git a

[Libcg-devel] [PATCH 4/4] ftests: Add a cgexec test

2021-05-17 Thread Tom Hromatka
11.87 034-cgexec-basic_cgexec.py2.55 teardown 0.00 - Total Run Time 14.42 Signed-off-by: Tom Hromatka --- ftests/034

[Libcg-devel] libcgroup v2.0 released

2021-05-06 Thread Tom Hromatka
Dhaval Giani and I have just released libcgroup v2.0 * https://github.com/libcgroup/libcgroup/releases/tag/v2.0 libcgroup v2.0 is a major release for libcgroup, and cgroup v2 is now fully supported by all libcgroup tools.  (cgroup v1 is still supported, of course.) Thanks so much to everyone wh

[Libcg-devel] [PATCH 04/16] api.c: Fix strncpy() truncation warning

2021-04-28 Thread Tom Hromatka
string of length 4095 [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~ Signed-off-by: Tom Hromatka --- src/api.c | 1 + 1 file changed, 1 insertion(+) diff --git

[Libcg-devel] [PATCH 02/16] api.c: Fix strncpy() truncation warning

2021-04-28 Thread Tom Hromatka
a string of length 255 [-Wstringop-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~ Signed-off-by: Tom Hromatka --- src/api.c | 2 ++ 1 file changed, 2 insertions(+) diff

[Libcg-devel] [PATCH 16/16] parse.y: Fix nonterminal %type warnings

2021-04-28 Thread Tom Hromatka
group_name | ^~~ Signed-off-by: Tom Hromatka --- src/parse.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parse.y b/src/parse.y index e67ad54e6f34..e2e6cb168648 100644 --- a/src/parse.y +++ b/src/parse.y @@ -37,7 +37,7 @@ int yywrap(void

[Libcg-devel] [PATCH 12/16] lssubsys: Fix strncpy() truncation warning

2021-04-28 Thread Tom Hromatka
)); | ^~ Signed-off-by: Tom Hromatka --- src/tools/lssubsys.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/lssubsys.c b/src/tools/lssubsys.c index a6713b8bf066..bf73b9d2d889 100644 --- a/src/tools/lssubsys.c +++ b/src/tools/lssubsys.c @@ -129,6 +129,7 @@ static int

[Libcg-devel] [PATCH 08/16] tools: Fix strncpy() truncation warning

2021-04-28 Thread Tom Hromatka
-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~ Signed-off-by: Tom Hromatka --- src/tools/tools-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[Libcg-devel] [PATCH 10/16] lssubsys: Fix strncpy() truncation warning

2021-04-28 Thread Tom Hromatka
)); | ^~ Signed-off-by: Tom Hromatka --- src/tools/lssubsys.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/lssubsys.c b/src/tools/lssubsys.c index d0a88b62468e..e77859b40e33 100644 --- a/src/tools/lssubsys.c +++ b/src/tools/lssubsys.c @@ -132,6 +132,7 @@ static

[Libcg-devel] [PATCH 09/16] cgget: Fix strncpy() truncation warning

2021-04-28 Thread Tom Hromatka
a string of length 4095 [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~ Signed-off-by: Tom Hromatka --- src/tools/cgget.c | 1 + 1 file changed, 1 insertion

[Libcg-devel] [PATCH 1/3] Makefile.am/tests: Do not compile the old tests

2021-04-28 Thread Tom Hromatka
For historical reasons, the old tests remain in the testing directory but are not being run or installed. Due to compiler warnings from newer versions of GCC, do not compile these tests. Signed-off-by: Tom Hromatka --- Makefile.am | 3 --- 1 file changed, 3 deletions(-) diff --git a

[Libcg-devel] [PATCH 11/16] lssubsys: Fix strncpy() truncation warning

2021-04-28 Thread Tom Hromatka
)); | ^~ Signed-off-by: Tom Hromatka --- src/tools/lssubsys.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/lssubsys.c b/src/tools/lssubsys.c index e77859b40e33..a6713b8bf066 100644 --- a/src/tools/lssubsys.c +++ b/src/tools/lssubsys.c @@ -125,6 +125,8 @@ static int

[Libcg-devel] [PATCH 01/16] api.c: Fix strncpy() truncation warning

2021-04-28 Thread Tom Hromatka
a string of length 4352 [-Wstringop-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~ Signed-off-by: Tom Hromatka --- src/api.c | 1 + 1 file changed, 1 insertion(+) diff

[Libcg-devel] [PATCH 0/3] Fix warnings in libcgroup-tools

2021-04-28 Thread Tom Hromatka
remained essentially the same at 51.6%: https://coveralls.io/builds/39190322 Tom Hromatka (3): Makefile.am/tests: Do not compile the old tests gunit: Fix an snprintf() truncation warning gunit: Fix an snprintf() truncation warning Makefile.am | 3 --- gunit

[Libcg-devel] [PATCH 15/16] lscgroup: Fix strncpy() truncation warning

2021-04-28 Thread Tom Hromatka
string of length 4095 [-Wstringop-truncation] 136 | return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); | ^~ Signed-off-by: Tom Hromatka --- src/tools/lscgroup.c | 1 + 1 file changed, 1 insertion

[Libcg-devel] [PATCH 13/16] lscgroup: Fix strncpy() truncation warning

2021-04-28 Thread Tom Hromatka
-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~ Signed-off-by: Tom Hromatka --- src/tools/lscgroup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/lscgroup.c b

[Libcg-devel] [PATCH 00/16] Fix warnings in libcgroup

2021-04-28 Thread Tom Hromatka
ibcgroup-tests/tree/issues/fix-warnings Continuous integration and automated tests are passing: https://github.com/drakenclimber/libcgroup/runs/2458125669 Code coverage remained essentially the same at 51.6%: https://coveralls.io/builds/39190322 Tom Hromatka (16): api.c: Fix strncpy() truncatio

[Libcg-devel] [PATCH 06/16] config.c: Fix strncpy() truncation warning

2021-04-28 Thread Tom Hromatka
string of length 4095 [-Wstringop-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~ Signed-off-by: Tom Hromatka --- src/config.c | 1 + 1 file changed, 1 insertion(+) diff

[Libcg-devel] [PATCH 07/16] config.c: Fix strncpy() truncation warning

2021-04-28 Thread Tom Hromatka
string of length 4095 [-Wstringop-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~ Signed-off-by: Tom Hromatka --- src/config.c | 1 + 1 file changed, 1 insertion(+) diff

[Libcg-devel] [PATCH 03/16] api.c: Fix strncpy() truncation warning

2021-04-28 Thread Tom Hromatka
4095 [-Wstringop-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~ Signed-off-by: Tom Hromatka --- src/api.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api.c b

[Libcg-devel] [PATCH 14/16] lscgroup: Fix strncpy() truncation warning

2021-04-28 Thread Tom Hromatka
-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~ Signed-off-by: Tom Hromatka --- src/tools/lscgroup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/lscgroup.c b

[Libcg-devel] [PATCH 05/16] config.c: Fix strncpy() truncation warning

2021-04-28 Thread Tom Hromatka
string of length 4095 [-Wstringop-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~ Signed-off-by: Tom Hromatka --- src/config.c | 1 + 1 file changed, 1 insertion(+) diff

[Libcg-devel] [PATCH 2/3] gunit: Fix an snprintf() truncation warning

2021-04-28 Thread Tom Hromatka
printf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, | ~^~~ 68 |__bos (__s), __fmt, __va_arg_pack ()); |~ Signed-off-by: Tom Hromatka --- gunit/001-path.cpp | 6

[Libcg-devel] [PATCH 3/3] gunit: Fix an snprintf() truncation warning

2021-04-28 Thread Tom Hromatka
(__s, __n, __USE_FORTIFY_LEVEL - 1, | ~^~~ 68 |__bos (__s), __fmt, __va_arg_pack ()); |~ Signed-off-by: Tom Hromatka --- gunit/013-cgroup_build_tasks_procs_path.cpp | 6

[Libcg-devel] libcgroup v2.0.rc1

2021-04-26 Thread Tom Hromatka
concise changelog as well as guidance for distros. Please let me know if you have any questions or encounter any issues. Thanks. Tom Dhaval Giani (1):   Merge pull request #8 from kloczek/master Koji Builder (1):   Paralell build fix #7 Tom Hromatka (82):   tests: Remove the

[Libcg-devel] [PATCH 1/1] ftests: Add cgget test with no flags

2021-04-14 Thread Tom Hromatka
0.11 Signed-off-by: Tom Hromatka --- ftests/033-cgget-no_flags.py | 77 1 file changed, 77 insertions(+) create mode 100755 ftests/033-cgget-no_flags.py diff --git a/ftests/033-cgget-no_flags.py b/ftests/033-cgget-no_flags.py new file mode 100755 index

[Libcg-devel] [PATCH 0/1] Add a cgget with no flags test

2021-04-14 Thread Tom Hromatka
: https://github.com/drakenclimber/libcgroup/runs/2345425112 Code coverage remained the same at 51.0%. I verified the new logic is being exercised by the functional tests: https://coveralls.io/builds/38814870 https://coveralls.io/builds/38814870/source?filename=src%2Ftools%2Fcgget.c#L350 Tom Hromatka

[Libcg-devel] [PATCH 0/1] Fix segfault in cgget

2021-04-14 Thread Tom Hromatka
ional tests: https://coveralls.io/builds/38814870 https://coveralls.io/builds/38814870/source?filename=src%2Ftools%2Fcgget.c#L350 Tom Hromatka (1): cgget: Fix segfault when no flags provided src/tools/cgget.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) -- 2

[Libcg-devel] [PATCH 1/1] cgget: Fix segfault when no flags provided

2021-04-14 Thread Tom Hromatka
Signed-off-by: Tom Hromatka --- src/tools/cgget.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/tools/cgget.c b/src/tools/cgget.c index 08c2286ca098..769ef9270006 100644 --- a/src/tools/cgget.c +++ b/src/tools/cgget.c @@ -336,9 +336,25 @@

  1   2   3   4   5   6   >