max_map_count: Add judgment of abnormal situation
PATCH 1/1 max_map_count: Add judgment of abnormal situation
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 +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" ); max_maps =MAP_COUNT_DEFAULT ;while (max_maps <= max_iters) {
--
2.17.1
PATCH 1/1 max_map_count: Add judgment of abnormal situation
Hi,
Quoted 13 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
-0
testcases/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).
Reviewed-by Petr Vorel <[email protected]>
You seems to exploring limits. Out of curiosity, which system / hw do you test?
Kind regards,
Petr
Quoted 2 lines
testcases/kernel/mem/tunable/max_map_count.c +0
-0max_maps =MAP_COUNT_DEFAULT ;while (max_maps <= max_iters) {