bee5051d436f5db0415517344ac944219ddc1a07
[deliverable/tracecompass.git] / lttng / org.eclipse.tracecompass.lttng2.control.ui.tests / testfiles / LTTngServiceMi3Test.cfg
1 ####################################################################
2 # Copyright (c) 2014, 2016 Ericsson
3 #
4 # All rights reserved. This program and the accompanying materials are
5 # made available under the terms of the Eclipse Public License v1.0 which
6 # accompanies this distribution, and is available at
7 # http://www.eclipse.org/legal/epl-v10.html
8 #
9 # Contributors:
10 # Jonathan Rajotte - Initial API and implementation
11 # Bernd Hufmann - Added new test cases
12 # Marc-Andre Laperle - Adapted to MI 3.0 (LTTng 2.8)
13 ####################################################################
14 ####################################################################
15 # Scenario: Test lttng not installed
16 ####################################################################
17 <SCENARIO>
18 LttngNotInstalled
19 <COMMAND_INPUT>
20 lttng --mi xml list
21 </COMMAND_INPUT>
22 <COMMAND_RESULT>
23 1
24 </COMMAND_RESULT>
25 <COMMAND_OUTPUT>
26 <COMMAND_ERROR_OUTPUT>
27 Command not found
28 </COMMAND_ERROR_OUTPUT>
29 </COMMAND_OUTPUT>
30 </SCENARIO>
31
32 ####################################################################
33 # Scenario: Test lttng version
34 ####################################################################
35 <SCENARIO>
36 LttngVersion
37 <COMMAND_INPUT>
38 lttng version
39 </COMMAND_INPUT>
40 <COMMAND_RESULT>
41 0
42 </COMMAND_RESULT>
43 <COMMAND_OUTPUT>
44 lttng version 2.8.0 - Isseki Nicho
45 Web site: http://lttng.org
46
47 lttng is free software and under the GPL license and part LGPL
48 </COMMAND_OUTPUT>
49 </SCENARIO>
50
51 ####################################################################
52 # Scenario: Test lttng version
53 # output with prompt
54 ####################################################################
55 <SCENARIO>
56 LttngVersionWithPrompt
57 <COMMAND_INPUT>
58 lttng version
59 </COMMAND_INPUT>
60 <COMMAND_RESULT>
61 0
62 </COMMAND_RESULT>
63 <COMMAND_OUTPUT>
64 Prompt> lttng version 2.8.0 - Isseki Nicho
65 Web site: http://lttng.org
66
67 lttng is free software and under the GPL license and part LGPL
68 </COMMAND_OUTPUT>
69 </SCENARIO>
70
71 ####################################################################
72 # Scenario: Test lttng version (unsupported version)
73 ####################################################################
74 <SCENARIO>
75 LttngUnsupportedVersion
76 <COMMAND_INPUT>
77 lttng version
78 </COMMAND_INPUT>
79 <COMMAND_RESULT>
80 0
81 </COMMAND_RESULT>
82 <COMMAND_OUTPUT>
83 lttng version 200.0.0 - Annedd'ale
84 Web site: http://lttng.org/
85
86 lttng is free software and under the GPL license and part LGPL
87 </COMMAND_OUTPUT>
88 </SCENARIO>
89
90
91 ####################################################################
92 # Scenario: Test lttng version (noversion)
93 ####################################################################
94 <SCENARIO>
95 LttngNoVersion
96 <COMMAND_INPUT>
97 lttng version
98 </COMMAND_INPUT>
99 <COMMAND_RESULT>
100 0
101 </COMMAND_RESULT>
102 <COMMAND_OUTPUT>
103 Web site: http://lttng.org/
104
105 lttng is free software and under the GPL license and part LGPL
106 </COMMAND_OUTPUT>
107 </SCENARIO>
108
109 ####################################################################
110 # Scenario: Test lttng version (compiled from source)
111 ####################################################################
112 <SCENARIO>
113 LttngVersionCompiled
114 <COMMAND_INPUT>
115 lttng --mi xml version
116 </COMMAND_INPUT>
117 <COMMAND_RESULT>
118 0
119 </COMMAND_RESULT>
120 <COMMAND_OUTPUT>
121 <?xml version="1.0" encoding="UTF-8"?>
122 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
123 <name>version</name>
124 <output>
125 <version>
126 <string>2.8.0-rc1</string>
127 <major>2</major>
128 <minor>8</minor>
129 <commit>v2.8.0-rc1-29-g55b4b79</commit>
130 <patchLevel>0</patchLevel>
131 <name>Isseki Nicho</name>
132 <description>The result of a collaboration between "Dieu du Ciel!" and Nagano-based "Shiga Kogen", Isseki Nicho is a strong Imperial Dark Saison offering a rich roasted malt flavor combined with a complex fruity finish typical of Saison yeasts.</description>
133 <url>https://lttng.org</url>
134 <license>lttng is free software and under the GPL license and part LGPL</license>
135 </version>
136 </output>
137 </command>
138 </COMMAND_OUTPUT>
139 </SCENARIO>
140
141 ####################################################################
142 # Scenario: Test no sessions available
143 ####################################################################
144 <SCENARIO>
145 NoSessionAvailable
146 <COMMAND_INPUT>
147 lttng --mi xml list
148 </COMMAND_INPUT>
149 <COMMAND_RESULT>
150 0
151 </COMMAND_RESULT>
152 <COMMAND_OUTPUT>
153 <?xml version="1.0" encoding="UTF-8"?>
154 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0"><name>list</name><output><sessions/></output></command>
155 </COMMAND_OUTPUT>
156 </SCENARIO>
157
158 ####################################################################
159 # Scenario: Test get sessions
160 ####################################################################
161 <SCENARIO>
162 GetSessionNames1
163 <COMMAND_INPUT>
164 lttng --mi xml list
165 </COMMAND_INPUT>
166 <COMMAND_RESULT>
167 0
168 </COMMAND_RESULT>
169 <COMMAND_OUTPUT>
170 <?xml version="1.0" encoding="UTF-8"?>
171 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
172 <name>list</name>
173 <output>
174 <sessions>
175 <session>
176 <name>mysession1</name>
177 <path>home/user/lttng-traces/mysession1-20120123-083928</path>
178 <enabled>false</enabled>
179 <snapshot_mode>0</snapshot_mode>
180 <live_timer_interval>0</live_timer_interval>
181 </session>
182 <session>
183 <name>mysession</name>
184 <path>home/user/lttng-traces/mysession-20120123-083318</path>
185 <enabled>false</enabled>
186 <snapshot_mode>0</snapshot_mode>
187 <live_timer_interval>0</live_timer_interval>
188 </session>
189 </sessions>
190 </output>
191 </command>
192 </COMMAND_OUTPUT>
193 </SCENARIO>
194
195 ####################################################################
196 # Scenario: Test get sessions with tracing group
197 ####################################################################
198 <SCENARIO>
199 GetSessionWithTracingGroup
200 <COMMAND_INPUT>
201 lttng -g group --mi xml list
202 </COMMAND_INPUT>
203 <COMMAND_RESULT>
204 0
205 </COMMAND_RESULT>
206 <COMMAND_OUTPUT>
207 <?xml version="1.0" encoding="UTF-8"?>
208 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
209 <name>list</name>
210 <output>
211 <sessions>
212 <session>
213 <name>mysession1</name>
214 <path>home/user/lttng-traces/mysession1-20120123-083928</path>
215 <enabled>false</enabled>
216 <snapshot_mode>0</snapshot_mode>
217 <live_timer_interval>0</live_timer_interval>
218 </session>
219 <session>
220 <name>mysession</name>
221 <path>home/user/lttng-traces/mysession-20120123-083318</path>
222 <enabled>false</enabled>
223 <snapshot_mode>0</snapshot_mode>
224 <live_timer_interval>0</live_timer_interval>
225 </session>
226 </sessions>
227 </output>
228 </command>
229 </COMMAND_OUTPUT>
230 </SCENARIO>
231
232
233 ####################################################################
234 # Scenario: Test lttng list <name> where session doesn't exist
235 ####################################################################
236 <SCENARIO>
237 GetSessionNameNotExist
238 <COMMAND_INPUT>
239 lttng --mi xml list test
240 </COMMAND_INPUT>
241 <COMMAND_RESULT>
242 1
243 </COMMAND_RESULT>
244 <COMMAND_OUTPUT>
245 <?xml version="1.0" encoding="UTF-8"?>
246 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0"><name>list</name><output><sessions/></output></command>
247 <COMMAND_ERROR_OUTPUT>
248 Error: Session 'test' not found
249 Error: Command error
250 </COMMAND_ERROR_OUTPUT>
251 </COMMAND_OUTPUT>
252 </SCENARIO>
253
254 ####################################################################
255 # Scenario: Test lttng -vvv list <name> where session doesn't exist
256 ####################################################################
257 <SCENARIO>
258 GetSessionNameNotExistVerbose
259 <COMMAND_INPUT>
260 lttng --mi xml -vvv list test
261 </COMMAND_INPUT>
262 <COMMAND_RESULT>
263 1
264 </COMMAND_RESULT>
265 <COMMAND_OUTPUT>
266 <?xml version="1.0" encoding="UTF-8"?>
267 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0"><name>list</name><output><sessions/></output></command>
268 <COMMAND_ERROR_OUTPUT>
269 Error: Session 'test' not found
270 Error: Command error
271 </COMMAND_ERROR_OUTPUT>
272 </COMMAND_OUTPUT>
273 </SCENARIO>
274
275 ####################################################################
276 # Scenario: Test lttng list with garbage output
277 ####################################################################
278 <SCENARIO>
279 GetSessionGarbageOut
280 <COMMAND_INPUT>
281 lttng --mi xml list
282 </COMMAND_INPUT>
283 <COMMAND_RESULT>
284 0
285 </COMMAND_RESULT>
286 <COMMAND_OUTPUT>
287 asdfaereafsdcv 12333456434&*89**(())(^%$*
288 @#$%^&*()@#$%^&*()0834523094578kj;djkfs
289 a;sdf094v5u dsafj;sd9
290 </COMMAND_OUTPUT>
291 </SCENARIO>
292
293 ####################################################################
294 # Scenario: Test lttng list <name> with sample outputs
295 ####################################################################
296 <SCENARIO>
297 GetSession1
298 <COMMAND_INPUT>
299 lttng --mi xml list mysession
300 </COMMAND_INPUT>
301 <COMMAND_RESULT>
302 0
303 </COMMAND_RESULT>
304 <COMMAND_OUTPUT>
305 <?xml version="1.0" encoding="UTF-8"?>
306 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
307 <name>list</name>
308 <output>
309 <sessions>
310 <session>
311 <name>mysession</name>
312 <path>/home/user/lttng-traces/mysession-20120129-084256</path>
313 <enabled>true</enabled>
314 <snapshot_mode>0</snapshot_mode>
315 <live_timer_interval>0</live_timer_interval>
316 <domains>
317 <domain>
318 <type>KERNEL</type>
319 <buffer_type>PER_PID</buffer_type>
320 <channels>
321 <channel>
322 <name>channel0</name>
323 <enabled>true</enabled>
324 <attributes>
325 <overwrite_mode>DISCARD</overwrite_mode>
326 <subbuffer_size>262144</subbuffer_size>
327 <subbuffer_count>4</subbuffer_count>
328 <switch_timer_interval>0</switch_timer_interval>
329 <read_timer_interval>200</read_timer_interval>
330 <output_type>SPLICE</output_type>
331 <tracefile_size>0</tracefile_size>
332 <tracefile_count>0</tracefile_count>
333 <live_timer_interval>0</live_timer_interval>
334 </attributes>
335 <events>
336 <event>
337 <name>block_rq_remap</name>
338 <type>TRACEPOINT</type>
339 <enabled>true</enabled>
340 <loglevel>TRACE_EMERG</loglevel>
341 <loglevel_type>ALL</loglevel_type>
342 </event>
343 <event>
344 <name>block_bio_remap</name>
345 <type>TRACEPOINT</type>
346 <enabled>false</enabled>
347 <loglevel>TRACE_EMERG</loglevel>
348 <loglevel_type>ALL</loglevel_type>
349 </event>
350 </events>
351 </channel>
352 <channel>
353 <name>channel1</name>
354 <enabled>false</enabled>
355 <attributes>
356 <overwrite_mode>OVERWRITE</overwrite_mode>
357 <subbuffer_size>524288</subbuffer_size>
358 <subbuffer_count>4</subbuffer_count>
359 <switch_timer_interval>100</switch_timer_interval>
360 <read_timer_interval>400</read_timer_interval>
361 <output_type>SPLICE</output_type>
362 <tracefile_size>0</tracefile_size>
363 <tracefile_count>0</tracefile_count>
364 <live_timer_interval>4294967295</live_timer_interval>
365 </attributes>
366 <events/>
367 </channel>
368 </channels>
369 </domain>
370 <domain>
371 <type>UST</type>
372 <buffer_type>PER_UID</buffer_type>
373 <channels>
374 <channel>
375 <name>mychannel1</name>
376 <enabled>false</enabled>
377 <attributes>
378 <overwrite_mode>OVERWRITE</overwrite_mode>
379 <subbuffer_size>8192</subbuffer_size>
380 <subbuffer_count>8</subbuffer_count>
381 <switch_timer_interval>200</switch_timer_interval>
382 <read_timer_interval>100</read_timer_interval>
383 <output_type>MMAP</output_type>
384 <tracefile_size>0</tracefile_size>
385 <tracefile_count>0</tracefile_count>
386 <live_timer_interval>0</live_timer_interval>
387 </attributes>
388 <events/>
389 </channel>
390 <channel>
391 <name>channel0</name>
392 <enabled>true</enabled>
393 <attributes>
394 <overwrite_mode>DISCARD</overwrite_mode>
395 <subbuffer_size>4096</subbuffer_size>
396 <subbuffer_count>4</subbuffer_count>
397 <switch_timer_interval>0</switch_timer_interval>
398 <read_timer_interval>200</read_timer_interval>
399 <output_type>MMAP</output_type>
400 <tracefile_size>0</tracefile_size>
401 <tracefile_count>0</tracefile_count>
402 <live_timer_interval>0</live_timer_interval>
403 </attributes>
404 <events>
405 <event>
406 <name>ust_tests_hello:tptest_sighandler</name>
407 <type>TRACEPOINT</type>
408 <enabled>false</enabled>
409 <loglevel>TRACE_DEBUG_LINE</loglevel>
410 <loglevel_type>ALL</loglevel_type>
411 </event>
412 <event>
413 <name>*</name>
414 <type>TRACEPOINT</type>
415 <enabled>true</enabled>
416 </event>
417 </events>
418 </channel>
419 </channels>
420 </domain>
421 </domains>
422 </session>
423 </sessions>
424 </output>
425 </command>
426 </COMMAND_OUTPUT>
427 <COMMAND_INPUT>
428 lttng --mi xml list mysession1
429 </COMMAND_INPUT>
430 <COMMAND_RESULT>
431 0
432 </COMMAND_RESULT>
433 <COMMAND_OUTPUT>
434 <?xml version="1.0" encoding="UTF-8"?>
435 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
436 <name>list</name>
437 <output>
438 <sessions>
439 <session>
440 <name>mysession1</name>
441 <path>/home/user/lttng-traces/mysession1-20120203-133225</path>
442 <enabled>false</enabled>
443 <snapshot_mode>0</snapshot_mode>
444 <live_timer_interval>0</live_timer_interval>
445 <domains/>
446 </session>
447 </sessions>
448 </output>
449 </command>
450 </COMMAND_OUTPUT>
451 </SCENARIO>
452
453 ####################################################################
454 # Scenario: Test lttng list <name> in the presence of filter expressions
455 ####################################################################
456 <SCENARIO>
457 GetSessionFilterExpression
458 <COMMAND_INPUT>
459 lttng --mi xml list mysession
460 </COMMAND_INPUT>
461 <COMMAND_RESULT>
462 0
463 </COMMAND_RESULT>
464 <COMMAND_OUTPUT>
465 <?xml version="1.0" encoding="UTF-8"?>
466 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
467 <name>list</name>
468 <output>
469 <sessions>
470 <session>
471 <name>mysession</name>
472 <path>/home/user/lttng-traces/mysession-20120129-084256</path>
473 <enabled>true</enabled>
474 <snapshot_mode>0</snapshot_mode>
475 <live_timer_interval>0</live_timer_interval>
476 <domains>
477 <domain>
478 <type>KERNEL</type>
479 <buffer_type>PER_PID</buffer_type>
480 <channels>
481 <channel>
482 <name>channel0</name>
483 <enabled>true</enabled>
484 <attributes>
485 <overwrite_mode>DISCARD</overwrite_mode>
486 <subbuffer_size>262144</subbuffer_size>
487 <subbuffer_count>4</subbuffer_count>
488 <switch_timer_interval>0</switch_timer_interval>
489 <read_timer_interval>200</read_timer_interval>
490 <output_type>SPLICE</output_type>
491 <tracefile_size>0</tracefile_size>
492 <tracefile_count>0</tracefile_count>
493 <live_timer_interval>0</live_timer_interval>
494 </attributes>
495 <events>
496 <event>
497 <name>block_rq_remap</name>
498 <type>TRACEPOINT</type>
499 <enabled>true</enabled>
500 <filter_expression>foo &gt; 10</filter_expression>
501 <loglevel>TRACE_EMERG</loglevel>
502 <loglevel_type>ALL</loglevel_type>
503 </event>
504 </events>
505 </channel>
506 </channels>
507 </domain>
508 <domain>
509 <type>UST</type>
510 <buffer_type>PER_UID</buffer_type>
511 <channels>
512 <channel>
513 <name>channel0</name>
514 <enabled>true</enabled>
515 <attributes>
516 <overwrite_mode>DISCARD</overwrite_mode>
517 <subbuffer_size>4096</subbuffer_size>
518 <subbuffer_count>4</subbuffer_count>
519 <switch_timer_interval>0</switch_timer_interval>
520 <read_timer_interval>200</read_timer_interval>
521 <output_type>MMAP</output_type>
522 <tracefile_size>0</tracefile_size>
523 <tracefile_count>0</tracefile_count>
524 <live_timer_interval>0</live_timer_interval>
525 </attributes>
526 <events>
527 <event>
528 <name>ust_tests_hello:tptest_sighandler</name>
529 <type>TRACEPOINT</type>
530 <enabled>false</enabled>
531 <filter_expression>foo &gt; 10</filter_expression>
532 <loglevel>TRACE_DEBUG_LINE</loglevel>
533 <loglevel_type>ALL</loglevel_type>
534 </event>
535 </events>
536 </channel>
537 </channels>
538 </domain>
539 </domains>
540 </session>
541 </sessions>
542 </output>
543 </command>
544 </COMMAND_OUTPUT>
545 </SCENARIO>
546
547 ####################################################################
548 # Scenario: Test lttng list <name> (with live time interval)
549 ####################################################################
550 <SCENARIO>
551 GetSessionWithLiveInterval
552 <COMMAND_INPUT>
553 lttng --mi xml list mysession
554 </COMMAND_INPUT>
555 <COMMAND_RESULT>
556 0
557 </COMMAND_RESULT>
558 <COMMAND_OUTPUT>
559 <?xml version="1.0" encoding="UTF-8"?>
560 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
561 <name>list</name>
562 <output>
563 <sessions>
564 <session>
565 <name>mysession</name>
566 <path>/home/user/lttng-traces/mysession-20120129-084256</path>
567 <enabled>false</enabled>
568 <snapshot_mode>1</snapshot_mode>
569 <live_timer_interval>4294967295</live_timer_interval>
570 <domains>
571 </domains>
572 </session>
573 </sessions>
574 </output>
575 </command>
576 </COMMAND_OUTPUT>
577 #------------------------------------------------------------------------------
578 <COMMAND_INPUT>
579 lttng --mi xml snapshot list-output -s mysession
580 </COMMAND_INPUT>
581 <COMMAND_RESULT>
582 0
583 </COMMAND_RESULT>
584 <COMMAND_OUTPUT>
585 <?xml version="1.0" encoding="UTF-8"?>
586 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
587 <name>snapshot</name>
588 <output>
589 <snapshot_action>
590 <name>list-output</name>
591 <output>
592 <session>
593 <name>mysession</name>
594 <snapshots>
595 <snapshot>
596 <id>1</id>
597 <name>snapshot-1</name>
598 <ctrl_url>/home/user/lttng-traces/mysession-20120129-084256</ctrl_url>
599 <data_url/>
600 <max_size>0</max_size>
601 </snapshot>
602 </snapshots>
603 </session>
604 </output>
605 </snapshot_action>
606 </output>
607 <success>true</success>
608 </command>
609 </COMMAND_OUTPUT>
610 #------------------------------------------------------------------------------
611 <COMMAND_INPUT>
612 lttng --mi xml list mysession1
613 </COMMAND_INPUT>
614 <COMMAND_RESULT>
615 0
616 </COMMAND_RESULT>
617 <COMMAND_OUTPUT>
618 <?xml version="1.0" encoding="UTF-8"?>
619 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
620 <name>list</name>
621 <output>
622 <sessions>
623 <session>
624 <name>mysession1</name>
625 <path>/home/user/lttng-traces/mysession1-20120129-084256</path>
626 <enabled>true</enabled>
627 <snapshot_mode>0</snapshot_mode>
628 <live_timer_interval>0</live_timer_interval>
629 <domains/>
630 </session>
631 </sessions>
632 </output>
633 </command>
634 </COMMAND_OUTPUT>
635 #------------------------------------------------------------------------------
636 <COMMAND_INPUT>
637 lttng --mi xml list mysession2
638 </COMMAND_INPUT>
639 <COMMAND_RESULT>
640 0
641 </COMMAND_RESULT>
642 <COMMAND_OUTPUT>
643 <?xml version="1.0" encoding="UTF-8"?>
644 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
645 <name>list</name>
646 <output>
647 <sessions>
648 <session>
649 <name>mysession2</name>
650 <path>tcp4://172.0.0.1:5342/ [data: 5343]</path>
651 <enabled>false</enabled>
652 <snapshot_mode>0</snapshot_mode>
653 <live_timer_interval>1000000</live_timer_interval>
654 <domains/>
655 </session>
656 </sessions>
657 </output>
658 </command>
659 </COMMAND_OUTPUT>
660
661 </SCENARIO>
662
663
664 ####################################################################
665 # Scenario: Test "lttng list -k" with sample output
666 ####################################################################
667 <SCENARIO>
668 GetKernelProvider1
669 <COMMAND_INPUT>
670 lttng --mi xml list -k
671 </COMMAND_INPUT>
672 <COMMAND_RESULT>
673 0
674 </COMMAND_RESULT>
675 <COMMAND_OUTPUT>
676 <?xml version="1.0" encoding="UTF-8"?>
677 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
678 <name>list</name>
679 <output>
680 <domains>
681 <domain>
682 <type>KERNEL</type>
683 <buffer_type>PER_PID</buffer_type>
684 <events>
685 <event>
686 <name>sched_kthread_stop</name>
687 <type>TRACEPOINT</type>
688 <enabled>true</enabled>
689 <loglevel>TRACE_EMERG</loglevel>
690 <loglevel_type>ALL</loglevel_type>
691 </event>
692 <event>
693 <name>sched_kthread_stop_ret</name>
694 <type>TRACEPOINT</type>
695 <enabled>true</enabled>
696 <loglevel>TRACE_EMERG</loglevel>
697 <loglevel_type>ALL</loglevel_type>
698 </event>
699 <event>
700 <name>sched_wakeup_new</name>
701 <type>TRACEPOINT</type>
702 <enabled>true</enabled>
703 <loglevel>TRACE_EMERG</loglevel>
704 <loglevel_type>ALL</loglevel_type>
705 </event>
706 </events>
707 </domain>
708 </domains>
709 </output>
710 </command>
711 </COMMAND_OUTPUT>
712 </SCENARIO>
713
714 ####################################################################
715 # Scenario: Test "lttng list -k" with no kernel and no session daemon
716 ####################################################################
717 <SCENARIO>
718 ListWithNoKernel1
719 <COMMAND_INPUT>
720 lttng --mi xml list -k
721 </COMMAND_INPUT>
722 <COMMAND_RESULT>
723 1
724 </COMMAND_RESULT>
725 <COMMAND_OUTPUT>
726 Spawning session daemon
727 <COMMAND_ERROR_OUTPUT>
728 Error: Unable to list kernel events
729 </COMMAND_ERROR_OUTPUT>
730 </COMMAND_OUTPUT>
731 </SCENARIO>
732
733 ####################################################################
734 # Scenario: Test "lttng list -k" with no kernel and with session daemon
735 ####################################################################
736 <SCENARIO>
737 ListWithNoKernel2
738 <COMMAND_INPUT>
739 lttng --mi xml list -k
740 </COMMAND_INPUT>
741 <COMMAND_RESULT>
742 1
743 </COMMAND_RESULT>
744 <COMMAND_OUTPUT>
745 <COMMAND_ERROR_OUTPUT>
746 Error: Unable to list kernel events
747 </COMMAND_ERROR_OUTPUT>
748 </COMMAND_OUTPUT>
749 </SCENARIO>
750
751 ####################################################################
752 # Scenario: Test "lttng list -u" with sample output
753 ####################################################################
754 <SCENARIO>
755 GetUstProvider1
756 <COMMAND_INPUT>
757 lttng --mi xml list -u -f
758 </COMMAND_INPUT>
759 <COMMAND_RESULT>
760 0
761 </COMMAND_RESULT>
762 <COMMAND_OUTPUT>
763 <?xml version="1.0" encoding="UTF-8"?>
764 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
765 <name>list</name>
766 <output>
767 <domains>
768 <domain>
769 <type>UST</type>
770 <buffer_type>PER_PID</buffer_type>
771 <pids>
772 <pid>
773 <id>9379</id>
774 <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
775 <events>
776 <event>
777 <name>ust_tests_hello:tptest_sighandler</name>
778 <type>TRACEPOINT</type>
779 <enabled>true</enabled>
780 <loglevel>TRACE_DEBUG_MODULE</loglevel>
781 <loglevel_type>ALL</loglevel_type>
782 <event_fields/>
783 </event>
784 <event>
785 <name>ust_tests_hello:tptest</name>
786 <type>TRACEPOINT</type>
787 <enabled>true</enabled>
788 <loglevel>TRACE_INFO</loglevel>
789 <loglevel_type>ALL</loglevel_type>
790 <event_fields>
791 <event_field>
792 <name>doublefield</name>
793 <type>FLOAT</type>
794 <nowrite>0</nowrite>
795 </event_field>
796 <event_field>
797 <name>floatfield</name>
798 <type>FLOAT</type>
799 <nowrite>0</nowrite>
800 </event_field>
801 <event_field>
802 <name>stringfield</name>
803 <type>STRING</type>
804 <nowrite>0</nowrite>
805 </event_field>
806 </event_fields>
807 </event>
808 </events>
809 </pid>
810 <pid>
811 <id>4852</id>
812 <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
813 <events>
814 <event>
815 <name>ust_tests_hello:tptest_sighandler</name>
816 <type>TRACEPOINT</type>
817 <enabled>true</enabled>
818 <loglevel>TRACE_WARNING</loglevel>
819 <loglevel_type>ALL</loglevel_type>
820 <event_fields/>
821 </event>
822 <event>
823 <name>ust_tests_hello:tptest</name>
824 <type>TRACEPOINT</type>
825 <enabled>true</enabled>
826 <loglevel>TRACE_DEBUG_FUNCTION</loglevel>
827 <loglevel_type>ALL</loglevel_type>
828 <event_fields>
829 <event_field>
830 <name>doublefield</name>
831 <type>FLOAT</type>
832 <nowrite>0</nowrite>
833 </event_field>
834 <event_field>
835 <name>floatfield</name>
836 <type>FLOAT</type>
837 <nowrite>0</nowrite>
838 </event_field>
839 <event_field>
840 <name>stringfield</name>
841 <type>STRING</type>
842 <nowrite>0</nowrite>
843 </event_field>
844 </event_fields>
845 </event>
846 </events>
847 </pid>
848 </pids>
849 </domain>
850 </domains>
851 </output>
852 </command>
853 </COMMAND_OUTPUT>
854 </SCENARIO>
855
856 ####################################################################
857 # Scenario: Test "lttng list -u" with no UST provider available
858 ####################################################################
859 <SCENARIO>
860 GetUstProvider2
861 <COMMAND_INPUT>
862 lttng --mi xml list -u -f
863 </COMMAND_INPUT>
864 <COMMAND_RESULT>
865 0
866 </COMMAND_RESULT>
867 <COMMAND_OUTPUT>
868 <?xml version="1.0" encoding="UTF-8"?>
869 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
870 <name>list</name>
871 <output>
872 <domains>
873 <domain>
874 <type>UST</type>
875 <buffer_type>PER_PID</buffer_type>
876 <pids/>
877 </domain>
878 </domains>
879 </output>
880 </command>
881 </COMMAND_OUTPUT>
882 </SCENARIO>
883
884 ####################################################################
885 # Scenario: Test "lttng list -u" with no UST available (LTTng 2.0.x)
886 ####################################################################
887 <SCENARIO>
888 ListWithNoUst1
889 <COMMAND_INPUT>
890 lttng --mi xml list -u -f
891 </COMMAND_INPUT>
892 <COMMAND_RESULT>
893 1
894 </COMMAND_RESULT>
895 <COMMAND_OUTPUT>
896 <?xml version="1.0" encoding="UTF-8"?>
897 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0"><name>list</name><output/></command>
898 <COMMAND_ERROR_OUTPUT>
899 Error: Unable to list UST event fields: LTTng-UST tracer is not supported. Please rebuild lttng-tools with lttng-ust support enabled.
900 Error: Command error
901 </COMMAND_ERROR_OUTPUT>
902 </COMMAND_OUTPUT>
903 </SCENARIO>
904 ####################################################################
905 # Scenario: Test "lttng list -u" with no UST available and no session daemon
906 ####################################################################
907 <SCENARIO>
908 ListWithNoUst2
909 <COMMAND_INPUT>
910 lttng --mi xml list -u -f
911 </COMMAND_INPUT>
912 <COMMAND_RESULT>
913 1
914 </COMMAND_RESULT>
915 <COMMAND_OUTPUT>
916 <?xml version="1.0" encoding="UTF-8"?>
917 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0"><name>list</name><output/></command>
918 <COMMAND_ERROR_OUTPUT>
919 Error: Unable to list UST event fields: LTTng-UST tracer is not supported. Please rebuild lttng-tools with lttng-ust support enabled.
920 Error: Command error
921 </COMMAND_ERROR_OUTPUT>
922 </COMMAND_OUTPUT>
923 </SCENARIO>
924 ####################################################################
925 # Scenario: Test "lttng list -" with no kernel and with session daemon
926 ####################################################################
927 <SCENARIO>
928 ListWithNoUst3
929 <COMMAND_INPUT>
930 lttng --mi xml list -u -f
931 </COMMAND_INPUT>
932 <COMMAND_RESULT>
933 1
934 </COMMAND_RESULT>
935 <COMMAND_OUTPUT>
936 <?xml version="1.0" encoding="UTF-8"?>
937 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0"><name>list</name><output/></command>
938 <COMMAND_ERROR_OUTPUT>
939 Error: Unable to list kernel events: Tracing the kernel requires a root lttng-sessiond daemon, as well as "tracing" group membership or root user ID for the lttng client.
940 Error: Command Error
941 </COMMAND_ERROR_OUTPUT>
942 </COMMAND_OUTPUT>
943 </SCENARIO>
944
945 ####################################################################
946 # Scenario: Test "lttng list -u -f" with sample output (version 2.6.0)
947 ####################################################################
948 <SCENARIO>
949 GetUstProvider3
950 <COMMAND_INPUT>
951 lttng --mi xml list -u -f
952 </COMMAND_INPUT>
953 <COMMAND_RESULT>
954 0
955 </COMMAND_RESULT>
956 <COMMAND_OUTPUT>
957 <?xml version="1.0" encoding="UTF-8"?>
958 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
959 <name>list</name>
960 <output>
961 <domains>
962 <domain>
963 <type>UST</type>
964 <buffer_type>PER_PID</buffer_type>
965 <pids>
966 <pid>
967 <id>9379</id>
968 <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
969 <events>
970 <event>
971 <name>ust_tests_hello:tptest_sighandler</name>
972 <type>TRACEPOINT</type>
973 <enabled>true</enabled>
974 <loglevel>TRACE_DEBUG_MODULE</loglevel>
975 <loglevel_type>ALL</loglevel_type>
976 <event_fields/>
977 </event>
978 <event>
979 <name>ust_tests_hello:tptest</name>
980 <type>TRACEPOINT</type>
981 <enabled>true</enabled>
982 <loglevel>TRACE_INFO</loglevel>
983 <loglevel_type>ALL</loglevel_type>
984 <event_fields>
985 <event_field>
986 <name>doublefield</name>
987 <type>FLOAT</type>
988 <nowrite>0</nowrite>
989 </event_field>
990 <event_field>
991 <name>floatfield</name>
992 <type>FLOAT</type>
993 <nowrite>0</nowrite>
994 </event_field>
995 <event_field>
996 <name>stringfield</name>
997 <type>STRING</type>
998 <nowrite>0</nowrite>
999 </event_field>
1000 </event_fields>
1001 </event>
1002 </events>
1003 </pid>
1004 <pid>
1005 <id>4852</id>
1006 <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
1007 <events>
1008 <event>
1009 <name>ust_tests_hello:tptest_sighandler</name>
1010 <type>TRACEPOINT</type>
1011 <enabled>true</enabled>
1012 <loglevel>TRACE_WARNING</loglevel>
1013 <loglevel_type>ALL</loglevel_type>
1014 <event_fields/>
1015 </event>
1016 <event>
1017 <name>ust_tests_hello:tptest</name>
1018 <type>TRACEPOINT</type>
1019 <enabled>true</enabled>
1020 <loglevel>TRACE_DEBUG_FUNCTION</loglevel>
1021 <loglevel_type>ALL</loglevel_type>
1022 <event_fields>
1023 <event_field>
1024 <name>doublefield</name>
1025 <type>FLOAT</type>
1026 <nowrite>0</nowrite>
1027 </event_field>
1028 <event_field>
1029 <name>floatfield</name>
1030 <type>FLOAT</type>
1031 <nowrite>0</nowrite>
1032 </event_field>
1033 <event_field>
1034 <name>stringfield</name>
1035 <type>STRING</type>
1036 <nowrite>0</nowrite>
1037 </event_field>
1038 </event_fields>
1039 </event>
1040 </events>
1041 </pid>
1042 </pids>
1043 </domain>
1044 </domains>
1045 </output>
1046 </command>
1047 </COMMAND_OUTPUT>
1048 </SCENARIO>
1049 ####################################################################
1050 # Scenario: Test "lttng create <session>
1051 ####################################################################
1052 <SCENARIO>
1053 CreateSession1
1054 <COMMAND_INPUT>
1055 lttng --mi xml create mysession2
1056 </COMMAND_INPUT>
1057 <COMMAND_RESULT>
1058 0
1059 </COMMAND_RESULT>
1060 <COMMAND_OUTPUT>
1061 <?xml version="1.0" encoding="UTF-8"?>
1062 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1063 <name>create</name>
1064 <output>
1065 <session>
1066 <name>mysession2</name>
1067 <path>/home/user/lttng-traces/mysession2-20120209-095418</path>
1068 <enabled>false</enabled>
1069 <snapshot_mode>0</snapshot_mode>
1070 <live_timer_interval>0</live_timer_interval>
1071 </session>
1072 </output>
1073 <success>true</success>
1074 </command>
1075 </COMMAND_OUTPUT>
1076 </SCENARIO>
1077
1078 ####################################################################
1079 # Scenario: Test "lttng create <session>
1080 ####################################################################
1081 <SCENARIO>
1082 CreateSessionWithPrompt
1083 <COMMAND_INPUT>
1084 lttng --mi xml create mysession2
1085 </COMMAND_INPUT>
1086 <COMMAND_RESULT>
1087 0
1088 </COMMAND_RESULT>
1089 <COMMAND_OUTPUT>
1090 Prompt> Session mysession2 created.
1091 Traces will be written in /home/user/lttng-traces/mysession2-20120209-095418
1092 </COMMAND_OUTPUT>
1093 </SCENARIO>
1094
1095 ####################################################################
1096 # Scenario: Test "lttng create <session> with different variants
1097 # and errors
1098 ####################################################################
1099 <SCENARIO>
1100 CreateSessionVariants
1101 <COMMAND_INPUT>
1102 lttng --mi xml create alreadyExist
1103 </COMMAND_INPUT>
1104 <COMMAND_RESULT>
1105 1
1106 </COMMAND_RESULT>
1107 <COMMAND_OUTPUT>
1108 <?xml version="1.0" encoding="UTF-8"?>
1109 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1110 <name>create</name>
1111 <output/>
1112 <success>false</success>
1113 </command>
1114 <COMMAND_ERROR_OUTPUT>
1115 Warning: Session mysession2 already exists
1116 Error: Session name already exists
1117 </COMMAND_ERROR_OUTPUT>
1118 </COMMAND_OUTPUT>
1119
1120 <COMMAND_INPUT>
1121 lttng --mi xml create session with spaces
1122 </COMMAND_INPUT>
1123 <COMMAND_RESULT>
1124 0
1125 </COMMAND_RESULT>
1126 <COMMAND_OUTPUT>
1127 <?xml version="1.0" encoding="UTF-8"?>
1128 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1129 <name>create</name>
1130 <output>
1131 <session>
1132 <name>session with spaces</name>
1133 <path>/home/user/lttng-traces/session with spaces-20120209-095418</path>
1134 <enabled>false</enabled>
1135 <snapshot_mode>0</snapshot_mode>
1136 <live_timer_interval>0</live_timer_interval>
1137 </session>
1138 </output>
1139 <success>true</success>
1140 </command>
1141 </COMMAND_OUTPUT>
1142
1143 <COMMAND_INPUT>
1144 lttng --mi xml create wrongName
1145 </COMMAND_INPUT>
1146 <COMMAND_RESULT>
1147 0
1148 </COMMAND_RESULT>
1149 <COMMAND_OUTPUT>
1150 <?xml version="1.0" encoding="UTF-8"?>
1151 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1152 <name>create</name>
1153 <output>
1154 <session>
1155 <name>auto</name>
1156 <path>/home/user/lttng-traces/auto-20120209-095418</path>
1157 <enabled>false</enabled>
1158 <snapshot_mode>0</snapshot_mode>
1159 <live_timer_interval>0</live_timer_interval>
1160 </session>
1161 </output>
1162 <success>true</success>
1163 </command>
1164 </COMMAND_OUTPUT>
1165
1166 <COMMAND_INPUT>
1167 lttng --mi xml create wrongPath -o /home/user/hallo
1168 </COMMAND_INPUT>
1169 <COMMAND_RESULT>
1170 0
1171 </COMMAND_RESULT>
1172 <COMMAND_OUTPUT>
1173 <?xml version="1.0" encoding="UTF-8"?>
1174 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1175 <name>create</name>
1176 <output>
1177 <session>
1178 <name>wrongPath</name>
1179 <path>/home/user/lttng-traces/wrongPath-20120209-095418</path>
1180 <enabled>false</enabled>
1181 <snapshot_mode>0</snapshot_mode>
1182 <live_timer_interval>0</live_timer_interval>
1183 </session>
1184 </output>
1185 <success>true</success>
1186 </command>
1187 </COMMAND_OUTPUT>
1188
1189 <COMMAND_INPUT>
1190 lttng --mi xml create pathWithSpaces -o /home/user/hallo user/here
1191 </COMMAND_INPUT>
1192 <COMMAND_RESULT>
1193 0
1194 </COMMAND_RESULT>
1195 <COMMAND_OUTPUT>
1196 <?xml version="1.0" encoding="UTF-8"?>
1197 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1198 <name>create</name>
1199 <output>
1200 <session>
1201 <name>pathWithSpaces</name>
1202 <path>/home/user/hallo user/here/pathWithSpaces-20120209-095418</path>
1203 <enabled>false</enabled>
1204 <snapshot_mode>0</snapshot_mode>
1205 <live_timer_interval>0</live_timer_interval>
1206 </session>
1207 </output>
1208 <success>true</success>
1209 </command>
1210 </COMMAND_OUTPUT>
1211 </SCENARIO>
1212
1213 ####################################################################
1214 # Scenario: Test "lttng destroy <session>
1215 ####################################################################
1216
1217 <SCENARIO>
1218 DestroySession1
1219 <COMMAND_INPUT>
1220 lttng --mi xml destroy mysession2
1221 </COMMAND_INPUT>
1222 <COMMAND_RESULT>
1223 0
1224 </COMMAND_RESULT>
1225 <COMMAND_OUTPUT>
1226 <?xml version="1.0" encoding="UTF-8"?>
1227 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1228 <name>destroy</name>
1229 <output>
1230 <sessions>
1231 <session>
1232 <name>mysession2</name>
1233 <path>/home/user/lttng-traces/mysession2-20140812-160632</path>
1234 <enabled>false</enabled>
1235 <snapshot_mode>0</snapshot_mode>
1236 <live_timer_interval>0</live_timer_interval>
1237 </session>
1238 </sessions>
1239 </output>
1240 <success>true</success>
1241 </command>
1242 </COMMAND_OUTPUT>
1243 </SCENARIO>
1244
1245 ####################################################################
1246 # Scenario: Test "lttng enable-channel ..." with different inputs
1247 ####################################################################
1248
1249 <SCENARIO>
1250 ChannelHandling
1251 <COMMAND_INPUT>
1252 lttng --mi xml enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100 -C 0 -W 10
1253 </COMMAND_INPUT>
1254 <COMMAND_RESULT>
1255 0
1256 </COMMAND_RESULT>
1257 <COMMAND_OUTPUT>
1258 Kernel channel mychannel0 enabled for session mysession2
1259 Kernel channel mychannel1 enabled for session mysession2
1260 </COMMAND_OUTPUT>
1261
1262 <COMMAND_INPUT>
1263 lttng --mi xml enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100
1264 </COMMAND_INPUT>
1265 <COMMAND_RESULT>
1266 0
1267 </COMMAND_RESULT>
1268 <COMMAND_OUTPUT>
1269 <?xml version="1.0" encoding="UTF-8"?>
1270 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1271 <name>enable-channel</name>
1272 <output>
1273 <channels>
1274 <channel>
1275 <name>mychannel0</name>
1276 <enabled>false</enabled>
1277 <attributes>
1278 <overwrite_mode>OVERWRITE</overwrite_mode>
1279 <subbuffer_size>16384</subbuffer_size>
1280 <subbuffer_count>2</subbuffer_count>
1281 <switch_timer_interval>200</switch_timer_interval>
1282 <read_timer_interval>100</read_timer_interval>
1283 <output_type>SPLICE</output_type>
1284 <tracefile_size>0</tracefile_size>
1285 <tracefile_count>0</tracefile_count>
1286 <live_timer_interval>4294967295</live_timer_interval>
1287 </attributes>
1288 <success>true</success>
1289 </channel>
1290 <channel>
1291 <name>mychannel1</name>
1292 <enabled>false</enabled>
1293 <attributes>
1294 <overwrite_mode>OVERWRITE</overwrite_mode>
1295 <subbuffer_size>16384</subbuffer_size>
1296 <subbuffer_count>2</subbuffer_count>
1297 <switch_timer_interval>200</switch_timer_interval>
1298 <read_timer_interval>100</read_timer_interval>
1299 <output_type>SPLICE</output_type>
1300 <tracefile_size>0</tracefile_size>
1301 <tracefile_count>0</tracefile_count>
1302 <live_timer_interval>4294967295</live_timer_interval>
1303 </attributes>
1304 <success>true</success>
1305 </channel>
1306 </channels>
1307 </output>
1308 <success>true</success>
1309 </command>
1310 </COMMAND_OUTPUT>
1311
1312 <COMMAND_INPUT>
1313 lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 -C 0 -W 20
1314 </COMMAND_INPUT>
1315 <COMMAND_RESULT>
1316 0
1317 </COMMAND_RESULT>
1318 <COMMAND_OUTPUT>
1319 UST channel channel0 enabled for session mysession2
1320 </COMMAND_OUTPUT>
1321
1322 <COMMAND_INPUT>
1323 lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200
1324 </COMMAND_INPUT>
1325 <COMMAND_RESULT>
1326 0
1327 </COMMAND_RESULT>
1328 <COMMAND_OUTPUT>
1329 <?xml version="1.0" encoding="UTF-8"?>
1330 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1331 <name>enable-channel</name>
1332 <output>
1333 <channels>
1334 <channel>
1335 <name>ustChannel</name>
1336 <enabled>false</enabled>
1337 <attributes>
1338 <overwrite_mode>OVERWRITE</overwrite_mode>
1339 <subbuffer_size>32768</subbuffer_size>
1340 <subbuffer_count>2</subbuffer_count>
1341 <switch_timer_interval>100</switch_timer_interval>
1342 <read_timer_interval>200</read_timer_interval>
1343 <output_type>MMAP</output_type>
1344 <tracefile_size>0</tracefile_size>
1345 <tracefile_count>0</tracefile_count>
1346 <live_timer_interval>4294967295</live_timer_interval>
1347 </attributes>
1348 <success>true</success>
1349 </channel>
1350 </channels>
1351 </output>
1352 <success>true</success>
1353 </command>
1354 </COMMAND_OUTPUT>
1355
1356 <COMMAND_INPUT>
1357 lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 --buffers-uid -C 0 -W 20
1358 </COMMAND_INPUT>
1359 <COMMAND_RESULT>
1360 0
1361 </COMMAND_RESULT>
1362 <COMMAND_OUTPUT>
1363 UST channel channel0 enabled for session mysession2
1364 </COMMAND_OUTPUT>
1365
1366 <COMMAND_INPUT>
1367 lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --buffers-pid
1368 </COMMAND_INPUT>
1369 <COMMAND_RESULT>
1370 0
1371 </COMMAND_RESULT>
1372 <COMMAND_OUTPUT>
1373 <?xml version="1.0" encoding="UTF-8"?>
1374 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1375 <name>enable-channel</name>
1376 <output>
1377 <channels>
1378 <channel>
1379 <name>ustChannel</name>
1380 <enabled>false</enabled>
1381 <attributes>
1382 <overwrite_mode>OVERWRITE</overwrite_mode>
1383 <subbuffer_size>4096</subbuffer_size>
1384 <subbuffer_count>4</subbuffer_count>
1385 <switch_timer_interval>0</switch_timer_interval>
1386 <read_timer_interval>0</read_timer_interval>
1387 <output_type>MMAP</output_type>
1388 <tracefile_size>0</tracefile_size>
1389 <tracefile_count>0</tracefile_count>
1390 <live_timer_interval>4294967295</live_timer_interval>
1391 </attributes>
1392 <success>true</success>
1393 </channel>
1394 </channels>
1395 </output>
1396 <success>true</success>
1397 </command>
1398 </COMMAND_OUTPUT>
1399
1400 <COMMAND_INPUT>
1401 lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 2 --switch-timer 100 --read-timer 200 --buffers-uid
1402 </COMMAND_INPUT>
1403 <COMMAND_RESULT>
1404 0
1405 </COMMAND_RESULT>
1406 <COMMAND_OUTPUT>
1407 <?xml version="1.0" encoding="UTF-8"?>
1408 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1409 <name>enable-channel</name>
1410 <output>
1411 <channels>
1412 <channel>
1413 <name>ustChannel</name>
1414 <enabled>false</enabled>
1415 <attributes>
1416 <overwrite_mode>OVERWRITE</overwrite_mode>
1417 <subbuffer_size>32768</subbuffer_size>
1418 <subbuffer_count>2</subbuffer_count>
1419 <switch_timer_interval>100</switch_timer_interval>
1420 <read_timer_interval>200</read_timer_interval>
1421 <output_type>MMAP</output_type>
1422 <tracefile_size>0</tracefile_size>
1423 <tracefile_count>0</tracefile_count>
1424 <live_timer_interval>4294967295</live_timer_interval>
1425 </attributes>
1426 <success>true</success>
1427 </channel>
1428 </channels>
1429 </output>
1430 <success>true</success>
1431 </command>
1432 </COMMAND_OUTPUT>
1433
1434
1435 <COMMAND_INPUT>
1436 lttng --mi xml enable-channel mychannel0,mychannel1 -k -s mysession2
1437 </COMMAND_INPUT>
1438 <COMMAND_RESULT>
1439 0
1440 </COMMAND_RESULT>
1441 <COMMAND_OUTPUT>
1442 <?xml version="1.0" encoding="UTF-8"?>
1443 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1444 <name>enable-channel</name>
1445 <output>
1446 <channels>
1447 <channel>
1448 <name>mychannel0</name>
1449 <enabled>false</enabled>
1450 <attributes>
1451 <overwrite_mode>DISCARD</overwrite_mode>
1452 <subbuffer_size>262144</subbuffer_size>
1453 <subbuffer_count>4</subbuffer_count>
1454 <switch_timer_interval>0</switch_timer_interval>
1455 <read_timer_interval>200000</read_timer_interval>
1456 <output_type>SPLICE</output_type>
1457 <tracefile_size>0</tracefile_size>
1458 <tracefile_count>0</tracefile_count>
1459 <live_timer_interval>4294967295</live_timer_interval>
1460 </attributes>
1461 <success>true</success>
1462 </channel>
1463 <channel>
1464 <name>mychannel1</name>
1465 <enabled>false</enabled>
1466 <attributes>
1467 <overwrite_mode>DISCARD</overwrite_mode>
1468 <subbuffer_size>262144</subbuffer_size>
1469 <subbuffer_count>4</subbuffer_count>
1470 <switch_timer_interval>0</switch_timer_interval>
1471 <read_timer_interval>200000</read_timer_interval>
1472 <output_type>SPLICE</output_type>
1473 <tracefile_size>0</tracefile_size>
1474 <tracefile_count>0</tracefile_count>
1475 <live_timer_interval>4294967295</live_timer_interval>
1476 </attributes>
1477 <success>true</success>
1478 </channel>
1479 </channels>
1480 </output>
1481 <success>true</success>
1482 </command>
1483 </COMMAND_OUTPUT>
1484
1485 <COMMAND_INPUT>
1486 lttng --mi xml enable-channel ustChannel -u -s mysession2
1487 </COMMAND_INPUT>
1488 <COMMAND_RESULT>
1489 0
1490 </COMMAND_RESULT>
1491 <COMMAND_OUTPUT>
1492 <?xml version="1.0" encoding="UTF-8"?>
1493 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1494 <name>enable-channel</name>
1495 <output>
1496 <channels>
1497 <channel>
1498 <name>ustChannel</name>
1499 <enabled>false</enabled>
1500 <attributes>
1501 <overwrite_mode>DISCARD</overwrite_mode>
1502 <subbuffer_size>131072</subbuffer_size>
1503 <subbuffer_count>4</subbuffer_count>
1504 <switch_timer_interval>0</switch_timer_interval>
1505 <read_timer_interval>0</read_timer_interval>
1506 <output_type>MMAP</output_type>
1507 <tracefile_size>0</tracefile_size>
1508 <tracefile_count>0</tracefile_count>
1509 <live_timer_interval>4294967295</live_timer_interval>
1510 </attributes>
1511 <success>true</success>
1512 </channel>
1513 </channels>
1514 </output>
1515 <success>true</success>
1516 </command>
1517 </COMMAND_OUTPUT>
1518
1519 <COMMAND_INPUT>
1520 lttng --mi xml disable-channel mychannel0,mychannel1 -k -s mysession2
1521 </COMMAND_INPUT>
1522 <COMMAND_RESULT>
1523 0
1524 </COMMAND_RESULT>
1525 <COMMAND_OUTPUT>
1526 <?xml version="1.0" encoding="UTF-8"?>
1527 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1528 <name>disable-channel</name>
1529 <output>
1530 <channels>
1531 <channel>
1532 <name>mychannel0</name>
1533 <enabled>false</enabled>
1534 <success>true</success>
1535 </channel>
1536 <channel>
1537 <name>mychannel1</name>
1538 <enabled>false</enabled>
1539 <success>true</success>
1540 </channel>
1541 </channels>
1542 </output>
1543 <success>true</success>
1544 </command>
1545 </COMMAND_OUTPUT>
1546
1547 <COMMAND_INPUT>
1548 lttng --mi xml disable-channel ustChannel -u -s mysession2
1549 </COMMAND_INPUT>
1550 <COMMAND_RESULT>
1551 0
1552 </COMMAND_RESULT>
1553 <COMMAND_OUTPUT>
1554 <?xml version="1.0" encoding="UTF-8"?>
1555 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1556 <name>disable-channel</name>
1557 <output>
1558 <channels>
1559 <channel>
1560 <name>ustChannel</name>
1561 <enabled>false</enabled>
1562 <success>true</success>
1563 </channel>
1564 </channels>
1565 </output>
1566 <success>true</success>
1567 </command>
1568 </COMMAND_OUTPUT>
1569 </SCENARIO>
1570
1571
1572 ####################################################################
1573 # Scenario: Test "lttng --mi xml enable-events ..." with different inputs
1574 ####################################################################
1575 <SCENARIO>
1576 EventHandling
1577
1578 # Tracepoint test cases
1579
1580 <COMMAND_INPUT>
1581 lttng --mi xml enable-event block_rq_remap,block_bio_remap,softirq_entry -k -s mysession2 --tracepoint
1582 </COMMAND_INPUT>
1583 <COMMAND_RESULT>
1584 0
1585 </COMMAND_RESULT>
1586 <COMMAND_OUTPUT>
1587 <?xml version="1.0" encoding="UTF-8"?>
1588 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1589 <name>enable-event</name>
1590 <output>
1591 <events>
1592 <event>
1593 <name>block_rq_remap</name>
1594 <type>TRACEPOINT</type>
1595 <enabled>true</enabled>
1596 <loglevel>TRACE_EMERG</loglevel>
1597 <loglevel_type>ALL</loglevel_type>
1598 <success>true</success>
1599 </event>
1600 <event>
1601 <name>block_bio_remap</name>
1602 <type>TRACEPOINT</type>
1603 <enabled>true</enabled>
1604 <loglevel>TRACE_EMERG</loglevel>
1605 <loglevel_type>ALL</loglevel_type>
1606 <success>true</success>
1607 </event>
1608 <event>
1609 <name>softirq_entry</name>
1610 <type>TRACEPOINT</type>
1611 <enabled>true</enabled>
1612 <loglevel>TRACE_EMERG</loglevel>
1613 <loglevel_type>ALL</loglevel_type>
1614 <success>true</success>
1615 </event>
1616 </events>
1617 </output>
1618 <success>true</success>
1619 </command>
1620 </COMMAND_OUTPUT>
1621
1622 <COMMAND_INPUT>
1623 lttng --mi xml enable-event -a -k -s mysession2 -c mychannel --tracepoint
1624 </COMMAND_INPUT>
1625 <COMMAND_RESULT>
1626 0
1627 </COMMAND_RESULT>
1628 <COMMAND_OUTPUT>
1629 <?xml version="1.0" encoding="UTF-8"?>
1630 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1631 <name>enable-event</name>
1632 <output>
1633 <events>
1634 <event>
1635 <name>*</name>
1636 <type>TRACEPOINT</type>
1637 <enabled>true</enabled>
1638 <loglevel>TRACE_EMERG</loglevel>
1639 <loglevel_type>ALL</loglevel_type>
1640 <success>true</success>
1641 </event>
1642 </events>
1643 </output>
1644 <success>true</success>
1645 </command>
1646 </COMMAND_OUTPUT>
1647
1648 <COMMAND_INPUT>
1649 lttng --mi xml enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint
1650 </COMMAND_INPUT>
1651 <COMMAND_RESULT>
1652 0
1653 </COMMAND_RESULT>
1654 <COMMAND_OUTPUT>
1655 <?xml version="1.0" encoding="UTF-8"?>
1656 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1657 <name>enable-event</name>
1658 <output>
1659 <events>
1660 <event>
1661 <name>ust_tests_hello:tptest_sighandler</name>
1662 <type>TRACEPOINT</type>
1663 <enabled>true</enabled>
1664 <success>true</success>
1665 </event>
1666 </events>
1667 </output>
1668 <success>true</success>
1669 </command>
1670 </COMMAND_OUTPUT>
1671
1672 <COMMAND_INPUT>
1673 lttng --mi xml enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint --filter intfield==10
1674 </COMMAND_INPUT>
1675 <COMMAND_RESULT>
1676 0
1677 </COMMAND_RESULT>
1678 <COMMAND_OUTPUT>
1679 <?xml version="1.0" encoding="UTF-8"?>
1680 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1681 <name>enable-event</name>
1682 <output>
1683 <events>
1684 <event>
1685 <name>ust_tests_hello:tptest_sighandler</name>
1686 <type>TRACEPOINT</type>
1687 <enabled>true</enabled>
1688 <success>true</success>
1689 </event>
1690 </events>
1691 </output>
1692 <success>true</success>
1693 </command>
1694 </COMMAND_OUTPUT>
1695
1696 <COMMAND_INPUT>
1697 lttng --mi xml enable-event -a -u -s mysession2 -c mychannel --tracepoint
1698 </COMMAND_INPUT>
1699 <COMMAND_RESULT>
1700 0
1701 </COMMAND_RESULT>
1702 <COMMAND_OUTPUT>
1703 <?xml version="1.0" encoding="UTF-8"?>
1704 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1705 <name>enable-event</name>
1706 <output>
1707 <events>
1708 <event>
1709 <name>*</name>
1710 <type>TRACEPOINT</type>
1711 <enabled>true</enabled>
1712 <success>true</success>
1713 </event>
1714 </events>
1715 </output>
1716 <success>true</success>
1717 </command>
1718 </COMMAND_OUTPUT>
1719
1720 # Syscall test cases
1721
1722 <COMMAND_INPUT>
1723 lttng --mi xml enable-event -a -k -s mysession2 --syscall
1724 </COMMAND_INPUT>
1725 <COMMAND_RESULT>
1726 0
1727 </COMMAND_RESULT>
1728 <COMMAND_OUTPUT>
1729 <?xml version="1.0" encoding="UTF-8"?>
1730 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1731 <name>enable-event</name>
1732 <output>
1733 <events>
1734 <event>
1735 <name>*</name>
1736 <type>SYSCALL</type>
1737 <enabled>true</enabled>
1738 <success>true</success>
1739 </event>
1740 </events>
1741 </output>
1742 <success>true</success>
1743 </command>
1744 </COMMAND_OUTPUT>
1745
1746 <COMMAND_INPUT>
1747 lttng --mi xml enable-event -a -k -s mysession2 -c mychannel --syscall
1748 </COMMAND_INPUT>
1749 <COMMAND_RESULT>
1750 0
1751 </COMMAND_RESULT>
1752 <COMMAND_OUTPUT>
1753 <?xml version="1.0" encoding="UTF-8"?>
1754 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1755 <name>enable-event</name>
1756 <output>
1757 <events>
1758 <event>
1759 <name>*</name>
1760 <type>SYSCALL</type>
1761 <enabled>true</enabled>
1762 <success>true</success>
1763 </event>
1764 </events>
1765 </output>
1766 <success>true</success>
1767 </command>
1768 </COMMAND_OUTPUT>
1769
1770 # dynamic probe/function probe test cases
1771
1772 <COMMAND_INPUT>
1773 lttng --mi xml enable-event myevent0 -k -s mysession2 --function 0xc0101340
1774 </COMMAND_INPUT>
1775 <COMMAND_RESULT>
1776 0
1777 </COMMAND_RESULT>
1778 <COMMAND_OUTPUT>
1779 <?xml version="1.0" encoding="UTF-8"?>
1780 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1781 <name>enable-event</name>
1782 <output>
1783 <events>
1784 <event>
1785 <name>myevent0</name>
1786 <type>FUNCTION</type>
1787 <enabled>false</enabled>
1788 <success>true</success>
1789 </event>
1790 </events>
1791 </output>
1792 <success>true</success>
1793 </command>
1794 </COMMAND_OUTPUT>
1795
1796 <COMMAND_INPUT>
1797 lttng --mi xml enable-event myevent1 -k -s mysession2 -c mychannel --probe init_post
1798 </COMMAND_INPUT>
1799 <COMMAND_RESULT>
1800 0
1801 </COMMAND_RESULT>
1802 <COMMAND_OUTPUT>
1803 <?xml version="1.0" encoding="UTF-8"?>
1804 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1805 <name>enable-event</name>
1806 <output>
1807 <events>
1808 <event>
1809 <name>myevent1</name>
1810 <type>PROBE</type>
1811 <enabled>false</enabled>
1812 <offset>0</offset>
1813 <symbol_name>init_post</symbol_name>
1814 <success>true</success>
1815 </event>
1816 </events>
1817 </output>
1818 <success>true</success>
1819 </command>
1820
1821 </COMMAND_OUTPUT>
1822
1823 # log level test cases
1824
1825 <COMMAND_INPUT>
1826 lttng --mi xml enable-event myevent4 -u -s mysession2 --loglevel-only TRACE_DEBUG
1827 </COMMAND_INPUT>
1828 <COMMAND_RESULT>
1829 0
1830 </COMMAND_RESULT>
1831 <COMMAND_OUTPUT>
1832 <?xml version="1.0" encoding="UTF-8"?>
1833 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1834 <name>enable-event</name>
1835 <output>
1836 <events>
1837 <event>
1838 <name>myevent4</name>
1839 <type>TRACEPOINT</type>
1840 <enabled>true</enabled>
1841 <loglevel>TRACE_DEBUG</loglevel>
1842 <loglevel_type>SINGLE</loglevel_type>
1843 <success>true</success>
1844 </event>
1845 </events>
1846 </output>
1847 <success>true</success>
1848 </command>
1849 </COMMAND_OUTPUT>
1850
1851 <COMMAND_INPUT>
1852 lttng --mi xml enable-event myevent5 -u -s mysession2 -c mychannel --loglevel TRACE_DEBUG_FUNCTION
1853 </COMMAND_INPUT>
1854 <COMMAND_RESULT>
1855 0
1856 </COMMAND_RESULT>
1857 <COMMAND_OUTPUT>
1858 <?xml version="1.0" encoding="UTF-8"?>
1859 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
1860 <name>enable-event</name>
1861 <output>
1862 <events>
1863 <event>
1864 <name>myevent5</name>
1865 <type>TRACEPOINT</type>
1866 <enabled>true</enabled>
1867 <loglevel>TRACE_DEBUG_FUNCTION</loglevel>
1868 <loglevel_type>RANGE</loglevel_type>
1869 <success>true</success>
1870 </event>
1871 </events>
1872 </output>
1873 <success>true</success>
1874 </command>
1875 </COMMAND_OUTPUT>
1876
1877 </SCENARIO>
1878
1879 ####################################################################
1880 # Scenario: Test "lttng add-context -h" and lttng --mi xml add-context ..." with different inputs
1881 ####################################################################
1882
1883 <SCENARIO>
1884 ContextHandling
1885
1886 <COMMAND_INPUT>
1887 lttng --mi xml add-context -h
1888 </COMMAND_INPUT>
1889 <COMMAND_RESULT>
1890 0
1891 </COMMAND_RESULT>
1892 <COMMAND_OUTPUT>
1893 usage: lttng add-context -t TYPE [-k|-u] [OPTIONS]
1894
1895 If no channel is given (-c), the context is added to
1896 all channels.
1897
1898 Otherwise the context is added only to the channel (-c).
1899
1900 Exactly one domain (-k or -u) must be specified.
1901
1902 Options:
1903 -h, --help Show this help
1904 --list-options Simple listing of options
1905 -s, --session NAME Apply to session name
1906 -c, --channel NAME Apply to channel
1907 -k, --kernel Apply to the kernel tracer
1908 -u, --userspace Apply to the user-space tracer
1909
1910 Context:
1911 -t, --type TYPE Context type. You can repeat that option on
1912 the command line to specify multiple contexts at once.
1913 (--kernel preempts --userspace)
1914 TYPE can be one of the strings below:
1915 pid, procname, prio, nice, vpid, tid, pthread_id,
1916 vtid, ppid, vppid, perf:cpu:cpu-cycles, perf:cpu:cycles
1917 Note that the vpid, vppid and vtid context types represent the virtual process id,
1918 virtual parent process id and virtual thread id as seen from the current execution context
1919 as opposed to the pid, ppid and tid which are kernel internal data structures.
1920
1921 Example:
1922 This command will add the context information 'prio' and two per-cpu
1923 perf counters (hardware branch misses and cache misses), to all channels
1924 in the trace data output:
1925 # lttng add-context -k -t prio -t perf:cpu:branch-misses -t perf:cpu:cache-misses
1926 </COMMAND_OUTPUT>
1927
1928 <COMMAND_INPUT>
1929 lttng --mi xml add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
1930 </COMMAND_INPUT>
1931 <COMMAND_RESULT>
1932 0
1933 </COMMAND_RESULT>
1934 <COMMAND_OUTPUT>
1935 UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
1936 UST context pid added to event sched_kthread_stop_ret channel mychannel
1937 </COMMAND_OUTPUT>
1938 </SCENARIO>
1939
1940 ####################################################################
1941 # Scenario: Test "lttng --mi xml add-context --list"
1942 ####################################################################
1943
1944 <SCENARIO>
1945 ListContext28
1946
1947 <COMMAND_INPUT>
1948 lttng --mi xml add-context --list
1949 </COMMAND_INPUT>
1950 <COMMAND_RESULT>
1951 0
1952 </COMMAND_RESULT>
1953 <COMMAND_OUTPUT>
1954 pid
1955 procname
1956 prio
1957 nice
1958 vpid
1959 tid
1960 pthread_id
1961 vtid
1962 ppid
1963 vppid
1964 perf:cpu:cpu-cycles
1965 perf:cpu:cycles
1966 </COMMAND_OUTPUT>
1967 </SCENARIO>
1968
1969 <SCENARIO>
1970 ContextErrorHandling
1971
1972 <COMMAND_INPUT>
1973 lttng --mi xml add-context -h
1974 </COMMAND_INPUT>
1975 <COMMAND_RESULT>
1976 1
1977 </COMMAND_RESULT>
1978 <COMMAND_OUTPUT>
1979 usage: lttng add-context -t TYPE
1980
1981 If no channel and no event is given (-c/-e), the context
1982 will be added to all events and all channels.
1983 Otherwise the context will be added only to the channel (-c)
1984 and/or event (-e) indicated.
1985 Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
1986
1987 Options:
1988 -h, --help Show this help
1989 --list-options Simple listing of options
1990 -s, --session NAME Apply to session name
1991 -c, --channel NAME Apply to channel
1992 -e, --event NAME Apply to event
1993 -k, --kernel Apply to the kernel tracer
1994 -u, --userspace Apply to the user-space tracer
1995 -t, --type TYPE Context type. You can repeat that option on
1996 the command line to specify multiple contexts at once.
1997 (--kernel preempts --userspace)
1998 TYPE can be one of the strings below:
1999 pid, procname, prio, nice, vpid, tid, pthread_id,
2000 vtid, ppid, vppid, perf:cpu-cycles, perf:cycles
2001 Example:
2002 This command will add the context information 'prio' and two perf
2003 counters (hardware branch misses and cache misses), to all events
2004 in the trace data output:
2005 # lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
2006
2007 </COMMAND_OUTPUT>
2008
2009 <COMMAND_INPUT>
2010 lttng --mi xml add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
2011 </COMMAND_INPUT>
2012 <COMMAND_RESULT>
2013 1
2014 </COMMAND_RESULT>
2015 <COMMAND_OUTPUT>
2016 UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
2017 UST context pid added to event sched_kthread_stop_ret channel mychannel
2018 </COMMAND_OUTPUT>
2019
2020 </SCENARIO>
2021
2022 ####################################################################
2023 # Scenario: Test "lttng create <session> with LTTng 2.1 options
2024 ####################################################################
2025 <SCENARIO>
2026 CreateSessionLttng2.1
2027
2028 <COMMAND_INPUT>
2029 lttng --mi xml create mysession -U net://172.0.0.1
2030 </COMMAND_INPUT>
2031 <COMMAND_RESULT>
2032 0
2033 </COMMAND_RESULT>
2034 <COMMAND_OUTPUT>
2035 <?xml version="1.0" encoding="UTF-8"?>
2036 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
2037 <name>create</name>
2038 <output>
2039 <session>
2040 <name>mysession</name>
2041 <path>tcp4://172.0.0.1:5342/mysession-20140813-095804 [data: 5343]</path>
2042 <enabled>false</enabled>
2043 <snapshot_mode>0</snapshot_mode>
2044 <live_timer_interval>0</live_timer_interval>
2045 </session>
2046 </output>
2047 <success>true</success>
2048 </command>
2049 </COMMAND_OUTPUT>
2050
2051 <COMMAND_INPUT>
2052 lttng --mi xml create mysession -U file:///tmp
2053 </COMMAND_INPUT>
2054 <COMMAND_RESULT>
2055 0
2056 </COMMAND_RESULT>
2057 <COMMAND_OUTPUT>
2058 <?xml version="1.0" encoding="UTF-8"?>
2059 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
2060 <name>create</name>
2061 <output>
2062 <session>
2063 <name>mysession</name>
2064 <path>/tmp</path>
2065 <enabled>false</enabled>
2066 <snapshot_mode>0</snapshot_mode>
2067 <live_timer_interval>0</live_timer_interval>
2068 </session>
2069 </output>
2070 <success>true</success>
2071 </command>
2072 </COMMAND_OUTPUT>
2073
2074 <COMMAND_INPUT>
2075 lttng --mi xml create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
2076 </COMMAND_INPUT>
2077 <COMMAND_RESULT>
2078 0
2079 </COMMAND_RESULT>
2080 <COMMAND_OUTPUT>
2081 <?xml version="1.0" encoding="UTF-8"?>
2082 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
2083 <name>create</name>
2084 <output>
2085 <session>
2086 <name>mysession</name>
2087 <path>tcp4://172.0.0.1:5342/ [data: 5343]</path>
2088 <enabled>false</enabled>
2089 <snapshot_mode>0</snapshot_mode>
2090 <live_timer_interval>0</live_timer_interval>
2091 </session>
2092 </output>
2093 <success>true</success>
2094 </command>
2095 </COMMAND_OUTPUT>
2096
2097 <COMMAND_INPUT>
2098 lttng --mi xml create mysession -U 172.0.0.1:1234:2345
2099 </COMMAND_INPUT>
2100 <COMMAND_RESULT>
2101 0
2102 </COMMAND_RESULT>
2103 <COMMAND_OUTPUT>
2104 <?xml version="1.0" encoding="UTF-8"?>
2105 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
2106 <name>create</name>
2107 <output>
2108 <session>
2109 <name>mysession</name>
2110 <path>tcp4://172.0.0.1:1234/mysession-20140813-102225 [data: 2345]</path>
2111 <enabled>false</enabled>
2112 <snapshot_mode>0</snapshot_mode>
2113 <live_timer_interval>0</live_timer_interval>
2114 </session>
2115 </output>
2116 <success>true</success>
2117 </command>
2118 </COMMAND_OUTPUT>
2119
2120 <COMMAND_INPUT>
2121 lttng --mi xml destroy mysession
2122 </COMMAND_INPUT>
2123 <COMMAND_RESULT>
2124 0
2125 </COMMAND_RESULT>
2126 <COMMAND_OUTPUT>
2127 <?xml version="1.0" encoding="UTF-8"?>
2128 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
2129 <name>destroy</name>
2130 <output>
2131 <sessions>
2132 <session>
2133 <name>mysession</name>
2134 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2135 <enabled>false</enabled>
2136 <snapshot_mode>0</snapshot_mode>
2137 <live_timer_interval>0</live_timer_interval>
2138 </session>
2139 </sessions>
2140 </output>
2141 <success>true</success>
2142 </command>
2143 </COMMAND_OUTPUT>
2144
2145 <COMMAND_INPUT>
2146 lttng --mi xml -vvv create mysession -U net://172.0.0.1
2147 </COMMAND_INPUT>
2148 <COMMAND_RESULT>
2149 0
2150 </COMMAND_RESULT>
2151 <COMMAND_OUTPUT>
2152 DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
2153 DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
2154 DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
2155 DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
2156 Session mysession created.
2157 Traces will be written in net://172.0.0.1
2158 DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
2159 </COMMAND_OUTPUT>
2160
2161 </SCENARIO>
2162
2163 ####################################################################
2164 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
2165 ####################################################################
2166 <SCENARIO>
2167 CreateSessionSnapshot
2168 <COMMAND_INPUT>
2169 lttng --mi xml create mysession --snapshot
2170 </COMMAND_INPUT>
2171 <COMMAND_RESULT>
2172 0
2173 </COMMAND_RESULT>
2174 <COMMAND_OUTPUT>
2175 <?xml version="1.0" encoding="UTF-8"?>
2176 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
2177 <name>create</name>
2178 <output>
2179 <session>
2180 <name>mysession</name>
2181 <path/>
2182 <enabled>false</enabled>
2183 <snapshot_mode>1</snapshot_mode>
2184 <live_timer_interval>4294967295</live_timer_interval>
2185 </session>
2186 </output>
2187 <success>true</success>
2188 </command>
2189 </COMMAND_OUTPUT>
2190 #------------------------------------------------------------------------------
2191 <COMMAND_INPUT>
2192 lttng --mi xml snapshot list-output -s mysession
2193 </COMMAND_INPUT>
2194 <COMMAND_RESULT>
2195 0
2196 </COMMAND_RESULT>
2197 <COMMAND_OUTPUT>
2198 <?xml version="1.0" encoding="UTF-8"?>
2199 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
2200 <name>snapshot</name>
2201 <output>
2202 <snapshot_action>
2203 <name>list-output</name>
2204 <output>
2205 <session>
2206 <name>mysession</name>
2207 <snapshots>
2208 <snapshot>
2209 <id>1</id>
2210 <name>snapshot-1</name>
2211 <ctrl_url>/home/user/lttng-traces/mysession-20130913-141651</ctrl_url>
2212 <data_url/>
2213 <max_size>0</max_size>
2214 </snapshot>
2215 </snapshots>
2216 </session>
2217 </output>
2218 </snapshot_action>
2219 </output>
2220 <success>true</success>
2221 </command>
2222 </COMMAND_OUTPUT>
2223 #------------------------------------------------------------------------------
2224 <COMMAND_INPUT>
2225 lttng --mi xml list
2226 </COMMAND_INPUT>
2227 <COMMAND_RESULT>
2228 0
2229 </COMMAND_RESULT>
2230 <COMMAND_OUTPUT>
2231 <?xml version="1.0" encoding="UTF-8"?>
2232 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
2233 <name>list</name>
2234 <output>
2235 <sessions>
2236 <session>
2237 <name>mysession</name>
2238 <path/>
2239 <enabled>false</enabled>
2240 <snapshot_mode>1</snapshot_mode>
2241 <live_timer_interval>4294967295</live_timer_interval>
2242 </session>
2243 </sessions>
2244 </output>
2245 </command>
2246 </COMMAND_OUTPUT>
2247 #------------------------------------------------------------------------------
2248 <COMMAND_INPUT>
2249 lttng --mi xml snapshot record -s mysession
2250 </COMMAND_INPUT>
2251 <COMMAND_RESULT>
2252 0
2253 </COMMAND_RESULT>
2254 <COMMAND_OUTPUT>
2255 Snapshot recorded successfully for session mysession
2256 </COMMAND_OUTPUT>
2257 #------------------------------------------------------------------------------
2258 <COMMAND_INPUT>
2259 lttng --mi xml destroy mysession
2260 </COMMAND_INPUT>
2261 <COMMAND_RESULT>
2262 0
2263 </COMMAND_RESULT>
2264 <COMMAND_OUTPUT>
2265 <?xml version="1.0" encoding="UTF-8"?>
2266 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
2267 <name>destroy</name>
2268 <output>
2269 <sessions>
2270 <session>
2271 <name>mysession</name>
2272 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2273 <enabled>false</enabled>
2274 <snapshot_mode>0</snapshot_mode>
2275 <live_timer_interval>0</live_timer_interval>
2276 </session>
2277 </sessions>
2278 </output>
2279 <success>true</success>
2280 </command>
2281 </COMMAND_OUTPUT>
2282 </SCENARIO>
2283
2284 ####################################################################
2285 # Scenario: Test "lttng create <session> --snapshot -U <URL> (LTTng 2.3)
2286 ####################################################################
2287 <SCENARIO>
2288 CreateSessionStreamedSnapshot
2289 <COMMAND_INPUT>
2290 lttng --mi xml create mysession --snapshot -U net://172.0.0.1
2291 </COMMAND_INPUT>
2292 <COMMAND_RESULT>
2293 0
2294 </COMMAND_RESULT>
2295 <COMMAND_OUTPUT>
2296 Session mysession created.
2297 Default snapshot output set to: net://172.0.0.1
2298 Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
2299 </COMMAND_OUTPUT>
2300 #------------------------------------------------------------------------------
2301 <COMMAND_INPUT>
2302 lttng --mi xml snapshot list-output -s mysession
2303 </COMMAND_INPUT>
2304 <COMMAND_RESULT>
2305 0
2306 </COMMAND_RESULT>
2307 <COMMAND_OUTPUT>
2308 Snapshot output list for session mysession
2309 [2] snapshot-2: net4://172.0.0.1:5342/
2310 </COMMAND_OUTPUT>
2311 #------------------------------------------------------------------------------
2312 <COMMAND_INPUT>
2313 lttng --mi xml list
2314 </COMMAND_INPUT>
2315 <COMMAND_RESULT>
2316 0
2317 </COMMAND_RESULT>
2318 <COMMAND_OUTPUT>
2319 1) mysession () [inactive snapshot]
2320
2321 </COMMAND_OUTPUT>
2322 #------------------------------------------------------------------------------
2323 <COMMAND_INPUT>
2324 lttng --mi xml snapshot record -s mysession
2325 </COMMAND_INPUT>
2326 <COMMAND_RESULT>
2327 0
2328 </COMMAND_RESULT>
2329 <COMMAND_OUTPUT>
2330 Snapshot recorded successfully for session mysession
2331 </COMMAND_OUTPUT>
2332 #------------------------------------------------------------------------------
2333 <COMMAND_INPUT>
2334 lttng --mi xml destroy mysession
2335 </COMMAND_INPUT>
2336 <COMMAND_RESULT>
2337 0
2338 </COMMAND_RESULT>
2339 <COMMAND_OUTPUT>
2340 <?xml version="1.0" encoding="UTF-8"?>
2341 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
2342 <name>destroy</name>
2343 <output>
2344 <sessions>
2345 <session>
2346 <name>mysession</name>
2347 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2348 <enabled>false</enabled>
2349 <snapshot_mode>0</snapshot_mode>
2350 <live_timer_interval>0</live_timer_interval>
2351 </session>
2352 </sessions>
2353 </output>
2354 <success>true</success>
2355 </command>
2356 </COMMAND_OUTPUT>
2357 </SCENARIO>
2358
2359 ####################################################################
2360 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
2361 ####################################################################
2362 <SCENARIO>
2363 CreateSessionSnapshotErrors
2364 <COMMAND_INPUT>
2365 lttng --mi xml snapshot list-output -s blabla
2366 </COMMAND_INPUT>
2367 <COMMAND_RESULT>
2368 1
2369 </COMMAND_RESULT>
2370 <COMMAND_OUTPUT>
2371 <COMMAND_ERROR_OUTPUT>
2372 <?xml version="1.0" encoding="UTF-8"?>
2373 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
2374 <name>snapshot</name>
2375 <output>
2376 <snapshot_action>
2377 <name>list-output</name>
2378 <output/>
2379 </snapshot_action>
2380 </output>
2381 <success>false</success>
2382 </command>
2383 </COMMAND_ERROR_OUTPUT>
2384 </COMMAND_OUTPUT>
2385 #------------------------------------------------------------------------------
2386 #next is not an error case but good to be tested
2387 <COMMAND_INPUT>
2388 lttng --mi xml list
2389 </COMMAND_INPUT>
2390 <COMMAND_RESULT>
2391 0
2392 </COMMAND_RESULT>
2393 <COMMAND_OUTPUT>
2394 <?xml version="1.0" encoding="UTF-8"?>
2395 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
2396 <name>list</name>
2397 <output>
2398 <sessions>
2399 <session>
2400 <name>mysession</name>
2401 <path/>
2402 <enabled>true</enabled>
2403 <snapshot_mode>1</snapshot_mode>
2404 <live_timer_interval>4294967295</live_timer_interval>
2405 </session>
2406 </sessions>
2407 </output>
2408 </command>
2409 </COMMAND_OUTPUT>
2410 #------------------------------------------------------------------------------
2411 <COMMAND_INPUT>
2412 lttng --mi xml snapshot record -s blabla
2413 </COMMAND_INPUT>
2414 <COMMAND_RESULT>
2415 1
2416 </COMMAND_RESULT>
2417 <COMMAND_OUTPUT>
2418 <COMMAND_ERROR_OUTPUT>
2419 Error: Session name not found
2420 </COMMAND_ERROR_OUTPUT>
2421 <?xml version="1.0" encoding="UTF-8"?>
2422 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
2423 <name>snapshot</name>
2424 <output>
2425 <snapshot_action>
2426 <name>record</name>
2427 <output/>
2428 </snapshot_action>
2429 </output>
2430 <success>false</success>
2431 </command>
2432 </COMMAND_OUTPUT>
2433 #------------------------------------------------------------------------------
2434 <COMMAND_INPUT>
2435 lttng --mi xml snapshot record -s mysession
2436 </COMMAND_INPUT>
2437 <COMMAND_RESULT>
2438 1
2439 </COMMAND_RESULT>
2440 <COMMAND_OUTPUT>
2441 <COMMAND_ERROR_OUTPUT>
2442 Error: Session needs to be started once
2443 </COMMAND_ERROR_OUTPUT>
2444 <?xml version="1.0" encoding="UTF-8"?>
2445 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
2446 <name>snapshot</name>
2447 <output>
2448 <snapshot_action>
2449 <name>record</name>
2450 <output/>
2451 </snapshot_action>
2452 </output>
2453 <success>false</success>
2454 </command>
2455 </COMMAND_OUTPUT>
2456
2457 </SCENARIO>
2458
2459 ####################################################################
2460 # Scenario: Test "lttng create <session> --live [USEC] (LTTng 2.4)
2461 ####################################################################
2462 <SCENARIO>
2463 CreateSessionLive
2464 <COMMAND_INPUT>
2465 lttng --mi xml create mysession --live -U net://127.0.0.1
2466 </COMMAND_INPUT>
2467 <COMMAND_RESULT>
2468 0
2469 </COMMAND_RESULT>
2470 <COMMAND_OUTPUT>
2471 <?xml version="1.0" encoding="UTF-8"?>
2472 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
2473 <name>create</name>
2474 <output>
2475 <session>
2476 <name>mysession</name>
2477 <path>tcp4://127.0.0.1:5342/ [data: 5343]</path>
2478 <enabled>false</enabled>
2479 <snapshot_mode>0</snapshot_mode>
2480 <live_timer_interval>1000000</live_timer_interval>
2481 </session>
2482 </output>
2483 <success>true</success>
2484 </command>
2485 </COMMAND_OUTPUT>
2486 #------------------------------------------------------------------------------
2487 <COMMAND_INPUT>
2488 lttng --mi xml list
2489 </COMMAND_INPUT>
2490 <COMMAND_RESULT>
2491 0
2492 </COMMAND_RESULT>
2493 <COMMAND_OUTPUT>
2494 <?xml version="1.0" encoding="UTF-8"?>
2495 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
2496 <name>list</name>
2497 <output>
2498 <sessions>
2499 <session>
2500 <name>mysession</name>
2501 <path>tcp4://127.0.0.1:5342/ [data: 5343]</path>
2502 <enabled>false</enabled>
2503 <snapshot_mode>0</snapshot_mode>
2504 <live_timer_interval>1000000</live_timer_interval>
2505 </session>
2506 </sessions>
2507 </output>
2508 </command>
2509 </COMMAND_OUTPUT>
2510 #------------------------------------------------------------------------------
2511 <COMMAND_INPUT>
2512 lttng --mi xml destroy mysession
2513 </COMMAND_INPUT>
2514 <COMMAND_RESULT>
2515 0
2516 </COMMAND_RESULT>
2517 <COMMAND_OUTPUT>
2518 <?xml version="1.0" encoding="UTF-8"?>
2519 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
2520 <name>destroy</name>
2521 <output>
2522 <sessions>
2523 <session>
2524 <name>mysession</name>
2525 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2526 <enabled>false</enabled>
2527 <snapshot_mode>0</snapshot_mode>
2528 <live_timer_interval>0</live_timer_interval>
2529 </session>
2530 </sessions>
2531 </output>
2532 <success>true</success>
2533 </command>
2534 </COMMAND_OUTPUT>
2535 </SCENARIO>
2536
2537 ####################################################################
2538 # Scenario: Test errors for "lttng create <session> --live [USEC] (LTTng 2.4)
2539 ####################################################################
2540 <SCENARIO>
2541 CreateSessionLiveErrors
2542 <COMMAND_INPUT>
2543 lttng --mi xml create mysession --live --snapshot
2544 </COMMAND_INPUT>
2545 <COMMAND_RESULT>
2546 1
2547 </COMMAND_RESULT>
2548 <COMMAND_OUTPUT>
2549 <COMMAND_ERROR_OUTPUT>
2550 Error: Snapshot and live modes are mutually exclusive.
2551 Error: Command error
2552 </COMMAND_ERROR_OUTPUT>
2553 </COMMAND_OUTPUT>
2554 #------------------------------------------------------------------------------
2555 <COMMAND_INPUT>
2556 lttng --mi xml create mysession --live -U blah
2557 </COMMAND_INPUT>
2558 <COMMAND_RESULT>
2559 1
2560 </COMMAND_RESULT>
2561 <COMMAND_OUTPUT>
2562 <COMMAND_ERROR_OUTPUT>
2563 Error: URI parse unknown protocol blah
2564 Error: Unable to parse the URL blah
2565 Error: Invalid parameter
2566 </COMMAND_ERROR_OUTPUT>
2567 </COMMAND_OUTPUT>
2568 #------------------------------------------------------------------------------
2569 <COMMAND_INPUT>
2570 lttng --mi xml create mysession --live -C net://127.0.0.1
2571 </COMMAND_INPUT>
2572 <COMMAND_RESULT>
2573 1
2574 </COMMAND_RESULT>
2575 <COMMAND_OUTPUT>
2576 <COMMAND_ERROR_OUTPUT>
2577 Error: You need both control and data URL.
2578 Error: Command error
2579 </COMMAND_ERROR_OUTPUT>
2580 </COMMAND_OUTPUT>
2581 </SCENARIO>
2582
2583 ####################################################################
2584 # Scenario: Test "lttng list <session> (version 2.6.0, syscalls)
2585 ####################################################################
2586 <SCENARIO>
2587 GetSessionWithSyscalls
2588 <COMMAND_INPUT>
2589 lttng --mi xml list mysession
2590 </COMMAND_INPUT>
2591 <COMMAND_RESULT>
2592 0
2593 </COMMAND_RESULT>
2594 <COMMAND_OUTPUT>
2595 <?xml version="1.0" encoding="UTF-8"?>
2596 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
2597 <name>list</name>
2598 <output>
2599 <sessions>
2600 <session>
2601 <name>mysession</name>
2602 <path>/home/user/lttng-traces/mysession-20120129-084256</path>
2603 <enabled>false</enabled><snapshot_mode>0</snapshot_mode>
2604 <live_timer_interval>0</live_timer_interval>
2605 <domains>
2606 <domain>
2607 <type>KERNEL</type>
2608 <buffer_type>PER_PID</buffer_type>
2609 <channels>
2610 <channel>
2611 <name>channel0</name>
2612 <enabled>true</enabled>
2613 <attributes>
2614 <overwrite_mode>DISCARD</overwrite_mode>
2615 <subbuffer_size>262144</subbuffer_size>
2616 <subbuffer_count>4</subbuffer_count>
2617 <switch_timer_interval>0</switch_timer_interval>
2618 <read_timer_interval>200</read_timer_interval>
2619 <output_type>SPLICE</output_type>
2620 <tracefile_size>0</tracefile_size>
2621 <tracefile_count>0</tracefile_count>
2622 <live_timer_interval>0</live_timer_interval>
2623 </attributes><events>
2624 <event>
2625 <name>read</name>
2626 <type>SYSCALL</type>
2627 <enabled>true</enabled>
2628 </event>
2629 <event>
2630 <name>write</name>
2631 <type>SYSCALL</type>
2632 <enabled>true</enabled>
2633 </event>
2634 </events>
2635 </channel>
2636 </channels>
2637 </domain></domains>
2638 </session>
2639 </sessions>
2640 </output>
2641 </command>
2642 </COMMAND_OUTPUT>
2643 </SCENARIO>
2644 <SCENARIO>
2645 ListSession2.7Compat
2646 <COMMAND_INPUT>
2647 lttng --mi xml list mysession
2648 </COMMAND_INPUT>
2649 <COMMAND_RESULT>
2650 0
2651 </COMMAND_RESULT>
2652 <COMMAND_OUTPUT>
2653 <?xml version="1.0" encoding="UTF-8"?>
2654 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0">
2655 <name>list</name>
2656 <output>
2657 <sessions>
2658 <session>
2659 <name>mysession</name>
2660 <path>/home/user/lttng-traces/mysession-20151020-085614</path>
2661 <enabled>false</enabled>
2662 <snapshot_mode>0</snapshot_mode>
2663 <live_timer_interval>0</live_timer_interval>
2664 <domains>
2665 <domain>
2666 <type>KERNEL</type>
2667 <buffer_type>GLOBAL</buffer_type>
2668 <trackers/>
2669 <channels>
2670 <channel>
2671 <name>channel0</name>
2672 <enabled>true</enabled>
2673 <attributes>
2674 <overwrite_mode>DISCARD</overwrite_mode>
2675 <subbuffer_size>262144</subbuffer_size>
2676 <subbuffer_count>4</subbuffer_count>
2677 <switch_timer_interval>0</switch_timer_interval>
2678 <read_timer_interval>200000</read_timer_interval>
2679 <output_type>SPLICE</output_type>
2680 <tracefile_size>0</tracefile_size>
2681 <tracefile_count>0</tracefile_count>
2682 <live_timer_interval>0</live_timer_interval>
2683 </attributes>
2684 <events>
2685 <event><name>*</name>
2686 <type>SYSCALL</type>
2687 <enabled>true</enabled>
2688 </event>
2689 <event>
2690 <name>*</name>
2691 <type>TRACEPOINT</type>
2692 <enabled>true</enabled>
2693 <loglevel>TRACE_EMERG</loglevel>
2694 <loglevel_type>ALL</loglevel_type>
2695 </event>
2696 </events>
2697 </channel>
2698 </channels>
2699 </domain>
2700 <domain>
2701 <type>UST</type>
2702 <buffer_type>PER_PID</buffer_type>
2703 <trackers/>
2704 <channels>
2705 <channel>
2706 <name>channel0</name>
2707 <enabled>true</enabled>
2708 <attributes>
2709 <overwrite_mode>DISCARD</overwrite_mode>
2710 <subbuffer_size>4096</subbuffer_size>
2711 <subbuffer_count>4</subbuffer_count>
2712 <switch_timer_interval>0</switch_timer_interval>
2713 <read_timer_interval>0</read_timer_interval>
2714 <output_type>MMAP</output_type>
2715 <tracefile_size>0</tracefile_size>
2716 <tracefile_count>0</tracefile_count>
2717 <live_timer_interval>0</live_timer_interval>
2718 </attributes>
2719 <events>
2720 <event><name>*</name>
2721 <type>TRACEPOINT</type>
2722 <enabled>true</enabled>
2723 </event></events>
2724 </channel>
2725 </channels>
2726 </domain>
2727 </domains>
2728 </session>
2729 </sessions>
2730 </output>
2731 </command>
2732 </COMMAND_OUTPUT>
2733 </SCENARIO>
2734 ####################################################################
2735 # Scenario: Test "lttng load [OPTIONS] [SESSION]"
2736 # "lttng save [OPTIONS] [SESSION]"
2737 # (LTTng 2.5)
2738 ####################################################################
2739 <SCENARIO>
2740 SessionProfile
2741 <COMMAND_INPUT>
2742 lttng --mi xml load -i /home/user/.lttng/sessions/mysession.lttng
2743 </COMMAND_INPUT>
2744 <COMMAND_RESULT>
2745 0
2746 </COMMAND_RESULT>
2747 <COMMAND_OUTPUT>
2748 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0"><name>load</name><output><load><session><name>*</name></session><path>.lttng/sessions/seqSession2.lttng</path></load></output><success>true</success></command>
2749 </COMMAND_OUTPUT>
2750
2751 <SCENARIO>
2752 SessionProfile
2753 <COMMAND_INPUT>
2754 lttng --mi xml load -i /home/user/.lttng/sessions/mysession.lttng -f
2755 </COMMAND_INPUT>
2756 <COMMAND_RESULT>
2757 0
2758 </COMMAND_RESULT>
2759 <COMMAND_OUTPUT>
2760 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0"><name>load</name><output><load><session><name>*</name></session><path>.lttng/sessions/seqSession2.lttng</path></load></output><success>true</success></command>
2761 </COMMAND_OUTPUT>
2762
2763 <COMMAND_INPUT>
2764 lttng --mi xml save
2765 </COMMAND_INPUT>
2766 <COMMAND_RESULT>
2767 0
2768 </COMMAND_RESULT>
2769 <COMMAND_OUTPUT>
2770 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0"><name>save</name><output><save><session><name>*</name></session></save></output><success>true</success></command>
2771 </COMMAND_OUTPUT>
2772
2773 <COMMAND_INPUT>
2774 lttng --mi xml save mysession
2775 </COMMAND_INPUT>
2776 <COMMAND_RESULT>
2777 0
2778 </COMMAND_RESULT>
2779 <COMMAND_OUTPUT>
2780 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0"><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>
2781 </COMMAND_OUTPUT>
2782
2783 <COMMAND_INPUT>
2784 lttng --mi xml save -f mysession
2785 </COMMAND_INPUT>
2786 <COMMAND_RESULT>
2787 0
2788 </COMMAND_RESULT>
2789 <COMMAND_OUTPUT>
2790 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0"><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>
2791 </COMMAND_OUTPUT>
2792
2793 <COMMAND_INPUT>
2794 lttng --mi xml save -o /tmp/test -f mysession
2795 </COMMAND_INPUT>
2796 <COMMAND_RESULT>
2797 0
2798 </COMMAND_RESULT>
2799 <COMMAND_OUTPUT>
2800 <command xmlns="http://lttng.org/xml/ns/lttng-mi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://lttng.org/xml/ns/lttng-mi http://lttng.org/xml/schemas/lttng-mi/3/lttng-mi-3.0.xsd" schemaVersion="3.0"><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>
2801 </COMMAND_OUTPUT>
2802
2803 </SCENARIO>
This page took 0.090649 seconds and 4 git commands to generate.