* [LTP] [PATCH] max_map_count: Add judgment of abnormal situation
@ 2021-03-09 13:17 zhaogongyi
2021-03-09 14:54 ` Petr Vorel
0 siblings, 1 reply; 7+ messages in thread
From: zhaogongyi @ 2021-03-09 13:17 UTC (permalink / raw)
To: ltp
Hi petr,
>
> Hi,
>
> > 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 <zhaogongyi@huawei.com>
> > ---
> > testcases/kernel/mem/tunable/max_map_count.c | 2 ++
> > 1 file changed, 2 insertions(+)
>
> > diff --git a/testcases/kernel/mem/tunable/max_map_count.c
> > b/testcases/kernel/mem/tunable/max_map_count.c
> > index aa70fde59..ffc53cbb5 100644
> > --- a/testcases/kernel/mem/tunable/max_map_count.c
> > +++ b/testcases/kernel/mem/tunable/max_map_count.c
> > @@ -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 <pvorel@suse.cz>
>
> 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
> Kind regards,
> Petr
>
> > max_maps = MAP_COUNT_DEFAULT;
> > while (max_maps <= max_iters) {
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH] max_map_count: Add judgment of abnormal situation
2021-03-09 13:17 [LTP] [PATCH] max_map_count: Add judgment of abnormal situation zhaogongyi
@ 2021-03-09 14:54 ` Petr Vorel
0 siblings, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2021-03-09 14:54 UTC (permalink / raw)
To: ltp
Hi Gongyi,
> > > 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");
> > 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH] max_map_count: Add judgment of abnormal situation
2021-03-10 2:03 Zhao Gongyi
@ 2021-03-10 10:26 ` Petr Vorel
0 siblings, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2021-03-10 10:26 UTC (permalink / raw)
To: ltp
Hi Zhao,
> When max_iters < max_maps, there is no post processing,
> and the test will report "TBROK: Test haven't reported results".
Thanks, merged!
> Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>
> ---------------
> v1->v2: modify comparison span of the judgment.
> ---------------
FYI: about these 3 lines below Signed-off-by: text should go under ---
and both --------------- are not needed. Not important, just in that way this
info won't endup in the commit message (anything below --- is not going to be in
the commit message).
Kind regards,
Petr
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH] max_map_count: Add judgment of abnormal situation
@ 2021-03-10 2:06 zhaogongyi
0 siblings, 0 replies; 7+ messages in thread
From: zhaogongyi @ 2021-03-10 2:06 UTC (permalink / raw)
To: ltp
Hi Petr,
I have resubmit the patch as your review.
Thanks!
Best Regards,
Gongyi
>
> Hi Gongyi,
>
> > > > 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");
>
>
> > > 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH] max_map_count: Add judgment of abnormal situation
@ 2021-03-10 2:03 Zhao Gongyi
2021-03-10 10:26 ` Petr Vorel
0 siblings, 1 reply; 7+ messages in thread
From: Zhao Gongyi @ 2021-03-10 2:03 UTC (permalink / raw)
To: ltp
When max_iters < max_maps, there is no post processing,
and the test will report "TBROK: Test haven't reported results".
Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>
---------------
v1->v2: modify comparison span of the judgment.
---------------
---
testcases/kernel/mem/tunable/max_map_count.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/testcases/kernel/mem/tunable/max_map_count.c b/testcases/kernel/mem/tunable/max_map_count.c
index aa70fde59..cf2df338a 100644
--- a/testcases/kernel/mem/tunable/max_map_count.c
+++ b/testcases/kernel/mem/tunable/max_map_count.c
@@ -164,6 +164,9 @@ static void max_map_count_test(void)
max_iters = MAX_MAP_COUNT;
max_maps = MAP_COUNT_DEFAULT;
+ if (max_iters < max_maps)
+ tst_brk(TCONF, "test requires more free memory");
+
while (max_maps <= max_iters) {
set_sys_tune("max_map_count", max_maps, 1);
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [LTP] [PATCH] max_map_count: Add judgment of abnormal situation
2021-03-09 12:09 Zhao Gongyi
@ 2021-03-09 12:46 ` Petr Vorel
0 siblings, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2021-03-09 12:46 UTC (permalink / raw)
To: ltp
Hi,
> 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 <zhaogongyi@huawei.com>
> ---
> testcases/kernel/mem/tunable/max_map_count.c | 2 ++
> 1 file changed, 2 insertions(+)
> diff --git a/testcases/kernel/mem/tunable/max_map_count.c b/testcases/kernel/mem/tunable/max_map_count.c
> index aa70fde59..ffc53cbb5 100644
> --- a/testcases/kernel/mem/tunable/max_map_count.c
> +++ b/testcases/kernel/mem/tunable/max_map_count.c
> @@ -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 <pvorel@suse.cz>
You seems to exploring limits. Out of curiosity, which system / hw do you test?
Kind regards,
Petr
> max_maps = MAP_COUNT_DEFAULT;
> while (max_maps <= max_iters) {
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH] max_map_count: Add judgment of abnormal situation
@ 2021-03-09 12:09 Zhao Gongyi
2021-03-09 12:46 ` Petr Vorel
0 siblings, 1 reply; 7+ messages in thread
From: Zhao Gongyi @ 2021-03-09 12:09 UTC (permalink / raw)
To: ltp
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 <zhaogongyi@huawei.com>
---
testcases/kernel/mem/tunable/max_map_count.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/testcases/kernel/mem/tunable/max_map_count.c b/testcases/kernel/mem/tunable/max_map_count.c
index aa70fde59..ffc53cbb5 100644
--- a/testcases/kernel/mem/tunable/max_map_count.c
+++ b/testcases/kernel/mem/tunable/max_map_count.c
@@ -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
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-03-10 10:26 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09 13:17 [LTP] [PATCH] max_map_count: Add judgment of abnormal situation zhaogongyi
2021-03-09 14:54 ` Petr Vorel
-- strict thread matches above, loose matches on Subject: below --
2021-03-10 2:06 zhaogongyi
2021-03-10 2:03 Zhao Gongyi
2021-03-10 10:26 ` Petr Vorel
2021-03-09 12:09 Zhao Gongyi
2021-03-09 12:46 ` Petr Vorel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.