When cgset fails to modify a cgroup, it output a
hardcoded error message which can cause user confusion.
This commit updates the error message to behave like
other error messages throughout libcgroup and produce
a more user-friendly output.
Signed-off-by: Tom Hromatka
---
src/tools/cgset.c | 5
In preparation for adding support for cgroup v2, this
commit moves some cgroup v1 mount logic out of
cgroup_init() and into its own function.
Signed-off-by: Tom Hromatka
---
src/api.c | 218 +-
1 file changed, 117 insertions(+), 101
This commit adds cgroup v2 support to cgget, cgset, and
cgroup_init().
Signed-off-by: Tom Hromatka
---
src/api.c| 134 +--
src/libcgroup-internal.h | 6 +++
2 files changed, 125 insertions(+), 15 deletions(-)
diff --git a/src/api.c
This patchset adds cgroup v2 support to cgget and cgset.
It may also add cgroup v2 support for other commands, but
I haven't extensively tested them yet.
Tom Hromatka (2):
api: Refactor cgroup v1 logic in cgroup_init()
api: Add cgroup v2 support
src/api.c
On 1/26/19 9:54 AM, Dhaval Giani wrote:
On Thu, Jan 24, 2019 at 4:53 AM Tom Hromatka wrote:
This patchset adds cgroup v2 support to cgget and cgset.
It may also add cgroup v2 support for other commands, but
I haven't extensively tested them yet.
How have you tested the submitted
On 1/26/19 9:56 AM, Dhaval Giani wrote:
On Thu, Jan 24, 2019 at 4:53 AM Tom Hromatka wrote:
In preparation for adding support for cgroup v2, this
commit moves some cgroup v1 mount logic out of
cgroup_init() and into its own function.
Signed-off-by: Tom Hromatka
---
src/api.c | 218
On 1/28/19 2:18 PM, Dhaval Giani wrote:
On Mon, Jan 28, 2019 at 7:19 AM Tom Hromatka wrote:
On 1/26/19 9:54 AM, Dhaval Giani wrote:
On Thu, Jan 24, 2019 at 4:53 AM Tom Hromatka wrote:
This patchset adds cgroup v2 support to cgget and cgset.
It may also add cgroup v2 support for other
This patch adds unit test support, via the googletest
framework, to libcgroup. I created a handful of unit tests
for the internal function cg_build_path() to provide a few
usage examples.
Tom Hromatka (1):
tests: Add googletest framework
.gitignore | 1 +
.gitmodules
This commit adds support for the googletest unit test
framework. To enable the testing of non-exported
functions, a more permissive map file was added.
Signed-off-by: Tom Hromatka
---
.gitignore | 1 +
.gitmodules| 4 ++
Makefile.am| 3
This commit adds support for the googletest unit test
framework. To enable the testing of non-exported
functions, a more permissive map file was added.
Signed-off-by: Tom Hromatka
---
.gitignore | 1 +
.gitmodules| 4 ++
Makefile.am
This commit adds unit tests for the internal function
cg_build_path(). While code coverage is not (yet) enabled,
I believe these tests provide full code coverage for the
aforementioned function and its sister function
cg_build_path_locked().
Signed-off-by: Tom Hromatka
---
tests/gunit/001
example test
* Updated copyright headers to match existing libcgroup
headers
* Moved the unit tests to tests/gunit/
* Moved libcgroup_unittest.map to the gunit folder
* Added doxygen headers on the test functions
Tom Hromatka (2):
tests: Add googletest unit test framework
tests: Add unit tests
unit tests to tests/gunit/
* Moved libcgroup_unittest.map to the gunit folder
* Added doxygen headers on the test functions
Tom Hromatka (2):
tests: Add googletest unit test framework
tests: Add unit tests for cg_build_path()
.gitignore | 1 +
.gitmodules
This commit adds support for the googletest unit test
framework. To enable the testing of non-exported
functions, a more permissive map file was added.
Signed-off-by: Tom Hromatka
---
.gitignore | 1 +
.gitmodules| 4 +
Makefile.am
a namespace
Signed-off-by: Tom Hromatka
---
tests/gunit/001-path.cpp | 175 +++
tests/gunit/Makefile.am | 3 +-
2 files changed, 177 insertions(+), 1 deletion(-)
create mode 100644 tests/gunit/001-path.cpp
diff --git a/tests/gunit/001-path.cpp b/tests/guni
This commit adds a functional test for a basic cgget call. The
test utilizes the new functional text framework and lxc
containers to establish a non-destructive cgroup test
environment.
Tests added:
001-cgget-basic_cgget.py - Test simple cgget functionality
Signed-off-by: Tom Hromatka
setup6.95
001-cgget-basic_cgget.py 0.07
teardown 0.00
-
Total Run Time 7.02
Signed-off-by: Tom Hromatka
---
co
that would be better in a
subsequent patch set.
Tom Hromatka (2):
tests: Add functional test suite
tests: Add functional test for basic cgget operations
configure.in | 1 +
tests/Makefile.am | 2 +-
tests/ftests/.gitignore | 5
On 4/2/19 9:21 AM, Michal Koutný wrote:
When a double-forking daemon spawns the shortlived forking process and
we fail to classify it in time, the child does not inherit (the
intended) cgroup membership.
I created a simple double-forking test program to try and reproduce the
issue, but I was
On 6/7/19 3:19 AM, Michal Koutný wrote:
On Wed, Jun 05, 2019 at 02:42:00PM -0600, Tom Hromatka
wrote:
I created a simple double-forking test program to try and reproduce the
issue, but I was unable to get it to happen. Is your system heavily
loaded? Any recommendations on reproducing the
On 6/10/19 11:56 AM, Dhaval Giani wrote:
On Tue, Jun 4, 2019 at 1:34 PM Tom Hromatka wrote:
This commit adds a functional test suite that utilizes lxc
containers to guarantee a non-destructive test environment.
The tests can be invoked individually, as a group of related
tests, or from
setup6.95
001-cgget-basic_cgget.py 0.07
teardown 0.00
-
Total Run Time 7.02
Signed-off-by: Tom Hromatka
---
tests/ftests
This commit adds a functional test for a basic cgget call. The
test utilizes the new functional text framework and lxc
containers to establish a non-destructive cgroup test
environment.
Tests added:
001-cgget-basic_cgget.py - Test simple cgget functionality
Signed-off-by: Tom Hromatka
This commit adds a Container() class for managing LXC containers.
Signed-off-by: Tom Hromatka
---
tests/ftests/container.py | 235 ++
tests/ftests/default.conf | 28 ++
2 files changed, 263 insertions(+)
create mode 100644 tests/ftests
This commit adds a Cgroup() class for managing cgroups.
Signed-off-by: Tom Hromatka
---
tests/ftests/cgroup.py | 185 +
1 file changed, 185 insertions(+)
create mode 100644 tests/ftests/cgroup.py
diff --git a/tests/ftests/cgroup.py b/tests
This commit adds a Run() class that can invoke Python's Popen
command.
Signed-off-by: Tom Hromatka
---
tests/ftests/run.py | 73 +
1 file changed, 73 insertions(+)
create mode 100644 tests/ftests/run.py
diff --git a/tests/ftests/run
This commit adds a folder that will hold the functional tests
and their framework.
Signed-off-by: Tom Hromatka
---
configure.in | 1 +
tests/Makefile.am| 2 +-
tests/ftests/.gitignore | 5 +
tests/ftests/Makefile.am | 27 +++
tests/ftests
that would be better in a
subsequent patch set.
The patches are also available here:
https://github.com/drakenclimber/libcgroup/tree/issues/functional_tests_v2
Changes from v1 to v2:
* Removed SPDX license line from headers
* Split patchset up into seven patches
Tom Hromatka (7):
tests: Add
This commit adds a Log() class for the functional test
suite.
Signed-off-by: Tom Hromatka
---
tests/ftests/log.py | 66 +
1 file changed, 66 insertions(+)
create mode 100644 tests/ftests/log.py
diff --git a/tests/ftests/log.py b/tests/ftests
On 6/25/19 2:27 PM, Dhaval Giani wrote:
On Fri, Jun 21, 2019 at 3:46 PM Tom Hromatka wrote:
This commit adds a Cgroup() class for managing cgroups.
Any relation to the struct cgroup? How are they related?
Not really. This class abstracts the major libcgroup CLI APIs -
cgget, cgset
On 6/25/19 2:34 PM, Dhaval Giani wrote:
On Tue, Jun 25, 2019 at 1:32 PM Tom Hromatka wrote:
On 6/25/19 2:27 PM, Dhaval Giani wrote:
On Fri, Jun 21, 2019 at 3:46 PM Tom Hromatka wrote:
This commit adds a Cgroup() class for managing cgroups.
Any relation to the struct cgroup? How are
This commit adds a folder that will hold the functional tests
and their framework.
Signed-off-by: Tom Hromatka
Reviewed-by: Dhaval Giani
---
configure.in | 1 +
tests/Makefile.am| 2 +-
tests/ftests/.gitignore | 5 +
tests/ftests/Makefile.am | 27
ytes = Cgroup.get(config, controller=None,
cgname='AnotherCgroup', setting='memory.limit_in_bytes',
print_headers=False, values_only=True)
Providing invalid parameters to a Cgroup method will result in
a ValueError while a failure to execute a command will result
in
This commit adds a functional test for a basic cgget call. The
test utilizes the new functional text framework and lxc
containers to establish a non-destructive cgroup test
environment.
Tests added:
001-cgget-basic_cgget.py - Test simple cgget functionality
Signed-off-by: Tom Hromatka
# create and start the container
mycontainer.create()
mycontainer.start()
Container() can raise ValueError on invalid parameters,
ContainerError when a container operation unexpectedly failes,
or RunError when running a command fails.
Signed-off-by: Tom Hromatka
---
tests/ftests/consts.p
l LOGLEVEL
-L LOGFILE, --logfile LOGFILE
Signed-off-by: Tom Hromatka
Reviewed-by: Dhaval Giani
---
tests/ftests/consts.py | 7 +++
tests/ftests/log.py| 57 ++
2 files changed, 64 insertions(+)
create mode 100644 tests/ftests/log.py
di
stderr =
Jun 27 12:34:18: DEBUG: run:
command = sudo lxc-attach -n test_libcg --
/libcg/src/tools/.libs/cgget -n -v -r cpu.shares 001cgget
ret = 0
stdout = 512
stderr =
If the command fails, Run.run() throws a RunError exception which
contains
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
setup6.95
001-cgget-basic_cgget.py 0.07
teardown 0.00
-
Total Run Time 7.02
Signed-off-by: Tom Hromatka
---
tests/ftests
On 7/2/19 5:35 AM, Michal Koutný wrote:
On Thu, Jun 27, 2019 at 01:08:36PM -0600, Tom Hromatka
wrote:
+@staticmethod
+def concatenate_controllers(controller_list):
+if type(controller_list) is types.StringType:
+# controller is already a string. return it as is
On 7/2/19 5:44 AM, Michal Koutný wrote:
On Thu, Jun 27, 2019 at 01:08:38PM -0600, Tom Hromatka
wrote:
Example test invocations:
[...]
Maybe these examples could be in the file tree itself (either one of the
Python files or README-like file).
Good idea. I'll make a README as
On 7/2/19 5:50 AM, Michal Koutný wrote:
Hi.
This is drive-by review of form (some remarks posted to particular
patches), I didn't look deeper into how the actual testing is structured.
No worries. Thanks for the time you were able to
give.
On Thu, Jun 27, 2019 at 01:08:32PM -0600
On 7/2/19 5:50 AM, Michal Koutný wrote:
Hi.
This is drive-by review of form (some remarks posted to particular
patches), I didn't look deeper into how the actual testing is structured.
On Thu, Jun 27, 2019 at 01:08:32PM -0600, Tom Hromatka
wrote:
These patches add nondestru
l LOGLEVEL
-L LOGFILE, --logfile LOGFILE
Signed-off-by: Tom Hromatka
Reviewed-by: Dhaval Giani
---
tests/ftests/consts.py | 7 +++
tests/ftests/log.py| 56 ++
2 files changed, 63 insertions(+)
create mode 100644 tests/ftests/log.py
di
y 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
setup6.95
001-cgget-basic_cgget.py 0.07
teardown 0.00
-
Total Run Time 7.02
Signed-off-by: Tom Hromatka
---
tests/ftests
This commit adds a folder that will hold the functional tests
and their framework.
Signed-off-by: Tom Hromatka
Reviewed-by: Dhaval Giani
---
configure.in | 1 +
tests/Makefile.am| 2 +-
tests/ftests/.gitignore | 5 +
tests/ftests/Makefile.am | 27
This commit adds a functional test for a basic cgget call. The
test utilizes the new functional text framework and lxc
containers to establish a non-destructive cgroup test
environment.
Tests added:
001-cgget-basic_cgget.py - Test simple cgget functionality
Signed-off-by: Tom Hromatka
ytes = Cgroup.get(config, controller=None,
cgname='AnotherCgroup', setting='memory.limit_in_bytes',
print_headers=False, values_only=True)
Providing invalid parameters to a Cgroup method will result in
a ValueError while a failure to execute a command will result
in
# create and start the container
mycontainer.create()
mycontainer.start()
Container() can raise ValueError on invalid parameters,
ContainerError when a container operation unexpectedly failes,
or RunError when running a command fails.
Signed-off-by: Tom Hromatka
---
tests/ftests/consts.p
stderr =
Jun 27 12:34:18: DEBUG: run:
command = sudo lxc-attach -n test_libcg --
/libcg/src/tools/.libs/cgget -n -v -r cpu.shares 001cgget
ret = 0
stdout = 512
stderr =
If the command fails, Run.run() throws a RunError exception which
contains
I was unable to get the legacy tests to pass in Travis CI,
so I am disabling them for the time being.
Signed-off-by: Tom Hromatka
---
tests/Makefile.am | 4 +++-
tests/tools/cgclassify/Makefile.am | 4 +++-
tests/tools/cgconfigparser/Makefile.am | 6 --
tests/tools
This commit enables coveralls.io to generate code coverage
results by utilizing the gcov data generated during both the
unit and functional test runs.
Signed-off-by: Tom Hromatka
---
.gitignore | 3 +
.travis.yml| 14 +++
bootstrap.sh | 8 +-
configure.in
I found a couple minor issues when running the tests on
Travis CI. The RunError() exception wasn't being invoked
properly and there was a typo in its string generation.
This commit resolves both of these issues
Signed-off-by: Tom Hromatka
---
tests/ftests/container.py | 4 ++--
tests/f
Prior to this commit, the functional tests used LXC. LXD is
better for configuring a shared device between the host and
container that can be written to by the container. This
feature is critical for tracking code coverage in the
functional tests.
Signed-off-by: Tom Hromatka
---
.travis.yml
This commit adds the Travis CI yaml configuration file that
will kick off the continuous integration.
Signed-off-by: Tom Hromatka
---
.travis.yml | 47 +++
1 file changed, 47 insertions(+)
create mode 100644 .travis.yml
diff --git a/.travis.yml b
Minor changes to make the googletest framework and the unit
tests work under Travis CI.
Signed-off-by: Tom Hromatka
---
bootstrap.sh| 8
tests/gunit/Makefile.am | 13 +++--
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/bootstrap.sh b/bootstrap.sh
Signed-off-by: Tom Hromatka
---
tests/ftests/001-cgget-basic_cgget.py | 2 +-
tests/ftests/ftests.py| 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/ftests/001-cgget-basic_cgget.py
b/tests/ftests/001-cgget-basic_cgget.py
index 9638335..be58869 100755
/travisci
Tom Hromatka (7):
tests: Update googletest settings to work with Travis CI
tests: Minor changes to the functional tests for Travis CI
tests: Default the functional tests to python3
tests: Disable the legacy tests
tests: Add Travis CI yaml configuration file
tests: Switch to using LXD
On 9/24/19 4:19 PM, Dhaval Giani wrote:
On Tue, Sep 24, 2019 at 1:36 PM Tom Hromatka wrote:
I was unable to get the legacy tests to pass in Travis CI,
so I am disabling them for the time being.
Signed-off-by: Tom Hromatka
---
tests/Makefile.am | 4 +++-
tests/tools
On 9/24/19 4:20 PM, Dhaval Giani wrote:
On Tue, Sep 24, 2019 at 1:36 PM Tom Hromatka wrote:
This commit enables coveralls.io to generate code coverage
results by utilizing the gcov data generated during both the
unit and functional test runs.
Signed-off-by: Tom Hromatka
---
.gitignore
On 9/24/19 4:22 PM, Dhaval Giani wrote:
On Tue, Sep 24, 2019 at 1:36 PM Tom Hromatka wrote:
This patchset enables continuous integration, via Travis CI,
and code coverage via Coveralls. Travis CI runs all unit
and functional tests with the --enable-code-coverage flag
passed into ./configure
On 9/24/19 2:36 PM, Tom Hromatka wrote:
Signed-off-by: Tom Hromatka
Michal, would you like me to add your name to this patch? i.e.
Suggested-by: Michal Koutný
Thanks.
Tom
---
tests/ftests/001-cgget-basic_cgget.py | 2 +-
tests/ftests/ftests.py| 2 +-
2 files
On 9/25/19 2:43 AM, Michal Koutný wrote:
On Tue, Sep 24, 2019 at 04:50:51PM -0600, Tom Hromatka
wrote:
Michal, would you like me to add your name to this patch? i.e.
Suggested-by: Michal Koutný
No problem with that. Maybe add an explanation to the commit message
that this change is
This commit adds the Travis CI yaml configuration file that
will kick off the continuous integration.
Signed-off-by: Tom Hromatka
---
.travis.yml | 47 +++
1 file changed, 47 insertions(+)
create mode 100644 .travis.yml
diff --git a/.travis.yml b
The legacy tests do not successfully run in Travis CI. This
commit disables them from running but does leave the test
code in place. The future of these tests and whether they will
be removed from the repo or not will be revisited at a later
date.
Signed-off-by: Tom Hromatka
---
tests
Minor changes to make the googletest framework and the unit
tests work under Travis CI.
Signed-off-by: Tom Hromatka
---
bootstrap.sh| 8
tests/gunit/Makefile.am | 13 +++--
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/bootstrap.sh b/bootstrap.sh
Python 2.7 will not be maintained beyond January 1, 2020. To
avoid potential problems when python 2 is retired, this commit
explicitly instructs the functional tests to use python3.
Suggested-by: Michal Koutný
Signed-off-by: Tom Hromatka
---
tests/ftests/001-cgget-basic_cgget.py | 2 +-
tests
/issues/travisci
v2 patches are available here:
https://github.com/drakenclimber/libcgroup/tree/issues/travisci_v2
Tom Hromatka (7):
tests: Update googletest settings to work with Travis CI
tests: Minor changes to the functional tests for Travis CI
tests: Default the functional tests to python3
Prior to this commit, the functional tests used LXC. LXD is
better for configuring a shared device between the host and
container that can be written to by the container. This
feature is critical for tracking code coverage in the
functional tests.
Signed-off-by: Tom Hromatka
---
.travis.yml
I found a couple minor issues when running the tests on
Travis CI. The RunError() exception wasn't being invoked
properly and there was a typo in its string generation.
This commit resolves both of these issues
Signed-off-by: Tom Hromatka
---
tests/ftests/container.py | 4 ++--
tests/f
:
https://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_code_coverage.m4
Signed-off-by: Tom Hromatka
---
.gitignore | 3 +
.travis.yml| 14 +++
bootstrap.sh | 8 +-
configure.in | 42 ---
m4/ax_code_coverage.m4 | 264
up a potential issue on some versions
of automake that don't properly expand $(top_builddir) early
in the automake process.
Signed-off-by: Tom Hromatka
---
bootstrap.sh| 8
tests/gunit/Makefile.am | 13 +++--
2 files changed, 15 insertions(+), 6 deletions(-)
di
The legacy tests do not successfully run in Travis CI. This
commit disables them from running but does leave the test
code in place. The future of these tests and whether they will
be removed from the repo or not will be revisited at a later
date.
Signed-off-by: Tom Hromatka
---
tests
This commit fixes the Container() class' inconsistent usage
of decode(). In the rootfs() method, it returned a binary
array in one case and a string in another. Now the rootfs()
method will always return a string.
Signed-off-by: Tom Hromatka
---
tests/ftests/container.py | 4 ++--
1
are available here:
https://github.com/drakenclimber/libcgroup/tree/issues/travisci_v3
Tom Hromatka (8):
tests: Improve the unit test framework integration with automake
tests: Fix errors in functional test error path handling
tests: Fix inconsistent return value in functional test's Cont
Prior to this commit, the functional tests used LXC. LXD is
better for configuring a shared device between the host and
container that can be written to by the container. This
feature is critical for tracking code coverage in the
functional tests.
Signed-off-by: Tom Hromatka
---
.travis.yml
mmand
Signed-off-by: Tom Hromatka
---
tests/ftests/run.py | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/ftests/run.py b/tests/ftests/run.py
index 80e5221..0b4e068 100644
--- a/tests/ftests/run.py
+++ b/tests/ftests/run.py
@@ -54,8 +54,8 @@ class Run(o
This commit adds the Travis CI yaml configuration file that
will automatically invoke continuous integration for the
libcgroup project.
Signed-off-by: Tom Hromatka
---
.travis.yml | 47 +++
1 file changed, 47 insertions(+)
create mode 100644
Python 2.7 will not be maintained beyond January 1, 2020. To
avoid potential problems when python 2 is retired, this commit
explicitly instructs the functional tests to use python3.
Suggested-by: Michal Koutný
Signed-off-by: Tom Hromatka
---
tests/ftests/001-cgget-basic_cgget.py | 2 +-
tests
autoconf team, and it has been used verbatim. The original
file is available here:
https://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_code_coverage.m4
Signed-off-by: Tom Hromatka
---
.gitignore | 3 +
.travis.yml| 14 +++
bootstrap.sh
Rename README to README.md so that markdown is supported. This
will allow for code coverage and continuous integration
information to be directly embedded into the readme.
Signed-off-by: Tom Hromatka
---
README| 183 --
README.md
This commit adds continuous integration and code coverage
status to the README via small infographics that display
test pass/fail and coverage percentage, respectively.
Signed-off-by: Tom Hromatka
---
README.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/README.md b/README.md
index
to Travis CI and coveralls.)
Tom Hromatka (2):
README: Rename README to README.md
README: Add continuous integration and code coverage badges
README| 183 -
README.md | 186
On 10/9/19 3:55 PM, Dhaval Giani wrote:
On Wed, Oct 9, 2019, 2:50 PM Tom Hromatka <mailto:[email protected]>> wrote:
This commit adds continuous integration and code coverage
status to the README via small infographics that display
test pass/fail and coverage p
e can do.
Signed-off-by: Tom Hromatka
---
README.md | 4
1 file changed, 4 insertions(+)
create mode 100644 README.md
diff --git a/README.md b/README.md
new file mode 100644
index 000..0677037
--- /dev/null
+++ b/README.md
@@ -0,0 +1,4 @@
+[, 2 deletions(-)
diff --git a/src/api.c b/src/api.c
index 41daa11a0fca..c418223bd6a6 100644
--- a/src/api.c
+++ b/src/api.c
@@ -
necessary memory for each string within the arrays.
Note that it's common to have many controllers on newer
kernels, so MAX_MNT_ELEMENTS was increased to 16 to handle
these additional controllers.
Signed-off-by: Tom Hromatka
---
src/api.c
not match a new process
Signed-off-by: Tom Hromatka
---
src/api.c | 4 +-
src/libcgroup-internal.h | 3 +
tests/gunit/004-cgroup_compare_ignore_rule.cpp | 241 +
tests/gunit/Makefile.am
tions_InvalidOption2() - An invalid option along with
a valid option is tested
RulesOptions_EmptyOptions() - An empty string is tested
RulesOptions_NullOptions() - A null-pointer option string is
tested
Signed-off-by: Tom Hromatka
---
src/api.c |
ReadExampleFile() - Read several lines that are similar to a typical
/proc/{pid}/cgroups file
Signed-off-by: Tom Hromatka
---
src/api.c | 6 +-
src/libcgroup-internal.h | 6 +
.../gunit/003-cg_get_cgroups_from_proc_cgroups.cpp
that matches the rule exactly.
Expects true.
ProcnameWildcard_NoAsteriskMatchExactly - Compares a rule
with no wildcards with a process name that exactly matches
the rule. Expects false as the function exits early due
to no asterisk in the rule.
Signed-off-by: Tom Hromatka
---
src/
ibcgroup/builds/135355854
Code coverage increased from 16% to 18%. The logic added for
this commit was fully covered with the exception of a few error
handling cases:
https://coveralls.io/builds/26816041
Tom Hromatka (9):
tests: Add STATIC and UNIT_TEST definitions to automake files
api.c: Add op
7;, 'foo2', etc. would be moved
to the FooCG/ cgroup. Processes named 'bar', 'fo', etc.
would not match this rule.
Signed-off-by: Tom Hromatka
---
src/api.c | 34 ++
1 file changed, 34 insertions(+)
diff --git a/src/api.c b/src/
e
IgnoreCgroup cgroup, then cgrulesengd will ignore it and it
will not be moved
* If a process named "bar" is spawned in IgnoreCgroup, it will
not match the first rule and will fall into the default
rule. Thus it will be moved to the DefaultCg
On 11/15/19 2:23 PM, Dhaval Giani wrote:
On Wed, Nov 6, 2019 at 3:43 PM Tom Hromatka wrote:
This commit adds two new definitions to the automake Makefile.am
files. This change has no effect on the deliverable binaries.
STATIC - For a standard libcgroup library build, STATIC is equal
On 11/15/19 2:29 PM, Dhaval Giani wrote:
On Wed, Nov 6, 2019 at 3:43 PM Tom Hromatka wrote:
This commit adds a function that, given a pid, can read in
the controllers and cgroups listed in /proc/{pid}/cgroup.
The caller is expected to allocate the controller_list[]
and cgroup_list[] arrays
necessary memory for each string within the arrays.
Signed-off-by: Tom Hromatka
---
src/api.c | 103 ++
1 file changed, 103 insertions(+)
diff --git a/src/api.c b/src/api.c
index 907475f8d6cf..105816a3ff51 100644
--- a/src/api.c
+++ b/src
1 - 100 of 505 matches
Mail list logo