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> (with live time interval)
462 ####################################################################
464 GetSessionWithLiveInterval
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>false</enabled>
481 <snapshot_mode>1</snapshot_mode>
482 <live_timer_interval>4294967295</live_timer_interval>
490 #------------------------------------------------------------------------------
492 lttng --mi xml snapshot list-output -s mysession
498 <?xml version="1.0" encoding="UTF-8"?>
500 <name>snapshot</name>
503 <name>list-output</name>
506 <name>mysession</name>
510 <name>snapshot-1</name>
511 <ctrl_url>/home/user/lttng-traces/mysession-20120129-084256</ctrl_url>
513 <max_size>0</max_size>
520 <success>true</success>
523 #------------------------------------------------------------------------------
525 lttng --mi xml list mysession1
531 <?xml version="1.0" encoding="UTF-8"?>
537 <name>mysession1</name>
538 <path>/home/user/lttng-traces/mysession1-20120129-084256</path>
539 <enabled>true</enabled>
540 <snapshot_mode>0</snapshot_mode>
541 <live_timer_interval>0</live_timer_interval>
548 #------------------------------------------------------------------------------
550 lttng --mi xml list mysession2
556 <?xml version="1.0" encoding="UTF-8"?>
562 <name>mysession2</name>
563 <path>tcp4://172.0.0.1:5342/ [data: 5343]</path>
564 <enabled>false</enabled>
565 <snapshot_mode>0</snapshot_mode>
566 <live_timer_interval>1000000</live_timer_interval>
577 ####################################################################
578 # Scenario: Test "lttng list -k" with sample output
579 ####################################################################
583 lttng --mi xml list -k
589 <?xml version="1.0" encoding="UTF-8"?>
596 <buffer_type>PER_PID</buffer_type>
599 <name>sched_kthread_stop</name>
600 <type>TRACEPOINT</type>
601 <enabled>true</enabled>
602 <filter>false</filter>
603 <loglevel>TRACE_EMERG</loglevel>
604 <loglevel_type>ALL</loglevel_type>
605 <exclusion>false</exclusion>
608 <name>sched_kthread_stop_ret</name>
609 <type>TRACEPOINT</type>
610 <enabled>true</enabled>
611 <filter>false</filter>
612 <loglevel>TRACE_EMERG</loglevel>
613 <loglevel_type>ALL</loglevel_type>
614 <exclusion>false</exclusion>
617 <name>sched_wakeup_new</name>
618 <type>TRACEPOINT</type>
619 <enabled>true</enabled>
620 <filter>false</filter>
621 <loglevel>TRACE_EMERG</loglevel>
622 <loglevel_type>ALL</loglevel_type>
623 <exclusion>false</exclusion>
633 ####################################################################
634 # Scenario: Test "lttng list -k" with no kernel and no session daemon
635 ####################################################################
639 lttng --mi xml list -k
645 Spawning session daemon
646 <COMMAND_ERROR_OUTPUT>
647 Error: Unable to list kernel events
648 </COMMAND_ERROR_OUTPUT>
652 ####################################################################
653 # Scenario: Test "lttng list -k" with no kernel and with session daemon
654 ####################################################################
658 lttng --mi xml list -k
664 <COMMAND_ERROR_OUTPUT>
665 Error: Unable to list kernel events
666 </COMMAND_ERROR_OUTPUT>
670 ####################################################################
671 # Scenario: Test "lttng list -u" with sample output
672 ####################################################################
676 lttng --mi xml list -u -f
682 <?xml version="1.0" encoding="UTF-8"?>
689 <buffer_type>PER_PID</buffer_type>
693 <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
696 <name>ust_tests_hello:tptest_sighandler</name>
697 <type>TRACEPOINT</type>
698 <enabled>true</enabled>
699 <filter>false</filter>
700 <loglevel>TRACE_DEBUG_MODULE</loglevel>
701 <loglevel_type>ALL</loglevel_type>
702 <exclusion>false</exclusion>
706 <name>ust_tests_hello:tptest</name>
707 <type>TRACEPOINT</type>
708 <enabled>true</enabled>
709 <filter>false</filter>
710 <loglevel>TRACE_INFO</loglevel>
711 <loglevel_type>ALL</loglevel_type>
712 <exclusion>false</exclusion>
715 <name>doublefield</name>
720 <name>floatfield</name>
725 <name>stringfield</name>
735 <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
738 <name>ust_tests_hello:tptest_sighandler</name>
739 <type>TRACEPOINT</type>
740 <enabled>true</enabled>
741 <filter>false</filter>
742 <loglevel>TRACE_WARNING</loglevel>
743 <loglevel_type>ALL</loglevel_type>
744 <exclusion>false</exclusion>
748 <name>ust_tests_hello:tptest</name>
749 <type>TRACEPOINT</type>
750 <enabled>true</enabled>
751 <filter>false</filter>
752 <loglevel>TRACE_DEBUG_FUNCTION</loglevel>
753 <loglevel_type>ALL</loglevel_type>
754 <exclusion>false</exclusion>
757 <name>doublefield</name>
762 <name>floatfield</name>
767 <name>stringfield</name>
783 ####################################################################
784 # Scenario: Test "lttng list -u" with no UST provider available
785 ####################################################################
789 lttng --mi xml list -u -f
795 <?xml version="1.0" encoding="UTF-8"?>
802 <buffer_type>PER_PID</buffer_type>
811 ####################################################################
812 # Scenario: Test "lttng list -u" with no UST available (LTTng 2.0.x)
813 ####################################################################
817 lttng --mi xml list -u -f
823 <?xml version="1.0" encoding="UTF-8"?>
824 <command><name>list</name><output/></command>
825 <COMMAND_ERROR_OUTPUT>
826 Error: Unable to list UST event fields: LTTng-UST tracer is not supported. Please rebuild lttng-tools with lttng-ust support enabled.
828 </COMMAND_ERROR_OUTPUT>
831 ####################################################################
832 # Scenario: Test "lttng list -u" with no UST available and no session daemon
833 ####################################################################
837 lttng --mi xml list -u -f
843 <?xml version="1.0" encoding="UTF-8"?>
844 <command><name>list</name><output/></command>
845 <COMMAND_ERROR_OUTPUT>
846 Error: Unable to list UST event fields: LTTng-UST tracer is not supported. Please rebuild lttng-tools with lttng-ust support enabled.
848 </COMMAND_ERROR_OUTPUT>
851 ####################################################################
852 # Scenario: Test "lttng list -" with no kernel and with session daemon
853 ####################################################################
857 lttng --mi xml list -u -f
863 <?xml version="1.0" encoding="UTF-8"?>
864 <command><name>list</name><output/></command>
865 <COMMAND_ERROR_OUTPUT>
866 Error: Unable to list kernel events: Tracing the kernel requires a root lttng-sessiond daemon, as well as "tracing" group membership or root user ID for the lttng client.
868 </COMMAND_ERROR_OUTPUT>
872 ####################################################################
873 # Scenario: Test "lttng list -u -f" with sample output (version 2.6.0)
874 ####################################################################
878 lttng --mi xml list -u -f
884 <?xml version="1.0" encoding="UTF-8"?>
891 <buffer_type>PER_PID</buffer_type>
895 <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
898 <name>ust_tests_hello:tptest_sighandler</name>
899 <type>TRACEPOINT</type>
900 <enabled>true</enabled>
901 <filter>false</filter>
902 <loglevel>TRACE_DEBUG_MODULE</loglevel>
903 <loglevel_type>ALL</loglevel_type>
904 <exclusion>false</exclusion>
908 <name>ust_tests_hello:tptest</name>
909 <type>TRACEPOINT</type>
910 <enabled>true</enabled>
911 <filter>false</filter>
912 <loglevel>TRACE_INFO</loglevel>
913 <loglevel_type>ALL</loglevel_type>
914 <exclusion>false</exclusion>
917 <name>doublefield</name>
922 <name>floatfield</name>
927 <name>stringfield</name>
937 <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
940 <name>ust_tests_hello:tptest_sighandler</name>
941 <type>TRACEPOINT</type>
942 <enabled>true</enabled>
943 <filter>false</filter>
944 <loglevel>TRACE_WARNING</loglevel>
945 <loglevel_type>ALL</loglevel_type>
946 <exclusion>false</exclusion>
950 <name>ust_tests_hello:tptest</name>
951 <type>TRACEPOINT</type>
952 <enabled>true</enabled>
953 <filter>false</filter>
954 <loglevel>TRACE_DEBUG_FUNCTION</loglevel>
955 <loglevel_type>ALL</loglevel_type>
956 <exclusion>false</exclusion>
959 <name>doublefield</name>
964 <name>floatfield</name>
969 <name>stringfield</name>
984 ####################################################################
985 # Scenario: Test "lttng create <session>
986 ####################################################################
990 lttng --mi xml create mysession2
996 <?xml version="1.0" encoding="UTF-8"?>
1001 <name>mysession2</name>
1002 <path>/home/user/lttng-traces/mysession2-20120209-095418</path>
1003 <enabled>false</enabled>
1004 <snapshot_mode>0</snapshot_mode>
1005 <live_timer_interval>0</live_timer_interval>
1008 <success>true</success>
1013 ####################################################################
1014 # Scenario: Test "lttng create <session>
1015 ####################################################################
1017 CreateSessionWithPrompt
1019 lttng --mi xml create mysession2
1025 Prompt> Session mysession2 created.
1026 Traces will be written in /home/user/lttng-traces/mysession2-20120209-095418
1030 ####################################################################
1031 # Scenario: Test "lttng create <session> with different variants
1033 ####################################################################
1035 CreateSessionVariants
1037 lttng --mi xml create alreadyExist
1043 <?xml version="1.0" encoding="UTF-8"?>
1047 <success>false</success>
1049 <COMMAND_ERROR_OUTPUT>
1050 Warning: Session mysession2 already exists
1051 Error: Session name already exists
1052 </COMMAND_ERROR_OUTPUT>
1056 lttng --mi xml create session with spaces
1062 <?xml version="1.0" encoding="UTF-8"?>
1067 <name>session with spaces</name>
1068 <path>/home/user/lttng-traces/session with spaces-20120209-095418</path>
1069 <enabled>false</enabled>
1070 <snapshot_mode>0</snapshot_mode>
1071 <live_timer_interval>0</live_timer_interval>
1074 <success>true</success>
1079 lttng --mi xml create wrongName
1085 <?xml version="1.0" encoding="UTF-8"?>
1091 <path>/home/user/lttng-traces/auto-20120209-095418</path>
1092 <enabled>false</enabled>
1093 <snapshot_mode>0</snapshot_mode>
1094 <live_timer_interval>0</live_timer_interval>
1097 <success>true</success>
1102 lttng --mi xml create wrongPath -o /home/user/hallo
1108 <?xml version="1.0" encoding="UTF-8"?>
1113 <name>wrongPath</name>
1114 <path>/home/user/lttng-traces/wrongPath-20120209-095418</path>
1115 <enabled>false</enabled>
1116 <snapshot_mode>0</snapshot_mode>
1117 <live_timer_interval>0</live_timer_interval>
1120 <success>true</success>
1125 lttng --mi xml create pathWithSpaces -o /home/user/hallo user/here
1131 <?xml version="1.0" encoding="UTF-8"?>
1136 <name>pathWithSpaces</name>
1137 <path>/home/user/hallo user/here/pathWithSpaces-20120209-095418</path>
1138 <enabled>false</enabled>
1139 <snapshot_mode>0</snapshot_mode>
1140 <live_timer_interval>0</live_timer_interval>
1143 <success>true</success>
1148 ####################################################################
1149 # Scenario: Test "lttng destroy <session>
1150 ####################################################################
1155 lttng --mi xml destroy mysession2
1161 <?xml version="1.0" encoding="UTF-8"?>
1163 <name>destroy</name>
1167 <name>mysession2</name>
1168 <path>/home/user/lttng-traces/mysession2-20140812-160632</path>
1169 <enabled>false</enabled>
1170 <snapshot_mode>0</snapshot_mode>
1171 <live_timer_interval>0</live_timer_interval>
1175 <success>true</success>
1180 ####################################################################
1181 # Scenario: Test "lttng enable-channel ..." with different inputs
1182 ####################################################################
1187 lttng --mi xml enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100 -C 0 -W 10
1193 Kernel channel mychannel0 enabled for session mysession2
1194 Kernel channel mychannel1 enabled for session mysession2
1198 lttng --mi xml enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100
1204 <?xml version="1.0" encoding="UTF-8"?>
1206 <name>enable-channel</name>
1210 <name>mychannel0</name>
1211 <enabled>false</enabled>
1213 <overwrite_mode>OVERWRITE</overwrite_mode>
1214 <subbuffer_size>16384</subbuffer_size>
1215 <subbuffer_count>2</subbuffer_count>
1216 <switch_timer_interval>200</switch_timer_interval>
1217 <read_timer_interval>100</read_timer_interval>
1218 <output_type>SPLICE</output_type>
1219 <tracefile_size>0</tracefile_size>
1220 <tracefile_count>0</tracefile_count>
1221 <live_timer_interval>4294967295</live_timer_interval>
1223 <success>true</success>
1226 <name>mychannel1</name>
1227 <enabled>false</enabled>
1229 <overwrite_mode>OVERWRITE</overwrite_mode>
1230 <subbuffer_size>16384</subbuffer_size>
1231 <subbuffer_count>2</subbuffer_count>
1232 <switch_timer_interval>200</switch_timer_interval>
1233 <read_timer_interval>100</read_timer_interval>
1234 <output_type>SPLICE</output_type>
1235 <tracefile_size>0</tracefile_size>
1236 <tracefile_count>0</tracefile_count>
1237 <live_timer_interval>4294967295</live_timer_interval>
1239 <success>true</success>
1243 <success>true</success>
1248 lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 -C 0 -W 20
1254 UST channel channel0 enabled for session mysession2
1258 lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200
1264 <?xml version="1.0" encoding="UTF-8"?>
1266 <name>enable-channel</name>
1270 <name>ustChannel</name>
1271 <enabled>false</enabled>
1273 <overwrite_mode>OVERWRITE</overwrite_mode>
1274 <subbuffer_size>32768</subbuffer_size>
1275 <subbuffer_count>2</subbuffer_count>
1276 <switch_timer_interval>100</switch_timer_interval>
1277 <read_timer_interval>200</read_timer_interval>
1278 <output_type>MMAP</output_type>
1279 <tracefile_size>0</tracefile_size>
1280 <tracefile_count>0</tracefile_count>
1281 <live_timer_interval>4294967295</live_timer_interval>
1283 <success>true</success>
1287 <success>true</success>
1292 lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 --buffers-uid -C 0 -W 20
1298 UST channel channel0 enabled for session mysession2
1302 lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --buffers-pid
1308 <?xml version="1.0" encoding="UTF-8"?>
1310 <name>enable-channel</name>
1314 <name>ustChannel</name>
1315 <enabled>false</enabled>
1317 <overwrite_mode>OVERWRITE</overwrite_mode>
1318 <subbuffer_size>4096</subbuffer_size>
1319 <subbuffer_count>4</subbuffer_count>
1320 <switch_timer_interval>0</switch_timer_interval>
1321 <read_timer_interval>0</read_timer_interval>
1322 <output_type>MMAP</output_type>
1323 <tracefile_size>0</tracefile_size>
1324 <tracefile_count>0</tracefile_count>
1325 <live_timer_interval>4294967295</live_timer_interval>
1327 <success>true</success>
1331 <success>true</success>
1336 lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 2 --switch-timer 100 --read-timer 200 --buffers-uid
1342 <?xml version="1.0" encoding="UTF-8"?>
1344 <name>enable-channel</name>
1348 <name>ustChannel</name>
1349 <enabled>false</enabled>
1351 <overwrite_mode>OVERWRITE</overwrite_mode>
1352 <subbuffer_size>32768</subbuffer_size>
1353 <subbuffer_count>2</subbuffer_count>
1354 <switch_timer_interval>100</switch_timer_interval>
1355 <read_timer_interval>200</read_timer_interval>
1356 <output_type>MMAP</output_type>
1357 <tracefile_size>0</tracefile_size>
1358 <tracefile_count>0</tracefile_count>
1359 <live_timer_interval>4294967295</live_timer_interval>
1361 <success>true</success>
1365 <success>true</success>
1371 lttng --mi xml enable-channel mychannel0,mychannel1 -k -s mysession2
1377 <?xml version="1.0" encoding="UTF-8"?>
1379 <name>enable-channel</name>
1383 <name>mychannel0</name>
1384 <enabled>false</enabled>
1386 <overwrite_mode>DISCARD</overwrite_mode>
1387 <subbuffer_size>262144</subbuffer_size>
1388 <subbuffer_count>4</subbuffer_count>
1389 <switch_timer_interval>0</switch_timer_interval>
1390 <read_timer_interval>200000</read_timer_interval>
1391 <output_type>SPLICE</output_type>
1392 <tracefile_size>0</tracefile_size>
1393 <tracefile_count>0</tracefile_count>
1394 <live_timer_interval>4294967295</live_timer_interval>
1396 <success>true</success>
1399 <name>mychannel1</name>
1400 <enabled>false</enabled>
1402 <overwrite_mode>DISCARD</overwrite_mode>
1403 <subbuffer_size>262144</subbuffer_size>
1404 <subbuffer_count>4</subbuffer_count>
1405 <switch_timer_interval>0</switch_timer_interval>
1406 <read_timer_interval>200000</read_timer_interval>
1407 <output_type>SPLICE</output_type>
1408 <tracefile_size>0</tracefile_size>
1409 <tracefile_count>0</tracefile_count>
1410 <live_timer_interval>4294967295</live_timer_interval>
1412 <success>true</success>
1416 <success>true</success>
1421 lttng --mi xml enable-channel ustChannel -u -s mysession2
1427 <?xml version="1.0" encoding="UTF-8"?>
1429 <name>enable-channel</name>
1433 <name>ustChannel</name>
1434 <enabled>false</enabled>
1436 <overwrite_mode>DISCARD</overwrite_mode>
1437 <subbuffer_size>131072</subbuffer_size>
1438 <subbuffer_count>4</subbuffer_count>
1439 <switch_timer_interval>0</switch_timer_interval>
1440 <read_timer_interval>0</read_timer_interval>
1441 <output_type>MMAP</output_type>
1442 <tracefile_size>0</tracefile_size>
1443 <tracefile_count>0</tracefile_count>
1444 <live_timer_interval>4294967295</live_timer_interval>
1446 <success>true</success>
1450 <success>true</success>
1455 lttng --mi xml disable-channel mychannel0,mychannel1 -k -s mysession2
1461 <?xml version="1.0" encoding="UTF-8"?>
1463 <name>disable-channel</name>
1467 <name>mychannel0</name>
1468 <enabled>false</enabled>
1469 <success>true</success>
1472 <name>mychannel1</name>
1473 <enabled>false</enabled>
1474 <success>true</success>
1478 <success>true</success>
1483 lttng --mi xml disable-channel ustChannel -u -s mysession2
1489 <?xml version="1.0" encoding="UTF-8"?>
1491 <name>disable-channel</name>
1495 <name>ustChannel</name>
1496 <enabled>false</enabled>
1497 <success>true</success>
1501 <success>true</success>
1507 ####################################################################
1508 # Scenario: Test "lttng --mi xml enable-events ..." with different inputs
1509 ####################################################################
1513 # Tracepoint test cases
1516 lttng --mi xml enable-event block_rq_remap,block_bio_remap,softirq_entry -k -s mysession2 --tracepoint
1522 <?xml version="1.0" encoding="UTF-8"?>
1524 <name>enable-event</name>
1528 <name>block_rq_remap</name>
1529 <type>TRACEPOINT</type>
1530 <enabled>true</enabled>
1531 <filter>false</filter>
1532 <loglevel>TRACE_EMERG</loglevel>
1533 <loglevel_type>ALL</loglevel_type>
1534 <exclusion>false</exclusion>
1535 <success>true</success>
1538 <name>block_bio_remap</name>
1539 <type>TRACEPOINT</type>
1540 <enabled>true</enabled>
1541 <filter>false</filter>
1542 <loglevel>TRACE_EMERG</loglevel>
1543 <loglevel_type>ALL</loglevel_type>
1544 <exclusion>false</exclusion>
1545 <success>true</success>
1548 <name>softirq_entry</name>
1549 <type>TRACEPOINT</type>
1550 <enabled>true</enabled>
1551 <filter>false</filter>
1552 <loglevel>TRACE_EMERG</loglevel>
1553 <loglevel_type>ALL</loglevel_type>
1554 <exclusion>false</exclusion>
1555 <success>true</success>
1559 <success>true</success>
1564 lttng --mi xml enable-event -a -k -s mysession2 -c mychannel --tracepoint
1570 <?xml version="1.0" encoding="UTF-8"?>
1572 <name>enable-event</name>
1577 <type>TRACEPOINT</type>
1578 <enabled>true</enabled>
1579 <filter>false</filter>
1580 <loglevel>TRACE_EMERG</loglevel>
1581 <loglevel_type>ALL</loglevel_type>
1582 <exclusion>false</exclusion>
1583 <success>true</success>
1587 <success>true</success>
1592 lttng --mi xml enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint
1598 <?xml version="1.0" encoding="UTF-8"?>
1600 <name>enable-event</name>
1604 <name>ust_tests_hello:tptest_sighandler</name>
1605 <type>TRACEPOINT</type>
1606 <enabled>true</enabled>
1607 <filter>false</filter>
1608 <exclusion>false</exclusion>
1609 <success>true</success>
1613 <success>true</success>
1618 lttng --mi xml enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint --filter intfield==10
1624 <?xml version="1.0" encoding="UTF-8"?>
1626 <name>enable-event</name>
1630 <name>ust_tests_hello:tptest_sighandler</name>
1631 <type>TRACEPOINT</type>
1632 <enabled>true</enabled>
1633 <filter>true</filter>
1634 <exclusion>false</exclusion>
1635 <success>true</success>
1639 <success>true</success>
1644 lttng --mi xml enable-event -a -u -s mysession2 -c mychannel --tracepoint
1650 <?xml version="1.0" encoding="UTF-8"?>
1652 <name>enable-event</name>
1657 <type>TRACEPOINT</type>
1658 <enabled>true</enabled>
1659 <filter>false</filter>
1660 <exclusion>false</exclusion>
1661 <success>true</success>
1665 <success>true</success>
1669 # Syscall test cases
1672 lttng --mi xml enable-event -a -k -s mysession2 --syscall
1678 <?xml version="1.0" encoding="UTF-8"?>
1680 <name>enable-event</name>
1685 <type>SYSCALL</type>
1686 <enabled>true</enabled>
1687 <filter>false</filter>
1688 <success>true</success>
1692 <success>true</success>
1697 lttng --mi xml enable-event -a -k -s mysession2 -c mychannel --syscall
1703 <?xml version="1.0" encoding="UTF-8"?>
1705 <name>enable-event</name>
1710 <type>SYSCALL</type>
1711 <enabled>true</enabled>
1712 <filter>false</filter>
1713 <success>true</success>
1717 <success>true</success>
1721 # dynamic probe/function probe test cases
1724 lttng --mi xml enable-event myevent0 -k -s mysession2 --function 0xc0101340
1730 <?xml version="1.0" encoding="UTF-8"?>
1732 <name>enable-event</name>
1736 <name>myevent0</name>
1737 <type>FUNCTION</type>
1738 <enabled>false</enabled>
1739 <filter>false</filter>
1740 <success>true</success>
1744 <success>true</success>
1749 lttng --mi xml enable-event myevent1 -k -s mysession2 -c mychannel --probe init_post
1755 <?xml version="1.0" encoding="UTF-8"?>
1757 <name>enable-event</name>
1761 <name>myevent1</name>
1763 <enabled>false</enabled>
1764 <filter>false</filter>
1766 <symbol_name>init_post</symbol_name>
1767 <success>true</success>
1771 <success>true</success>
1776 # log level test cases
1779 lttng --mi xml enable-event myevent4 -u -s mysession2 --loglevel-only TRACE_DEBUG
1785 <?xml version="1.0" encoding="UTF-8"?>
1787 <name>enable-event</name>
1791 <name>myevent4</name>
1792 <type>TRACEPOINT</type>
1793 <enabled>true</enabled>
1794 <filter>false</filter>
1795 <loglevel>TRACE_DEBUG</loglevel>
1796 <loglevel_type>SINGLE</loglevel_type>
1797 <exclusion>false</exclusion>
1798 <success>true</success>
1802 <success>true</success>
1807 lttng --mi xml enable-event myevent5 -u -s mysession2 -c mychannel --loglevel TRACE_DEBUG_FUNCTION
1813 <?xml version="1.0" encoding="UTF-8"?>
1815 <name>enable-event</name>
1819 <name>myevent5</name>
1820 <type>TRACEPOINT</type>
1821 <enabled>true</enabled>
1822 <filter>false</filter>
1823 <loglevel>TRACE_DEBUG_FUNCTION</loglevel>
1824 <loglevel_type>RANGE</loglevel_type>
1825 <exclusion>false</exclusion>
1826 <success>true</success>
1830 <success>true</success>
1836 ####################################################################
1837 # Scenario: Test "lttng add-context -h" and lttng --mi xml add-context ..." with different inputs
1838 ####################################################################
1844 lttng --mi xml add-context -h
1850 usage: lttng add-context -t TYPE [-k|-u] [OPTIONS]
1852 If no channel is given (-c), the context is added to
1855 Otherwise the context is added only to the channel (-c).
1857 Exactly one domain (-k or -u) must be specified.
1860 -h, --help Show this help
1861 --list-options Simple listing of options
1862 -s, --session NAME Apply to session name
1863 -c, --channel NAME Apply to channel
1864 -k, --kernel Apply to the kernel tracer
1865 -u, --userspace Apply to the user-space tracer
1868 -t, --type TYPE Context type. You can repeat that option on
1869 the command line to specify multiple contexts at once.
1870 (--kernel preempts --userspace)
1871 TYPE can be one of the strings below:
1872 pid, procname, prio, nice, vpid, tid, pthread_id,
1873 vtid, ppid, vppid, perf:cpu:cpu-cycles, perf:cpu:cycles
1874 Note that the vpid, vppid and vtid context types represent the virtual process id,
1875 virtual parent process id and virtual thread id as seen from the current execution context
1876 as opposed to the pid, ppid and tid which are kernel internal data structures.
1879 This command will add the context information 'prio' and two per-cpu
1880 perf counters (hardware branch misses and cache misses), to all channels
1881 in the trace data output:
1882 # lttng add-context -k -t prio -t perf:cpu:branch-misses -t perf:cpu:cache-misses
1886 lttng --mi xml add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
1892 UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
1893 UST context pid added to event sched_kthread_stop_ret channel mychannel
1898 ContextErrorHandling
1901 lttng --mi xml add-context -h
1907 usage: lttng add-context -t TYPE
1909 If no channel and no event is given (-c/-e), the context
1910 will be added to all events and all channels.
1911 Otherwise the context will be added only to the channel (-c)
1912 and/or event (-e) indicated.
1913 Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
1916 -h, --help Show this help
1917 --list-options Simple listing of options
1918 -s, --session NAME Apply to session name
1919 -c, --channel NAME Apply to channel
1920 -e, --event NAME Apply to event
1921 -k, --kernel Apply to the kernel tracer
1922 -u, --userspace Apply to the user-space tracer
1923 -t, --type TYPE Context type. You can repeat that option on
1924 the command line to specify multiple contexts at once.
1925 (--kernel preempts --userspace)
1926 TYPE can be one of the strings below:
1927 pid, procname, prio, nice, vpid, tid, pthread_id,
1928 vtid, ppid, vppid, perf:cpu-cycles, perf:cycles
1930 This command will add the context information 'prio' and two perf
1931 counters (hardware branch misses and cache misses), to all events
1932 in the trace data output:
1933 # lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
1938 lttng --mi xml add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
1944 UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
1945 UST context pid added to event sched_kthread_stop_ret channel mychannel
1950 ####################################################################
1951 # Scenario: Test "lttng create <session> with LTTng 2.1 options
1952 ####################################################################
1954 CreateSessionLttng2.1
1957 lttng --mi xml create mysession -U net://172.0.0.1
1963 <?xml version="1.0" encoding="UTF-8"?>
1968 <name>mysession</name>
1969 <path>tcp4://172.0.0.1:5342/mysession-20140813-095804 [data: 5343]</path>
1970 <enabled>false</enabled>
1971 <snapshot_mode>0</snapshot_mode>
1972 <live_timer_interval>0</live_timer_interval>
1975 <success>true</success>
1980 lttng --mi xml create mysession -U file:///tmp
1986 <?xml version="1.0" encoding="UTF-8"?>
1991 <name>mysession</name>
1993 <enabled>false</enabled>
1994 <snapshot_mode>0</snapshot_mode>
1995 <live_timer_interval>0</live_timer_interval>
1998 <success>true</success>
2003 lttng --mi xml create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
2009 <?xml version="1.0" encoding="UTF-8"?>
2014 <name>mysession</name>
2015 <path>tcp4://172.0.0.1:5342/ [data: 5343]</path>
2016 <enabled>false</enabled>
2017 <snapshot_mode>0</snapshot_mode>
2018 <live_timer_interval>0</live_timer_interval>
2021 <success>true</success>
2026 lttng --mi xml create mysession -U 172.0.0.1:1234:2345
2032 <?xml version="1.0" encoding="UTF-8"?>
2037 <name>mysession</name>
2038 <path>tcp4://172.0.0.1:1234/mysession-20140813-102225 [data: 2345]</path>
2039 <enabled>false</enabled>
2040 <snapshot_mode>0</snapshot_mode>
2041 <live_timer_interval>0</live_timer_interval>
2044 <success>true</success>
2049 lttng --mi xml destroy mysession
2055 <?xml version="1.0" encoding="UTF-8"?>
2057 <name>destroy</name>
2061 <name>mysession</name>
2062 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2063 <enabled>false</enabled>
2064 <snapshot_mode>0</snapshot_mode>
2065 <live_timer_interval>0</live_timer_interval>
2069 <success>true</success>
2074 lttng --mi xml -vvv create mysession -U net://172.0.0.1
2080 DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
2081 DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
2082 DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
2083 DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
2084 Session mysession created.
2085 Traces will be written in net://172.0.0.1
2086 DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
2091 ####################################################################
2092 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
2093 ####################################################################
2095 CreateSessionSnapshot
2097 lttng --mi xml create mysession --snapshot
2103 <?xml version="1.0" encoding="UTF-8"?>
2108 <name>mysession</name>
2110 <enabled>false</enabled>
2111 <snapshot_mode>1</snapshot_mode>
2112 <live_timer_interval>4294967295</live_timer_interval>
2115 <success>true</success>
2118 #------------------------------------------------------------------------------
2120 lttng --mi xml snapshot list-output -s mysession
2126 <?xml version="1.0" encoding="UTF-8"?>
2128 <name>snapshot</name>
2131 <name>list-output</name>
2134 <name>mysession</name>
2138 <name>snapshot-1</name>
2139 <ctrl_url>/home/user/lttng-traces/mysession-20130913-141651</ctrl_url>
2141 <max_size>0</max_size>
2148 <success>true</success>
2151 #------------------------------------------------------------------------------
2159 <?xml version="1.0" encoding="UTF-8"?>
2165 <name>mysession</name>
2167 <enabled>false</enabled>
2168 <snapshot_mode>1</snapshot_mode>
2169 <live_timer_interval>4294967295</live_timer_interval>
2175 #------------------------------------------------------------------------------
2177 lttng --mi xml snapshot record -s mysession
2183 Snapshot recorded successfully for session mysession
2185 #------------------------------------------------------------------------------
2187 lttng --mi xml destroy mysession
2193 <?xml version="1.0" encoding="UTF-8"?>
2195 <name>destroy</name>
2199 <name>mysession</name>
2200 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2201 <enabled>false</enabled>
2202 <snapshot_mode>0</snapshot_mode>
2203 <live_timer_interval>0</live_timer_interval>
2207 <success>true</success>
2212 ####################################################################
2213 # Scenario: Test "lttng create <session> --snapshot -U <URL> (LTTng 2.3)
2214 ####################################################################
2216 CreateSessionStreamedSnapshot
2218 lttng --mi xml create mysession --snapshot -U net://172.0.0.1
2224 Session mysession created.
2225 Default snapshot output set to: net://172.0.0.1
2226 Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
2228 #------------------------------------------------------------------------------
2230 lttng --mi xml snapshot list-output -s mysession
2236 Snapshot output list for session mysession
2237 [2] snapshot-2: net4://172.0.0.1:5342/
2239 #------------------------------------------------------------------------------
2247 1) mysession () [inactive snapshot]
2250 #------------------------------------------------------------------------------
2252 lttng --mi xml snapshot record -s mysession
2258 Snapshot recorded successfully for session mysession
2260 #------------------------------------------------------------------------------
2262 lttng --mi xml destroy mysession
2268 <?xml version="1.0" encoding="UTF-8"?>
2270 <name>destroy</name>
2274 <name>mysession</name>
2275 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2276 <enabled>false</enabled>
2277 <snapshot_mode>0</snapshot_mode>
2278 <live_timer_interval>0</live_timer_interval>
2282 <success>true</success>
2287 ####################################################################
2288 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
2289 ####################################################################
2291 CreateSessionSnapshotErrors
2293 lttng --mi xml snapshot list-output -s blabla
2299 <COMMAND_ERROR_OUTPUT>
2300 <?xml version="1.0" encoding="UTF-8"?>
2302 <name>snapshot</name>
2305 <name>list-output</name>
2309 <success>false</success>
2311 </COMMAND_ERROR_OUTPUT>
2313 #------------------------------------------------------------------------------
2314 #next is not an error case but good to be tested
2322 <?xml version="1.0" encoding="UTF-8"?>
2328 <name>mysession</name>
2330 <enabled>true</enabled>
2331 <snapshot_mode>1</snapshot_mode>
2332 <live_timer_interval>4294967295</live_timer_interval>
2338 #------------------------------------------------------------------------------
2340 lttng --mi xml snapshot record -s blabla
2346 <COMMAND_ERROR_OUTPUT>
2347 Error: Session name not found
2348 </COMMAND_ERROR_OUTPUT>
2349 <?xml version="1.0" encoding="UTF-8"?>
2351 <name>snapshot</name>
2358 <success>false</success>
2361 #------------------------------------------------------------------------------
2363 lttng --mi xml snapshot record -s mysession
2369 <COMMAND_ERROR_OUTPUT>
2370 Error: Session needs to be started once
2371 </COMMAND_ERROR_OUTPUT>
2372 <?xml version="1.0" encoding="UTF-8"?>
2374 <name>snapshot</name>
2381 <success>false</success>
2387 ####################################################################
2388 # Scenario: Test "lttng create <session> --live [USEC] (LTTng 2.4)
2389 ####################################################################
2393 lttng --mi xml create mysession --live -U net://127.0.0.1
2399 <?xml version="1.0" encoding="UTF-8"?>
2404 <name>mysession</name>
2405 <path>tcp4://127.0.0.1:5342/ [data: 5343]</path>
2406 <enabled>false</enabled>
2407 <snapshot_mode>0</snapshot_mode>
2408 <live_timer_interval>1000000</live_timer_interval>
2411 <success>true</success>
2414 #------------------------------------------------------------------------------
2422 <?xml version="1.0" encoding="UTF-8"?>
2428 <name>mysession</name>
2429 <path>tcp4://127.0.0.1:5342/ [data: 5343]</path>
2430 <enabled>false</enabled>
2431 <snapshot_mode>0</snapshot_mode>
2432 <live_timer_interval>1000000</live_timer_interval>
2438 #------------------------------------------------------------------------------
2440 lttng --mi xml destroy mysession
2446 <?xml version="1.0" encoding="UTF-8"?>
2448 <name>destroy</name>
2452 <name>mysession</name>
2453 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2454 <enabled>false</enabled>
2455 <snapshot_mode>0</snapshot_mode>
2456 <live_timer_interval>0</live_timer_interval>
2460 <success>true</success>
2465 ####################################################################
2466 # Scenario: Test errors for "lttng create <session> --live [USEC] (LTTng 2.4)
2467 ####################################################################
2469 CreateSessionLiveErrors
2471 lttng --mi xml create mysession --live --snapshot
2477 <COMMAND_ERROR_OUTPUT>
2478 Error: Snapshot and live modes are mutually exclusive.
2479 Error: Command error
2480 </COMMAND_ERROR_OUTPUT>
2482 #------------------------------------------------------------------------------
2484 lttng --mi xml create mysession --live -U blah
2490 <COMMAND_ERROR_OUTPUT>
2491 Error: URI parse unknown protocol blah
2492 Error: Unable to parse the URL blah
2493 Error: Invalid parameter
2494 </COMMAND_ERROR_OUTPUT>
2496 #------------------------------------------------------------------------------
2498 lttng --mi xml create mysession --live -C net://127.0.0.1
2504 <COMMAND_ERROR_OUTPUT>
2505 Error: You need both control and data URL.
2506 Error: Command error
2507 </COMMAND_ERROR_OUTPUT>
2511 ####################################################################
2512 # Scenario: Test "lttng list <session> (version 2.6.0, syscalls)
2513 ####################################################################
2515 GetSessionWithSyscalls
2517 lttng --mi xml list mysession
2523 <?xml version="1.0" encoding="UTF-8"?>
2529 <name>mysession</name>
2530 <path>/home/user/lttng-traces/mysession-20120129-084256</path>
2531 <enabled>false</enabled><snapshot_mode>0</snapshot_mode>
2532 <live_timer_interval>0</live_timer_interval>
2536 <buffer_type>PER_PID</buffer_type>
2539 <name>channel0</name>
2540 <enabled>true</enabled>
2542 <overwrite_mode>DISCARD</overwrite_mode>
2543 <subbuffer_size>262144</subbuffer_size>
2544 <subbuffer_count>4</subbuffer_count>
2545 <switch_timer_interval>0</switch_timer_interval>
2546 <read_timer_interval>200</read_timer_interval>
2547 <output_type>SPLICE</output_type>
2548 <tracefile_size>0</tracefile_size>
2549 <tracefile_count>0</tracefile_count>
2550 <live_timer_interval>0</live_timer_interval>
2551 </attributes><events>
2554 <type>SYSCALL</type>
2555 <enabled>true</enabled>
2556 <filter>false</filter>
2560 <type>SYSCALL</type>
2561 <enabled>true</enabled>
2562 <filter>false</filter>
2575 ListSession2.7Compat
2577 lttng --mi xml list mysession
2583 <?xml version="1.0" encoding="UTF-8"?>
2589 <name>mysession</name>
2590 <path>/home/user/lttng-traces/mysession-20151020-085614</path>
2591 <enabled>false</enabled>
2592 <snapshot_mode>0</snapshot_mode>
2593 <live_timer_interval>0</live_timer_interval>
2597 <buffer_type>GLOBAL</buffer_type>
2601 <name>channel0</name>
2602 <enabled>true</enabled>
2604 <overwrite_mode>DISCARD</overwrite_mode>
2605 <subbuffer_size>262144</subbuffer_size>
2606 <subbuffer_count>4</subbuffer_count>
2607 <switch_timer_interval>0</switch_timer_interval>
2608 <read_timer_interval>200000</read_timer_interval>
2609 <output_type>SPLICE</output_type>
2610 <tracefile_size>0</tracefile_size>
2611 <tracefile_count>0</tracefile_count>
2612 <live_timer_interval>0</live_timer_interval>
2615 <event><name>*</name>
2616 <type>SYSCALL</type>
2617 <enabled>true</enabled>
2618 <filter>false</filter>
2622 <type>TRACEPOINT</type>
2623 <enabled>true</enabled>
2624 <filter>false</filter>
2625 <loglevel>TRACE_EMERG</loglevel>
2626 <loglevel_type>ALL</loglevel_type>
2627 <exclusion>false</exclusion>
2635 <buffer_type>PER_PID</buffer_type>
2639 <name>channel0</name>
2640 <enabled>true</enabled>
2642 <overwrite_mode>DISCARD</overwrite_mode>
2643 <subbuffer_size>4096</subbuffer_size>
2644 <subbuffer_count>4</subbuffer_count>
2645 <switch_timer_interval>0</switch_timer_interval>
2646 <read_timer_interval>0</read_timer_interval>
2647 <output_type>MMAP</output_type>
2648 <tracefile_size>0</tracefile_size>
2649 <tracefile_count>0</tracefile_count>
2650 <live_timer_interval>0</live_timer_interval>
2653 <event><name>*</name>
2654 <type>TRACEPOINT</type>
2655 <enabled>true</enabled>
2656 <filter>false</filter>
2657 <exclusion>false</exclusion>
2669 ####################################################################
2670 # Scenario: Test "lttng load [OPTIONS] [SESSION]"
2671 # "lttng save [OPTIONS] [SESSION]"
2673 ####################################################################
2677 lttng --mi xml load -i /home/user/.lttng/sessions/mysession.lttng
2683 <command><name>load</name><output><load><session><name>*</name></session><path>.lttng/sessions/seqSession2.lttng</path></load></output><success>true</success></command>
2689 lttng --mi xml load -i /home/user/.lttng/sessions/mysession.lttng -f
2695 <command><name>load</name><output><load><session><name>*</name></session><path>.lttng/sessions/seqSession2.lttng</path></load></output><success>true</success></command>
2705 <command><name>save</name><output><save><session><name>*</name></session></save></output><success>true</success></command>
2709 lttng --mi xml save mysession
2715 <command><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>
2719 lttng --mi xml save -f mysession
2725 <command><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>
2729 lttng --mi xml save -o /tmp/test -f mysession
2735 <command><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>