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