* [LTP] [PATCH] lib: use TCONF if hpage reserve failed in retry
@ 2020-05-26 7:09 Li Wang
2020-05-26 8:58 ` Jan Stancek
0 siblings, 1 reply; 3+ messages in thread
From: Li Wang @ 2020-05-26 7:09 UTC (permalink / raw)
To: ltp
Test still easy to get fail in?hpages?reserving (only 80% of
max_hpages) because of memory fragmentation.
?
tst_hugepage.c:46: BROK: nr_hugepages = 171, but expect 255
? ?
But it seems unkind and useless to exit with TBROK when failed
in hpage reserve retrying. This patch proposes to use TCONF for
better log review.
Signed-off-by: Li Wang <liwang@redhat.com>
Cc: Jan Stancek <jstancek@redhat.com>
---
lib/tst_hugepage.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/tst_hugepage.c b/lib/tst_hugepage.c
index 52667a14e..f2bf5d20e 100644
--- a/lib/tst_hugepage.c
+++ b/lib/tst_hugepage.c
@@ -43,7 +43,9 @@ unsigned long tst_request_hugepages(unsigned long hpages)
SAFE_FILE_PRINTF(PATH_NR_HPAGES, "%lu", tst_hugepages);
SAFE_FILE_SCANF(PATH_NR_HPAGES, "%lu", &val);
if (val != tst_hugepages)
- tst_brk(TBROK, "nr_hugepages = %lu, but expect %lu", val, tst_hugepages);
+ tst_brk(TCONF, "nr_hugepages = %lu, but expect %lu. "
+ "Not enough hugepages for testing.",
+ val, tst_hugepages);
tst_res(TINFO, "%lu hugepage(s) reserved", tst_hugepages);
out:
--
2.21.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [LTP] [PATCH] lib: use TCONF if hpage reserve failed in retry
2020-05-26 7:09 [LTP] [PATCH] lib: use TCONF if hpage reserve failed in retry Li Wang
@ 2020-05-26 8:58 ` Jan Stancek
2020-05-26 10:23 ` Li Wang
0 siblings, 1 reply; 3+ messages in thread
From: Jan Stancek @ 2020-05-26 8:58 UTC (permalink / raw)
To: ltp
----- Original Message -----
> Test still easy to get fail in?hpages?reserving (only 80% of
> max_hpages) because of memory fragmentation.
> ?
> tst_hugepage.c:46: BROK: nr_hugepages = 171, but expect 255
> ? ?
> But it seems unkind and useless to exit with TBROK when failed
> in hpage reserve retrying. This patch proposes to use TCONF for
> better log review.
>
> Signed-off-by: Li Wang <liwang@redhat.com>
> Cc: Jan Stancek <jstancek@redhat.com>
Acked-by: Jan Stancek <jstancek@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [LTP] [PATCH] lib: use TCONF if hpage reserve failed in retry
2020-05-26 8:58 ` Jan Stancek
@ 2020-05-26 10:23 ` Li Wang
0 siblings, 0 replies; 3+ messages in thread
From: Li Wang @ 2020-05-26 10:23 UTC (permalink / raw)
To: ltp
On Tue, May 26, 2020 at 4:58 PM Jan Stancek <jstancek@redhat.com> wrote:
>
>
> ----- Original Message -----
> > Test still easy to get fail in hpages reserving (only 80% of
> > max_hpages) because of memory fragmentation.
> >
> > tst_hugepage.c:46: BROK: nr_hugepages = 171, but expect 255
> >
> > But it seems unkind and useless to exit with TBROK when failed
> > in hpage reserve retrying. This patch proposes to use TCONF for
> > better log review.
> >
> > Signed-off-by: Li Wang <liwang@redhat.com>
> > Cc: Jan Stancek <jstancek@redhat.com>
>
> Acked-by: Jan Stancek <jstancek@redhat.com>
>
Pushed, thanks for the review.
--
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20200526/d7090e1a/attachment-0001.htm>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-26 10:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-26 7:09 [LTP] [PATCH] lib: use TCONF if hpage reserve failed in retry Li Wang
2020-05-26 8:58 ` Jan Stancek
2020-05-26 10:23 ` Li Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox