We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 919ba00 + 95b9286 commit 94cadf0Copy full SHA for 94cadf0
1 file changed
libs/binder/tests/binderLibTest.cpp
@@ -341,7 +341,12 @@ class BinderLibTest : public ::testing::Test {
341
}
342
343
bool checkFreezeSupport() {
344
- std::ifstream freezer_file("/sys/fs/cgroup/uid_0/cgroup.freeze");
+ std::string path;
345
+ if (!CgroupGetAttributePathForTask("FreezerState", getpid(), &path)) {
346
+ return false;
347
+ }
348
+
349
+ std::ifstream freezer_file(path);
350
// Pass test on devices where the cgroup v2 freezer is not supported
351
if (freezer_file.fail()) {
352
return false;
0 commit comments