]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
tests: Add unit tests for cgroup_get_cgroup()
authorTom Hromatka <tom.hromatka@oracle.com>
Mon, 20 Apr 2020 17:37:52 +0000 (11:37 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Mon, 20 Apr 2020 17:37:52 +0000 (11:37 -0600)
commit132ead3ecd66b8e620a13c58f667e5d5e14649f2
tree403b2c0bfabcf797c456c1f0775aa7f35fe95add
parentd54844c34b2261f34b43fe522872d4983c4c8a9a
tests: Add unit tests for cgroup_get_cgroup()

This commit adds a unit test for cgroup_get_cgroup().  To
facilitate this, it creates a pseudo-cgroup sysfs in the
working directory and updates the test's cg_mount_table[]
to point at this temporary directory.

[----------] 2 tests from CgroupGetCgroupTest
[ RUN      ] CgroupGetCgroupTest.CgroupGetCgroup1
[       OK ] CgroupGetCgroupTest.CgroupGetCgroup1 (3 ms)
[ RUN      ] CgroupGetCgroupTest.CgroupGetCgroup_NoTasksFile
[       OK ] CgroupGetCgroupTest.CgroupGetCgroup_NoTasksFile (2 ms)
[----------] 2 tests from CgroupGetCgroupTest (6 ms total)

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
gunit/006-cgroup_get_cgroup.cpp [new file with mode: 0644]
gunit/Makefile.am