Currently run_test_prog is unprotected from the OSError exception.
This patch makes run_test_prog return an error value instead of
having the exception kill the entire process.

Signed-off-by: Eric B Munson <[email protected]>
---
 tests/run_tests.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/tests/run_tests.py b/tests/run_tests.py
index 8de0cb4..ebf9c80 100755
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -69,12 +69,14 @@ def run_test_prog(bits, pagesize, cmd, **env):
         % (bits, bits, local_env.get("LD_LIBRARY_PATH", ""))
     local_env["HUGETLB_DEFAULT_PAGE_SIZE"] = repr(pagesize)
 
-    p = subprocess.Popen(cmd, env=local_env, stdout=subprocess.PIPE)
     try:
+        p = subprocess.Popen(cmd, env=local_env, stdout=subprocess.PIPE)
         rc = p.wait()
     except KeyboardInterrupt:
         # Abort and mark this a strange test result
         return (None, "")
+    except OSError:
+        return (None, "")
     out = p.stdout.read().strip()
 
     if paranoid_pool_check:
-- 
1.6.3.3


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Libhugetlbfs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to