Remove unnecessary handler
[deliverable/lttng-ivc.git] / lttng_ivc / tests / ust_app_vs_ust_tools / test_ust_app_vs_ust_tools.py
index d8dc0c7160688f96b07be58584f43b993456e1ae..e07670686065197d3b14e7afb2f4e72c1e86221e 100644 (file)
@@ -57,7 +57,7 @@ test_matrix_tracing_available = [
 ]
 
 # Only consider test case for which tracing is valid
-test_matrix_other = [
+test_matrix_app_context = [
     ("lttng-ust-2.7", "lttng-tools-2.7",  ""),
     ("lttng-ust-2.7", "lttng-tools-2.8",  ""),
     ("lttng-ust-2.7", "lttng-tools-2.9",  ""),
@@ -87,12 +87,13 @@ else:
             runtime_matrix_tracing_available.append(tup)
 
 
-def lttng_sessiond_ready():
-    print("lttng sessiond is ready ! FFS")
-
 @pytest.mark.parametrize("ust_label,tools_label, should_trace", runtime_matrix_tracing_available)
 def test_ust_app_tracing_available(tmpdir, ust_label, tools_label, should_trace):
 
+    if ((ust_label == "lttng-ust-2.7" and tools_label == "lttng-tools-2.8") or
+            (ust_label == "lttng-ust-2.8" and tools_label == "lttng-tools-2.7")):
+        pytest.xfail("FAiling but should work, problem regarding the size of fields structure")
+
     nb_events = 100
 
     # Prepare environment
@@ -118,11 +119,7 @@ def test_ust_app_tracing_available(tmpdir, ust_label, tools_label, should_trace)
         runtime_app.run("make V=1", cwd=app_path)
 
         # Start lttng-sessiond
-        # TODO: extract to utils function with a runtime as parameter
-        previous_handler = signal.signal(signal.SIGUSR1, lttng_sessiond_ready)
-        runtime_tools.spawn_subprocess("lttng-sessiond -vvv -S")
-        signal.sigtimedwait({signal.SIGUSR1}, 60)
-        previous_handler = signal.signal(signal.SIGUSR1, previous_handler)
+        sessiond = utils.sessiond_spawn(runtime_tools)
 
         # Create session using mi to get path and session name
         runtime_tools.run('lttng create trace --output={}'.format(trace_path))
@@ -138,6 +135,7 @@ def test_ust_app_tracing_available(tmpdir, ust_label, tools_label, should_trace)
 
         # Stop tracing
         runtime_tools.run('lttng destroy -a')
+        runtime_tools.subprocess_terminate(sessiond)
 
         try:
             # Read trace with babeltrace and check for event count via number of line
@@ -149,5 +147,3 @@ def test_ust_app_tracing_available(tmpdir, ust_label, tools_label, should_trace)
             if should_trace:
                 # Something happened
                 raise e
-
-
This page took 0.024871 seconds and 5 git commands to generate.