Test scripts are meant to be run, as root, from the build tree.
Should be reported usptream.
Index: git/tests/run_tests.py
===================================================================
--- git.orig/tests/run_tests.py	2010-03-21 22:39:04.000000000 +0100
+++ git/tests/run_tests.py	2010-03-21 23:24:36.000000000 +0100
@@ -63,10 +63,10 @@
 
     local_env = os.environ.copy()
     local_env.update(env)
-    local_env["PATH"] = "./obj%d:../obj%d:%s" \
-        % (bits, bits, local_env.get("PATH", ""))
-    local_env["LD_LIBRARY_PATH"] = "../obj%d:obj%d:%s" \
-        % (bits, bits, local_env.get("LD_LIBRARY_PATH", ""))
+    local_env["PATH"] = "/usr/lib/libhugetlbfs/tests/obj%d:%s" \
+        % (bits, local_env.get("PATH", ""))
+    local_env["LD_LIBRARY_PATH"] = "/usr/lib/libhugetlbfs/tests/obj%d:%s" \
+        % (bits, local_env.get("LD_LIBRARY_PATH", ""))
     local_env["HUGETLB_DEFAULT_PAGE_SIZE"] = repr(pagesize)
 
     try:
@@ -234,7 +234,7 @@
     """
     sizes = set()
     out = ""
-    (rc, out) = bash("../obj/hugeadm --page-sizes")
+    (rc, out) = bash("hugeadm --page-sizes")
     if rc != 0 or out == "": return sizes
 
     for size in out.split("\n"): sizes.add(int(size))
@@ -289,7 +289,7 @@
     okbits = set()
 
     for bits in wordsizes:
-        script = open('obj%d/dummy.ldscript' % bits, 'r').read()
+        script = open('/usr/lib/libhugetlbfs/tests/obj%d/dummy.ldscript' % bits, 'r').read()
         if script.count('SPECIAL') == 0:
             okbits.add(bits)
     return okbits
