3 import lttng_ivc
.utils
.ProjectFactory
as ProjectFactory
4 import lttng_ivc
.utils
.runtime
as Run
5 import lttng_ivc
.settings
as Settings
9 TODO: provide kernel version check for matrix since there is upper and lower
10 bound to lttng-modules.
12 TODO:Packet sequence number. 5b3cf4f924befda843a7736daf84f8ecae5e86a4
13 LTTNG_RING_BUFFER_GET_SEQ_NUM
14 TODO:Stream instance id. 5594698f9c8ad13e0964c67946d1867df7757dae
15 LTTNG_RING_BUFFER_INSTANCE_ID
19 BC: Feature of the smallest version number will works.
21 +-------------------------------------------------------+
22 | LTTng Modules ABI vs LTTng Tools compatibility matrix |
23 +-------------------------------------------------------+
24 | Modules / Tools | 2.7 | 2.8 | 2.9 | 2.10 |
25 +------------------+------+------+------+---------------+
26 | 2.7 | FC | BC | BC | BC |
27 | 2.8 | BC | FC | BC | BC |
28 | 2.9 | BC | BC | FC | BC |
29 | 2.10 | BC | BC | BC | FC |
30 +------------------+------+------+------+---------------+
35 First tuple member: lttng-ust label
36 Second tuple member: lttng-tool label
37 Third tuple member: expected scenario
40 test_matrix_regen_metadata
= [
41 ("lttng-modules-2.7", "lttng-tools-2.7", "Unsupported by tools"),
42 ("lttng-modules-2.7", "lttng-tools-2.8", "Unsupported by module"),
43 ("lttng-modules-2.7", "lttng-tools-2.9", "Unsupported by module"),
44 ("lttng-modules-2.7", "lttng-tools-2.10", "Unsupported by module"),
45 ("lttng-modules-2.8", "lttng-tools-2.7", "Unsupported by tools"),
46 ("lttng-modules-2.8", "lttng-tools-2.8", "Supported"),
47 ("lttng-modules-2.8", "lttng-tools-2.9", "Supported"),
48 ("lttng-modules-2.8", "lttng-tools-2.10", "Supported"),
49 ("lttng-modules-2.9", "lttng-tools-2.7", "Unsupported by tools"),
50 ("lttng-modules-2.9", "lttng-tools-2.8", "Supported"),
51 ("lttng-modules-2.9", "lttng-tools-2.9", "Supported"),
52 ("lttng-modules-2.9", "lttng-tools-2.10", "Supported"),
53 ("lttng-modules-2.10", "lttng-tools-2.7", "Unsupported by tools"),
54 ("lttng-modules-2.10", "lttng-tools-2.8", "Supported"),
55 ("lttng-modules-2.10", "lttng-tools-2.9", "Supported"),
56 ("lttng-modules-2.10", "lttng-tools-2.10", "Supported"),
59 test_matrix_statedump
= [
60 ("lttng-modules-2.7", "lttng-tools-2.7", "Unsupported by tools"),
61 ("lttng-modules-2.7", "lttng-tools-2.8", "Unsupported by tools"),
62 ("lttng-modules-2.7", "lttng-tools-2.9", "Unsupported by module"),
63 ("lttng-modules-2.7", "lttng-tools-2.10", "Unsupported by module"),
64 ("lttng-modules-2.8", "lttng-tools-2.7", "Unsupported by tools"),
65 ("lttng-modules-2.8", "lttng-tools-2.8", "Unsupported by tools"),
66 ("lttng-modules-2.8", "lttng-tools-2.9", "Unsupported by modules"),
67 ("lttng-modules-2.8", "lttng-tools-2.10", "Unsupported by modules"),
68 ("lttng-modules-2.9", "lttng-tools-2.7", "Unsupported by tools"),
69 ("lttng-modules-2.9", "lttng-tools-2.8", "Unsupported by tools"),
70 ("lttng-modules-2.9", "lttng-tools-2.9", "Supported"),
71 ("lttng-modules-2.9", "lttng-tools-2.10", "Supported"),
72 ("lttng-modules-2.10", "lttng-tools-2.7", "Unsupported by tools"),
73 ("lttng-modules-2.10", "lttng-tools-2.8", "Unsupported by tools"),
74 ("lttng-modules-2.10", "lttng-tools-2.9", "Supported"),
75 ("lttng-modules-2.10", "lttng-tools-2.10", "Supported"),
78 test_matrix_starglobing
= [
79 ("lttng-modules-2.7", "lttng-tools-2.7", "Unsupported by tools"),
80 ("lttng-modules-2.7", "lttng-tools-2.8", "Unsupported by tools"),
81 ("lttng-modules-2.7", "lttng-tools-2.9", "Unsupported by tools"),
82 ("lttng-modules-2.7", "lttng-tools-2.10", "Unsupported by module"),
83 ("lttng-modules-2.8", "lttng-tools-2.7", "Unsupported by tools"),
84 ("lttng-modules-2.8", "lttng-tools-2.8", "Unsupported by tools"),
85 ("lttng-modules-2.8", "lttng-tools-2.9", "Unsupported by tools"),
86 ("lttng-modules-2.8", "lttng-tools-2.10", "Unsupported by modules"),
87 ("lttng-modules-2.9", "lttng-tools-2.7", "Unsupported by tools"),
88 ("lttng-modules-2.9", "lttng-tools-2.8", "Unsupported by tools"),
89 ("lttng-modules-2.9", "lttng-tools-2.9", "Unsupported by tools"),
90 ("lttng-modules-2.9", "lttng-tools-2.10", "Unsupported by modules"),
91 ("lttng-modules-2.10", "lttng-tools-2.7", "Unsupported by tools"),
92 ("lttng-modules-2.10", "lttng-tools-2.8", "Unsupported by tools"),
93 ("lttng-modules-2.10", "lttng-tools-2.9", "Unsupported by tools"),
94 ("lttng-modules-2.10", "lttng-tools-2.10", "Supported"),
98 runtime_matrix_regen_metadata
= []
99 runtime_matrix_statedump
= []
100 runtime_matrix_starglobing
= []
102 if not Settings
.test_only
:
103 runtime_matrix_regen_metadata
= test_matrix_regen_metadata
104 runtime_matrix_statedump
= test_matrix_statedump
105 runtime_matrix_starglobing
= test_matrix_starglobing
107 for tup
in test_matrix_regen_metadata
:
108 if (tup
[0] in Settings
.test_only
or tup
[1] in
110 runtime_matrix_regen_metadata
.append(tup
)
111 for tup
in test_matrix_statedump
:
112 if (tup
[0] in Settings
.test_only
or tup
[1] in
114 runtime_matrix_statedump
.append(tup
)
115 for tup
in test_matrix_starglobing
:
116 if (tup
[0] in Settings
.test_only
or tup
[1] in
118 runtime_matrix_starglobing
.append(tup
)
121 @pytest.mark
.parametrize("modules_label,tools_label,outcome", runtime_matrix_regen_metadata
)
122 def test_modules_regen_metadata(tmpdir
, modules_label
, tools_label
, outcome
):
123 pytest
.xfail("Not implemented yet. Need to perform version checking for lttng-modules validity")
124 modules
= ProjectFactory
.get_precook(modules_label
)
125 tools
= ProjectFactory
.get_precook(tools_label
)
126 runtime
= Run
.Runtime(str(tmpdir
))
127 runtime
.add_project(modules
)
128 runtime
.add_project(tools
)
131 @pytest.mark
.parametrize("modules_label,tools_label,outcome", runtime_matrix_statedump
)
132 def test_modules_statedump(tmpdir
, modules_label
, tools_label
, outcome
):
133 pytest
.xfail("Not implemented yet. Need to perform version checking for lttng-modules validity")
134 modules
= ProjectFactory
.get_precook(modules_label
)
135 tools
= ProjectFactory
.get_precook(tools_label
)
136 runtime
= Run
.Runtime(str(tmpdir
))
137 runtime
.add_project(modules
)
138 runtime
.add_project(tools
)
141 @pytest.mark
.parametrize("modules_label,tools_label,outcome", runtime_matrix_starglobing
)
142 def test_modules_starglobing(tmpdir
, modules_label
, tools_label
, outcome
):
143 pytest
.xfail("Not implemented yet. Need to perform version checking for lttng-modules validity")
144 modules
= ProjectFactory
.get_precook(modules_label
)
145 tools
= ProjectFactory
.get_precook(tools_label
)
146 runtime
= Run
.Runtime(str(tmpdir
))
147 runtime
.add_project(modules
)
148 runtime
.add_project(tools
)