Merge "lmkd: test: access /sys/module/lowmemorykiller/ as u:r:shell:s0" am: b69cb7071d am: 4f7d8851a5
am: aa0b84afca Change-Id: I2b9848ada0bdff52179bebdda05b2695e8293994
This commit is contained in:
commit
b9bd86aeaf
|
|
@ -215,6 +215,13 @@ void runMemStressTest() {
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
uid_t uid = getuid();
|
uid_t uid = getuid();
|
||||||
|
|
||||||
|
// check if in-kernel LMK driver is present
|
||||||
|
if (!access(INKERNEL_MINFREE_PATH, W_OK)) {
|
||||||
|
GTEST_LOG_(INFO) << "Must not have kernel lowmemorykiller driver,"
|
||||||
|
<< " terminating test";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ASSERT_FALSE((sock = lmkd_connect()) < 0)
|
ASSERT_FALSE((sock = lmkd_connect()) < 0)
|
||||||
<< "Failed to connect to lmkd process, err=" << strerror(errno);
|
<< "Failed to connect to lmkd process, err=" << strerror(errno);
|
||||||
|
|
||||||
|
|
@ -287,12 +294,6 @@ TEST(lmkd, check_for_oom) {
|
||||||
GTEST_LOG_(INFO) << "Must be userdebug build, terminating test";
|
GTEST_LOG_(INFO) << "Must be userdebug build, terminating test";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// check if in-kernel LMK driver is present
|
|
||||||
if (!access(INKERNEL_MINFREE_PATH, W_OK)) {
|
|
||||||
GTEST_LOG_(INFO) << "Must not have kernel lowmemorykiller driver,"
|
|
||||||
<< " terminating test";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// if respawned test process then run the test and exit (no analysis)
|
// if respawned test process then run the test and exit (no analysis)
|
||||||
if (getenv(LMKDTEST_RESPAWN_FLAG) != NULL) {
|
if (getenv(LMKDTEST_RESPAWN_FLAG) != NULL) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue