Skip to contentSkip to conversation

hugeshmat: do cleanup for hugeshmat04.c

PATCH New Li Wang 2 participants 2 messages Nov 17, 2015 – Nov 18, 2015

lore
Share & tools
lore

Li Wang

author
#0 lore raw

PATCH 1/1 hugeshmat: do cleanup for hugeshmat04.c

there is no need to check the number of system hugepages again, because funciton 'set_sys_tune("nr_hugepages", hugepages, 1);' has already done that before.

so, I propose to remove these redundant codes.

---
 testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat04.c | 6 ------
 1 file changed, 6 deletions(-)
testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat04.c +0 -6
index 9e8ffa6..f631a0a 100644
@@ -54,7 +54,6 @@
 char *TCID = "hugeshmat04";
 int TST_TOTAL = 3;
 
-static long huge_total;
 static long huge_free;
 static long huge_free2;
 static long hugepages;
@@ -145,11 +144,6 @@ void setup(void)
 	hugepages = (orig_hugepages * hpage_size + SIZE) / hpage_size;
 	set_sys_tune("nr_hugepages", hugepages, 1);
 
-	huge_total = read_meminfo("HugePages_Total:");
-	if (huge_total != hugepages)
-		tst_brkm(TCONF, cleanup,
-			"Maybe huge pages not enough for test.");
-
 	TEST_PAUSE;
 }
 
Signature · 1 line
1.8.3.1