Commit Graph

4 Commits

Author SHA1 Message Date
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