My mistake, this patch is a stand alone not 1/2.

On Thu, 04 Feb 2010, Eric B Munson wrote:

> Currently run_tests.py blindly tries both 32 and 64 bit tests regardless
> of what is available.  This patch makes run_tests.py detect available
> word sizes before starting the tests.
> 
> Signed-off-by: Eric B Munson <ebmun...@us.ibm.com>
> ---
>  tests/run_tests.py |   12 +++++++++++-
>  1 files changed, 11 insertions(+), 1 deletions(-)
> 
> diff --git a/tests/run_tests.py b/tests/run_tests.py
> index ebf9c80..99f382a 100755
> --- a/tests/run_tests.py
> +++ b/tests/run_tests.py
> @@ -240,6 +240,16 @@ def get_pagesizes():
>      for size in out.split("\n"): sizes.add(int(size))
>      return sizes
> 
> +def get_wordsizes():
> +    """
> +    Checks for obj32 and obj64 subdirs to determine valid word sizes.
> +    """
> +    sizes = set()
> +    if os.path.isdir("./obj32"): sizes.add(32)
> +    if os.path.isdir("./obj64"): sizes.add(64)
> +
> +    return sizes
> +
>  def check_hugetlbfs_path():
>      """
>      Check each combination of page size and word size for validity.
> @@ -658,7 +668,7 @@ def main():
>         else:
>             assert False, "unhandled option"
>      if len(testsets) == 0: testsets = set(["func", "stress"])
> -    if len(wordsizes) == 0: wordsizes = set([32, 64])
> +    if len(wordsizes) == 0: wordsizes = get_wordsizes()
>      if len(pagesizes) == 0: pagesizes = get_pagesizes()
> 
>      if len(pagesizes) == 0:
> -- 
> 1.6.3.3
> 

-- 
Eric B Munson
IBM Linux Technology Center
ebmun...@us.ibm.com

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Libhugetlbfs-devel mailing list
Libhugetlbfs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to