Skip to content

Commit 94cadf0

Browse files
Treehugger RobotGerrit Code Review
authored andcommitted
Merge "Use libprocessgroup to find cgroup v2 paths" into main
2 parents 919ba00 + 95b9286 commit 94cadf0

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

libs/binder/tests/binderLibTest.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,12 @@ class BinderLibTest : public ::testing::Test {
341341
}
342342

343343
bool checkFreezeSupport() {
344-
std::ifstream freezer_file("/sys/fs/cgroup/uid_0/cgroup.freeze");
344+
std::string path;
345+
if (!CgroupGetAttributePathForTask("FreezerState", getpid(), &path)) {
346+
return false;
347+
}
348+
349+
std::ifstream freezer_file(path);
345350
// Pass test on devices where the cgroup v2 freezer is not supported
346351
if (freezer_file.fail()) {
347352
return false;

0 commit comments

Comments
 (0)