lmkd_test: remove memcg creation on non-AndroidGo devices
Memory cgroups are disabled on non-AndroidGo devices. Change the test not to fail due to missing in-kernel memory cgroup support. Bug: 172296409 Signed-off-by: Suren Baghdasaryan <surenb@google.com> Change-Id: I35d724c23c22e97458976c1cad45fe9d993326f9
This commit is contained in:
parent
dab3944256
commit
d7146e0f54
|
|
@ -27,6 +27,7 @@
|
||||||
#include <android-base/properties.h>
|
#include <android-base/properties.h>
|
||||||
#include <android-base/stringprintf.h>
|
#include <android-base/stringprintf.h>
|
||||||
#include <android-base/strings.h>
|
#include <android-base/strings.h>
|
||||||
|
#include <cutils/properties.h>
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <lmkd.h>
|
#include <lmkd.h>
|
||||||
#include <liblmkd_utils.h>
|
#include <liblmkd_utils.h>
|
||||||
|
|
@ -274,8 +275,10 @@ void runMemStressTest() {
|
||||||
<< data->oomadj;
|
<< data->oomadj;
|
||||||
data->allocated = 0;
|
data->allocated = 0;
|
||||||
data->finished = false;
|
data->finished = false;
|
||||||
|
if (property_get_bool("ro.config.low_ram", false)) {
|
||||||
ASSERT_FALSE(create_memcg(uid, pid) != 0)
|
ASSERT_FALSE(create_memcg(uid, pid) != 0)
|
||||||
<< "Child [pid=" << pid << "] failed to create a cgroup";
|
<< "Child [pid=" << pid << "] failed to create a cgroup";
|
||||||
|
}
|
||||||
signal_state(ssync, STATE_CHILD_READY);
|
signal_state(ssync, STATE_CHILD_READY);
|
||||||
wait_for_state(ssync, STATE_PARENT_READY);
|
wait_for_state(ssync, STATE_PARENT_READY);
|
||||||
add_pressure(data);
|
add_pressure(data);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue