]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
tests: Set cgroup version in test 006
authorTom Hromatka <tom.hromatka@oracle.com>
Thu, 16 Jul 2020 19:57:49 +0000 (13:57 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 30 Jul 2020 15:24:57 +0000 (09:24 -0600)
This commit explicitly sets the cgroup version in the
fictitious mount table in test 006.  With the introduction
of the CGROUP_UNK enumeration value, this test fails without
explicitly setting the version to CGROUP_V1.

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
gunit/006-cgroup_get_cgroup.cpp

index 1c97cde8774e20e6d3058abcaec786cd276e0426..e5ee07fbb0208ca136d96cfc36644e2eadc1825e 100644 (file)
@@ -131,6 +131,7 @@ class CgroupGetCgroupTest : public ::testing::Test {
                                 "%s", CONTROLLERS[i]);
                        snprintf(cg_mount_table[i].mount.path, FILENAME_MAX,
                                 "%s/%s", PARENT_DIR, CONTROLLERS[i]);
+                       cg_mount_table[i].version = CGROUP_V1;
 
                        ret = mkdir(cg_mount_table[i].mount.path, MODE);
                        ASSERT_EQ(ret, 0);