Commit Graph

9 Commits

Author SHA1 Message Date
Elliott Hughes 50e484b980 Stop redefining __NR_process_mrelease.
Change-Id: Icc7ba982b3f47802685e8af40045367c627bf133
2024-12-03 19:13:32 +00:00
Suren Baghdasaryan 753642e31a 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>
2024-08-12 19:03:09 +00:00
Suren Baghdasaryan 13b5b0ce06 lmkd/tests: handle kill reports being confused with reap reports
The starting line for kill and reap reports are the same. Add additional
logic in the test to distinguish between them and retry if a kill report
is found.

Bug: 347296675
Bug: 358830454
Test: mock the input data where lmkd_tests failed
Change-Id: Idf83831e45e6682c1dfb6cde258d4ec631a5eb32
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2024-08-12 19:02:49 +00:00
Carlos Galo 2f00c03379 Integration PROCS_PRIO cmd in lmkd
Creating new cmd in LMKD to batch PROCPRIO requests.

Test: atest lmkd_tests
Bug: 325525024
Change-Id: I5460446d4e968e80263aa25298e2a893863eece4
Signed-off-by: Carlos Galo <carlosgalo@google.com>
2024-05-23 17:42:38 +00:00
Suren Baghdasaryan ec169b178a lmkd/tests: handle reordering of killing and reaping reports in the logs
Since killing and reaping of a process is done in separate threads, it's
possible that the reaping report will be ordered before the kill report.
Adjust the test to handle this case by checking for the reaping report
in the entire log output.

Bug: 296555636
Change-Id: I5549b05392e08655655d4aecc4fadec281c489af
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2023-10-05 21:34:54 +00:00
Suren Baghdasaryan 90c4e26b9f lmkd/tests: do not fail when occasionally reaping time is reported as 0
In rare cases the process reaping time is short enough that it is
reported as 0. Prevent the test from failing in this rare case.

Bug: 296555636
Change-Id: I8484958eb9561ba345008195be8b6a7bd94e9ef3
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2023-10-05 21:34:38 +00:00
Suren Baghdasaryan 0cb4aae3e6 lmkd/tests: handle the case when process exits before reaping starts
Current test will fail in the case when the target process exits before
process_mrelease is called. However this is possible and should not be
treated as an invalid case. Add special handling of this case in the
test.

Bug: 254880957
Test: run lmkd_tests until this case happens
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ica5b28fa52a5f42a771fb9516112e58b66291068
2022-10-24 20:24:41 +00:00
Suren Baghdasaryan 2bf5487381 lmkd/tests: Consume memory more aggressively to avoid test timeout
Increase the allocation step to 5MB and decrease the delay between
allocations to 200ms in order to speed up memory consumption and
avoid the test timing out.

Bug: 217478668
Test: atest lmkd_tests:lmkd_tests.LmkdTest#TargetReaping -- --abi x86_64
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ia36229b280d79acd9d93a5ca1961d6cf1ef223df
2022-02-03 14:53:00 -08:00
Suren Baghdasaryan 683d6cbc2d lmkd/tests: Add a test to check for lmkd process reaping capability
Add a test to verify a process killed by lmkd is being reaped when
kernel supports process_mrelease syscall.

Bug: 203597692
Test: atest LmkdTest
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Iac46f68c811e6e89378952ce1d29daf8a47514e2
2022-02-01 11:40:47 -08:00