7 import lttng_ivc
.utils
.ProjectFactory
as ProjectFactory
8 import lttng_ivc
.utils
.utils
as utils
9 import lttng_ivc
.utils
.runtime
as Run
10 import lttng_ivc
.settings
as Settings
16 +------------------------------------------------------------------------------+
17 | LTTng consumer daemon vs LTTng session daemon |
18 +--------------------------+------------+------------+------------+------------+
19 | Consumerd/Sessiond | 2.7 | 2.8 | 2.9 | 2.10 |
20 +--------------------------+------------+------------+------------+------------+
21 | 2.7 | FC | I | I | I |
22 | 2.8 | I | FC | I | I |
23 | 2.9 | I | I | FC | I |
24 | 2.10 | I | I | I | FC |
25 +--------------------------+------------+------------+------------+------------+
29 test_matrix_consumerd
= [
30 ("lttng-tools-2.7", "lttng-tools-2.7", True),
31 ("lttng-tools-2.7", "lttng-tools-2.8", False),
32 ("lttng-tools-2.7", "lttng-tools-2.9", False),
33 ("lttng-tools-2.7", "lttng-tools-2.10", False),
34 ("lttng-tools-2.8", "lttng-tools-2.7", False),
35 ("lttng-tools-2.8", "lttng-tools-2.8", True),
36 ("lttng-tools-2.8", "lttng-tools-2.9", True),
37 ("lttng-tools-2.8", "lttng-tools-2.10", False),
38 ("lttng-tools-2.9", "lttng-tools-2.7", False),
39 ("lttng-tools-2.9", "lttng-tools-2.8", True),
40 ("lttng-tools-2.9", "lttng-tools-2.9", True),
41 ("lttng-tools-2.9", "lttng-tools-2.10", False),
42 ("lttng-tools-2.10", "lttng-tools-2.7", False),
43 ("lttng-tools-2.10", "lttng-tools-2.8", False),
44 ("lttng-tools-2.10", "lttng-tools-2.9", False),
45 ("lttng-tools-2.10", "lttng-tools-2.10", True),
48 runtime_matrix_consumerd
= []
50 if not Settings
.test_only
:
51 runtime_matrix_consumerd
= test_matrix_consumerd
53 for tup
in test_matrix_consumerd
:
54 if (tup
[0] in Settings
.test_only
or tup
[1] in
56 runtime_matrix_consumerd
.append(tup
)
59 @pytest.mark
.parametrize("consumerd_l,tools_l,should_work", runtime_matrix_consumerd
)
60 def test_consumerd_vs_sessiond(tmpdir
, consumerd_l
, tools_l
, should_work
):
63 consumerd
= ProjectFactory
.get_precook(consumerd_l
)
64 tools
= ProjectFactory
.get_precook(tools_l
)
66 app_path
= os
.path
.join(str(tmpdir
), "app")
68 replacement_consumerd
= utils
.find_file(consumerd
.installation_path
, "lttng-consumerd")
69 assert(replacement_consumerd
)
71 c_dict
= {"32bit": "-consumerd32-path", "64bit": "--consumerd64-path"}
72 platform_type
= platform
.architecture()[0]
74 sessiond_opt_args
= "{}={}".format(c_dict
[platform_type
], replacement_consumerd
)
76 with Run
.get_runtime(str(tmpdir
)) as runtime
:
77 runtime
.add_project(tools
)
79 shutil
.copytree(Settings
.apps_gen_events_folder
, app_path
)
80 runtime
.run("make V=1", cwd
=app_path
)
82 utils
.sessiond_spawn(runtime
, sessiond_opt_args
)
84 # Consumer is only called on channel creation
85 runtime
.run("lttng create")
87 runtime
.run("lttng enable-event -u tp:test", timeout
=5)
88 runtime
.run("lttng start", timeout
=5)
91 cmd
= './app {}'.format(100)
92 runtime
.run(cmd
, cwd
=app_path
)
94 runtime
.run("lttng destroy -a", timeout
=5)
95 except (subprocess
.CalledProcessError
, subprocess
.TimeoutExpired
) as e
:
99 raise Exception("Supposed to fail")
This page took 0.039009 seconds and 6 git commands to generate.