diff options
| author | 2024-12-10 00:40:06 +0000 | |
|---|---|---|
| committer | 2024-12-10 00:40:06 +0000 | |
| commit | 94cadf0156e2e08fa54520f48b2f413cc6e8d738 (patch) | |
| tree | 806544536797e63fb5f4d67f8528b1f9b1f43f71 | |
| parent | 919ba007c9ad310a1f3f01e5b0e930ca044278c5 (diff) | |
| parent | 95b928689853029f01692c3392840ea0aa52caf2 (diff) | |
Merge "Use libprocessgroup to find cgroup v2 paths" into main
| -rw-r--r-- | libs/binder/tests/binderLibTest.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/binder/tests/binderLibTest.cpp b/libs/binder/tests/binderLibTest.cpp index c234172916..d6cb508d7f 100644 --- a/libs/binder/tests/binderLibTest.cpp +++ b/libs/binder/tests/binderLibTest.cpp @@ -341,7 +341,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; |