lmkd/tests: add 200ms wait for reaper to output its logs
Occasionally the test reads logcat before lmkd reaper had a chance to write into it, resulting in the expected report messages being missed. Add a 200ms delay after lmkd kills the process to give lmkd reper thread more time to write its reports. Bug: 347296675 Bug: 358830454 Test: atest lmkd_tests Change-Id: I2549e37f25c81c9add91f7ee450c4a96c8cf18e4 Signed-off-by: Suren Baghdasaryan <surenb@google.com>
This commit is contained in:
parent
13b5b0ce06
commit
753642e31a
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue