Project

General

Profile

Bug #598 » 0001-Use-the-lttng_stop_tracing-call-instead-of-the-lttng.patch

Jérémie Galarneau, 07/18/2013 04:28 PM

View differences:

tests/regression/ust/fork/test_fork.py
current_test += 1
if babeltrace_process.returncode != 0:
for error_line in babeltrace_process.stderr:
error_line = error_line.decode('utf-8').replace("\n", "")
print( "#" + error_line )
bail("Unreadable trace; can't proceed with analysis.", session_info)
event_before_fork = False
tests/utils/test_utils.py
import shutil
import sys
import tempfile
import time
# Import lttng bindings generated in the current tree
lttng_bindings_path = os.path.dirname(os.path.abspath(__file__)) + "/"
......
start(session_info.name)
def stop_session(session_info, bailing = False):
# Workaround lttng-ctl outputing directly to stdout by spawning a subprocess.
lttng_binary_path = os.path.dirname(os.path.abspath(__file__)) + "/"
for i in range(3):
lttng_binary_path = os.path.dirname(lttng_binary_path)
lttng_binary_path = lttng_binary_path + "/src/bin/lttng/lttng"
retcode = subprocess.call([lttng_binary_path, "stop", session_info.name], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if retcode != 0 and not bailing:
bail("Unable to stop session " + session_info.name, session_info)
if stop(session_info.name) != 0:
print( "# Failed to close session " + session_info.name )
destroy(session_info.name)
    (1-1/1)