The run_tests.py functions elflink_and_share_test and
elflink_rw_and_share_test have an inner loop which runs exactly the
same tests twice.  It looks like it's instead supposed to run them
with HUGETLB_SHARE=0 then HUGETLB_SHARE=1.  This patch fixes up the
Python code so that that's actually what happens.

Signed-off-by: David Gibson <d...@au1.ibm.com>

Index: libhugetlbfs/tests/run_tests.py
===================================================================
--- libhugetlbfs.orig/tests/run_tests.py        2009-08-19 15:57:59.000000000 
+1000
+++ libhugetlbfs/tests/run_tests.py     2009-08-19 15:58:13.000000000 +1000
@@ -391,7 +391,7 @@ def elflink_and_share_test(cmd, pre=""):
     clear_hpages()
     for link_str in ("xB.", "xBDT."):
         for i in range(2):
-            do_elflink_test(link_str + cmd, combine("HUGETLB_SHARE=1", pre))
+            do_elflink_test(link_str + cmd, combine("HUGETLB_SHARE=%d" % i, 
pre))
         clear_hpages()
 
 def elflink_rw_and_share_test(cmd, pre=""):
@@ -402,7 +402,7 @@ def elflink_rw_and_share_test(cmd, pre="
     for mode in ("R", "W", "RW"):
         for i in range(2):
             do_test(cmd, combine("HUGETLB_ELFMAP=" + mode + " " + \
-                                 "HUGETLB_SHARE=1", pre))
+                                 "HUGETLB_SHARE=%d" % i, pre))
         clear_hpages()
 
 def setup_shm_sysctl(limit):

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

------------------------------------------------------------------------------
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
_______________________________________________
Libhugetlbfs-devel mailing list
Libhugetlbfs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to