max_map_count: Add judgment of abnormal situation
PATCH 1/1 max_map_count: Add judgment of abnormal situation
Hi petr,
Quoted 24 lines
Hi,
Quoted 14 lines
When CommitLimit -
Committed_AS< 128, there is no post processing, and the test will report "TBROK: Test haven't reported results".Signed-off-by Zhao Gongyi <[email protected]>--- testcases/kernel/mem/tunable/max_map_count.c | 2 ++ 1 file changed, 2 insertions(+)testcases/kernel/mem/tunable/max_map_count.c +0
-0testcases/kernel/mem/tunable/max_map_count.c static void max_map_count_test(void) · line 166
Quoted 5 lines
testcases/kernel/mem/tunable/max_map_count.c +2
-0@@ -162,6 +162,8 @@ static void max_map_count_test(void) max_iters = memfree /sysconf (_SC_PAGESIZE) *1024 -64 ;if (max_iters >MAX_MAP_COUNT ) max_iters =MAX_MAP_COUNT ; +if (max_iters <0 ) +tst_brk (TCONF ,"Test nees max_iters > 0, test skipped" );typo: nees => needs (no need to repost, can be changed during merge).
Quoted 4 lines
Reviewed-by Petr Vorel <[email protected]>You seems to exploring limits. Out of curiosity, which system / hw do you test?
We are testing linux on some different embedded systems whose hw resource is limited.
Thanks for your review!
Best Regards,
Gongyi
Quoted 5 lines
Kind regards,
PetrQuoted 2 lines
testcases/kernel/mem/tunable/max_map_count.c +0
-0max_maps =MAP_COUNT_DEFAULT ;while (max_maps <= max_iters) {
PATCH 1/1 max_map_count: Add judgment of abnormal situation
Hi Gongyi,
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
When CommitLimit -
Committed_AS< 128, there is no post processing, and the test will report "TBROK: Test haven't reported results".
Actually, I have problem for CommitLimit - Committed_AS < 5280 (depends on actual system).
But that means that even check for max_iters < 0 is not enough, because while (max_maps <= max_iters) block should be run@least once to avoid TBROK: Test haven't reported results!
max_maps is always 1024, thus how about this?
max_maps = MAP_COUNT_DEFAULT;
+ if (max_iters < max_maps)
+ tst_brk(TCONF, "test requires more free memory");
Quoted 4 lines
Quoted 2 lines
You seems to exploring limits. Out of curiosity, which system / hw do you test?
We are testing linux on some different embedded systems whose hw resource is limited.
Thanks for info.
Kind regards,
Petr