summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-12-10 01:34:44 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2024-12-10 01:34:44 +0000
commitb587a472b06992c512f412bdbaf3bf4175707fe2 (patch)
treefecd35482a2cda13b6eeccce8550da224c97a07d
parent1aba9815cdc575c089ed803da839f079f346f80a (diff)
parentf07c0d66360426c6fafe7e543b98a2e99571bee9 (diff)
Merge "Use libprocessgroup to find cgroup v2 paths" into main am: 94cadf0156 am: f07c0d6636
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3394790 Change-Id: Ie11fb181d927a443dee05c082ce9f16888f91397 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--libs/binder/tests/binderLibTest.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/binder/tests/binderLibTest.cpp b/libs/binder/tests/binderLibTest.cpp
index 08fa03cfd6..c038c95b07 100644
--- a/libs/binder/tests/binderLibTest.cpp
+++ b/libs/binder/tests/binderLibTest.cpp
@@ -344,7 +344,12 @@ class BinderLibTest : public ::testing::Test {
}
bool checkFreezeSupport() {
- std::ifstream freezer_file("/sys/fs/cgroup/uid_0/cgroup.freeze");
+ std::string path;
+ if (!CgroupGetAttributePathForTask("FreezerState", getpid(), &path)) {
+ return false;
+ }
+
+ std::ifstream freezer_file(path);
// Pass test on devices where the cgroup v2 freezer is not supported
if (freezer_file.fail()) {
return false;