Skip to contentSkip to conversation

mem/hugetlb: fix failure of hugemmap04

PATCH In review liubo 2 participants 2 messages Nov 13, 2009 – Nov 16, 2009

lore
Share & tools
lore

liubo

author
#0 lore raw

PATCH 1/1 mem/hugetlb: fix failure of hugemmap04

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

This patch fixed the problems.

---
 testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c +6 -0
index 050a071..e67e43c 100644
@@ -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();
 
Signature · 13 lines
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#1 lore raw
Quoted 6 lines · liubo

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

This patch fixed the problems.

Thanks.

Regards--
Subrata

Quoted 19 lines
---
 testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c +1 -0
index 050a071..e67e43c 100644
@@ -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();

testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c main(int ac, char **av) · line 135

Quoted 10 lines
testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c +5 -0
 	}
 
+	/* 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();
 

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list