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
1993 ####################################################################
1994 # Scenario: Test "lttng --mi xml add-context --list"
1995 ####################################################################
2001 lttng --mi xml add-context --list
2023 ContextErrorHandling
2026 lttng --mi xml add-context -h
2032 usage: lttng add-context -t TYPE
2034 If no channel and no event is given (-c/-e), the context
2035 will be added to all events and all channels.
2036 Otherwise the context will be added only to the channel (-c)
2037 and/or event (-e) indicated.
2038 Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
2041 -h, --help Show this help
2042 --list-options Simple listing of options
2043 -s, --session NAME Apply to session name
2044 -c, --channel NAME Apply to channel
2045 -e, --event NAME Apply to event
2046 -k, --kernel Apply to the kernel tracer
2047 -u, --userspace Apply to the user-space tracer
2048 -t, --type TYPE Context type. You can repeat that option on
2049 the command line to specify multiple contexts at once.
2050 (--kernel preempts --userspace)
2051 TYPE can be one of the strings below:
2052 pid, procname, prio, nice, vpid, tid, pthread_id,
2053 vtid, ppid, vppid, perf:cpu-cycles, perf:cycles
2055 This command will add the context information 'prio' and two perf
2056 counters (hardware branch misses and cache misses), to all events
2057 in the trace data output:
2058 # lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
2063 lttng --mi xml add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
2069 UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
2070 UST context pid added to event sched_kthread_stop_ret channel mychannel
2075 ####################################################################
2076 # Scenario: Test "lttng create <session> with LTTng 2.1 options
2077 ####################################################################
2079 CreateSessionLttng2.1
2082 lttng --mi xml create mysession -U net://172.0.0.1
2088 <?xml version="1.0" encoding="UTF-8"?>
2093 <name>mysession</name>
2094 <path>tcp4://172.0.0.1:5342/mysession-20140813-095804 [data: 5343]</path>
2095 <enabled>false</enabled>
2096 <snapshot_mode>0</snapshot_mode>
2097 <live_timer_interval>0</live_timer_interval>
2100 <success>true</success>
2105 lttng --mi xml create mysession -U file:///tmp
2111 <?xml version="1.0" encoding="UTF-8"?>
2116 <name>mysession</name>
2118 <enabled>false</enabled>
2119 <snapshot_mode>0</snapshot_mode>
2120 <live_timer_interval>0</live_timer_interval>
2123 <success>true</success>
2128 lttng --mi xml create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
2134 <?xml version="1.0" encoding="UTF-8"?>
2139 <name>mysession</name>
2140 <path>tcp4://172.0.0.1:5342/ [data: 5343]</path>
2141 <enabled>false</enabled>
2142 <snapshot_mode>0</snapshot_mode>
2143 <live_timer_interval>0</live_timer_interval>
2146 <success>true</success>
2151 lttng --mi xml create mysession -U 172.0.0.1:1234:2345
2157 <?xml version="1.0" encoding="UTF-8"?>
2162 <name>mysession</name>
2163 <path>tcp4://172.0.0.1:1234/mysession-20140813-102225 [data: 2345]</path>
2164 <enabled>false</enabled>
2165 <snapshot_mode>0</snapshot_mode>
2166 <live_timer_interval>0</live_timer_interval>
2169 <success>true</success>
2174 lttng --mi xml destroy mysession
2180 <?xml version="1.0" encoding="UTF-8"?>
2182 <name>destroy</name>
2186 <name>mysession</name>
2187 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2188 <enabled>false</enabled>
2189 <snapshot_mode>0</snapshot_mode>
2190 <live_timer_interval>0</live_timer_interval>
2194 <success>true</success>
2199 lttng --mi xml -vvv create mysession -U net://172.0.0.1
2205 DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
2206 DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
2207 DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
2208 DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
2209 Session mysession created.
2210 Traces will be written in net://172.0.0.1
2211 DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
2216 ####################################################################
2217 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
2218 ####################################################################
2220 CreateSessionSnapshot
2222 lttng --mi xml create mysession --snapshot
2228 <?xml version="1.0" encoding="UTF-8"?>
2233 <name>mysession</name>
2235 <enabled>false</enabled>
2236 <snapshot_mode>1</snapshot_mode>
2237 <live_timer_interval>4294967295</live_timer_interval>
2240 <success>true</success>
2243 #------------------------------------------------------------------------------
2245 lttng --mi xml snapshot list-output -s mysession
2251 <?xml version="1.0" encoding="UTF-8"?>
2253 <name>snapshot</name>
2256 <name>list-output</name>
2259 <name>mysession</name>
2263 <name>snapshot-1</name>
2264 <ctrl_url>/home/user/lttng-traces/mysession-20130913-141651</ctrl_url>
2266 <max_size>0</max_size>
2273 <success>true</success>
2276 #------------------------------------------------------------------------------
2284 <?xml version="1.0" encoding="UTF-8"?>
2290 <name>mysession</name>
2292 <enabled>false</enabled>
2293 <snapshot_mode>1</snapshot_mode>
2294 <live_timer_interval>4294967295</live_timer_interval>
2300 #------------------------------------------------------------------------------
2302 lttng --mi xml snapshot record -s mysession
2308 Snapshot recorded successfully for session mysession
2310 #------------------------------------------------------------------------------
2312 lttng --mi xml destroy mysession
2318 <?xml version="1.0" encoding="UTF-8"?>
2320 <name>destroy</name>
2324 <name>mysession</name>
2325 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2326 <enabled>false</enabled>
2327 <snapshot_mode>0</snapshot_mode>
2328 <live_timer_interval>0</live_timer_interval>
2332 <success>true</success>
2337 ####################################################################
2338 # Scenario: Test "lttng create <session> --snapshot -U <URL> (LTTng 2.3)
2339 ####################################################################
2341 CreateSessionStreamedSnapshot
2343 lttng --mi xml create mysession --snapshot -U net://172.0.0.1
2349 Session mysession created.
2350 Default snapshot output set to: net://172.0.0.1
2351 Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
2353 #------------------------------------------------------------------------------
2355 lttng --mi xml snapshot list-output -s mysession
2361 Snapshot output list for session mysession
2362 [2] snapshot-2: net4://172.0.0.1:5342/
2364 #------------------------------------------------------------------------------
2372 1) mysession () [inactive snapshot]
2375 #------------------------------------------------------------------------------
2377 lttng --mi xml snapshot record -s mysession
2383 Snapshot recorded successfully for session mysession
2385 #------------------------------------------------------------------------------
2387 lttng --mi xml destroy mysession
2393 <?xml version="1.0" encoding="UTF-8"?>
2395 <name>destroy</name>
2399 <name>mysession</name>
2400 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2401 <enabled>false</enabled>
2402 <snapshot_mode>0</snapshot_mode>
2403 <live_timer_interval>0</live_timer_interval>
2407 <success>true</success>
2412 ####################################################################
2413 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
2414 ####################################################################
2416 CreateSessionSnapshotErrors
2418 lttng --mi xml snapshot list-output -s blabla
2424 <COMMAND_ERROR_OUTPUT>
2425 <?xml version="1.0" encoding="UTF-8"?>
2427 <name>snapshot</name>
2430 <name>list-output</name>
2434 <success>false</success>
2436 </COMMAND_ERROR_OUTPUT>
2438 #------------------------------------------------------------------------------
2439 #next is not an error case but good to be tested
2447 <?xml version="1.0" encoding="UTF-8"?>
2453 <name>mysession</name>
2455 <enabled>true</enabled>
2456 <snapshot_mode>1</snapshot_mode>
2457 <live_timer_interval>4294967295</live_timer_interval>
2463 #------------------------------------------------------------------------------
2465 lttng --mi xml snapshot record -s blabla
2471 <COMMAND_ERROR_OUTPUT>
2472 Error: Session name not found
2473 </COMMAND_ERROR_OUTPUT>
2474 <?xml version="1.0" encoding="UTF-8"?>
2476 <name>snapshot</name>
2483 <success>false</success>
2486 #------------------------------------------------------------------------------
2488 lttng --mi xml snapshot record -s mysession
2494 <COMMAND_ERROR_OUTPUT>
2495 Error: Session needs to be started once
2496 </COMMAND_ERROR_OUTPUT>
2497 <?xml version="1.0" encoding="UTF-8"?>
2499 <name>snapshot</name>
2506 <success>false</success>
2512 ####################################################################
2513 # Scenario: Test "lttng create <session> --live [USEC] (LTTng 2.4)
2514 ####################################################################
2518 lttng --mi xml create mysession --live -U net://127.0.0.1
2524 <?xml version="1.0" encoding="UTF-8"?>
2529 <name>mysession</name>
2530 <path>tcp4://127.0.0.1:5342/ [data: 5343]</path>
2531 <enabled>false</enabled>
2532 <snapshot_mode>0</snapshot_mode>
2533 <live_timer_interval>1000000</live_timer_interval>
2536 <success>true</success>
2539 #------------------------------------------------------------------------------
2547 <?xml version="1.0" encoding="UTF-8"?>
2553 <name>mysession</name>
2554 <path>tcp4://127.0.0.1:5342/ [data: 5343]</path>
2555 <enabled>false</enabled>
2556 <snapshot_mode>0</snapshot_mode>
2557 <live_timer_interval>1000000</live_timer_interval>
2563 #------------------------------------------------------------------------------
2565 lttng --mi xml destroy mysession
2571 <?xml version="1.0" encoding="UTF-8"?>
2573 <name>destroy</name>
2577 <name>mysession</name>
2578 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2579 <enabled>false</enabled>
2580 <snapshot_mode>0</snapshot_mode>
2581 <live_timer_interval>0</live_timer_interval>
2585 <success>true</success>
2590 ####################################################################
2591 # Scenario: Test errors for "lttng create <session> --live [USEC] (LTTng 2.4)
2592 ####################################################################
2594 CreateSessionLiveErrors
2596 lttng --mi xml create mysession --live --snapshot
2602 <COMMAND_ERROR_OUTPUT>
2603 Error: Snapshot and live modes are mutually exclusive.
2604 Error: Command error
2605 </COMMAND_ERROR_OUTPUT>
2607 #------------------------------------------------------------------------------
2609 lttng --mi xml create mysession --live -U blah
2615 <COMMAND_ERROR_OUTPUT>
2616 Error: URI parse unknown protocol blah
2617 Error: Unable to parse the URL blah
2618 Error: Invalid parameter
2619 </COMMAND_ERROR_OUTPUT>
2621 #------------------------------------------------------------------------------
2623 lttng --mi xml create mysession --live -C net://127.0.0.1
2629 <COMMAND_ERROR_OUTPUT>
2630 Error: You need both control and data URL.
2631 Error: Command error
2632 </COMMAND_ERROR_OUTPUT>
2636 ####################################################################
2637 # Scenario: Test "lttng list <session> (version 2.6.0, syscalls)
2638 ####################################################################
2640 GetSessionWithSyscalls
2642 lttng --mi xml list mysession
2648 <?xml version="1.0" encoding="UTF-8"?>
2654 <name>mysession</name>
2655 <path>/home/user/lttng-traces/mysession-20120129-084256</path>
2656 <enabled>false</enabled><snapshot_mode>0</snapshot_mode>
2657 <live_timer_interval>0</live_timer_interval>
2661 <buffer_type>PER_PID</buffer_type>
2664 <name>channel0</name>
2665 <enabled>true</enabled>
2667 <overwrite_mode>DISCARD</overwrite_mode>
2668 <subbuffer_size>262144</subbuffer_size>
2669 <subbuffer_count>4</subbuffer_count>
2670 <switch_timer_interval>0</switch_timer_interval>
2671 <read_timer_interval>200</read_timer_interval>
2672 <output_type>SPLICE</output_type>
2673 <tracefile_size>0</tracefile_size>
2674 <tracefile_count>0</tracefile_count>
2675 <live_timer_interval>0</live_timer_interval>
2676 </attributes><events>
2679 <type>SYSCALL</type>
2680 <enabled>true</enabled>
2681 <filter>false</filter>
2685 <type>SYSCALL</type>
2686 <enabled>true</enabled>
2687 <filter>false</filter>
2700 ListSession2.7Compat
2702 lttng --mi xml list mysession
2708 <?xml version="1.0" encoding="UTF-8"?>
2714 <name>mysession</name>
2715 <path>/home/user/lttng-traces/mysession-20151020-085614</path>
2716 <enabled>false</enabled>
2717 <snapshot_mode>0</snapshot_mode>
2718 <live_timer_interval>0</live_timer_interval>
2722 <buffer_type>GLOBAL</buffer_type>
2726 <name>channel0</name>
2727 <enabled>true</enabled>
2729 <overwrite_mode>DISCARD</overwrite_mode>
2730 <subbuffer_size>262144</subbuffer_size>
2731 <subbuffer_count>4</subbuffer_count>
2732 <switch_timer_interval>0</switch_timer_interval>
2733 <read_timer_interval>200000</read_timer_interval>
2734 <output_type>SPLICE</output_type>
2735 <tracefile_size>0</tracefile_size>
2736 <tracefile_count>0</tracefile_count>
2737 <live_timer_interval>0</live_timer_interval>
2740 <event><name>*</name>
2741 <type>SYSCALL</type>
2742 <enabled>true</enabled>
2743 <filter>false</filter>
2747 <type>TRACEPOINT</type>
2748 <enabled>true</enabled>
2749 <filter>false</filter>
2750 <loglevel>TRACE_EMERG</loglevel>
2751 <loglevel_type>ALL</loglevel_type>
2752 <exclusion>false</exclusion>
2760 <buffer_type>PER_PID</buffer_type>
2764 <name>channel0</name>
2765 <enabled>true</enabled>
2767 <overwrite_mode>DISCARD</overwrite_mode>
2768 <subbuffer_size>4096</subbuffer_size>
2769 <subbuffer_count>4</subbuffer_count>
2770 <switch_timer_interval>0</switch_timer_interval>
2771 <read_timer_interval>0</read_timer_interval>
2772 <output_type>MMAP</output_type>
2773 <tracefile_size>0</tracefile_size>
2774 <tracefile_count>0</tracefile_count>
2775 <live_timer_interval>0</live_timer_interval>
2778 <event><name>*</name>
2779 <type>TRACEPOINT</type>
2780 <enabled>true</enabled>
2781 <filter>false</filter>
2782 <exclusion>false</exclusion>
2794 ####################################################################
2795 # Scenario: Test "lttng load [OPTIONS] [SESSION]"
2796 # "lttng save [OPTIONS] [SESSION]"
2798 ####################################################################
2802 lttng --mi xml load -i /home/user/.lttng/sessions/mysession.lttng
2808 <command><name>load</name><output><load><session><name>*</name></session><path>.lttng/sessions/seqSession2.lttng</path></load></output><success>true</success></command>
2814 lttng --mi xml load -i /home/user/.lttng/sessions/mysession.lttng -f
2820 <command><name>load</name><output><load><session><name>*</name></session><path>.lttng/sessions/seqSession2.lttng</path></load></output><success>true</success></command>
2830 <command><name>save</name><output><save><session><name>*</name></session></save></output><success>true</success></command>
2834 lttng --mi xml save mysession
2840 <command><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>
2844 lttng --mi xml save -f mysession
2850 <command><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>
2854 lttng --mi xml save -o /tmp/test -f mysession
2860 <command><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>