class CgroupTest
Defined at line 47 of file ../../src/starnix/tests/syscalls/cpp/cgroup_test.cc
Mounts cgroup2 in a temporary directory for each test case, and deletes all cgroups created by
`CreateCgroup` at the end of each test, and all mountpoints of the cgroup.
Public Methods
void SetUp ()
Defined at line 49 of file ../../src/starnix/tests/syscalls/cpp/cgroup_test.cc
void TearDown ()
Defined at line 58 of file ../../src/starnix/tests/syscalls/cpp/cgroup_test.cc
std::string root_path ()
Returns the path of the first mountpoint.
Defined at line 78 of file ../../src/starnix/tests/syscalls/cpp/cgroup_test.cc
std::string MountCgroup2 ()
Creates a temp directory and mount cgroup2 on it. Returns the mountpoint path.
Defined at line 81 of file ../../src/starnix/tests/syscalls/cpp/cgroup_test.cc
void CheckInterfaceFilesExist (const std::string & path, bool is_root)
Defined at line 88 of file ../../src/starnix/tests/syscalls/cpp/cgroup_test.cc
void CheckDirectoryIncludes (const std::string & path, const std::vector<ExpectedEntry> & expected)
Defined at line 115 of file ../../src/starnix/tests/syscalls/cpp/cgroup_test.cc
testing::AssertionResult CheckFileForLine (const std::string &path,const std::string &line,const boolshould_exist)
Defined at line 133 of file ../../src/starnix/tests/syscalls/cpp/cgroup_test.cc
testing::AssertionResult CheckFileHasLine (const std::string & path, const std::string & line)
Defined at line 156 of file ../../src/starnix/tests/syscalls/cpp/cgroup_test.cc
testing::AssertionResult CheckFileDoesNotHaveLine (const std::string & path, const std::string & line)
Defined at line 161 of file ../../src/starnix/tests/syscalls/cpp/cgroup_test.cc
void CreateCgroup (std::string path, mode_t mode)
Defined at line 166 of file ../../src/starnix/tests/syscalls/cpp/cgroup_test.cc
void DeleteCgroup (const std::string & path)
Defined at line 171 of file ../../src/starnix/tests/syscalls/cpp/cgroup_test.cc