From 2bf54873817748cb914f490acac52de56f52c0a4 Mon Sep 17 00:00:00 2001 From: Suren Baghdasaryan Date: Thu, 3 Feb 2022 12:45:55 -0800 Subject: [PATCH] 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 Change-Id: Ia36229b280d79acd9d93a5ca1961d6cf1ef223df --- tests/lmkd_tests.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/lmkd_tests.cpp b/tests/lmkd_tests.cpp index 6491a7b..0676d85 100644 --- a/tests/lmkd_tests.cpp +++ b/tests/lmkd_tests.cpp @@ -47,8 +47,8 @@ using namespace android::base; // Test constant parameters #define OOM_ADJ_MAX 1000 -#define ALLOC_STEP (ONE_MB) -#define ALLOC_DELAY 1000 +#define ALLOC_STEP (5 * ONE_MB) +#define ALLOC_DELAY 200 // used to create ptr aliasing and prevent compiler optimizing the access static volatile void* gptr;