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