control: command support for enabling all tracepoints/syscalls
[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 <COMMAND_INPUT>
1835 lttng --mi xml enable-event -a -k -s mysession2
1836 </COMMAND_INPUT>
1837 <COMMAND_RESULT>
1838 0
1839 </COMMAND_RESULT>
1840 <COMMAND_OUTPUT>
1841 <?xml version="1.0" encoding="UTF-8"?>
1842 <command>
1843 <name>enable-event</name>
1844 <output>
1845 <events>
1846 <event>
1847 <name>*</name>
1848 <type>ALL</type>
1849 <enabled>true</enabled>
1850 <filter>false</filter>
1851 <success>true</success>
1852 </event>
1853 </events>
1854 </output>
1855 <success>true</success>
1856 </command>
1857 </COMMAND_OUTPUT>
1858
1859 </SCENARIO>
1860
1861 ####################################################################
1862 # Scenario: Test "lttng add-context -h" and lttng --mi xml add-context ..." with different inputs
1863 ####################################################################
1864
1865 <SCENARIO>
1866 ContextHandling
1867
1868 <COMMAND_INPUT>
1869 lttng --mi xml add-context -h
1870 </COMMAND_INPUT>
1871 <COMMAND_RESULT>
1872 0
1873 </COMMAND_RESULT>
1874 <COMMAND_OUTPUT>
1875 usage: lttng add-context -t TYPE [-k|-u] [OPTIONS]
1876
1877 If no channel is given (-c), the context is added to
1878 all channels.
1879
1880 Otherwise the context is added only to the channel (-c).
1881
1882 Exactly one domain (-k or -u) must be specified.
1883
1884 Options:
1885 -h, --help Show this help
1886 --list-options Simple listing of options
1887 -s, --session NAME Apply to session name
1888 -c, --channel NAME Apply to channel
1889 -k, --kernel Apply to the kernel tracer
1890 -u, --userspace Apply to the user-space tracer
1891
1892 Context:
1893 -t, --type TYPE Context type. You can repeat that option on
1894 the command line to specify multiple contexts at once.
1895 (--kernel preempts --userspace)
1896 TYPE can be one of the strings below:
1897 pid, procname, prio, nice, vpid, tid, pthread_id,
1898 vtid, ppid, vppid, perf:cpu:cpu-cycles, perf:cpu:cycles
1899 Note that the vpid, vppid and vtid context types represent the virtual process id,
1900 virtual parent process id and virtual thread id as seen from the current execution context
1901 as opposed to the pid, ppid and tid which are kernel internal data structures.
1902
1903 Example:
1904 This command will add the context information 'prio' and two per-cpu
1905 perf counters (hardware branch misses and cache misses), to all channels
1906 in the trace data output:
1907 # lttng add-context -k -t prio -t perf:cpu:branch-misses -t perf:cpu:cache-misses
1908 </COMMAND_OUTPUT>
1909
1910 <COMMAND_INPUT>
1911 lttng --mi xml add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
1912 </COMMAND_INPUT>
1913 <COMMAND_RESULT>
1914 0
1915 </COMMAND_RESULT>
1916 <COMMAND_OUTPUT>
1917 UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
1918 UST context pid added to event sched_kthread_stop_ret channel mychannel
1919 </COMMAND_OUTPUT>
1920 </SCENARIO>
1921
1922 <SCENARIO>
1923 ContextErrorHandling
1924
1925 <COMMAND_INPUT>
1926 lttng --mi xml add-context -h
1927 </COMMAND_INPUT>
1928 <COMMAND_RESULT>
1929 1
1930 </COMMAND_RESULT>
1931 <COMMAND_OUTPUT>
1932 usage: lttng add-context -t TYPE
1933
1934 If no channel and no event is given (-c/-e), the context
1935 will be added to all events and all channels.
1936 Otherwise the context will be added only to the channel (-c)
1937 and/or event (-e) indicated.
1938 Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
1939
1940 Options:
1941 -h, --help Show this help
1942 --list-options Simple listing of options
1943 -s, --session NAME Apply to session name
1944 -c, --channel NAME Apply to channel
1945 -e, --event NAME Apply to event
1946 -k, --kernel Apply to the kernel tracer
1947 -u, --userspace Apply to the user-space tracer
1948 -t, --type TYPE Context type. You can repeat that option on
1949 the command line to specify multiple contexts at once.
1950 (--kernel preempts --userspace)
1951 TYPE can be one of the strings below:
1952 pid, procname, prio, nice, vpid, tid, pthread_id,
1953 vtid, ppid, vppid, perf:cpu-cycles, perf:cycles
1954 Example:
1955 This command will add the context information 'prio' and two perf
1956 counters (hardware branch misses and cache misses), to all events
1957 in the trace data output:
1958 # lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
1959
1960 </COMMAND_OUTPUT>
1961
1962 <COMMAND_INPUT>
1963 lttng --mi xml add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
1964 </COMMAND_INPUT>
1965 <COMMAND_RESULT>
1966 1
1967 </COMMAND_RESULT>
1968 <COMMAND_OUTPUT>
1969 UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
1970 UST context pid added to event sched_kthread_stop_ret channel mychannel
1971 </COMMAND_OUTPUT>
1972
1973 </SCENARIO>
1974
1975 ####################################################################
1976 # Scenario: Test "lttng create <session> with LTTng 2.1 options
1977 ####################################################################
1978 <SCENARIO>
1979 CreateSessionLttng2.1
1980
1981 <COMMAND_INPUT>
1982 lttng --mi xml create mysession -U net://172.0.0.1
1983 </COMMAND_INPUT>
1984 <COMMAND_RESULT>
1985 0
1986 </COMMAND_RESULT>
1987 <COMMAND_OUTPUT>
1988 <?xml version="1.0" encoding="UTF-8"?>
1989 <command>
1990 <name>create</name>
1991 <output>
1992 <session>
1993 <name>mysession</name>
1994 <path>tcp4://172.0.0.1:5342/mysession-20140813-095804 [data: 5343]</path>
1995 <enabled>false</enabled>
1996 <snapshot_mode>0</snapshot_mode>
1997 <live_timer_interval>0</live_timer_interval>
1998 </session>
1999 </output>
2000 <success>true</success>
2001 </command>
2002 </COMMAND_OUTPUT>
2003
2004 <COMMAND_INPUT>
2005 lttng --mi xml create mysession -U file:///tmp
2006 </COMMAND_INPUT>
2007 <COMMAND_RESULT>
2008 0
2009 </COMMAND_RESULT>
2010 <COMMAND_OUTPUT>
2011 <?xml version="1.0" encoding="UTF-8"?>
2012 <command>
2013 <name>create</name>
2014 <output>
2015 <session>
2016 <name>mysession</name>
2017 <path>/tmp</path>
2018 <enabled>false</enabled>
2019 <snapshot_mode>0</snapshot_mode>
2020 <live_timer_interval>0</live_timer_interval>
2021 </session>
2022 </output>
2023 <success>true</success>
2024 </command>
2025 </COMMAND_OUTPUT>
2026
2027 <COMMAND_INPUT>
2028 lttng --mi xml create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
2029 </COMMAND_INPUT>
2030 <COMMAND_RESULT>
2031 0
2032 </COMMAND_RESULT>
2033 <COMMAND_OUTPUT>
2034 <?xml version="1.0" encoding="UTF-8"?>
2035 <command>
2036 <name>create</name>
2037 <output>
2038 <session>
2039 <name>mysession</name>
2040 <path>tcp4://172.0.0.1:5342/ [data: 5343]</path>
2041 <enabled>false</enabled>
2042 <snapshot_mode>0</snapshot_mode>
2043 <live_timer_interval>0</live_timer_interval>
2044 </session>
2045 </output>
2046 <success>true</success>
2047 </command>
2048 </COMMAND_OUTPUT>
2049
2050 <COMMAND_INPUT>
2051 lttng --mi xml create mysession -U 172.0.0.1:1234:2345
2052 </COMMAND_INPUT>
2053 <COMMAND_RESULT>
2054 0
2055 </COMMAND_RESULT>
2056 <COMMAND_OUTPUT>
2057 <?xml version="1.0" encoding="UTF-8"?>
2058 <command>
2059 <name>create</name>
2060 <output>
2061 <session>
2062 <name>mysession</name>
2063 <path>tcp4://172.0.0.1:1234/mysession-20140813-102225 [data: 2345]</path>
2064 <enabled>false</enabled>
2065 <snapshot_mode>0</snapshot_mode>
2066 <live_timer_interval>0</live_timer_interval>
2067 </session>
2068 </output>
2069 <success>true</success>
2070 </command>
2071 </COMMAND_OUTPUT>
2072
2073 <COMMAND_INPUT>
2074 lttng --mi xml destroy mysession
2075 </COMMAND_INPUT>
2076 <COMMAND_RESULT>
2077 0
2078 </COMMAND_RESULT>
2079 <COMMAND_OUTPUT>
2080 <?xml version="1.0" encoding="UTF-8"?>
2081 <command>
2082 <name>destroy</name>
2083 <output>
2084 <sessions>
2085 <session>
2086 <name>mysession</name>
2087 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2088 <enabled>false</enabled>
2089 <snapshot_mode>0</snapshot_mode>
2090 <live_timer_interval>0</live_timer_interval>
2091 </session>
2092 </sessions>
2093 </output>
2094 <success>true</success>
2095 </command>
2096 </COMMAND_OUTPUT>
2097
2098 <COMMAND_INPUT>
2099 lttng --mi xml -vvv create mysession -U net://172.0.0.1
2100 </COMMAND_INPUT>
2101 <COMMAND_RESULT>
2102 0
2103 </COMMAND_RESULT>
2104 <COMMAND_OUTPUT>
2105 DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
2106 DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
2107 DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
2108 DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
2109 Session mysession created.
2110 Traces will be written in net://172.0.0.1
2111 DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
2112 </COMMAND_OUTPUT>
2113
2114 </SCENARIO>
2115
2116 ####################################################################
2117 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
2118 ####################################################################
2119 <SCENARIO>
2120 CreateSessionSnapshot
2121 <COMMAND_INPUT>
2122 lttng --mi xml create mysession --snapshot
2123 </COMMAND_INPUT>
2124 <COMMAND_RESULT>
2125 0
2126 </COMMAND_RESULT>
2127 <COMMAND_OUTPUT>
2128 <?xml version="1.0" encoding="UTF-8"?>
2129 <command>
2130 <name>create</name>
2131 <output>
2132 <session>
2133 <name>mysession</name>
2134 <path/>
2135 <enabled>false</enabled>
2136 <snapshot_mode>1</snapshot_mode>
2137 <live_timer_interval>4294967295</live_timer_interval>
2138 </session>
2139 </output>
2140 <success>true</success>
2141 </command>
2142 </COMMAND_OUTPUT>
2143 #------------------------------------------------------------------------------
2144 <COMMAND_INPUT>
2145 lttng --mi xml snapshot list-output -s mysession
2146 </COMMAND_INPUT>
2147 <COMMAND_RESULT>
2148 0
2149 </COMMAND_RESULT>
2150 <COMMAND_OUTPUT>
2151 <?xml version="1.0" encoding="UTF-8"?>
2152 <command>
2153 <name>snapshot</name>
2154 <output>
2155 <snapshot_action>
2156 <name>list-output</name>
2157 <output>
2158 <session>
2159 <name>mysession</name>
2160 <snapshots>
2161 <snapshot>
2162 <id>1</id>
2163 <name>snapshot-1</name>
2164 <ctrl_url>/home/user/lttng-traces/mysession-20130913-141651</ctrl_url>
2165 <data_url/>
2166 <max_size>0</max_size>
2167 </snapshot>
2168 </snapshots>
2169 </session>
2170 </output>
2171 </snapshot_action>
2172 </output>
2173 <success>true</success>
2174 </command>
2175 </COMMAND_OUTPUT>
2176 #------------------------------------------------------------------------------
2177 <COMMAND_INPUT>
2178 lttng --mi xml list
2179 </COMMAND_INPUT>
2180 <COMMAND_RESULT>
2181 0
2182 </COMMAND_RESULT>
2183 <COMMAND_OUTPUT>
2184 <?xml version="1.0" encoding="UTF-8"?>
2185 <command>
2186 <name>list</name>
2187 <output>
2188 <sessions>
2189 <session>
2190 <name>mysession</name>
2191 <path/>
2192 <enabled>false</enabled>
2193 <snapshot_mode>1</snapshot_mode>
2194 <live_timer_interval>4294967295</live_timer_interval>
2195 </session>
2196 </sessions>
2197 </output>
2198 </command>
2199 </COMMAND_OUTPUT>
2200 #------------------------------------------------------------------------------
2201 <COMMAND_INPUT>
2202 lttng --mi xml snapshot record -s mysession
2203 </COMMAND_INPUT>
2204 <COMMAND_RESULT>
2205 0
2206 </COMMAND_RESULT>
2207 <COMMAND_OUTPUT>
2208 Snapshot recorded successfully for session mysession
2209 </COMMAND_OUTPUT>
2210 #------------------------------------------------------------------------------
2211 <COMMAND_INPUT>
2212 lttng --mi xml destroy mysession
2213 </COMMAND_INPUT>
2214 <COMMAND_RESULT>
2215 0
2216 </COMMAND_RESULT>
2217 <COMMAND_OUTPUT>
2218 <?xml version="1.0" encoding="UTF-8"?>
2219 <command>
2220 <name>destroy</name>
2221 <output>
2222 <sessions>
2223 <session>
2224 <name>mysession</name>
2225 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2226 <enabled>false</enabled>
2227 <snapshot_mode>0</snapshot_mode>
2228 <live_timer_interval>0</live_timer_interval>
2229 </session>
2230 </sessions>
2231 </output>
2232 <success>true</success>
2233 </command>
2234 </COMMAND_OUTPUT>
2235 </SCENARIO>
2236
2237 ####################################################################
2238 # Scenario: Test "lttng create <session> --snapshot -U <URL> (LTTng 2.3)
2239 ####################################################################
2240 <SCENARIO>
2241 CreateSessionStreamedSnapshot
2242 <COMMAND_INPUT>
2243 lttng --mi xml create mysession --snapshot -U net://172.0.0.1
2244 </COMMAND_INPUT>
2245 <COMMAND_RESULT>
2246 0
2247 </COMMAND_RESULT>
2248 <COMMAND_OUTPUT>
2249 Session mysession created.
2250 Default snapshot output set to: net://172.0.0.1
2251 Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
2252 </COMMAND_OUTPUT>
2253 #------------------------------------------------------------------------------
2254 <COMMAND_INPUT>
2255 lttng --mi xml snapshot list-output -s mysession
2256 </COMMAND_INPUT>
2257 <COMMAND_RESULT>
2258 0
2259 </COMMAND_RESULT>
2260 <COMMAND_OUTPUT>
2261 Snapshot output list for session mysession
2262 [2] snapshot-2: net4://172.0.0.1:5342/
2263 </COMMAND_OUTPUT>
2264 #------------------------------------------------------------------------------
2265 <COMMAND_INPUT>
2266 lttng --mi xml list
2267 </COMMAND_INPUT>
2268 <COMMAND_RESULT>
2269 0
2270 </COMMAND_RESULT>
2271 <COMMAND_OUTPUT>
2272 1) mysession () [inactive snapshot]
2273
2274 </COMMAND_OUTPUT>
2275 #------------------------------------------------------------------------------
2276 <COMMAND_INPUT>
2277 lttng --mi xml snapshot record -s mysession
2278 </COMMAND_INPUT>
2279 <COMMAND_RESULT>
2280 0
2281 </COMMAND_RESULT>
2282 <COMMAND_OUTPUT>
2283 Snapshot recorded successfully for session mysession
2284 </COMMAND_OUTPUT>
2285 #------------------------------------------------------------------------------
2286 <COMMAND_INPUT>
2287 lttng --mi xml destroy mysession
2288 </COMMAND_INPUT>
2289 <COMMAND_RESULT>
2290 0
2291 </COMMAND_RESULT>
2292 <COMMAND_OUTPUT>
2293 <?xml version="1.0" encoding="UTF-8"?>
2294 <command>
2295 <name>destroy</name>
2296 <output>
2297 <sessions>
2298 <session>
2299 <name>mysession</name>
2300 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2301 <enabled>false</enabled>
2302 <snapshot_mode>0</snapshot_mode>
2303 <live_timer_interval>0</live_timer_interval>
2304 </session>
2305 </sessions>
2306 </output>
2307 <success>true</success>
2308 </command>
2309 </COMMAND_OUTPUT>
2310 </SCENARIO>
2311
2312 ####################################################################
2313 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
2314 ####################################################################
2315 <SCENARIO>
2316 CreateSessionSnapshotErrors
2317 <COMMAND_INPUT>
2318 lttng --mi xml snapshot list-output -s blabla
2319 </COMMAND_INPUT>
2320 <COMMAND_RESULT>
2321 1
2322 </COMMAND_RESULT>
2323 <COMMAND_OUTPUT>
2324 <COMMAND_ERROR_OUTPUT>
2325 <?xml version="1.0" encoding="UTF-8"?>
2326 <command>
2327 <name>snapshot</name>
2328 <output>
2329 <snapshot_action>
2330 <name>list-output</name>
2331 <output/>
2332 </snapshot_action>
2333 </output>
2334 <success>false</success>
2335 </command>
2336 </COMMAND_ERROR_OUTPUT>
2337 </COMMAND_OUTPUT>
2338 #------------------------------------------------------------------------------
2339 #next is not an error case but good to be tested
2340 <COMMAND_INPUT>
2341 lttng --mi xml list
2342 </COMMAND_INPUT>
2343 <COMMAND_RESULT>
2344 0
2345 </COMMAND_RESULT>
2346 <COMMAND_OUTPUT>
2347 <?xml version="1.0" encoding="UTF-8"?>
2348 <command>
2349 <name>list</name>
2350 <output>
2351 <sessions>
2352 <session>
2353 <name>mysession</name>
2354 <path/>
2355 <enabled>true</enabled>
2356 <snapshot_mode>1</snapshot_mode>
2357 <live_timer_interval>4294967295</live_timer_interval>
2358 </session>
2359 </sessions>
2360 </output>
2361 </command>
2362 </COMMAND_OUTPUT>
2363 #------------------------------------------------------------------------------
2364 <COMMAND_INPUT>
2365 lttng --mi xml snapshot record -s blabla
2366 </COMMAND_INPUT>
2367 <COMMAND_RESULT>
2368 1
2369 </COMMAND_RESULT>
2370 <COMMAND_OUTPUT>
2371 <COMMAND_ERROR_OUTPUT>
2372 Error: Session name not found
2373 </COMMAND_ERROR_OUTPUT>
2374 <?xml version="1.0" encoding="UTF-8"?>
2375 <command>
2376 <name>snapshot</name>
2377 <output>
2378 <snapshot_action>
2379 <name>record</name>
2380 <output/>
2381 </snapshot_action>
2382 </output>
2383 <success>false</success>
2384 </command>
2385 </COMMAND_OUTPUT>
2386 #------------------------------------------------------------------------------
2387 <COMMAND_INPUT>
2388 lttng --mi xml snapshot record -s mysession
2389 </COMMAND_INPUT>
2390 <COMMAND_RESULT>
2391 1
2392 </COMMAND_RESULT>
2393 <COMMAND_OUTPUT>
2394 <COMMAND_ERROR_OUTPUT>
2395 Error: Session needs to be started once
2396 </COMMAND_ERROR_OUTPUT>
2397 <?xml version="1.0" encoding="UTF-8"?>
2398 <command>
2399 <name>snapshot</name>
2400 <output>
2401 <snapshot_action>
2402 <name>record</name>
2403 <output/>
2404 </snapshot_action>
2405 </output>
2406 <success>false</success>
2407 </command>
2408 </COMMAND_OUTPUT>
2409
2410 </SCENARIO>
2411
2412 ####################################################################
2413 # Scenario: Test "lttng create <session> --live [USEC] (LTTng 2.4)
2414 ####################################################################
2415 <SCENARIO>
2416 CreateSessionLive
2417 <COMMAND_INPUT>
2418 lttng --mi xml create mysession --live -U net://127.0.0.1
2419 </COMMAND_INPUT>
2420 <COMMAND_RESULT>
2421 0
2422 </COMMAND_RESULT>
2423 <COMMAND_OUTPUT>
2424 <?xml version="1.0" encoding="UTF-8"?>
2425 <command>
2426 <name>create</name>
2427 <output>
2428 <session>
2429 <name>mysession</name>
2430 <path>tcp4://127.0.0.1:5342/ [data: 5343]</path>
2431 <enabled>false</enabled>
2432 <snapshot_mode>0</snapshot_mode>
2433 <live_timer_interval>1000000</live_timer_interval>
2434 </session>
2435 </output>
2436 <success>true</success>
2437 </command>
2438 </COMMAND_OUTPUT>
2439 #------------------------------------------------------------------------------
2440 <COMMAND_INPUT>
2441 lttng --mi xml list
2442 </COMMAND_INPUT>
2443 <COMMAND_RESULT>
2444 0
2445 </COMMAND_RESULT>
2446 <COMMAND_OUTPUT>
2447 <?xml version="1.0" encoding="UTF-8"?>
2448 <command>
2449 <name>list</name>
2450 <output>
2451 <sessions>
2452 <session>
2453 <name>mysession</name>
2454 <path>tcp4://127.0.0.1:5342/ [data: 5343]</path>
2455 <enabled>false</enabled>
2456 <snapshot_mode>0</snapshot_mode>
2457 <live_timer_interval>1000000</live_timer_interval>
2458 </session>
2459 </sessions>
2460 </output>
2461 </command>
2462 </COMMAND_OUTPUT>
2463 #------------------------------------------------------------------------------
2464 <COMMAND_INPUT>
2465 lttng --mi xml destroy mysession
2466 </COMMAND_INPUT>
2467 <COMMAND_RESULT>
2468 0
2469 </COMMAND_RESULT>
2470 <COMMAND_OUTPUT>
2471 <?xml version="1.0" encoding="UTF-8"?>
2472 <command>
2473 <name>destroy</name>
2474 <output>
2475 <sessions>
2476 <session>
2477 <name>mysession</name>
2478 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2479 <enabled>false</enabled>
2480 <snapshot_mode>0</snapshot_mode>
2481 <live_timer_interval>0</live_timer_interval>
2482 </session>
2483 </sessions>
2484 </output>
2485 <success>true</success>
2486 </command>
2487 </COMMAND_OUTPUT>
2488 </SCENARIO>
2489
2490 ####################################################################
2491 # Scenario: Test errors for "lttng create <session> --live [USEC] (LTTng 2.4)
2492 ####################################################################
2493 <SCENARIO>
2494 CreateSessionLiveErrors
2495 <COMMAND_INPUT>
2496 lttng --mi xml create mysession --live --snapshot
2497 </COMMAND_INPUT>
2498 <COMMAND_RESULT>
2499 1
2500 </COMMAND_RESULT>
2501 <COMMAND_OUTPUT>
2502 <COMMAND_ERROR_OUTPUT>
2503 Error: Snapshot and live modes are mutually exclusive.
2504 Error: Command error
2505 </COMMAND_ERROR_OUTPUT>
2506 </COMMAND_OUTPUT>
2507 #------------------------------------------------------------------------------
2508 <COMMAND_INPUT>
2509 lttng --mi xml create mysession --live -U blah
2510 </COMMAND_INPUT>
2511 <COMMAND_RESULT>
2512 1
2513 </COMMAND_RESULT>
2514 <COMMAND_OUTPUT>
2515 <COMMAND_ERROR_OUTPUT>
2516 Error: URI parse unknown protocol blah
2517 Error: Unable to parse the URL blah
2518 Error: Invalid parameter
2519 </COMMAND_ERROR_OUTPUT>
2520 </COMMAND_OUTPUT>
2521 #------------------------------------------------------------------------------
2522 <COMMAND_INPUT>
2523 lttng --mi xml create mysession --live -C net://127.0.0.1
2524 </COMMAND_INPUT>
2525 <COMMAND_RESULT>
2526 1
2527 </COMMAND_RESULT>
2528 <COMMAND_OUTPUT>
2529 <COMMAND_ERROR_OUTPUT>
2530 Error: You need both control and data URL.
2531 Error: Command error
2532 </COMMAND_ERROR_OUTPUT>
2533 </COMMAND_OUTPUT>
2534 </SCENARIO>
2535
2536 ####################################################################
2537 # Scenario: Test "lttng list <session> (version 2.6.0, syscalls)
2538 ####################################################################
2539 <SCENARIO>
2540 GetSessionWithSyscalls
2541 <COMMAND_INPUT>
2542 lttng --mi xml list mysession
2543 </COMMAND_INPUT>
2544 <COMMAND_RESULT>
2545 0
2546 </COMMAND_RESULT>
2547 <COMMAND_OUTPUT>
2548 <?xml version="1.0" encoding="UTF-8"?>
2549 <command>
2550 <name>list</name>
2551 <output>
2552 <sessions>
2553 <session>
2554 <name>mysession</name>
2555 <path>/home/user/lttng-traces/mysession-20120129-084256</path>
2556 <enabled>false</enabled><snapshot_mode>0</snapshot_mode>
2557 <live_timer_interval>0</live_timer_interval>
2558 <domains>
2559 <domain>
2560 <type>KERNEL</type>
2561 <buffer_type>PER_PID</buffer_type>
2562 <channels>
2563 <channel>
2564 <name>channel0</name>
2565 <enabled>true</enabled>
2566 <attributes>
2567 <overwrite_mode>DISCARD</overwrite_mode>
2568 <subbuffer_size>262144</subbuffer_size>
2569 <subbuffer_count>4</subbuffer_count>
2570 <switch_timer_interval>0</switch_timer_interval>
2571 <read_timer_interval>200</read_timer_interval>
2572 <output_type>SPLICE</output_type>
2573 <tracefile_size>0</tracefile_size>
2574 <tracefile_count>0</tracefile_count>
2575 <live_timer_interval>0</live_timer_interval>
2576 </attributes><events>
2577 <event>
2578 <name>read</name>
2579 <type>SYSCALL</type>
2580 <enabled>true</enabled>
2581 <filter>false</filter>
2582 </event>
2583 <event>
2584 <name>write</name>
2585 <type>SYSCALL</type>
2586 <enabled>true</enabled>
2587 <filter>false</filter>
2588 </event>
2589 </events>
2590 </channel>
2591 </channels>
2592 </domain></domains>
2593 </session>
2594 </sessions>
2595 </output>
2596 </command>
2597 </COMMAND_OUTPUT>
2598 </SCENARIO>
2599 <SCENARIO>
2600 ListSession2.7Compat
2601 <COMMAND_INPUT>
2602 lttng --mi xml list mysession
2603 </COMMAND_INPUT>
2604 <COMMAND_RESULT>
2605 0
2606 </COMMAND_RESULT>
2607 <COMMAND_OUTPUT>
2608 <?xml version="1.0" encoding="UTF-8"?>
2609 <command>
2610 <name>list</name>
2611 <output>
2612 <sessions>
2613 <session>
2614 <name>mysession</name>
2615 <path>/home/user/lttng-traces/mysession-20151020-085614</path>
2616 <enabled>false</enabled>
2617 <snapshot_mode>0</snapshot_mode>
2618 <live_timer_interval>0</live_timer_interval>
2619 <domains>
2620 <domain>
2621 <type>KERNEL</type>
2622 <buffer_type>GLOBAL</buffer_type>
2623 <trackers/>
2624 <channels>
2625 <channel>
2626 <name>channel0</name>
2627 <enabled>true</enabled>
2628 <attributes>
2629 <overwrite_mode>DISCARD</overwrite_mode>
2630 <subbuffer_size>262144</subbuffer_size>
2631 <subbuffer_count>4</subbuffer_count>
2632 <switch_timer_interval>0</switch_timer_interval>
2633 <read_timer_interval>200000</read_timer_interval>
2634 <output_type>SPLICE</output_type>
2635 <tracefile_size>0</tracefile_size>
2636 <tracefile_count>0</tracefile_count>
2637 <live_timer_interval>0</live_timer_interval>
2638 </attributes>
2639 <events>
2640 <event><name>*</name>
2641 <type>SYSCALL</type>
2642 <enabled>true</enabled>
2643 <filter>false</filter>
2644 </event>
2645 <event>
2646 <name>*</name>
2647 <type>TRACEPOINT</type>
2648 <enabled>true</enabled>
2649 <filter>false</filter>
2650 <loglevel>TRACE_EMERG</loglevel>
2651 <loglevel_type>ALL</loglevel_type>
2652 <exclusion>false</exclusion>
2653 </event>
2654 </events>
2655 </channel>
2656 </channels>
2657 </domain>
2658 <domain>
2659 <type>UST</type>
2660 <buffer_type>PER_PID</buffer_type>
2661 <trackers/>
2662 <channels>
2663 <channel>
2664 <name>channel0</name>
2665 <enabled>true</enabled>
2666 <attributes>
2667 <overwrite_mode>DISCARD</overwrite_mode>
2668 <subbuffer_size>4096</subbuffer_size>
2669 <subbuffer_count>4</subbuffer_count>
2670 <switch_timer_interval>0</switch_timer_interval>
2671 <read_timer_interval>0</read_timer_interval>
2672 <output_type>MMAP</output_type>
2673 <tracefile_size>0</tracefile_size>
2674 <tracefile_count>0</tracefile_count>
2675 <live_timer_interval>0</live_timer_interval>
2676 </attributes>
2677 <events>
2678 <event><name>*</name>
2679 <type>TRACEPOINT</type>
2680 <enabled>true</enabled>
2681 <filter>false</filter>
2682 <exclusion>false</exclusion>
2683 </event></events>
2684 </channel>
2685 </channels>
2686 </domain>
2687 </domains>
2688 </session>
2689 </sessions>
2690 </output>
2691 </command>
2692 </COMMAND_OUTPUT>
2693 </SCENARIO>
2694 ####################################################################
2695 # Scenario: Test "lttng load [OPTIONS] [SESSION]"
2696 # "lttng save [OPTIONS] [SESSION]"
2697 # (LTTng 2.5)
2698 ####################################################################
2699 <SCENARIO>
2700 SessionProfile
2701 <COMMAND_INPUT>
2702 lttng --mi xml load -i /home/user/.lttng/sessions/mysession.lttng
2703 </COMMAND_INPUT>
2704 <COMMAND_RESULT>
2705 0
2706 </COMMAND_RESULT>
2707 <COMMAND_OUTPUT>
2708 <command><name>load</name><output><load><session><name>*</name></session><path>.lttng/sessions/seqSession2.lttng</path></load></output><success>true</success></command>
2709 </COMMAND_OUTPUT>
2710
2711 <SCENARIO>
2712 SessionProfile
2713 <COMMAND_INPUT>
2714 lttng --mi xml load -i /home/user/.lttng/sessions/mysession.lttng -f
2715 </COMMAND_INPUT>
2716 <COMMAND_RESULT>
2717 0
2718 </COMMAND_RESULT>
2719 <COMMAND_OUTPUT>
2720 <command><name>load</name><output><load><session><name>*</name></session><path>.lttng/sessions/seqSession2.lttng</path></load></output><success>true</success></command>
2721 </COMMAND_OUTPUT>
2722
2723 <COMMAND_INPUT>
2724 lttng --mi xml save
2725 </COMMAND_INPUT>
2726 <COMMAND_RESULT>
2727 0
2728 </COMMAND_RESULT>
2729 <COMMAND_OUTPUT>
2730 <command><name>save</name><output><save><session><name>*</name></session></save></output><success>true</success></command>
2731 </COMMAND_OUTPUT>
2732
2733 <COMMAND_INPUT>
2734 lttng --mi xml save mysession
2735 </COMMAND_INPUT>
2736 <COMMAND_RESULT>
2737 0
2738 </COMMAND_RESULT>
2739 <COMMAND_OUTPUT>
2740 <command><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>
2741 </COMMAND_OUTPUT>
2742
2743 <COMMAND_INPUT>
2744 lttng --mi xml save -f mysession
2745 </COMMAND_INPUT>
2746 <COMMAND_RESULT>
2747 0
2748 </COMMAND_RESULT>
2749 <COMMAND_OUTPUT>
2750 <command><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>
2751 </COMMAND_OUTPUT>
2752
2753 <COMMAND_INPUT>
2754 lttng --mi xml save -o /tmp/test -f mysession
2755 </COMMAND_INPUT>
2756 <COMMAND_RESULT>
2757 0
2758 </COMMAND_RESULT>
2759 <COMMAND_OUTPUT>
2760 <command><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>
2761 </COMMAND_OUTPUT>
2762
2763 </SCENARIO>
This page took 0.097498 seconds and 5 git commands to generate.