1 ####################################################################
2 # Copyright (c) 2014, 2015 Ericsson
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
10 # Jonathan Rajotte - Initial API and implementation
11 # Bernd Hufmann - Added new test cases
12 ####################################################################
13 ####################################################################
14 # Scenario: Test lttng not installed
15 ####################################################################
25 <COMMAND_ERROR_OUTPUT>
27 </COMMAND_ERROR_OUTPUT>
31 ####################################################################
32 # Scenario: Test lttng version
33 ####################################################################
43 lttng version 2.1.0 - Basse Messe
44 Web site: http://lttng.org/
46 lttng is free software and under the GPL license and part LGPL
50 ####################################################################
51 # Scenario: Test lttng version
53 ####################################################################
55 LttngVersionWithPrompt
63 Prompt> lttng version 2.0.0 - Annedd'ale
64 Web site: http://lttng.org/
66 lttng is free software and under the GPL license and part LGPL
70 ####################################################################
71 # Scenario: Test lttng version (unsupported version)
72 ####################################################################
74 LttngUnsupportedVersion
82 lttng version 200.0.0 - Annedd'ale
83 Web site: http://lttng.org/
85 lttng is free software and under the GPL license and part LGPL
90 ####################################################################
91 # Scenario: Test lttng version (noversion)
92 ####################################################################
102 Web site: http://lttng.org/
104 lttng is free software and under the GPL license and part LGPL
108 ####################################################################
109 # Scenario: Test lttng version (compiled from source)
110 ####################################################################
114 lttng --mi xml version
120 <?xml version="1.0" encoding="UTF-8"?>
125 <string>2.5.0-rc2</string>
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>
140 ####################################################################
141 # Scenario: Test no sessions available
142 ####################################################################
152 <?xml version="1.0" encoding="UTF-8"?>
153 <command><name>list</name><output><sessions/></output></command>
157 ####################################################################
158 # Scenario: Test get sessions
159 ####################################################################
169 <?xml version="1.0" encoding="UTF-8"?>
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>
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>
194 ####################################################################
195 # Scenario: Test get sessions with tracing group
196 ####################################################################
198 GetSessionWithTracingGroup
200 lttng -g group --mi xml list
206 <?xml version="1.0" encoding="UTF-8"?>
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>
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>
232 ####################################################################
233 # Scenario: Test lttng list <name> where session doesn't exist
234 ####################################################################
236 GetSessionNameNotExist
238 lttng --mi xml list test
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
249 </COMMAND_ERROR_OUTPUT>
253 ####################################################################
254 # Scenario: Test lttng -vvv list <name> where session doesn't exist
255 ####################################################################
257 GetSessionNameNotExistVerbose
259 lttng --mi xml -vvv list test
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
270 </COMMAND_ERROR_OUTPUT>
274 ####################################################################
275 # Scenario: Test lttng list with garbage output
276 ####################################################################
286 asdfaereafsdcv 12333456434&*89**(())(^%$*
287 @#$%^&*()@#$%^&*()0834523094578kj;djkfs
288 a;sdf094v5u dsafj;sd9
292 ####################################################################
293 # Scenario: Test lttng list <name> with sample outputs
294 ####################################################################
298 lttng --mi xml list mysession
304 <?xml version="1.0" encoding="UTF-8"?>
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>
318 <buffer_type>PER_PID</buffer_type>
321 <name>channel0</name>
322 <enabled>true</enabled>
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>
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>
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>
356 <name>channel1</name>
357 <enabled>false</enabled>
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>
375 <buffer_type>PER_UID</buffer_type>
378 <name>mychannel1</name>
379 <enabled>false</enabled>
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>
394 <name>channel0</name>
395 <enabled>true</enabled>
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>
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>
419 <type>TRACEPOINT</type>
420 <enabled>true</enabled>
421 <filter>false</filter>
422 <exclusion>false</exclusion>
435 lttng --mi xml list mysession1
441 <?xml version="1.0" encoding="UTF-8"?>
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>
460 ####################################################################
461 # Scenario: Test lttng list <name> in the presence of filter expressions
462 ####################################################################
464 GetSessionFilterExpression
466 lttng --mi xml list mysession
472 <?xml version="1.0" encoding="UTF-8"?>
478 <name>mysession</name>
479 <path>/home/user/lttng-traces/mysession-20120129-084256</path>
480 <enabled>true</enabled>
481 <snapshot_mode>0</snapshot_mode>
482 <live_timer_interval>0</live_timer_interval>
486 <buffer_type>PER_PID</buffer_type>
489 <name>channel0</name>
490 <enabled>true</enabled>
492 <overwrite_mode>DISCARD</overwrite_mode>
493 <subbuffer_size>262144</subbuffer_size>
494 <subbuffer_count>4</subbuffer_count>
495 <switch_timer_interval>0</switch_timer_interval>
496 <read_timer_interval>200</read_timer_interval>
497 <output_type>SPLICE</output_type>
498 <tracefile_size>0</tracefile_size>
499 <tracefile_count>0</tracefile_count>
500 <live_timer_interval>0</live_timer_interval>
504 <name>block_rq_remap</name>
505 <type>TRACEPOINT</type>
506 <enabled>true</enabled>
507 <filter_expression>foo > 10</filter_expression>
508 <loglevel>TRACE_EMERG</loglevel>
509 <loglevel_type>ALL</loglevel_type>
510 <exclusion>false</exclusion>
518 <buffer_type>PER_UID</buffer_type>
521 <name>channel0</name>
522 <enabled>true</enabled>
524 <overwrite_mode>DISCARD</overwrite_mode>
525 <subbuffer_size>4096</subbuffer_size>
526 <subbuffer_count>4</subbuffer_count>
527 <switch_timer_interval>0</switch_timer_interval>
528 <read_timer_interval>200</read_timer_interval>
529 <output_type>MMAP</output_type>
530 <tracefile_size>0</tracefile_size>
531 <tracefile_count>0</tracefile_count>
532 <live_timer_interval>0</live_timer_interval>
536 <name>ust_tests_hello:tptest_sighandler</name>
537 <type>TRACEPOINT</type>
538 <enabled>false</enabled>
539 <filter_expression>foo > 10</filter_expression>
540 <loglevel>TRACE_DEBUG_LINE</loglevel>
541 <loglevel_type>ALL</loglevel_type>
542 <exclusion>false</exclusion>
556 ####################################################################
557 # Scenario: Test lttng list <name> (with live time interval)
558 ####################################################################
560 GetSessionWithLiveInterval
562 lttng --mi xml list mysession
568 <?xml version="1.0" encoding="UTF-8"?>
574 <name>mysession</name>
575 <path>/home/user/lttng-traces/mysession-20120129-084256</path>
576 <enabled>false</enabled>
577 <snapshot_mode>1</snapshot_mode>
578 <live_timer_interval>4294967295</live_timer_interval>
586 #------------------------------------------------------------------------------
588 lttng --mi xml snapshot list-output -s mysession
594 <?xml version="1.0" encoding="UTF-8"?>
596 <name>snapshot</name>
599 <name>list-output</name>
602 <name>mysession</name>
606 <name>snapshot-1</name>
607 <ctrl_url>/home/user/lttng-traces/mysession-20120129-084256</ctrl_url>
609 <max_size>0</max_size>
616 <success>true</success>
619 #------------------------------------------------------------------------------
621 lttng --mi xml list mysession1
627 <?xml version="1.0" encoding="UTF-8"?>
633 <name>mysession1</name>
634 <path>/home/user/lttng-traces/mysession1-20120129-084256</path>
635 <enabled>true</enabled>
636 <snapshot_mode>0</snapshot_mode>
637 <live_timer_interval>0</live_timer_interval>
644 #------------------------------------------------------------------------------
646 lttng --mi xml list mysession2
652 <?xml version="1.0" encoding="UTF-8"?>
658 <name>mysession2</name>
659 <path>tcp4://172.0.0.1:5342/ [data: 5343]</path>
660 <enabled>false</enabled>
661 <snapshot_mode>0</snapshot_mode>
662 <live_timer_interval>1000000</live_timer_interval>
673 ####################################################################
674 # Scenario: Test "lttng list -k" with sample output
675 ####################################################################
679 lttng --mi xml list -k
685 <?xml version="1.0" encoding="UTF-8"?>
692 <buffer_type>PER_PID</buffer_type>
695 <name>sched_kthread_stop</name>
696 <type>TRACEPOINT</type>
697 <enabled>true</enabled>
698 <filter>false</filter>
699 <loglevel>TRACE_EMERG</loglevel>
700 <loglevel_type>ALL</loglevel_type>
701 <exclusion>false</exclusion>
704 <name>sched_kthread_stop_ret</name>
705 <type>TRACEPOINT</type>
706 <enabled>true</enabled>
707 <filter>false</filter>
708 <loglevel>TRACE_EMERG</loglevel>
709 <loglevel_type>ALL</loglevel_type>
710 <exclusion>false</exclusion>
713 <name>sched_wakeup_new</name>
714 <type>TRACEPOINT</type>
715 <enabled>true</enabled>
716 <filter>false</filter>
717 <loglevel>TRACE_EMERG</loglevel>
718 <loglevel_type>ALL</loglevel_type>
719 <exclusion>false</exclusion>
729 ####################################################################
730 # Scenario: Test "lttng list -k" with no kernel and no session daemon
731 ####################################################################
735 lttng --mi xml list -k
741 Spawning session daemon
742 <COMMAND_ERROR_OUTPUT>
743 Error: Unable to list kernel events
744 </COMMAND_ERROR_OUTPUT>
748 ####################################################################
749 # Scenario: Test "lttng list -k" with no kernel and with session daemon
750 ####################################################################
754 lttng --mi xml list -k
760 <COMMAND_ERROR_OUTPUT>
761 Error: Unable to list kernel events
762 </COMMAND_ERROR_OUTPUT>
766 ####################################################################
767 # Scenario: Test "lttng list -u" with sample output
768 ####################################################################
772 lttng --mi xml list -u -f
778 <?xml version="1.0" encoding="UTF-8"?>
785 <buffer_type>PER_PID</buffer_type>
789 <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
792 <name>ust_tests_hello:tptest_sighandler</name>
793 <type>TRACEPOINT</type>
794 <enabled>true</enabled>
795 <filter>false</filter>
796 <loglevel>TRACE_DEBUG_MODULE</loglevel>
797 <loglevel_type>ALL</loglevel_type>
798 <exclusion>false</exclusion>
802 <name>ust_tests_hello:tptest</name>
803 <type>TRACEPOINT</type>
804 <enabled>true</enabled>
805 <filter>false</filter>
806 <loglevel>TRACE_INFO</loglevel>
807 <loglevel_type>ALL</loglevel_type>
808 <exclusion>false</exclusion>
811 <name>doublefield</name>
816 <name>floatfield</name>
821 <name>stringfield</name>
831 <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
834 <name>ust_tests_hello:tptest_sighandler</name>
835 <type>TRACEPOINT</type>
836 <enabled>true</enabled>
837 <filter>false</filter>
838 <loglevel>TRACE_WARNING</loglevel>
839 <loglevel_type>ALL</loglevel_type>
840 <exclusion>false</exclusion>
844 <name>ust_tests_hello:tptest</name>
845 <type>TRACEPOINT</type>
846 <enabled>true</enabled>
847 <filter>false</filter>
848 <loglevel>TRACE_DEBUG_FUNCTION</loglevel>
849 <loglevel_type>ALL</loglevel_type>
850 <exclusion>false</exclusion>
853 <name>doublefield</name>
858 <name>floatfield</name>
863 <name>stringfield</name>
879 ####################################################################
880 # Scenario: Test "lttng list -u" with no UST provider available
881 ####################################################################
885 lttng --mi xml list -u -f
891 <?xml version="1.0" encoding="UTF-8"?>
898 <buffer_type>PER_PID</buffer_type>
907 ####################################################################
908 # Scenario: Test "lttng list -u" with no UST available (LTTng 2.0.x)
909 ####################################################################
913 lttng --mi xml list -u -f
919 <?xml version="1.0" encoding="UTF-8"?>
920 <command><name>list</name><output/></command>
921 <COMMAND_ERROR_OUTPUT>
922 Error: Unable to list UST event fields: LTTng-UST tracer is not supported. Please rebuild lttng-tools with lttng-ust support enabled.
924 </COMMAND_ERROR_OUTPUT>
927 ####################################################################
928 # Scenario: Test "lttng list -u" with no UST available and no session daemon
929 ####################################################################
933 lttng --mi xml list -u -f
939 <?xml version="1.0" encoding="UTF-8"?>
940 <command><name>list</name><output/></command>
941 <COMMAND_ERROR_OUTPUT>
942 Error: Unable to list UST event fields: LTTng-UST tracer is not supported. Please rebuild lttng-tools with lttng-ust support enabled.
944 </COMMAND_ERROR_OUTPUT>
947 ####################################################################
948 # Scenario: Test "lttng list -" with no kernel and with session daemon
949 ####################################################################
953 lttng --mi xml list -u -f
959 <?xml version="1.0" encoding="UTF-8"?>
960 <command><name>list</name><output/></command>
961 <COMMAND_ERROR_OUTPUT>
962 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.
964 </COMMAND_ERROR_OUTPUT>
968 ####################################################################
969 # Scenario: Test "lttng list -u -f" with sample output (version 2.6.0)
970 ####################################################################
974 lttng --mi xml list -u -f
980 <?xml version="1.0" encoding="UTF-8"?>
987 <buffer_type>PER_PID</buffer_type>
991 <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
994 <name>ust_tests_hello:tptest_sighandler</name>
995 <type>TRACEPOINT</type>
996 <enabled>true</enabled>
997 <filter>false</filter>
998 <loglevel>TRACE_DEBUG_MODULE</loglevel>
999 <loglevel_type>ALL</loglevel_type>
1000 <exclusion>false</exclusion>
1004 <name>ust_tests_hello:tptest</name>
1005 <type>TRACEPOINT</type>
1006 <enabled>true</enabled>
1007 <filter>false</filter>
1008 <loglevel>TRACE_INFO</loglevel>
1009 <loglevel_type>ALL</loglevel_type>
1010 <exclusion>false</exclusion>
1013 <name>doublefield</name>
1015 <nowrite>0</nowrite>
1018 <name>floatfield</name>
1020 <nowrite>0</nowrite>
1023 <name>stringfield</name>
1025 <nowrite>0</nowrite>
1033 <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
1036 <name>ust_tests_hello:tptest_sighandler</name>
1037 <type>TRACEPOINT</type>
1038 <enabled>true</enabled>
1039 <filter>false</filter>
1040 <loglevel>TRACE_WARNING</loglevel>
1041 <loglevel_type>ALL</loglevel_type>
1042 <exclusion>false</exclusion>
1046 <name>ust_tests_hello:tptest</name>
1047 <type>TRACEPOINT</type>
1048 <enabled>true</enabled>
1049 <filter>false</filter>
1050 <loglevel>TRACE_DEBUG_FUNCTION</loglevel>
1051 <loglevel_type>ALL</loglevel_type>
1052 <exclusion>false</exclusion>
1055 <name>doublefield</name>
1057 <nowrite>0</nowrite>
1060 <name>floatfield</name>
1062 <nowrite>0</nowrite>
1065 <name>stringfield</name>
1067 <nowrite>0</nowrite>
1080 ####################################################################
1081 # Scenario: Test "lttng create <session>
1082 ####################################################################
1086 lttng --mi xml create mysession2
1092 <?xml version="1.0" encoding="UTF-8"?>
1097 <name>mysession2</name>
1098 <path>/home/user/lttng-traces/mysession2-20120209-095418</path>
1099 <enabled>false</enabled>
1100 <snapshot_mode>0</snapshot_mode>
1101 <live_timer_interval>0</live_timer_interval>
1104 <success>true</success>
1109 ####################################################################
1110 # Scenario: Test "lttng create <session>
1111 ####################################################################
1113 CreateSessionWithPrompt
1115 lttng --mi xml create mysession2
1121 Prompt> Session mysession2 created.
1122 Traces will be written in /home/user/lttng-traces/mysession2-20120209-095418
1126 ####################################################################
1127 # Scenario: Test "lttng create <session> with different variants
1129 ####################################################################
1131 CreateSessionVariants
1133 lttng --mi xml create alreadyExist
1139 <?xml version="1.0" encoding="UTF-8"?>
1143 <success>false</success>
1145 <COMMAND_ERROR_OUTPUT>
1146 Warning: Session mysession2 already exists
1147 Error: Session name already exists
1148 </COMMAND_ERROR_OUTPUT>
1152 lttng --mi xml create session with spaces
1158 <?xml version="1.0" encoding="UTF-8"?>
1163 <name>session with spaces</name>
1164 <path>/home/user/lttng-traces/session with spaces-20120209-095418</path>
1165 <enabled>false</enabled>
1166 <snapshot_mode>0</snapshot_mode>
1167 <live_timer_interval>0</live_timer_interval>
1170 <success>true</success>
1175 lttng --mi xml create wrongName
1181 <?xml version="1.0" encoding="UTF-8"?>
1187 <path>/home/user/lttng-traces/auto-20120209-095418</path>
1188 <enabled>false</enabled>
1189 <snapshot_mode>0</snapshot_mode>
1190 <live_timer_interval>0</live_timer_interval>
1193 <success>true</success>
1198 lttng --mi xml create wrongPath -o /home/user/hallo
1204 <?xml version="1.0" encoding="UTF-8"?>
1209 <name>wrongPath</name>
1210 <path>/home/user/lttng-traces/wrongPath-20120209-095418</path>
1211 <enabled>false</enabled>
1212 <snapshot_mode>0</snapshot_mode>
1213 <live_timer_interval>0</live_timer_interval>
1216 <success>true</success>
1221 lttng --mi xml create pathWithSpaces -o /home/user/hallo user/here
1227 <?xml version="1.0" encoding="UTF-8"?>
1232 <name>pathWithSpaces</name>
1233 <path>/home/user/hallo user/here/pathWithSpaces-20120209-095418</path>
1234 <enabled>false</enabled>
1235 <snapshot_mode>0</snapshot_mode>
1236 <live_timer_interval>0</live_timer_interval>
1239 <success>true</success>
1244 ####################################################################
1245 # Scenario: Test "lttng destroy <session>
1246 ####################################################################
1251 lttng --mi xml destroy mysession2
1257 <?xml version="1.0" encoding="UTF-8"?>
1259 <name>destroy</name>
1263 <name>mysession2</name>
1264 <path>/home/user/lttng-traces/mysession2-20140812-160632</path>
1265 <enabled>false</enabled>
1266 <snapshot_mode>0</snapshot_mode>
1267 <live_timer_interval>0</live_timer_interval>
1271 <success>true</success>
1276 ####################################################################
1277 # Scenario: Test "lttng enable-channel ..." with different inputs
1278 ####################################################################
1283 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
1289 Kernel channel mychannel0 enabled for session mysession2
1290 Kernel channel mychannel1 enabled for session mysession2
1294 lttng --mi xml enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100
1300 <?xml version="1.0" encoding="UTF-8"?>
1302 <name>enable-channel</name>
1306 <name>mychannel0</name>
1307 <enabled>false</enabled>
1309 <overwrite_mode>OVERWRITE</overwrite_mode>
1310 <subbuffer_size>16384</subbuffer_size>
1311 <subbuffer_count>2</subbuffer_count>
1312 <switch_timer_interval>200</switch_timer_interval>
1313 <read_timer_interval>100</read_timer_interval>
1314 <output_type>SPLICE</output_type>
1315 <tracefile_size>0</tracefile_size>
1316 <tracefile_count>0</tracefile_count>
1317 <live_timer_interval>4294967295</live_timer_interval>
1319 <success>true</success>
1322 <name>mychannel1</name>
1323 <enabled>false</enabled>
1325 <overwrite_mode>OVERWRITE</overwrite_mode>
1326 <subbuffer_size>16384</subbuffer_size>
1327 <subbuffer_count>2</subbuffer_count>
1328 <switch_timer_interval>200</switch_timer_interval>
1329 <read_timer_interval>100</read_timer_interval>
1330 <output_type>SPLICE</output_type>
1331 <tracefile_size>0</tracefile_size>
1332 <tracefile_count>0</tracefile_count>
1333 <live_timer_interval>4294967295</live_timer_interval>
1335 <success>true</success>
1339 <success>true</success>
1344 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
1350 UST channel channel0 enabled for session mysession2
1354 lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200
1360 <?xml version="1.0" encoding="UTF-8"?>
1362 <name>enable-channel</name>
1366 <name>ustChannel</name>
1367 <enabled>false</enabled>
1369 <overwrite_mode>OVERWRITE</overwrite_mode>
1370 <subbuffer_size>32768</subbuffer_size>
1371 <subbuffer_count>2</subbuffer_count>
1372 <switch_timer_interval>100</switch_timer_interval>
1373 <read_timer_interval>200</read_timer_interval>
1374 <output_type>MMAP</output_type>
1375 <tracefile_size>0</tracefile_size>
1376 <tracefile_count>0</tracefile_count>
1377 <live_timer_interval>4294967295</live_timer_interval>
1379 <success>true</success>
1383 <success>true</success>
1388 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
1394 UST channel channel0 enabled for session mysession2
1398 lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --buffers-pid
1404 <?xml version="1.0" encoding="UTF-8"?>
1406 <name>enable-channel</name>
1410 <name>ustChannel</name>
1411 <enabled>false</enabled>
1413 <overwrite_mode>OVERWRITE</overwrite_mode>
1414 <subbuffer_size>4096</subbuffer_size>
1415 <subbuffer_count>4</subbuffer_count>
1416 <switch_timer_interval>0</switch_timer_interval>
1417 <read_timer_interval>0</read_timer_interval>
1418 <output_type>MMAP</output_type>
1419 <tracefile_size>0</tracefile_size>
1420 <tracefile_count>0</tracefile_count>
1421 <live_timer_interval>4294967295</live_timer_interval>
1423 <success>true</success>
1427 <success>true</success>
1432 lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 2 --switch-timer 100 --read-timer 200 --buffers-uid
1438 <?xml version="1.0" encoding="UTF-8"?>
1440 <name>enable-channel</name>
1444 <name>ustChannel</name>
1445 <enabled>false</enabled>
1447 <overwrite_mode>OVERWRITE</overwrite_mode>
1448 <subbuffer_size>32768</subbuffer_size>
1449 <subbuffer_count>2</subbuffer_count>
1450 <switch_timer_interval>100</switch_timer_interval>
1451 <read_timer_interval>200</read_timer_interval>
1452 <output_type>MMAP</output_type>
1453 <tracefile_size>0</tracefile_size>
1454 <tracefile_count>0</tracefile_count>
1455 <live_timer_interval>4294967295</live_timer_interval>
1457 <success>true</success>
1461 <success>true</success>
1467 lttng --mi xml enable-channel mychannel0,mychannel1 -k -s mysession2
1473 <?xml version="1.0" encoding="UTF-8"?>
1475 <name>enable-channel</name>
1479 <name>mychannel0</name>
1480 <enabled>false</enabled>
1482 <overwrite_mode>DISCARD</overwrite_mode>
1483 <subbuffer_size>262144</subbuffer_size>
1484 <subbuffer_count>4</subbuffer_count>
1485 <switch_timer_interval>0</switch_timer_interval>
1486 <read_timer_interval>200000</read_timer_interval>
1487 <output_type>SPLICE</output_type>
1488 <tracefile_size>0</tracefile_size>
1489 <tracefile_count>0</tracefile_count>
1490 <live_timer_interval>4294967295</live_timer_interval>
1492 <success>true</success>
1495 <name>mychannel1</name>
1496 <enabled>false</enabled>
1498 <overwrite_mode>DISCARD</overwrite_mode>
1499 <subbuffer_size>262144</subbuffer_size>
1500 <subbuffer_count>4</subbuffer_count>
1501 <switch_timer_interval>0</switch_timer_interval>
1502 <read_timer_interval>200000</read_timer_interval>
1503 <output_type>SPLICE</output_type>
1504 <tracefile_size>0</tracefile_size>
1505 <tracefile_count>0</tracefile_count>
1506 <live_timer_interval>4294967295</live_timer_interval>
1508 <success>true</success>
1512 <success>true</success>
1517 lttng --mi xml enable-channel ustChannel -u -s mysession2
1523 <?xml version="1.0" encoding="UTF-8"?>
1525 <name>enable-channel</name>
1529 <name>ustChannel</name>
1530 <enabled>false</enabled>
1532 <overwrite_mode>DISCARD</overwrite_mode>
1533 <subbuffer_size>131072</subbuffer_size>
1534 <subbuffer_count>4</subbuffer_count>
1535 <switch_timer_interval>0</switch_timer_interval>
1536 <read_timer_interval>0</read_timer_interval>
1537 <output_type>MMAP</output_type>
1538 <tracefile_size>0</tracefile_size>
1539 <tracefile_count>0</tracefile_count>
1540 <live_timer_interval>4294967295</live_timer_interval>
1542 <success>true</success>
1546 <success>true</success>
1551 lttng --mi xml disable-channel mychannel0,mychannel1 -k -s mysession2
1557 <?xml version="1.0" encoding="UTF-8"?>
1559 <name>disable-channel</name>
1563 <name>mychannel0</name>
1564 <enabled>false</enabled>
1565 <success>true</success>
1568 <name>mychannel1</name>
1569 <enabled>false</enabled>
1570 <success>true</success>
1574 <success>true</success>
1579 lttng --mi xml disable-channel ustChannel -u -s mysession2
1585 <?xml version="1.0" encoding="UTF-8"?>
1587 <name>disable-channel</name>
1591 <name>ustChannel</name>
1592 <enabled>false</enabled>
1593 <success>true</success>
1597 <success>true</success>
1603 ####################################################################
1604 # Scenario: Test "lttng --mi xml enable-events ..." with different inputs
1605 ####################################################################
1609 # Tracepoint test cases
1612 lttng --mi xml enable-event block_rq_remap,block_bio_remap,softirq_entry -k -s mysession2 --tracepoint
1618 <?xml version="1.0" encoding="UTF-8"?>
1620 <name>enable-event</name>
1624 <name>block_rq_remap</name>
1625 <type>TRACEPOINT</type>
1626 <enabled>true</enabled>
1627 <filter>false</filter>
1628 <loglevel>TRACE_EMERG</loglevel>
1629 <loglevel_type>ALL</loglevel_type>
1630 <exclusion>false</exclusion>
1631 <success>true</success>
1634 <name>block_bio_remap</name>
1635 <type>TRACEPOINT</type>
1636 <enabled>true</enabled>
1637 <filter>false</filter>
1638 <loglevel>TRACE_EMERG</loglevel>
1639 <loglevel_type>ALL</loglevel_type>
1640 <exclusion>false</exclusion>
1641 <success>true</success>
1644 <name>softirq_entry</name>
1645 <type>TRACEPOINT</type>
1646 <enabled>true</enabled>
1647 <filter>false</filter>
1648 <loglevel>TRACE_EMERG</loglevel>
1649 <loglevel_type>ALL</loglevel_type>
1650 <exclusion>false</exclusion>
1651 <success>true</success>
1655 <success>true</success>
1660 lttng --mi xml enable-event -a -k -s mysession2 -c mychannel --tracepoint
1666 <?xml version="1.0" encoding="UTF-8"?>
1668 <name>enable-event</name>
1673 <type>TRACEPOINT</type>
1674 <enabled>true</enabled>
1675 <filter>false</filter>
1676 <loglevel>TRACE_EMERG</loglevel>
1677 <loglevel_type>ALL</loglevel_type>
1678 <exclusion>false</exclusion>
1679 <success>true</success>
1683 <success>true</success>
1688 lttng --mi xml enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint
1694 <?xml version="1.0" encoding="UTF-8"?>
1696 <name>enable-event</name>
1700 <name>ust_tests_hello:tptest_sighandler</name>
1701 <type>TRACEPOINT</type>
1702 <enabled>true</enabled>
1703 <filter>false</filter>
1704 <exclusion>false</exclusion>
1705 <success>true</success>
1709 <success>true</success>
1714 lttng --mi xml enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint --filter intfield==10
1720 <?xml version="1.0" encoding="UTF-8"?>
1722 <name>enable-event</name>
1726 <name>ust_tests_hello:tptest_sighandler</name>
1727 <type>TRACEPOINT</type>
1728 <enabled>true</enabled>
1729 <filter>true</filter>
1730 <exclusion>false</exclusion>
1731 <success>true</success>
1735 <success>true</success>
1740 lttng --mi xml enable-event -a -u -s mysession2 -c mychannel --tracepoint
1746 <?xml version="1.0" encoding="UTF-8"?>
1748 <name>enable-event</name>
1753 <type>TRACEPOINT</type>
1754 <enabled>true</enabled>
1755 <filter>false</filter>
1756 <exclusion>false</exclusion>
1757 <success>true</success>
1761 <success>true</success>
1765 # Syscall test cases
1768 lttng --mi xml enable-event -a -k -s mysession2 --syscall
1774 <?xml version="1.0" encoding="UTF-8"?>
1776 <name>enable-event</name>
1781 <type>SYSCALL</type>
1782 <enabled>true</enabled>
1783 <filter>false</filter>
1784 <success>true</success>
1788 <success>true</success>
1793 lttng --mi xml enable-event -a -k -s mysession2 -c mychannel --syscall
1799 <?xml version="1.0" encoding="UTF-8"?>
1801 <name>enable-event</name>
1806 <type>SYSCALL</type>
1807 <enabled>true</enabled>
1808 <filter>false</filter>
1809 <success>true</success>
1813 <success>true</success>
1817 # dynamic probe/function probe test cases
1820 lttng --mi xml enable-event myevent0 -k -s mysession2 --function 0xc0101340
1826 <?xml version="1.0" encoding="UTF-8"?>
1828 <name>enable-event</name>
1832 <name>myevent0</name>
1833 <type>FUNCTION</type>
1834 <enabled>false</enabled>
1835 <filter>false</filter>
1836 <success>true</success>
1840 <success>true</success>
1845 lttng --mi xml enable-event myevent1 -k -s mysession2 -c mychannel --probe init_post
1851 <?xml version="1.0" encoding="UTF-8"?>
1853 <name>enable-event</name>
1857 <name>myevent1</name>
1859 <enabled>false</enabled>
1860 <filter>false</filter>
1862 <symbol_name>init_post</symbol_name>
1863 <success>true</success>
1867 <success>true</success>
1872 # log level test cases
1875 lttng --mi xml enable-event myevent4 -u -s mysession2 --loglevel-only TRACE_DEBUG
1881 <?xml version="1.0" encoding="UTF-8"?>
1883 <name>enable-event</name>
1887 <name>myevent4</name>
1888 <type>TRACEPOINT</type>
1889 <enabled>true</enabled>
1890 <filter>false</filter>
1891 <loglevel>TRACE_DEBUG</loglevel>
1892 <loglevel_type>SINGLE</loglevel_type>
1893 <exclusion>false</exclusion>
1894 <success>true</success>
1898 <success>true</success>
1903 lttng --mi xml enable-event myevent5 -u -s mysession2 -c mychannel --loglevel TRACE_DEBUG_FUNCTION
1909 <?xml version="1.0" encoding="UTF-8"?>
1911 <name>enable-event</name>
1915 <name>myevent5</name>
1916 <type>TRACEPOINT</type>
1917 <enabled>true</enabled>
1918 <filter>false</filter>
1919 <loglevel>TRACE_DEBUG_FUNCTION</loglevel>
1920 <loglevel_type>RANGE</loglevel_type>
1921 <exclusion>false</exclusion>
1922 <success>true</success>
1926 <success>true</success>
1932 ####################################################################
1933 # Scenario: Test "lttng add-context -h" and lttng --mi xml add-context ..." with different inputs
1934 ####################################################################
1940 lttng --mi xml add-context -h
1946 usage: lttng add-context -t TYPE [-k|-u] [OPTIONS]
1948 If no channel is given (-c), the context is added to
1951 Otherwise the context is added only to the channel (-c).
1953 Exactly one domain (-k or -u) must be specified.
1956 -h, --help Show this help
1957 --list-options Simple listing of options
1958 -s, --session NAME Apply to session name
1959 -c, --channel NAME Apply to channel
1960 -k, --kernel Apply to the kernel tracer
1961 -u, --userspace Apply to the user-space tracer
1964 -t, --type TYPE Context type. You can repeat that option on
1965 the command line to specify multiple contexts at once.
1966 (--kernel preempts --userspace)
1967 TYPE can be one of the strings below:
1968 pid, procname, prio, nice, vpid, tid, pthread_id,
1969 vtid, ppid, vppid, perf:cpu:cpu-cycles, perf:cpu:cycles
1970 Note that the vpid, vppid and vtid context types represent the virtual process id,
1971 virtual parent process id and virtual thread id as seen from the current execution context
1972 as opposed to the pid, ppid and tid which are kernel internal data structures.
1975 This command will add the context information 'prio' and two per-cpu
1976 perf counters (hardware branch misses and cache misses), to all channels
1977 in the trace data output:
1978 # lttng add-context -k -t prio -t perf:cpu:branch-misses -t perf:cpu:cache-misses
1982 lttng --mi xml add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
1988 UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
1989 UST context pid added to event sched_kthread_stop_ret channel mychannel
1994 ContextErrorHandling
1997 lttng --mi xml add-context -h
2003 usage: lttng add-context -t TYPE
2005 If no channel and no event is given (-c/-e), the context
2006 will be added to all events and all channels.
2007 Otherwise the context will be added only to the channel (-c)
2008 and/or event (-e) indicated.
2009 Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
2012 -h, --help Show this help
2013 --list-options Simple listing of options
2014 -s, --session NAME Apply to session name
2015 -c, --channel NAME Apply to channel
2016 -e, --event NAME Apply to event
2017 -k, --kernel Apply to the kernel tracer
2018 -u, --userspace Apply to the user-space tracer
2019 -t, --type TYPE Context type. You can repeat that option on
2020 the command line to specify multiple contexts at once.
2021 (--kernel preempts --userspace)
2022 TYPE can be one of the strings below:
2023 pid, procname, prio, nice, vpid, tid, pthread_id,
2024 vtid, ppid, vppid, perf:cpu-cycles, perf:cycles
2026 This command will add the context information 'prio' and two perf
2027 counters (hardware branch misses and cache misses), to all events
2028 in the trace data output:
2029 # lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
2034 lttng --mi xml add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
2040 UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
2041 UST context pid added to event sched_kthread_stop_ret channel mychannel
2046 ####################################################################
2047 # Scenario: Test "lttng create <session> with LTTng 2.1 options
2048 ####################################################################
2050 CreateSessionLttng2.1
2053 lttng --mi xml create mysession -U net://172.0.0.1
2059 <?xml version="1.0" encoding="UTF-8"?>
2064 <name>mysession</name>
2065 <path>tcp4://172.0.0.1:5342/mysession-20140813-095804 [data: 5343]</path>
2066 <enabled>false</enabled>
2067 <snapshot_mode>0</snapshot_mode>
2068 <live_timer_interval>0</live_timer_interval>
2071 <success>true</success>
2076 lttng --mi xml create mysession -U file:///tmp
2082 <?xml version="1.0" encoding="UTF-8"?>
2087 <name>mysession</name>
2089 <enabled>false</enabled>
2090 <snapshot_mode>0</snapshot_mode>
2091 <live_timer_interval>0</live_timer_interval>
2094 <success>true</success>
2099 lttng --mi xml create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
2105 <?xml version="1.0" encoding="UTF-8"?>
2110 <name>mysession</name>
2111 <path>tcp4://172.0.0.1:5342/ [data: 5343]</path>
2112 <enabled>false</enabled>
2113 <snapshot_mode>0</snapshot_mode>
2114 <live_timer_interval>0</live_timer_interval>
2117 <success>true</success>
2122 lttng --mi xml create mysession -U 172.0.0.1:1234:2345
2128 <?xml version="1.0" encoding="UTF-8"?>
2133 <name>mysession</name>
2134 <path>tcp4://172.0.0.1:1234/mysession-20140813-102225 [data: 2345]</path>
2135 <enabled>false</enabled>
2136 <snapshot_mode>0</snapshot_mode>
2137 <live_timer_interval>0</live_timer_interval>
2140 <success>true</success>
2145 lttng --mi xml destroy mysession
2151 <?xml version="1.0" encoding="UTF-8"?>
2153 <name>destroy</name>
2157 <name>mysession</name>
2158 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2159 <enabled>false</enabled>
2160 <snapshot_mode>0</snapshot_mode>
2161 <live_timer_interval>0</live_timer_interval>
2165 <success>true</success>
2170 lttng --mi xml -vvv create mysession -U net://172.0.0.1
2176 DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
2177 DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
2178 DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
2179 DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
2180 Session mysession created.
2181 Traces will be written in net://172.0.0.1
2182 DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
2187 ####################################################################
2188 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
2189 ####################################################################
2191 CreateSessionSnapshot
2193 lttng --mi xml create mysession --snapshot
2199 <?xml version="1.0" encoding="UTF-8"?>
2204 <name>mysession</name>
2206 <enabled>false</enabled>
2207 <snapshot_mode>1</snapshot_mode>
2208 <live_timer_interval>4294967295</live_timer_interval>
2211 <success>true</success>
2214 #------------------------------------------------------------------------------
2216 lttng --mi xml snapshot list-output -s mysession
2222 <?xml version="1.0" encoding="UTF-8"?>
2224 <name>snapshot</name>
2227 <name>list-output</name>
2230 <name>mysession</name>
2234 <name>snapshot-1</name>
2235 <ctrl_url>/home/user/lttng-traces/mysession-20130913-141651</ctrl_url>
2237 <max_size>0</max_size>
2244 <success>true</success>
2247 #------------------------------------------------------------------------------
2255 <?xml version="1.0" encoding="UTF-8"?>
2261 <name>mysession</name>
2263 <enabled>false</enabled>
2264 <snapshot_mode>1</snapshot_mode>
2265 <live_timer_interval>4294967295</live_timer_interval>
2271 #------------------------------------------------------------------------------
2273 lttng --mi xml snapshot record -s mysession
2279 Snapshot recorded successfully for session mysession
2281 #------------------------------------------------------------------------------
2283 lttng --mi xml destroy mysession
2289 <?xml version="1.0" encoding="UTF-8"?>
2291 <name>destroy</name>
2295 <name>mysession</name>
2296 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2297 <enabled>false</enabled>
2298 <snapshot_mode>0</snapshot_mode>
2299 <live_timer_interval>0</live_timer_interval>
2303 <success>true</success>
2308 ####################################################################
2309 # Scenario: Test "lttng create <session> --snapshot -U <URL> (LTTng 2.3)
2310 ####################################################################
2312 CreateSessionStreamedSnapshot
2314 lttng --mi xml create mysession --snapshot -U net://172.0.0.1
2320 Session mysession created.
2321 Default snapshot output set to: net://172.0.0.1
2322 Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
2324 #------------------------------------------------------------------------------
2326 lttng --mi xml snapshot list-output -s mysession
2332 Snapshot output list for session mysession
2333 [2] snapshot-2: net4://172.0.0.1:5342/
2335 #------------------------------------------------------------------------------
2343 1) mysession () [inactive snapshot]
2346 #------------------------------------------------------------------------------
2348 lttng --mi xml snapshot record -s mysession
2354 Snapshot recorded successfully for session mysession
2356 #------------------------------------------------------------------------------
2358 lttng --mi xml destroy mysession
2364 <?xml version="1.0" encoding="UTF-8"?>
2366 <name>destroy</name>
2370 <name>mysession</name>
2371 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2372 <enabled>false</enabled>
2373 <snapshot_mode>0</snapshot_mode>
2374 <live_timer_interval>0</live_timer_interval>
2378 <success>true</success>
2383 ####################################################################
2384 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
2385 ####################################################################
2387 CreateSessionSnapshotErrors
2389 lttng --mi xml snapshot list-output -s blabla
2395 <COMMAND_ERROR_OUTPUT>
2396 <?xml version="1.0" encoding="UTF-8"?>
2398 <name>snapshot</name>
2401 <name>list-output</name>
2405 <success>false</success>
2407 </COMMAND_ERROR_OUTPUT>
2409 #------------------------------------------------------------------------------
2410 #next is not an error case but good to be tested
2418 <?xml version="1.0" encoding="UTF-8"?>
2424 <name>mysession</name>
2426 <enabled>true</enabled>
2427 <snapshot_mode>1</snapshot_mode>
2428 <live_timer_interval>4294967295</live_timer_interval>
2434 #------------------------------------------------------------------------------
2436 lttng --mi xml snapshot record -s blabla
2442 <COMMAND_ERROR_OUTPUT>
2443 Error: Session name not found
2444 </COMMAND_ERROR_OUTPUT>
2445 <?xml version="1.0" encoding="UTF-8"?>
2447 <name>snapshot</name>
2454 <success>false</success>
2457 #------------------------------------------------------------------------------
2459 lttng --mi xml snapshot record -s mysession
2465 <COMMAND_ERROR_OUTPUT>
2466 Error: Session needs to be started once
2467 </COMMAND_ERROR_OUTPUT>
2468 <?xml version="1.0" encoding="UTF-8"?>
2470 <name>snapshot</name>
2477 <success>false</success>
2483 ####################################################################
2484 # Scenario: Test "lttng create <session> --live [USEC] (LTTng 2.4)
2485 ####################################################################
2489 lttng --mi xml create mysession --live -U net://127.0.0.1
2495 <?xml version="1.0" encoding="UTF-8"?>
2500 <name>mysession</name>
2501 <path>tcp4://127.0.0.1:5342/ [data: 5343]</path>
2502 <enabled>false</enabled>
2503 <snapshot_mode>0</snapshot_mode>
2504 <live_timer_interval>1000000</live_timer_interval>
2507 <success>true</success>
2510 #------------------------------------------------------------------------------
2518 <?xml version="1.0" encoding="UTF-8"?>
2524 <name>mysession</name>
2525 <path>tcp4://127.0.0.1:5342/ [data: 5343]</path>
2526 <enabled>false</enabled>
2527 <snapshot_mode>0</snapshot_mode>
2528 <live_timer_interval>1000000</live_timer_interval>
2534 #------------------------------------------------------------------------------
2536 lttng --mi xml destroy mysession
2542 <?xml version="1.0" encoding="UTF-8"?>
2544 <name>destroy</name>
2548 <name>mysession</name>
2549 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2550 <enabled>false</enabled>
2551 <snapshot_mode>0</snapshot_mode>
2552 <live_timer_interval>0</live_timer_interval>
2556 <success>true</success>
2561 ####################################################################
2562 # Scenario: Test errors for "lttng create <session> --live [USEC] (LTTng 2.4)
2563 ####################################################################
2565 CreateSessionLiveErrors
2567 lttng --mi xml create mysession --live --snapshot
2573 <COMMAND_ERROR_OUTPUT>
2574 Error: Snapshot and live modes are mutually exclusive.
2575 Error: Command error
2576 </COMMAND_ERROR_OUTPUT>
2578 #------------------------------------------------------------------------------
2580 lttng --mi xml create mysession --live -U blah
2586 <COMMAND_ERROR_OUTPUT>
2587 Error: URI parse unknown protocol blah
2588 Error: Unable to parse the URL blah
2589 Error: Invalid parameter
2590 </COMMAND_ERROR_OUTPUT>
2592 #------------------------------------------------------------------------------
2594 lttng --mi xml create mysession --live -C net://127.0.0.1
2600 <COMMAND_ERROR_OUTPUT>
2601 Error: You need both control and data URL.
2602 Error: Command error
2603 </COMMAND_ERROR_OUTPUT>
2607 ####################################################################
2608 # Scenario: Test "lttng list <session> (version 2.6.0, syscalls)
2609 ####################################################################
2611 GetSessionWithSyscalls
2613 lttng --mi xml list mysession
2619 <?xml version="1.0" encoding="UTF-8"?>
2625 <name>mysession</name>
2626 <path>/home/user/lttng-traces/mysession-20120129-084256</path>
2627 <enabled>false</enabled><snapshot_mode>0</snapshot_mode>
2628 <live_timer_interval>0</live_timer_interval>
2632 <buffer_type>PER_PID</buffer_type>
2635 <name>channel0</name>
2636 <enabled>true</enabled>
2638 <overwrite_mode>DISCARD</overwrite_mode>
2639 <subbuffer_size>262144</subbuffer_size>
2640 <subbuffer_count>4</subbuffer_count>
2641 <switch_timer_interval>0</switch_timer_interval>
2642 <read_timer_interval>200</read_timer_interval>
2643 <output_type>SPLICE</output_type>
2644 <tracefile_size>0</tracefile_size>
2645 <tracefile_count>0</tracefile_count>
2646 <live_timer_interval>0</live_timer_interval>
2647 </attributes><events>
2650 <type>SYSCALL</type>
2651 <enabled>true</enabled>
2652 <filter>false</filter>
2656 <type>SYSCALL</type>
2657 <enabled>true</enabled>
2658 <filter>false</filter>
2671 ListSession2.7Compat
2673 lttng --mi xml list mysession
2679 <?xml version="1.0" encoding="UTF-8"?>
2685 <name>mysession</name>
2686 <path>/home/user/lttng-traces/mysession-20151020-085614</path>
2687 <enabled>false</enabled>
2688 <snapshot_mode>0</snapshot_mode>
2689 <live_timer_interval>0</live_timer_interval>
2693 <buffer_type>GLOBAL</buffer_type>
2697 <name>channel0</name>
2698 <enabled>true</enabled>
2700 <overwrite_mode>DISCARD</overwrite_mode>
2701 <subbuffer_size>262144</subbuffer_size>
2702 <subbuffer_count>4</subbuffer_count>
2703 <switch_timer_interval>0</switch_timer_interval>
2704 <read_timer_interval>200000</read_timer_interval>
2705 <output_type>SPLICE</output_type>
2706 <tracefile_size>0</tracefile_size>
2707 <tracefile_count>0</tracefile_count>
2708 <live_timer_interval>0</live_timer_interval>
2711 <event><name>*</name>
2712 <type>SYSCALL</type>
2713 <enabled>true</enabled>
2714 <filter>false</filter>
2718 <type>TRACEPOINT</type>
2719 <enabled>true</enabled>
2720 <filter>false</filter>
2721 <loglevel>TRACE_EMERG</loglevel>
2722 <loglevel_type>ALL</loglevel_type>
2723 <exclusion>false</exclusion>
2731 <buffer_type>PER_PID</buffer_type>
2735 <name>channel0</name>
2736 <enabled>true</enabled>
2738 <overwrite_mode>DISCARD</overwrite_mode>
2739 <subbuffer_size>4096</subbuffer_size>
2740 <subbuffer_count>4</subbuffer_count>
2741 <switch_timer_interval>0</switch_timer_interval>
2742 <read_timer_interval>0</read_timer_interval>
2743 <output_type>MMAP</output_type>
2744 <tracefile_size>0</tracefile_size>
2745 <tracefile_count>0</tracefile_count>
2746 <live_timer_interval>0</live_timer_interval>
2749 <event><name>*</name>
2750 <type>TRACEPOINT</type>
2751 <enabled>true</enabled>
2752 <filter>false</filter>
2753 <exclusion>false</exclusion>
2765 ####################################################################
2766 # Scenario: Test "lttng load [OPTIONS] [SESSION]"
2767 # "lttng save [OPTIONS] [SESSION]"
2769 ####################################################################
2773 lttng --mi xml load -i /home/user/.lttng/sessions/mysession.lttng
2779 <command><name>load</name><output><load><session><name>*</name></session><path>.lttng/sessions/seqSession2.lttng</path></load></output><success>true</success></command>
2785 lttng --mi xml load -i /home/user/.lttng/sessions/mysession.lttng -f
2791 <command><name>load</name><output><load><session><name>*</name></session><path>.lttng/sessions/seqSession2.lttng</path></load></output><success>true</success></command>
2801 <command><name>save</name><output><save><session><name>*</name></session></save></output><success>true</success></command>
2805 lttng --mi xml save mysession
2811 <command><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>
2815 lttng --mi xml save -f mysession
2821 <command><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>
2825 lttng --mi xml save -o /tmp/test -f mysession
2831 <command><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>