lmkd/tests: add 200ms wait for reaper to output its logs am: 753642e31a

Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/3134321

Change-Id: I935c673210c05961ac121faf707adc4f174cd64e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Suren Baghdasaryan 2024-08-12 21:01:19 +00:00 committed by Automerger Merge Worker
commit cad7196508
1 changed files with 3 additions and 0 deletions

View File

@ -210,6 +210,9 @@ TEST_F(LmkdTest, TargetReaping) {
FAIL() << "Target process " << pid << " was not killed"; FAIL() << "Target process " << pid << " was not killed";
} }
// wait 200ms for the reaper thread to write its output in the logcat
usleep(200000);
std::string regex = StringPrintf("((" LMKD_KILL_TEMPLATE ")|(" LMKD_REAP_TEMPLATE std::string regex = StringPrintf("((" LMKD_KILL_TEMPLATE ")|(" LMKD_REAP_TEMPLATE
")|(" LMKD_REAP_FAIL_TEMPLATE "))", ")|(" LMKD_REAP_FAIL_TEMPLATE "))",
pid, pid, pid); pid, pid, pid);