Fix: TimeoutExpired in Python tests not defined globally
authorAntoine Busque <abusque@efficios.com>
Tue, 11 Aug 2015 20:29:30 +0000 (16:29 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 14 Aug 2015 22:10:29 +0000 (18:10 -0400)
The `TimeoutExpired` exception is used in multiple locations
throughout the Python tests. However, it needs to be used as
`subprocess.TimeoutExpired` given that it is only defined in that
module.

Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/regression/ust/daemon/test_daemon.py
tests/regression/ust/exit-fast/test_exit-fast.py
tests/regression/ust/fork/test_fork.py
tests/regression/ust/libc-wrapper/test_libc-wrapper.py
tests/regression/ust/linking/test_linking.py

index c9a9bff2c9a7207836106d33231648f202eaa205..70afe3ce313f9635fd0d43cc89ec1d45f5ef2b17 100644 (file)
@@ -47,7 +47,7 @@ daemon_process = subprocess.Popen(test_path + "daemon", stdout=subprocess.PIPE)
 if sys.version_info >= (3, 3):
     try:
         daemon_process_return_code = daemon_process.wait(5)
-    except TimeoutExpired:
+    except subprocess.TimeoutExpired:
         daemon_process.kill()
         daemon_process_return_code = -1
 else:
index 71ae7d33e3c113bbd4b8a798d16c86cba1975661..fbe3c857a69c89c5ce22748b1ac91ba20e6145fe 100644 (file)
@@ -52,7 +52,7 @@ exit_fast_process = subprocess.Popen(test_path + "exit-fast", stdout=subprocess.
 if sys.version_info >= (3, 3):
     try:
         exit_fast_process.wait(5)
-    except TimeoutExpired:
+    except subprocess.TimeoutExpired:
         exit_fast_process.kill()
         bail("Failed to run exit-fast test application.")
 else:
@@ -66,7 +66,7 @@ exit_fast_process = subprocess.Popen([test_path + "exit-fast", "suicide"], stdou
 if sys.version_info >= (3, 3):
     try:
         exit_fast_process.wait(5)
-    except TimeoutExpired:
+    except subprocess.TimeoutExpired:
         exit_fast_process.kill()
         bail("Failed to run exit-fast test application in suicide mode.")
 else:
index 62faf71f1ad121ded11c65e321f269a2a59492a5..ec444aef71143128c72d91550be1cd76a3739e02 100644 (file)
@@ -47,7 +47,7 @@ fork_process = subprocess.Popen([test_path + "fork", test_path + "fork2"], stdou
 if sys.version_info >= (3, 3):
     try:
         fork_process.wait(5)
-    except TimeoutExpired:
+    except subprocess.TimeoutExpired:
         fork_process.kill()
         bail("Failed to run fork test application (time out)", session_info)
 else:
index 8650f8632c7e708dd133912f2045a48562e89a5f..fd27a370f5231751577c56505cfe675ae69ade33 100644 (file)
@@ -46,7 +46,7 @@ malloc_process = subprocess.Popen(test_path + "prog", stdout=subprocess.PIPE, st
 if sys.version_info >= (3, 3):
     try:
         malloc_process.wait(5)
-    except TimeoutExpired:
+    except subprocess.TimeoutExpired:
         malloc_process.kill()
         bail("Failed to run libustinstr-malloc test application.", session_info)
 else:
index 9591312935894bdf2fc22b3932ab8fac01fb15e7..f2081f8073d30b59f10f2eeebe1ddad8c2116f31 100644 (file)
@@ -114,7 +114,7 @@ if DYNAMIC_TEST_ENABLED:
     if sys.version_info >= (3 ,3):
         try:
             demo_process.wait(5)
-        except TimeoutExpired:
+        except subprocess.TimeoutExpired:
             demo_process.kill()
             bail("Failed to run demo test application without preloading")
     else:
@@ -140,7 +140,7 @@ for executable in test_executables:
     if sys.version_info >= (3, 3):
         try:
             demo_process.wait(5)
-        except TimeoutExpired:
+        except subprocess.TimeoutExpired:
             demo_process.kill()
             bail("Failed to run {0} test application".format(executable_name))
     else:
This page took 0.02773 seconds and 4 git commands to generate.