diff --git a/tests/lmkd_test.cpp b/tests/lmkd_test.cpp index b1957bc..07d91bb 100644 --- a/tests/lmkd_test.cpp +++ b/tests/lmkd_test.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -274,8 +275,10 @@ void runMemStressTest() { << data->oomadj; data->allocated = 0; data->finished = false; - ASSERT_FALSE(create_memcg(uid, pid) != 0) - << "Child [pid=" << pid << "] failed to create a cgroup"; + if (property_get_bool("ro.config.low_ram", false)) { + ASSERT_FALSE(create_memcg(uid, pid) != 0) + << "Child [pid=" << pid << "] failed to create a cgroup"; + } signal_state(ssync, STATE_CHILD_READY); wait_for_state(ssync, STATE_PARENT_READY); add_pressure(data);