Skip to content

Commit f07c0d6

Browse files
Treehugger Robotandroid-build-merge-worker-robot
authored andcommitted
Merge "Use libprocessgroup to find cgroup v2 paths" into main am: 94cadf0
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3394790 Change-Id: Ia13509fe172e97edcc8ef4ee64f238f7247a1b69 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2 parents 17bcaf2 + 94cadf0 commit f07c0d6

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)