start_session(session_info)
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 subprocess.TimeoutExpired:
- daemon_process.kill()
- daemon_process_return_code = -1
-else:
- daemon_process_return_code = daemon_process.wait()
+daemon_process_return_code = daemon_process.wait()
daemon_process_output = daemon_process.communicate()[0]
daemon_process_output = daemon_process_output.decode('utf-8').splitlines()
test_env["LTTNG_UST_REGISTER_TIMEOUT"] = "-1"
exit_fast_process = subprocess.Popen(test_path + "exit-fast", stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=test_env)
-
-if sys.version_info >= (3, 3):
- try:
- exit_fast_process.wait(5)
- except subprocess.TimeoutExpired:
- exit_fast_process.kill()
- bail("Failed to run exit-fast test application.")
-else:
- exit_fast_process.wait()
+exit_fast_process.wait()
print_test_result(exit_fast_process.returncode == 0, current_test, "Test application exited normally")
current_test += 1
exit_fast_process = subprocess.Popen([test_path + "exit-fast", "suicide"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=test_env)
-
-if sys.version_info >= (3, 3):
- try:
- exit_fast_process.wait(5)
- except subprocess.TimeoutExpired:
- exit_fast_process.kill()
- bail("Failed to run exit-fast test application in suicide mode.")
-else:
- exit_fast_process.wait()
+exit_fast_process.wait()
stop_session(session_info)
start_session(session_info)
fork_process = subprocess.Popen([test_path + "fork", test_path + "fork2"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-
-if sys.version_info >= (3, 3):
- try:
- fork_process.wait(5)
- except subprocess.TimeoutExpired:
- fork_process.kill()
- bail("Failed to run fork test application (time out)", session_info)
-else:
- fork_process.wait()
+fork_process.wait()
parent_pid = -1
child_pid = -1
start_session(session_info)
malloc_process = subprocess.Popen(test_path + "prog", stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-if sys.version_info >= (3, 3):
- try:
- malloc_process.wait(5)
- except subprocess.TimeoutExpired:
- malloc_process.kill()
- bail("Failed to run libustinstr-malloc test application.", session_info)
-else:
- malloc_process.wait()
+malloc_process.wait()
print_test_result(malloc_process.returncode == 0, current_test, "Test application exited normally")
current_test += 1
# Dry run, no events should be logged
demo_process = subprocess.Popen(test_path + "demo", stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- if sys.version_info >= (3 ,3):
- try:
- demo_process.wait(5)
- except subprocess.TimeoutExpired:
- demo_process.kill()
- bail("Failed to run demo test application without preloading")
- else:
- demo_process.wait()
+ demo_process.wait()
stop_session(session_info)
print_test_result(demo_process.returncode == 0, current_test,\
start_session(session_info)
demo_process = subprocess.Popen(executable, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- if sys.version_info >= (3, 3):
- try:
- demo_process.wait(5)
- except subprocess.TimeoutExpired:
- demo_process.kill()
- bail("Failed to run {0} test application".format(executable_name))
- else:
- demo_process.wait()
+ demo_process.wait()
stop_session(session_info)
trace_found = os.path.exists(session_info.trace_path)