All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] mem/hugetlb: fix failure of hugemmap04
@ 2009-11-13  9:23 liubo
  2009-11-16  8:13 ` Subrata Modak
  0 siblings, 1 reply; 2+ messages in thread
From: liubo @ 2009-11-13  9:23 UTC (permalink / raw)
  To: ltp-list

Testcase hugemmap04 needs at least one hugepage to test,
so there needs a judgement of "number of hugepages".

This patch fixed the problems.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>

---
 testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c
index 050a071..e67e43c 100644
--- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c
+++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c
@@ -72,6 +72,7 @@
 
 #include "test.h"
 #include "usctest.h"
+#include "system_specific_hugepages_info.h"
 
 #define BUFFER_SIZE  256
 
@@ -124,6 +125,11 @@ main(int ac, char **av)
 		tst_exit();
 	}
 
+	/* Check number of hugepages */
+	if (get_no_of_hugepages() <= 0 || hugepages_size() <= 0)
+		tst_brkm(TBROK, cleanup, "Test cannot be continued owning to \
+				sufficient availability of Hugepages on the system");
+
 	/* Perform global setup for test */
 	setup();
 
-- 
1.6.2.2



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-16  8:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-13  9:23 [LTP] [PATCH] mem/hugetlb: fix failure of hugemmap04 liubo
2009-11-16  8:13 ` Subrata Modak

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.