lttng: Move plugins to their own sub-directory
[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 <SCENARIO>
1952 CalibrateHandling
1953 <COMMAND_INPUT>
1954 lttng --mi xml calibrate -k --function
1955 </COMMAND_INPUT>
1956 <COMMAND_RESULT>
1957 0
1958 </COMMAND_RESULT>
1959 <COMMAND_OUTPUT>
1960 <?xml version="1.0" encoding="UTF-8"?>
1961 <command>
1962 <name>calibrate</name>
1963 <output>
1964 <calibrate>
1965 <type>FUNCTION</type>
1966 </calibrate>
1967 </output>
1968 <success>true</success>
1969 </command>
1970 </COMMAND_OUTPUT>
1971
1972 <COMMAND_INPUT>
1973 lttng --mi xml calibrate -u --function
1974 </COMMAND_INPUT>
1975 <COMMAND_RESULT>
1976 1
1977 </COMMAND_RESULT>
1978 <COMMAND_OUTPUT>
1979 <?xml version="1.0" encoding="UTF-8"?>
1980 <command>
1981 <name>calibrate</name>
1982 <output>
1983 <calibrate>
1984 <type>FUNCTION</type>
1985 </calibrate>
1986 </output>
1987 <success>true</success>
1988 </command>
1989 </COMMAND_OUTPUT>
1990
1991 </SCENARIO>
1992
1993 ####################################################################
1994 # Scenario: Test "lttng create <session> with LTTng 2.1 options
1995 ####################################################################
1996 <SCENARIO>
1997 CreateSessionLttng2.1
1998
1999 <COMMAND_INPUT>
2000 lttng --mi xml create mysession -U net://172.0.0.1
2001 </COMMAND_INPUT>
2002 <COMMAND_RESULT>
2003 0
2004 </COMMAND_RESULT>
2005 <COMMAND_OUTPUT>
2006 <?xml version="1.0" encoding="UTF-8"?>
2007 <command>
2008 <name>create</name>
2009 <output>
2010 <session>
2011 <name>mysession</name>
2012 <path>tcp4://172.0.0.1:5342/mysession-20140813-095804 [data: 5343]</path>
2013 <enabled>false</enabled>
2014 <snapshot_mode>0</snapshot_mode>
2015 <live_timer_interval>0</live_timer_interval>
2016 </session>
2017 </output>
2018 <success>true</success>
2019 </command>
2020 </COMMAND_OUTPUT>
2021
2022 <COMMAND_INPUT>
2023 lttng --mi xml create mysession -U file:///tmp
2024 </COMMAND_INPUT>
2025 <COMMAND_RESULT>
2026 0
2027 </COMMAND_RESULT>
2028 <COMMAND_OUTPUT>
2029 <?xml version="1.0" encoding="UTF-8"?>
2030 <command>
2031 <name>create</name>
2032 <output>
2033 <session>
2034 <name>mysession</name>
2035 <path>/tmp</path>
2036 <enabled>false</enabled>
2037 <snapshot_mode>0</snapshot_mode>
2038 <live_timer_interval>0</live_timer_interval>
2039 </session>
2040 </output>
2041 <success>true</success>
2042 </command>
2043 </COMMAND_OUTPUT>
2044
2045 <COMMAND_INPUT>
2046 lttng --mi xml create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
2047 </COMMAND_INPUT>
2048 <COMMAND_RESULT>
2049 0
2050 </COMMAND_RESULT>
2051 <COMMAND_OUTPUT>
2052 <?xml version="1.0" encoding="UTF-8"?>
2053 <command>
2054 <name>create</name>
2055 <output>
2056 <session>
2057 <name>mysession</name>
2058 <path>tcp4://172.0.0.1:5342/ [data: 5343]</path>
2059 <enabled>false</enabled>
2060 <snapshot_mode>0</snapshot_mode>
2061 <live_timer_interval>0</live_timer_interval>
2062 </session>
2063 </output>
2064 <success>true</success>
2065 </command>
2066 </COMMAND_OUTPUT>
2067
2068 <COMMAND_INPUT>
2069 lttng --mi xml create mysession -U 172.0.0.1:1234:2345
2070 </COMMAND_INPUT>
2071 <COMMAND_RESULT>
2072 0
2073 </COMMAND_RESULT>
2074 <COMMAND_OUTPUT>
2075 <?xml version="1.0" encoding="UTF-8"?>
2076 <command>
2077 <name>create</name>
2078 <output>
2079 <session>
2080 <name>mysession</name>
2081 <path>tcp4://172.0.0.1:1234/mysession-20140813-102225 [data: 2345]</path>
2082 <enabled>false</enabled>
2083 <snapshot_mode>0</snapshot_mode>
2084 <live_timer_interval>0</live_timer_interval>
2085 </session>
2086 </output>
2087 <success>true</success>
2088 </command>
2089 </COMMAND_OUTPUT>
2090
2091 <COMMAND_INPUT>
2092 lttng --mi xml destroy mysession
2093 </COMMAND_INPUT>
2094 <COMMAND_RESULT>
2095 0
2096 </COMMAND_RESULT>
2097 <COMMAND_OUTPUT>
2098 <?xml version="1.0" encoding="UTF-8"?>
2099 <command>
2100 <name>destroy</name>
2101 <output>
2102 <sessions>
2103 <session>
2104 <name>mysession</name>
2105 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2106 <enabled>false</enabled>
2107 <snapshot_mode>0</snapshot_mode>
2108 <live_timer_interval>0</live_timer_interval>
2109 </session>
2110 </sessions>
2111 </output>
2112 <success>true</success>
2113 </command>
2114 </COMMAND_OUTPUT>
2115
2116 <COMMAND_INPUT>
2117 lttng --mi xml -vvv create mysession -U net://172.0.0.1
2118 </COMMAND_INPUT>
2119 <COMMAND_RESULT>
2120 0
2121 </COMMAND_RESULT>
2122 <COMMAND_OUTPUT>
2123 DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
2124 DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
2125 DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
2126 DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
2127 Session mysession created.
2128 Traces will be written in net://172.0.0.1
2129 DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
2130 </COMMAND_OUTPUT>
2131
2132 </SCENARIO>
2133
2134 ####################################################################
2135 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
2136 ####################################################################
2137 <SCENARIO>
2138 CreateSessionSnapshot
2139 <COMMAND_INPUT>
2140 lttng --mi xml create mysession --snapshot
2141 </COMMAND_INPUT>
2142 <COMMAND_RESULT>
2143 0
2144 </COMMAND_RESULT>
2145 <COMMAND_OUTPUT>
2146 <?xml version="1.0" encoding="UTF-8"?>
2147 <command>
2148 <name>create</name>
2149 <output>
2150 <session>
2151 <name>mysession</name>
2152 <path/>
2153 <enabled>false</enabled>
2154 <snapshot_mode>1</snapshot_mode>
2155 <live_timer_interval>4294967295</live_timer_interval>
2156 </session>
2157 </output>
2158 <success>true</success>
2159 </command>
2160 </COMMAND_OUTPUT>
2161 #------------------------------------------------------------------------------
2162 <COMMAND_INPUT>
2163 lttng --mi xml snapshot list-output -s mysession
2164 </COMMAND_INPUT>
2165 <COMMAND_RESULT>
2166 0
2167 </COMMAND_RESULT>
2168 <COMMAND_OUTPUT>
2169 <?xml version="1.0" encoding="UTF-8"?>
2170 <command>
2171 <name>snapshot</name>
2172 <output>
2173 <snapshot_action>
2174 <name>list-output</name>
2175 <output>
2176 <session>
2177 <name>mysession</name>
2178 <snapshots>
2179 <snapshot>
2180 <id>1</id>
2181 <name>snapshot-1</name>
2182 <ctrl_url>/home/user/lttng-traces/mysession-20130913-141651</ctrl_url>
2183 <data_url/>
2184 <max_size>0</max_size>
2185 </snapshot>
2186 </snapshots>
2187 </session>
2188 </output>
2189 </snapshot_action>
2190 </output>
2191 <success>true</success>
2192 </command>
2193 </COMMAND_OUTPUT>
2194 #------------------------------------------------------------------------------
2195 <COMMAND_INPUT>
2196 lttng --mi xml list
2197 </COMMAND_INPUT>
2198 <COMMAND_RESULT>
2199 0
2200 </COMMAND_RESULT>
2201 <COMMAND_OUTPUT>
2202 <?xml version="1.0" encoding="UTF-8"?>
2203 <command>
2204 <name>list</name>
2205 <output>
2206 <sessions>
2207 <session>
2208 <name>mysession</name>
2209 <path/>
2210 <enabled>false</enabled>
2211 <snapshot_mode>1</snapshot_mode>
2212 <live_timer_interval>4294967295</live_timer_interval>
2213 </session>
2214 </sessions>
2215 </output>
2216 </command>
2217 </COMMAND_OUTPUT>
2218 #------------------------------------------------------------------------------
2219 <COMMAND_INPUT>
2220 lttng --mi xml snapshot record -s mysession
2221 </COMMAND_INPUT>
2222 <COMMAND_RESULT>
2223 0
2224 </COMMAND_RESULT>
2225 <COMMAND_OUTPUT>
2226 Snapshot recorded successfully for session mysession
2227 </COMMAND_OUTPUT>
2228 #------------------------------------------------------------------------------
2229 <COMMAND_INPUT>
2230 lttng --mi xml destroy mysession
2231 </COMMAND_INPUT>
2232 <COMMAND_RESULT>
2233 0
2234 </COMMAND_RESULT>
2235 <COMMAND_OUTPUT>
2236 <?xml version="1.0" encoding="UTF-8"?>
2237 <command>
2238 <name>destroy</name>
2239 <output>
2240 <sessions>
2241 <session>
2242 <name>mysession</name>
2243 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2244 <enabled>false</enabled>
2245 <snapshot_mode>0</snapshot_mode>
2246 <live_timer_interval>0</live_timer_interval>
2247 </session>
2248 </sessions>
2249 </output>
2250 <success>true</success>
2251 </command>
2252 </COMMAND_OUTPUT>
2253 </SCENARIO>
2254
2255 ####################################################################
2256 # Scenario: Test "lttng create <session> --snapshot -U <URL> (LTTng 2.3)
2257 ####################################################################
2258 <SCENARIO>
2259 CreateSessionStreamedSnapshot
2260 <COMMAND_INPUT>
2261 lttng --mi xml create mysession --snapshot -U net://172.0.0.1
2262 </COMMAND_INPUT>
2263 <COMMAND_RESULT>
2264 0
2265 </COMMAND_RESULT>
2266 <COMMAND_OUTPUT>
2267 Session mysession created.
2268 Default snapshot output set to: net://172.0.0.1
2269 Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
2270 </COMMAND_OUTPUT>
2271 #------------------------------------------------------------------------------
2272 <COMMAND_INPUT>
2273 lttng --mi xml snapshot list-output -s mysession
2274 </COMMAND_INPUT>
2275 <COMMAND_RESULT>
2276 0
2277 </COMMAND_RESULT>
2278 <COMMAND_OUTPUT>
2279 Snapshot output list for session mysession
2280 [2] snapshot-2: net4://172.0.0.1:5342/
2281 </COMMAND_OUTPUT>
2282 #------------------------------------------------------------------------------
2283 <COMMAND_INPUT>
2284 lttng --mi xml list
2285 </COMMAND_INPUT>
2286 <COMMAND_RESULT>
2287 0
2288 </COMMAND_RESULT>
2289 <COMMAND_OUTPUT>
2290 1) mysession () [inactive snapshot]
2291
2292 </COMMAND_OUTPUT>
2293 #------------------------------------------------------------------------------
2294 <COMMAND_INPUT>
2295 lttng --mi xml snapshot record -s mysession
2296 </COMMAND_INPUT>
2297 <COMMAND_RESULT>
2298 0
2299 </COMMAND_RESULT>
2300 <COMMAND_OUTPUT>
2301 Snapshot recorded successfully for session mysession
2302 </COMMAND_OUTPUT>
2303 #------------------------------------------------------------------------------
2304 <COMMAND_INPUT>
2305 lttng --mi xml destroy mysession
2306 </COMMAND_INPUT>
2307 <COMMAND_RESULT>
2308 0
2309 </COMMAND_RESULT>
2310 <COMMAND_OUTPUT>
2311 <?xml version="1.0" encoding="UTF-8"?>
2312 <command>
2313 <name>destroy</name>
2314 <output>
2315 <sessions>
2316 <session>
2317 <name>mysession</name>
2318 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2319 <enabled>false</enabled>
2320 <snapshot_mode>0</snapshot_mode>
2321 <live_timer_interval>0</live_timer_interval>
2322 </session>
2323 </sessions>
2324 </output>
2325 <success>true</success>
2326 </command>
2327 </COMMAND_OUTPUT>
2328 </SCENARIO>
2329
2330 ####################################################################
2331 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
2332 ####################################################################
2333 <SCENARIO>
2334 CreateSessionSnapshotErrors
2335 <COMMAND_INPUT>
2336 lttng --mi xml snapshot list-output -s blabla
2337 </COMMAND_INPUT>
2338 <COMMAND_RESULT>
2339 1
2340 </COMMAND_RESULT>
2341 <COMMAND_OUTPUT>
2342 <COMMAND_ERROR_OUTPUT>
2343 <?xml version="1.0" encoding="UTF-8"?>
2344 <command>
2345 <name>snapshot</name>
2346 <output>
2347 <snapshot_action>
2348 <name>list-output</name>
2349 <output/>
2350 </snapshot_action>
2351 </output>
2352 <success>false</success>
2353 </command>
2354 </COMMAND_ERROR_OUTPUT>
2355 </COMMAND_OUTPUT>
2356 #------------------------------------------------------------------------------
2357 #next is not an error case but good to be tested
2358 <COMMAND_INPUT>
2359 lttng --mi xml list
2360 </COMMAND_INPUT>
2361 <COMMAND_RESULT>
2362 0
2363 </COMMAND_RESULT>
2364 <COMMAND_OUTPUT>
2365 <?xml version="1.0" encoding="UTF-8"?>
2366 <command>
2367 <name>list</name>
2368 <output>
2369 <sessions>
2370 <session>
2371 <name>mysession</name>
2372 <path/>
2373 <enabled>true</enabled>
2374 <snapshot_mode>1</snapshot_mode>
2375 <live_timer_interval>4294967295</live_timer_interval>
2376 </session>
2377 </sessions>
2378 </output>
2379 </command>
2380 </COMMAND_OUTPUT>
2381 #------------------------------------------------------------------------------
2382 <COMMAND_INPUT>
2383 lttng --mi xml snapshot record -s blabla
2384 </COMMAND_INPUT>
2385 <COMMAND_RESULT>
2386 1
2387 </COMMAND_RESULT>
2388 <COMMAND_OUTPUT>
2389 <COMMAND_ERROR_OUTPUT>
2390 Error: Session name not found
2391 </COMMAND_ERROR_OUTPUT>
2392 <?xml version="1.0" encoding="UTF-8"?>
2393 <command>
2394 <name>snapshot</name>
2395 <output>
2396 <snapshot_action>
2397 <name>record</name>
2398 <output/>
2399 </snapshot_action>
2400 </output>
2401 <success>false</success>
2402 </command>
2403 </COMMAND_OUTPUT>
2404 #------------------------------------------------------------------------------
2405 <COMMAND_INPUT>
2406 lttng --mi xml snapshot record -s mysession
2407 </COMMAND_INPUT>
2408 <COMMAND_RESULT>
2409 1
2410 </COMMAND_RESULT>
2411 <COMMAND_OUTPUT>
2412 <COMMAND_ERROR_OUTPUT>
2413 Error: Session needs to be started once
2414 </COMMAND_ERROR_OUTPUT>
2415 <?xml version="1.0" encoding="UTF-8"?>
2416 <command>
2417 <name>snapshot</name>
2418 <output>
2419 <snapshot_action>
2420 <name>record</name>
2421 <output/>
2422 </snapshot_action>
2423 </output>
2424 <success>false</success>
2425 </command>
2426 </COMMAND_OUTPUT>
2427
2428 </SCENARIO>
2429
2430 ####################################################################
2431 # Scenario: Test "lttng create <session> --live [USEC] (LTTng 2.4)
2432 ####################################################################
2433 <SCENARIO>
2434 CreateSessionLive
2435 <COMMAND_INPUT>
2436 lttng --mi xml create mysession --live -U net://127.0.0.1
2437 </COMMAND_INPUT>
2438 <COMMAND_RESULT>
2439 0
2440 </COMMAND_RESULT>
2441 <COMMAND_OUTPUT>
2442 <?xml version="1.0" encoding="UTF-8"?>
2443 <command>
2444 <name>create</name>
2445 <output>
2446 <session>
2447 <name>mysession</name>
2448 <path>tcp4://127.0.0.1:5342/ [data: 5343]</path>
2449 <enabled>false</enabled>
2450 <snapshot_mode>0</snapshot_mode>
2451 <live_timer_interval>1000000</live_timer_interval>
2452 </session>
2453 </output>
2454 <success>true</success>
2455 </command>
2456 </COMMAND_OUTPUT>
2457 #------------------------------------------------------------------------------
2458 <COMMAND_INPUT>
2459 lttng --mi xml list
2460 </COMMAND_INPUT>
2461 <COMMAND_RESULT>
2462 0
2463 </COMMAND_RESULT>
2464 <COMMAND_OUTPUT>
2465 <?xml version="1.0" encoding="UTF-8"?>
2466 <command>
2467 <name>list</name>
2468 <output>
2469 <sessions>
2470 <session>
2471 <name>mysession</name>
2472 <path>tcp4://127.0.0.1:5342/ [data: 5343]</path>
2473 <enabled>false</enabled>
2474 <snapshot_mode>0</snapshot_mode>
2475 <live_timer_interval>1000000</live_timer_interval>
2476 </session>
2477 </sessions>
2478 </output>
2479 </command>
2480 </COMMAND_OUTPUT>
2481 #------------------------------------------------------------------------------
2482 <COMMAND_INPUT>
2483 lttng --mi xml destroy mysession
2484 </COMMAND_INPUT>
2485 <COMMAND_RESULT>
2486 0
2487 </COMMAND_RESULT>
2488 <COMMAND_OUTPUT>
2489 <?xml version="1.0" encoding="UTF-8"?>
2490 <command>
2491 <name>destroy</name>
2492 <output>
2493 <sessions>
2494 <session>
2495 <name>mysession</name>
2496 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2497 <enabled>false</enabled>
2498 <snapshot_mode>0</snapshot_mode>
2499 <live_timer_interval>0</live_timer_interval>
2500 </session>
2501 </sessions>
2502 </output>
2503 <success>true</success>
2504 </command>
2505 </COMMAND_OUTPUT>
2506 </SCENARIO>
2507
2508 ####################################################################
2509 # Scenario: Test errors for "lttng create <session> --live [USEC] (LTTng 2.4)
2510 ####################################################################
2511 <SCENARIO>
2512 CreateSessionLiveErrors
2513 <COMMAND_INPUT>
2514 lttng --mi xml create mysession --live --snapshot
2515 </COMMAND_INPUT>
2516 <COMMAND_RESULT>
2517 1
2518 </COMMAND_RESULT>
2519 <COMMAND_OUTPUT>
2520 <COMMAND_ERROR_OUTPUT>
2521 Error: Snapshot and live modes are mutually exclusive.
2522 Error: Command error
2523 </COMMAND_ERROR_OUTPUT>
2524 </COMMAND_OUTPUT>
2525 #------------------------------------------------------------------------------
2526 <COMMAND_INPUT>
2527 lttng --mi xml create mysession --live -U blah
2528 </COMMAND_INPUT>
2529 <COMMAND_RESULT>
2530 1
2531 </COMMAND_RESULT>
2532 <COMMAND_OUTPUT>
2533 <COMMAND_ERROR_OUTPUT>
2534 Error: URI parse unknown protocol blah
2535 Error: Unable to parse the URL blah
2536 Error: Invalid parameter
2537 </COMMAND_ERROR_OUTPUT>
2538 </COMMAND_OUTPUT>
2539 #------------------------------------------------------------------------------
2540 <COMMAND_INPUT>
2541 lttng --mi xml create mysession --live -C net://127.0.0.1
2542 </COMMAND_INPUT>
2543 <COMMAND_RESULT>
2544 1
2545 </COMMAND_RESULT>
2546 <COMMAND_OUTPUT>
2547 <COMMAND_ERROR_OUTPUT>
2548 Error: You need both control and data URL.
2549 Error: Command error
2550 </COMMAND_ERROR_OUTPUT>
2551 </COMMAND_OUTPUT>
2552 </SCENARIO>
2553
2554 ####################################################################
2555 # Scenario: Test "lttng list <session> (version 2.6.0, syscalls)
2556 ####################################################################
2557 <SCENARIO>
2558 GetSessionWithSyscalls
2559 <COMMAND_INPUT>
2560 lttng --mi xml list mysession
2561 </COMMAND_INPUT>
2562 <COMMAND_RESULT>
2563 0
2564 </COMMAND_RESULT>
2565 <COMMAND_OUTPUT>
2566 <?xml version="1.0" encoding="UTF-8"?>
2567 <command>
2568 <name>list</name>
2569 <output>
2570 <sessions>
2571 <session>
2572 <name>mysession</name>
2573 <path>/home/user/lttng-traces/mysession-20120129-084256</path>
2574 <enabled>false</enabled><snapshot_mode>0</snapshot_mode>
2575 <live_timer_interval>0</live_timer_interval>
2576 <domains>
2577 <domain>
2578 <type>KERNEL</type>
2579 <buffer_type>PER_PID</buffer_type>
2580 <channels>
2581 <channel>
2582 <name>channel0</name>
2583 <enabled>true</enabled>
2584 <attributes>
2585 <overwrite_mode>DISCARD</overwrite_mode>
2586 <subbuffer_size>262144</subbuffer_size>
2587 <subbuffer_count>4</subbuffer_count>
2588 <switch_timer_interval>0</switch_timer_interval>
2589 <read_timer_interval>200</read_timer_interval>
2590 <output_type>SPLICE</output_type>
2591 <tracefile_size>0</tracefile_size>
2592 <tracefile_count>0</tracefile_count>
2593 <live_timer_interval>0</live_timer_interval>
2594 </attributes><events>
2595 <event>
2596 <name>read</name>
2597 <type>SYSCALL</type>
2598 <enabled>true</enabled>
2599 <filter>false</filter>
2600 </event>
2601 <event>
2602 <name>write</name>
2603 <type>SYSCALL</type>
2604 <enabled>true</enabled>
2605 <filter>false</filter>
2606 </event>
2607 </events>
2608 </channel>
2609 </channels>
2610 </domain></domains>
2611 </session>
2612 </sessions>
2613 </output>
2614 </command>
2615 </COMMAND_OUTPUT>
2616 </SCENARIO>
This page took 0.094149 seconds and 6 git commands to generate.