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>
461 ####################################################################
462 # Scenario: Test lttng list <name> (with live time interval)
463 ####################################################################
465 GetSessionWithLiveInterval
467 lttng --mi xml list mysession
473 <?xml version="1.0" encoding="UTF-8"?>
479 <name>mysession</name>
480 <path>/home/user/lttng-traces/mysession-20120129-084256</path>
481 <enabled>false</enabled>
482 <snapshot_mode>1</snapshot_mode>
483 <live_timer_interval>4294967295</live_timer_interval>
491 #------------------------------------------------------------------------------
493 lttng --mi xml snapshot list-output -s mysession
499 <?xml version="1.0" encoding="UTF-8"?>
501 <name>snapshot</name>
504 <name>list-output</name>
507 <name>mysession</name>
511 <name>snapshot-1</name>
512 <ctrl_url>/home/user/lttng-traces/mysession-20120129-084256</ctrl_url>
514 <max_size>0</max_size>
521 <success>true</success>
524 #------------------------------------------------------------------------------
526 lttng --mi xml list mysession1
532 <?xml version="1.0" encoding="UTF-8"?>
538 <name>mysession1</name>
539 <path>/home/user/lttng-traces/mysession1-20120129-084256</path>
540 <enabled>true</enabled>
541 <snapshot_mode>0</snapshot_mode>
542 <live_timer_interval>0</live_timer_interval>
549 #------------------------------------------------------------------------------
551 lttng --mi xml list mysession2
557 <?xml version="1.0" encoding="UTF-8"?>
563 <name>mysession2</name>
564 <path>tcp4://172.0.0.1:5342/ [data: 5343]</path>
565 <enabled>false</enabled>
566 <snapshot_mode>0</snapshot_mode>
567 <live_timer_interval>1000000</live_timer_interval>
578 ####################################################################
579 # Scenario: Test "lttng list -k" with sample output
580 ####################################################################
584 lttng --mi xml list -k
590 <?xml version="1.0" encoding="UTF-8"?>
597 <buffer_type>PER_PID</buffer_type>
600 <name>sched_kthread_stop</name>
601 <type>TRACEPOINT</type>
602 <enabled>true</enabled>
603 <filter>false</filter>
604 <loglevel>TRACE_EMERG</loglevel>
605 <loglevel_type>ALL</loglevel_type>
606 <exclusion>false</exclusion>
609 <name>sched_kthread_stop_ret</name>
610 <type>TRACEPOINT</type>
611 <enabled>true</enabled>
612 <filter>false</filter>
613 <loglevel>TRACE_EMERG</loglevel>
614 <loglevel_type>ALL</loglevel_type>
615 <exclusion>false</exclusion>
618 <name>sched_wakeup_new</name>
619 <type>TRACEPOINT</type>
620 <enabled>true</enabled>
621 <filter>false</filter>
622 <loglevel>TRACE_EMERG</loglevel>
623 <loglevel_type>ALL</loglevel_type>
624 <exclusion>false</exclusion>
634 ####################################################################
635 # Scenario: Test "lttng list -k" with no kernel and no session daemon
636 ####################################################################
640 lttng --mi xml list -k
646 Spawning session daemon
647 <COMMAND_ERROR_OUTPUT>
648 Error: Unable to list kernel events
649 </COMMAND_ERROR_OUTPUT>
653 ####################################################################
654 # Scenario: Test "lttng list -k" with no kernel and with session daemon
655 ####################################################################
659 lttng --mi xml list -k
665 <COMMAND_ERROR_OUTPUT>
666 Error: Unable to list kernel events
667 </COMMAND_ERROR_OUTPUT>
671 ####################################################################
672 # Scenario: Test "lttng list -u" with sample output
673 ####################################################################
677 lttng --mi xml list -u -f
683 <?xml version="1.0" encoding="UTF-8"?>
690 <buffer_type>PER_PID</buffer_type>
694 <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
697 <name>ust_tests_hello:tptest_sighandler</name>
698 <type>TRACEPOINT</type>
699 <enabled>true</enabled>
700 <filter>false</filter>
701 <loglevel>TRACE_DEBUG_MODULE</loglevel>
702 <loglevel_type>ALL</loglevel_type>
703 <exclusion>false</exclusion>
707 <name>ust_tests_hello:tptest</name>
708 <type>TRACEPOINT</type>
709 <enabled>true</enabled>
710 <filter>false</filter>
711 <loglevel>TRACE_INFO</loglevel>
712 <loglevel_type>ALL</loglevel_type>
713 <exclusion>false</exclusion>
716 <name>doublefield</name>
721 <name>floatfield</name>
726 <name>stringfield</name>
736 <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
739 <name>ust_tests_hello:tptest_sighandler</name>
740 <type>TRACEPOINT</type>
741 <enabled>true</enabled>
742 <filter>false</filter>
743 <loglevel>TRACE_WARNING</loglevel>
744 <loglevel_type>ALL</loglevel_type>
745 <exclusion>false</exclusion>
749 <name>ust_tests_hello:tptest</name>
750 <type>TRACEPOINT</type>
751 <enabled>true</enabled>
752 <filter>false</filter>
753 <loglevel>TRACE_DEBUG_FUNCTION</loglevel>
754 <loglevel_type>ALL</loglevel_type>
755 <exclusion>false</exclusion>
758 <name>doublefield</name>
763 <name>floatfield</name>
768 <name>stringfield</name>
784 ####################################################################
785 # Scenario: Test "lttng list -u" with no UST provider available
786 ####################################################################
790 lttng --mi xml list -u -f
796 <?xml version="1.0" encoding="UTF-8"?>
803 <buffer_type>PER_PID</buffer_type>
812 ####################################################################
813 # Scenario: Test "lttng list -u" with no UST available (LTTng 2.0.x)
814 ####################################################################
818 lttng --mi xml list -u -f
824 <?xml version="1.0" encoding="UTF-8"?>
825 <command><name>list</name><output/></command>
826 <COMMAND_ERROR_OUTPUT>
827 Error: Unable to list UST event fields: LTTng-UST tracer is not supported. Please rebuild lttng-tools with lttng-ust support enabled.
829 </COMMAND_ERROR_OUTPUT>
832 ####################################################################
833 # Scenario: Test "lttng list -u" with no UST available and no session daemon
834 ####################################################################
838 lttng --mi xml list -u -f
844 <?xml version="1.0" encoding="UTF-8"?>
845 <command><name>list</name><output/></command>
846 <COMMAND_ERROR_OUTPUT>
847 Error: Unable to list UST event fields: LTTng-UST tracer is not supported. Please rebuild lttng-tools with lttng-ust support enabled.
849 </COMMAND_ERROR_OUTPUT>
852 ####################################################################
853 # Scenario: Test "lttng list -" with no kernel and with session daemon
854 ####################################################################
858 lttng --mi xml list -u -f
864 <?xml version="1.0" encoding="UTF-8"?>
865 <command><name>list</name><output/></command>
866 <COMMAND_ERROR_OUTPUT>
867 Error: Unable to list kernel events: Tracing the kernel requires a root lttng-sessiond daemon, as well as "tracing" group membership or root user ID for the lttng client.
869 </COMMAND_ERROR_OUTPUT>
873 ####################################################################
874 # Scenario: Test "lttng list -u -f" with sample output (version 2.6.0)
875 ####################################################################
879 lttng --mi xml list -u -f
885 <?xml version="1.0" encoding="UTF-8"?>
892 <buffer_type>PER_PID</buffer_type>
896 <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
899 <name>ust_tests_hello:tptest_sighandler</name>
900 <type>TRACEPOINT</type>
901 <enabled>true</enabled>
902 <filter>false</filter>
903 <loglevel>TRACE_DEBUG_MODULE</loglevel>
904 <loglevel_type>ALL</loglevel_type>
905 <exclusion>false</exclusion>
909 <name>ust_tests_hello:tptest</name>
910 <type>TRACEPOINT</type>
911 <enabled>true</enabled>
912 <filter>false</filter>
913 <loglevel>TRACE_INFO</loglevel>
914 <loglevel_type>ALL</loglevel_type>
915 <exclusion>false</exclusion>
918 <name>doublefield</name>
923 <name>floatfield</name>
928 <name>stringfield</name>
938 <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
941 <name>ust_tests_hello:tptest_sighandler</name>
942 <type>TRACEPOINT</type>
943 <enabled>true</enabled>
944 <filter>false</filter>
945 <loglevel>TRACE_WARNING</loglevel>
946 <loglevel_type>ALL</loglevel_type>
947 <exclusion>false</exclusion>
951 <name>ust_tests_hello:tptest</name>
952 <type>TRACEPOINT</type>
953 <enabled>true</enabled>
954 <filter>false</filter>
955 <loglevel>TRACE_DEBUG_FUNCTION</loglevel>
956 <loglevel_type>ALL</loglevel_type>
957 <exclusion>false</exclusion>
960 <name>doublefield</name>
965 <name>floatfield</name>
970 <name>stringfield</name>
985 ####################################################################
986 # Scenario: Test "lttng create <session>
987 ####################################################################
991 lttng --mi xml create mysession2
997 <?xml version="1.0" encoding="UTF-8"?>
1002 <name>mysession2</name>
1003 <path>/home/user/lttng-traces/mysession2-20120209-095418</path>
1004 <enabled>false</enabled>
1005 <snapshot_mode>0</snapshot_mode>
1006 <live_timer_interval>0</live_timer_interval>
1009 <success>true</success>
1014 ####################################################################
1015 # Scenario: Test "lttng create <session>
1016 ####################################################################
1018 CreateSessionWithPrompt
1020 lttng --mi xml create mysession2
1026 Prompt> Session mysession2 created.
1027 Traces will be written in /home/user/lttng-traces/mysession2-20120209-095418
1031 ####################################################################
1032 # Scenario: Test "lttng create <session> with different variants
1034 ####################################################################
1036 CreateSessionVariants
1038 lttng --mi xml create alreadyExist
1044 <?xml version="1.0" encoding="UTF-8"?>
1048 <success>false</success>
1050 <COMMAND_ERROR_OUTPUT>
1051 Warning: Session mysession2 already exists
1052 Error: Session name already exists
1053 </COMMAND_ERROR_OUTPUT>
1057 lttng --mi xml create session with spaces
1063 <?xml version="1.0" encoding="UTF-8"?>
1068 <name>session with spaces</name>
1069 <path>/home/user/lttng-traces/session with spaces-20120209-095418</path>
1070 <enabled>false</enabled>
1071 <snapshot_mode>0</snapshot_mode>
1072 <live_timer_interval>0</live_timer_interval>
1075 <success>true</success>
1080 lttng --mi xml create wrongName
1086 <?xml version="1.0" encoding="UTF-8"?>
1092 <path>/home/user/lttng-traces/auto-20120209-095418</path>
1093 <enabled>false</enabled>
1094 <snapshot_mode>0</snapshot_mode>
1095 <live_timer_interval>0</live_timer_interval>
1098 <success>true</success>
1103 lttng --mi xml create wrongPath -o /home/user/hallo
1109 <?xml version="1.0" encoding="UTF-8"?>
1114 <name>wrongPath</name>
1115 <path>/home/user/lttng-traces/wrongPath-20120209-095418</path>
1116 <enabled>false</enabled>
1117 <snapshot_mode>0</snapshot_mode>
1118 <live_timer_interval>0</live_timer_interval>
1121 <success>true</success>
1126 lttng --mi xml create pathWithSpaces -o /home/user/hallo user/here
1132 <?xml version="1.0" encoding="UTF-8"?>
1137 <name>pathWithSpaces</name>
1138 <path>/home/user/hallo user/here/pathWithSpaces-20120209-095418</path>
1139 <enabled>false</enabled>
1140 <snapshot_mode>0</snapshot_mode>
1141 <live_timer_interval>0</live_timer_interval>
1144 <success>true</success>
1149 ####################################################################
1150 # Scenario: Test "lttng destroy <session>
1151 ####################################################################
1156 lttng --mi xml destroy mysession2
1162 <?xml version="1.0" encoding="UTF-8"?>
1164 <name>destroy</name>
1168 <name>mysession2</name>
1169 <path>/home/user/lttng-traces/mysession2-20140812-160632</path>
1170 <enabled>false</enabled>
1171 <snapshot_mode>0</snapshot_mode>
1172 <live_timer_interval>0</live_timer_interval>
1176 <success>true</success>
1181 ####################################################################
1182 # Scenario: Test "lttng enable-channel ..." with different inputs
1183 ####################################################################
1188 lttng --mi xml enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100 -C 0 -W 10
1194 Kernel channel mychannel0 enabled for session mysession2
1195 Kernel channel mychannel1 enabled for session mysession2
1199 lttng --mi xml enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100
1205 <?xml version="1.0" encoding="UTF-8"?>
1207 <name>enable-channel</name>
1211 <name>mychannel0</name>
1212 <enabled>false</enabled>
1214 <overwrite_mode>OVERWRITE</overwrite_mode>
1215 <subbuffer_size>16384</subbuffer_size>
1216 <subbuffer_count>2</subbuffer_count>
1217 <switch_timer_interval>200</switch_timer_interval>
1218 <read_timer_interval>100</read_timer_interval>
1219 <output_type>SPLICE</output_type>
1220 <tracefile_size>0</tracefile_size>
1221 <tracefile_count>0</tracefile_count>
1222 <live_timer_interval>4294967295</live_timer_interval>
1224 <success>true</success>
1227 <name>mychannel1</name>
1228 <enabled>false</enabled>
1230 <overwrite_mode>OVERWRITE</overwrite_mode>
1231 <subbuffer_size>16384</subbuffer_size>
1232 <subbuffer_count>2</subbuffer_count>
1233 <switch_timer_interval>200</switch_timer_interval>
1234 <read_timer_interval>100</read_timer_interval>
1235 <output_type>SPLICE</output_type>
1236 <tracefile_size>0</tracefile_size>
1237 <tracefile_count>0</tracefile_count>
1238 <live_timer_interval>4294967295</live_timer_interval>
1240 <success>true</success>
1244 <success>true</success>
1249 lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 -C 0 -W 20
1255 UST channel channel0 enabled for session mysession2
1259 lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200
1265 <?xml version="1.0" encoding="UTF-8"?>
1267 <name>enable-channel</name>
1271 <name>ustChannel</name>
1272 <enabled>false</enabled>
1274 <overwrite_mode>OVERWRITE</overwrite_mode>
1275 <subbuffer_size>32768</subbuffer_size>
1276 <subbuffer_count>2</subbuffer_count>
1277 <switch_timer_interval>100</switch_timer_interval>
1278 <read_timer_interval>200</read_timer_interval>
1279 <output_type>MMAP</output_type>
1280 <tracefile_size>0</tracefile_size>
1281 <tracefile_count>0</tracefile_count>
1282 <live_timer_interval>4294967295</live_timer_interval>
1284 <success>true</success>
1288 <success>true</success>
1293 lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 --buffers-uid -C 0 -W 20
1299 UST channel channel0 enabled for session mysession2
1303 lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --buffers-pid
1309 <?xml version="1.0" encoding="UTF-8"?>
1311 <name>enable-channel</name>
1315 <name>ustChannel</name>
1316 <enabled>false</enabled>
1318 <overwrite_mode>OVERWRITE</overwrite_mode>
1319 <subbuffer_size>4096</subbuffer_size>
1320 <subbuffer_count>4</subbuffer_count>
1321 <switch_timer_interval>0</switch_timer_interval>
1322 <read_timer_interval>0</read_timer_interval>
1323 <output_type>MMAP</output_type>
1324 <tracefile_size>0</tracefile_size>
1325 <tracefile_count>0</tracefile_count>
1326 <live_timer_interval>4294967295</live_timer_interval>
1328 <success>true</success>
1332 <success>true</success>
1337 lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 2 --switch-timer 100 --read-timer 200 --buffers-uid
1343 <?xml version="1.0" encoding="UTF-8"?>
1345 <name>enable-channel</name>
1349 <name>ustChannel</name>
1350 <enabled>false</enabled>
1352 <overwrite_mode>OVERWRITE</overwrite_mode>
1353 <subbuffer_size>32768</subbuffer_size>
1354 <subbuffer_count>2</subbuffer_count>
1355 <switch_timer_interval>100</switch_timer_interval>
1356 <read_timer_interval>200</read_timer_interval>
1357 <output_type>MMAP</output_type>
1358 <tracefile_size>0</tracefile_size>
1359 <tracefile_count>0</tracefile_count>
1360 <live_timer_interval>4294967295</live_timer_interval>
1362 <success>true</success>
1366 <success>true</success>
1372 lttng --mi xml enable-channel mychannel0,mychannel1 -k -s mysession2
1378 <?xml version="1.0" encoding="UTF-8"?>
1380 <name>enable-channel</name>
1384 <name>mychannel0</name>
1385 <enabled>false</enabled>
1387 <overwrite_mode>DISCARD</overwrite_mode>
1388 <subbuffer_size>262144</subbuffer_size>
1389 <subbuffer_count>4</subbuffer_count>
1390 <switch_timer_interval>0</switch_timer_interval>
1391 <read_timer_interval>200000</read_timer_interval>
1392 <output_type>SPLICE</output_type>
1393 <tracefile_size>0</tracefile_size>
1394 <tracefile_count>0</tracefile_count>
1395 <live_timer_interval>4294967295</live_timer_interval>
1397 <success>true</success>
1400 <name>mychannel1</name>
1401 <enabled>false</enabled>
1403 <overwrite_mode>DISCARD</overwrite_mode>
1404 <subbuffer_size>262144</subbuffer_size>
1405 <subbuffer_count>4</subbuffer_count>
1406 <switch_timer_interval>0</switch_timer_interval>
1407 <read_timer_interval>200000</read_timer_interval>
1408 <output_type>SPLICE</output_type>
1409 <tracefile_size>0</tracefile_size>
1410 <tracefile_count>0</tracefile_count>
1411 <live_timer_interval>4294967295</live_timer_interval>
1413 <success>true</success>
1417 <success>true</success>
1422 lttng --mi xml enable-channel ustChannel -u -s mysession2
1428 <?xml version="1.0" encoding="UTF-8"?>
1430 <name>enable-channel</name>
1434 <name>ustChannel</name>
1435 <enabled>false</enabled>
1437 <overwrite_mode>DISCARD</overwrite_mode>
1438 <subbuffer_size>131072</subbuffer_size>
1439 <subbuffer_count>4</subbuffer_count>
1440 <switch_timer_interval>0</switch_timer_interval>
1441 <read_timer_interval>0</read_timer_interval>
1442 <output_type>MMAP</output_type>
1443 <tracefile_size>0</tracefile_size>
1444 <tracefile_count>0</tracefile_count>
1445 <live_timer_interval>4294967295</live_timer_interval>
1447 <success>true</success>
1451 <success>true</success>
1456 lttng --mi xml disable-channel mychannel0,mychannel1 -k -s mysession2
1462 <?xml version="1.0" encoding="UTF-8"?>
1464 <name>disable-channel</name>
1468 <name>mychannel0</name>
1469 <enabled>false</enabled>
1470 <success>true</success>
1473 <name>mychannel1</name>
1474 <enabled>false</enabled>
1475 <success>true</success>
1479 <success>true</success>
1484 lttng --mi xml disable-channel ustChannel -u -s mysession2
1490 <?xml version="1.0" encoding="UTF-8"?>
1492 <name>disable-channel</name>
1496 <name>ustChannel</name>
1497 <enabled>false</enabled>
1498 <success>true</success>
1502 <success>true</success>
1508 ####################################################################
1509 # Scenario: Test "lttng --mi xml enable-events ..." with different inputs
1510 ####################################################################
1514 # Tracepoint test cases
1517 lttng --mi xml enable-event block_rq_remap,block_bio_remap,softirq_entry -k -s mysession2 --tracepoint
1523 <?xml version="1.0" encoding="UTF-8"?>
1525 <name>enable-event</name>
1529 <name>block_rq_remap</name>
1530 <type>TRACEPOINT</type>
1531 <enabled>true</enabled>
1532 <filter>false</filter>
1533 <loglevel>TRACE_EMERG</loglevel>
1534 <loglevel_type>ALL</loglevel_type>
1535 <exclusion>false</exclusion>
1536 <success>true</success>
1539 <name>block_bio_remap</name>
1540 <type>TRACEPOINT</type>
1541 <enabled>true</enabled>
1542 <filter>false</filter>
1543 <loglevel>TRACE_EMERG</loglevel>
1544 <loglevel_type>ALL</loglevel_type>
1545 <exclusion>false</exclusion>
1546 <success>true</success>
1549 <name>softirq_entry</name>
1550 <type>TRACEPOINT</type>
1551 <enabled>true</enabled>
1552 <filter>false</filter>
1553 <loglevel>TRACE_EMERG</loglevel>
1554 <loglevel_type>ALL</loglevel_type>
1555 <exclusion>false</exclusion>
1556 <success>true</success>
1560 <success>true</success>
1565 lttng --mi xml enable-event -a -k -s mysession2 -c mychannel --tracepoint
1571 <?xml version="1.0" encoding="UTF-8"?>
1573 <name>enable-event</name>
1578 <type>TRACEPOINT</type>
1579 <enabled>true</enabled>
1580 <filter>false</filter>
1581 <loglevel>TRACE_EMERG</loglevel>
1582 <loglevel_type>ALL</loglevel_type>
1583 <exclusion>false</exclusion>
1584 <success>true</success>
1588 <success>true</success>
1593 lttng --mi xml enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint
1599 <?xml version="1.0" encoding="UTF-8"?>
1601 <name>enable-event</name>
1605 <name>ust_tests_hello:tptest_sighandler</name>
1606 <type>TRACEPOINT</type>
1607 <enabled>true</enabled>
1608 <filter>false</filter>
1609 <exclusion>false</exclusion>
1610 <success>true</success>
1614 <success>true</success>
1619 lttng --mi xml enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint --filter intfield==10
1625 <?xml version="1.0" encoding="UTF-8"?>
1627 <name>enable-event</name>
1631 <name>ust_tests_hello:tptest_sighandler</name>
1632 <type>TRACEPOINT</type>
1633 <enabled>true</enabled>
1634 <filter>true</filter>
1635 <exclusion>false</exclusion>
1636 <success>true</success>
1640 <success>true</success>
1645 lttng --mi xml enable-event -a -u -s mysession2 -c mychannel --tracepoint
1651 <?xml version="1.0" encoding="UTF-8"?>
1653 <name>enable-event</name>
1658 <type>TRACEPOINT</type>
1659 <enabled>true</enabled>
1660 <filter>false</filter>
1661 <exclusion>false</exclusion>
1662 <success>true</success>
1666 <success>true</success>
1670 # Syscall test cases
1673 lttng --mi xml enable-event -a -k -s mysession2 --syscall
1679 <?xml version="1.0" encoding="UTF-8"?>
1681 <name>enable-event</name>
1686 <type>SYSCALL</type>
1687 <enabled>true</enabled>
1688 <filter>false</filter>
1689 <success>true</success>
1693 <success>true</success>
1698 lttng --mi xml enable-event -a -k -s mysession2 -c mychannel --syscall
1704 <?xml version="1.0" encoding="UTF-8"?>
1706 <name>enable-event</name>
1711 <type>SYSCALL</type>
1712 <enabled>true</enabled>
1713 <filter>false</filter>
1714 <success>true</success>
1718 <success>true</success>
1722 # dynamic probe/function probe test cases
1725 lttng --mi xml enable-event myevent0 -k -s mysession2 --function 0xc0101340
1731 <?xml version="1.0" encoding="UTF-8"?>
1733 <name>enable-event</name>
1737 <name>myevent0</name>
1738 <type>FUNCTION</type>
1739 <enabled>false</enabled>
1740 <filter>false</filter>
1741 <success>true</success>
1745 <success>true</success>
1750 lttng --mi xml enable-event myevent1 -k -s mysession2 -c mychannel --probe init_post
1756 <?xml version="1.0" encoding="UTF-8"?>
1758 <name>enable-event</name>
1762 <name>myevent1</name>
1764 <enabled>false</enabled>
1765 <filter>false</filter>
1767 <symbol_name>init_post</symbol_name>
1768 <success>true</success>
1772 <success>true</success>
1777 # log level test cases
1780 lttng --mi xml enable-event myevent4 -u -s mysession2 --loglevel-only TRACE_DEBUG
1786 <?xml version="1.0" encoding="UTF-8"?>
1788 <name>enable-event</name>
1792 <name>myevent4</name>
1793 <type>TRACEPOINT</type>
1794 <enabled>true</enabled>
1795 <filter>false</filter>
1796 <loglevel>TRACE_DEBUG</loglevel>
1797 <loglevel_type>SINGLE</loglevel_type>
1798 <exclusion>false</exclusion>
1799 <success>true</success>
1803 <success>true</success>
1808 lttng --mi xml enable-event myevent5 -u -s mysession2 -c mychannel --loglevel TRACE_DEBUG_FUNCTION
1814 <?xml version="1.0" encoding="UTF-8"?>
1816 <name>enable-event</name>
1820 <name>myevent5</name>
1821 <type>TRACEPOINT</type>
1822 <enabled>true</enabled>
1823 <filter>false</filter>
1824 <loglevel>TRACE_DEBUG_FUNCTION</loglevel>
1825 <loglevel_type>RANGE</loglevel_type>
1826 <exclusion>false</exclusion>
1827 <success>true</success>
1831 <success>true</success>
1837 ####################################################################
1838 # Scenario: Test "lttng add-context -h" and lttng --mi xml add-context ..." with different inputs
1839 ####################################################################
1845 lttng --mi xml add-context -h
1851 usage: lttng add-context -t TYPE [-k|-u] [OPTIONS]
1853 If no channel is given (-c), the context is added to
1856 Otherwise the context is added only to the channel (-c).
1858 Exactly one domain (-k or -u) must be specified.
1861 -h, --help Show this help
1862 --list-options Simple listing of options
1863 -s, --session NAME Apply to session name
1864 -c, --channel NAME Apply to channel
1865 -k, --kernel Apply to the kernel tracer
1866 -u, --userspace Apply to the user-space tracer
1869 -t, --type TYPE Context type. You can repeat that option on
1870 the command line to specify multiple contexts at once.
1871 (--kernel preempts --userspace)
1872 TYPE can be one of the strings below:
1873 pid, procname, prio, nice, vpid, tid, pthread_id,
1874 vtid, ppid, vppid, perf:cpu:cpu-cycles, perf:cpu:cycles
1875 Note that the vpid, vppid and vtid context types represent the virtual process id,
1876 virtual parent process id and virtual thread id as seen from the current execution context
1877 as opposed to the pid, ppid and tid which are kernel internal data structures.
1880 This command will add the context information 'prio' and two per-cpu
1881 perf counters (hardware branch misses and cache misses), to all channels
1882 in the trace data output:
1883 # lttng add-context -k -t prio -t perf:cpu:branch-misses -t perf:cpu:cache-misses
1887 lttng --mi xml add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
1893 UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
1894 UST context pid added to event sched_kthread_stop_ret channel mychannel
1899 ContextErrorHandling
1902 lttng --mi xml add-context -h
1908 usage: lttng add-context -t TYPE
1910 If no channel and no event is given (-c/-e), the context
1911 will be added to all events and all channels.
1912 Otherwise the context will be added only to the channel (-c)
1913 and/or event (-e) indicated.
1914 Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
1917 -h, --help Show this help
1918 --list-options Simple listing of options
1919 -s, --session NAME Apply to session name
1920 -c, --channel NAME Apply to channel
1921 -e, --event NAME Apply to event
1922 -k, --kernel Apply to the kernel tracer
1923 -u, --userspace Apply to the user-space tracer
1924 -t, --type TYPE Context type. You can repeat that option on
1925 the command line to specify multiple contexts at once.
1926 (--kernel preempts --userspace)
1927 TYPE can be one of the strings below:
1928 pid, procname, prio, nice, vpid, tid, pthread_id,
1929 vtid, ppid, vppid, perf:cpu-cycles, perf:cycles
1931 This command will add the context information 'prio' and two perf
1932 counters (hardware branch misses and cache misses), to all events
1933 in the trace data output:
1934 # lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
1939 lttng --mi xml add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
1945 UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
1946 UST context pid added to event sched_kthread_stop_ret channel mychannel
1951 ####################################################################
1952 # Scenario: Test "lttng create <session> with LTTng 2.1 options
1953 ####################################################################
1955 CreateSessionLttng2.1
1958 lttng --mi xml create mysession -U net://172.0.0.1
1964 <?xml version="1.0" encoding="UTF-8"?>
1969 <name>mysession</name>
1970 <path>tcp4://172.0.0.1:5342/mysession-20140813-095804 [data: 5343]</path>
1971 <enabled>false</enabled>
1972 <snapshot_mode>0</snapshot_mode>
1973 <live_timer_interval>0</live_timer_interval>
1976 <success>true</success>
1981 lttng --mi xml create mysession -U file:///tmp
1987 <?xml version="1.0" encoding="UTF-8"?>
1992 <name>mysession</name>
1994 <enabled>false</enabled>
1995 <snapshot_mode>0</snapshot_mode>
1996 <live_timer_interval>0</live_timer_interval>
1999 <success>true</success>
2004 lttng --mi xml create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
2010 <?xml version="1.0" encoding="UTF-8"?>
2015 <name>mysession</name>
2016 <path>tcp4://172.0.0.1:5342/ [data: 5343]</path>
2017 <enabled>false</enabled>
2018 <snapshot_mode>0</snapshot_mode>
2019 <live_timer_interval>0</live_timer_interval>
2022 <success>true</success>
2027 lttng --mi xml create mysession -U 172.0.0.1:1234:2345
2033 <?xml version="1.0" encoding="UTF-8"?>
2038 <name>mysession</name>
2039 <path>tcp4://172.0.0.1:1234/mysession-20140813-102225 [data: 2345]</path>
2040 <enabled>false</enabled>
2041 <snapshot_mode>0</snapshot_mode>
2042 <live_timer_interval>0</live_timer_interval>
2045 <success>true</success>
2050 lttng --mi xml destroy mysession
2056 <?xml version="1.0" encoding="UTF-8"?>
2058 <name>destroy</name>
2062 <name>mysession</name>
2063 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2064 <enabled>false</enabled>
2065 <snapshot_mode>0</snapshot_mode>
2066 <live_timer_interval>0</live_timer_interval>
2070 <success>true</success>
2075 lttng --mi xml -vvv create mysession -U net://172.0.0.1
2081 DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
2082 DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
2083 DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
2084 DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
2085 Session mysession created.
2086 Traces will be written in net://172.0.0.1
2087 DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
2092 ####################################################################
2093 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
2094 ####################################################################
2096 CreateSessionSnapshot
2098 lttng --mi xml create mysession --snapshot
2104 <?xml version="1.0" encoding="UTF-8"?>
2109 <name>mysession</name>
2111 <enabled>false</enabled>
2112 <snapshot_mode>1</snapshot_mode>
2113 <live_timer_interval>4294967295</live_timer_interval>
2116 <success>true</success>
2119 #------------------------------------------------------------------------------
2121 lttng --mi xml snapshot list-output -s mysession
2127 <?xml version="1.0" encoding="UTF-8"?>
2129 <name>snapshot</name>
2132 <name>list-output</name>
2135 <name>mysession</name>
2139 <name>snapshot-1</name>
2140 <ctrl_url>/home/user/lttng-traces/mysession-20130913-141651</ctrl_url>
2142 <max_size>0</max_size>
2149 <success>true</success>
2152 #------------------------------------------------------------------------------
2160 <?xml version="1.0" encoding="UTF-8"?>
2166 <name>mysession</name>
2168 <enabled>false</enabled>
2169 <snapshot_mode>1</snapshot_mode>
2170 <live_timer_interval>4294967295</live_timer_interval>
2176 #------------------------------------------------------------------------------
2178 lttng --mi xml snapshot record -s mysession
2184 Snapshot recorded successfully for session mysession
2186 #------------------------------------------------------------------------------
2188 lttng --mi xml destroy mysession
2194 <?xml version="1.0" encoding="UTF-8"?>
2196 <name>destroy</name>
2200 <name>mysession</name>
2201 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2202 <enabled>false</enabled>
2203 <snapshot_mode>0</snapshot_mode>
2204 <live_timer_interval>0</live_timer_interval>
2208 <success>true</success>
2213 ####################################################################
2214 # Scenario: Test "lttng create <session> --snapshot -U <URL> (LTTng 2.3)
2215 ####################################################################
2217 CreateSessionStreamedSnapshot
2219 lttng --mi xml create mysession --snapshot -U net://172.0.0.1
2225 Session mysession created.
2226 Default snapshot output set to: net://172.0.0.1
2227 Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
2229 #------------------------------------------------------------------------------
2231 lttng --mi xml snapshot list-output -s mysession
2237 Snapshot output list for session mysession
2238 [2] snapshot-2: net4://172.0.0.1:5342/
2240 #------------------------------------------------------------------------------
2248 1) mysession () [inactive snapshot]
2251 #------------------------------------------------------------------------------
2253 lttng --mi xml snapshot record -s mysession
2259 Snapshot recorded successfully for session mysession
2261 #------------------------------------------------------------------------------
2263 lttng --mi xml destroy mysession
2269 <?xml version="1.0" encoding="UTF-8"?>
2271 <name>destroy</name>
2275 <name>mysession</name>
2276 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2277 <enabled>false</enabled>
2278 <snapshot_mode>0</snapshot_mode>
2279 <live_timer_interval>0</live_timer_interval>
2283 <success>true</success>
2288 ####################################################################
2289 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
2290 ####################################################################
2292 CreateSessionSnapshotErrors
2294 lttng --mi xml snapshot list-output -s blabla
2300 <COMMAND_ERROR_OUTPUT>
2301 <?xml version="1.0" encoding="UTF-8"?>
2303 <name>snapshot</name>
2306 <name>list-output</name>
2310 <success>false</success>
2312 </COMMAND_ERROR_OUTPUT>
2314 #------------------------------------------------------------------------------
2315 #next is not an error case but good to be tested
2323 <?xml version="1.0" encoding="UTF-8"?>
2329 <name>mysession</name>
2331 <enabled>true</enabled>
2332 <snapshot_mode>1</snapshot_mode>
2333 <live_timer_interval>4294967295</live_timer_interval>
2339 #------------------------------------------------------------------------------
2341 lttng --mi xml snapshot record -s blabla
2347 <COMMAND_ERROR_OUTPUT>
2348 Error: Session name not found
2349 </COMMAND_ERROR_OUTPUT>
2350 <?xml version="1.0" encoding="UTF-8"?>
2352 <name>snapshot</name>
2359 <success>false</success>
2362 #------------------------------------------------------------------------------
2364 lttng --mi xml snapshot record -s mysession
2370 <COMMAND_ERROR_OUTPUT>
2371 Error: Session needs to be started once
2372 </COMMAND_ERROR_OUTPUT>
2373 <?xml version="1.0" encoding="UTF-8"?>
2375 <name>snapshot</name>
2382 <success>false</success>
2388 ####################################################################
2389 # Scenario: Test "lttng create <session> --live [USEC] (LTTng 2.4)
2390 ####################################################################
2394 lttng --mi xml create mysession --live -U net://127.0.0.1
2400 <?xml version="1.0" encoding="UTF-8"?>
2405 <name>mysession</name>
2406 <path>tcp4://127.0.0.1:5342/ [data: 5343]</path>
2407 <enabled>false</enabled>
2408 <snapshot_mode>0</snapshot_mode>
2409 <live_timer_interval>1000000</live_timer_interval>
2412 <success>true</success>
2415 #------------------------------------------------------------------------------
2423 <?xml version="1.0" encoding="UTF-8"?>
2429 <name>mysession</name>
2430 <path>tcp4://127.0.0.1:5342/ [data: 5343]</path>
2431 <enabled>false</enabled>
2432 <snapshot_mode>0</snapshot_mode>
2433 <live_timer_interval>1000000</live_timer_interval>
2439 #------------------------------------------------------------------------------
2441 lttng --mi xml destroy mysession
2447 <?xml version="1.0" encoding="UTF-8"?>
2449 <name>destroy</name>
2453 <name>mysession</name>
2454 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2455 <enabled>false</enabled>
2456 <snapshot_mode>0</snapshot_mode>
2457 <live_timer_interval>0</live_timer_interval>
2461 <success>true</success>
2466 ####################################################################
2467 # Scenario: Test errors for "lttng create <session> --live [USEC] (LTTng 2.4)
2468 ####################################################################
2470 CreateSessionLiveErrors
2472 lttng --mi xml create mysession --live --snapshot
2478 <COMMAND_ERROR_OUTPUT>
2479 Error: Snapshot and live modes are mutually exclusive.
2480 Error: Command error
2481 </COMMAND_ERROR_OUTPUT>
2483 #------------------------------------------------------------------------------
2485 lttng --mi xml create mysession --live -U blah
2491 <COMMAND_ERROR_OUTPUT>
2492 Error: URI parse unknown protocol blah
2493 Error: Unable to parse the URL blah
2494 Error: Invalid parameter
2495 </COMMAND_ERROR_OUTPUT>
2497 #------------------------------------------------------------------------------
2499 lttng --mi xml create mysession --live -C net://127.0.0.1
2505 <COMMAND_ERROR_OUTPUT>
2506 Error: You need both control and data URL.
2507 Error: Command error
2508 </COMMAND_ERROR_OUTPUT>
2512 ####################################################################
2513 # Scenario: Test "lttng list <session> (version 2.6.0, syscalls)
2514 ####################################################################
2516 GetSessionWithSyscalls
2518 lttng --mi xml list mysession
2524 <?xml version="1.0" encoding="UTF-8"?>
2530 <name>mysession</name>
2531 <path>/home/user/lttng-traces/mysession-20120129-084256</path>
2532 <enabled>false</enabled><snapshot_mode>0</snapshot_mode>
2533 <live_timer_interval>0</live_timer_interval>
2537 <buffer_type>PER_PID</buffer_type>
2540 <name>channel0</name>
2541 <enabled>true</enabled>
2543 <overwrite_mode>DISCARD</overwrite_mode>
2544 <subbuffer_size>262144</subbuffer_size>
2545 <subbuffer_count>4</subbuffer_count>
2546 <switch_timer_interval>0</switch_timer_interval>
2547 <read_timer_interval>200</read_timer_interval>
2548 <output_type>SPLICE</output_type>
2549 <tracefile_size>0</tracefile_size>
2550 <tracefile_count>0</tracefile_count>
2551 <live_timer_interval>0</live_timer_interval>
2552 </attributes><events>
2555 <type>SYSCALL</type>
2556 <enabled>true</enabled>
2557 <filter>false</filter>
2561 <type>SYSCALL</type>
2562 <enabled>true</enabled>
2563 <filter>false</filter>
2576 ListSession2.7Compat
2578 lttng --mi xml list mysession
2584 <?xml version="1.0" encoding="UTF-8"?>
2590 <name>mysession</name>
2591 <path>/home/user/lttng-traces/mysession-20151020-085614</path>
2592 <enabled>false</enabled>
2593 <snapshot_mode>0</snapshot_mode>
2594 <live_timer_interval>0</live_timer_interval>
2598 <buffer_type>GLOBAL</buffer_type>
2602 <name>channel0</name>
2603 <enabled>true</enabled>
2605 <overwrite_mode>DISCARD</overwrite_mode>
2606 <subbuffer_size>262144</subbuffer_size>
2607 <subbuffer_count>4</subbuffer_count>
2608 <switch_timer_interval>0</switch_timer_interval>
2609 <read_timer_interval>200000</read_timer_interval>
2610 <output_type>SPLICE</output_type>
2611 <tracefile_size>0</tracefile_size>
2612 <tracefile_count>0</tracefile_count>
2613 <live_timer_interval>0</live_timer_interval>
2616 <event><name>*</name>
2617 <type>SYSCALL</type>
2618 <enabled>true</enabled>
2619 <filter>false</filter>
2623 <type>TRACEPOINT</type>
2624 <enabled>true</enabled>
2625 <filter>false</filter>
2626 <loglevel>TRACE_EMERG</loglevel>
2627 <loglevel_type>ALL</loglevel_type>
2628 <exclusion>false</exclusion>
2636 <buffer_type>PER_PID</buffer_type>
2640 <name>channel0</name>
2641 <enabled>true</enabled>
2643 <overwrite_mode>DISCARD</overwrite_mode>
2644 <subbuffer_size>4096</subbuffer_size>
2645 <subbuffer_count>4</subbuffer_count>
2646 <switch_timer_interval>0</switch_timer_interval>
2647 <read_timer_interval>0</read_timer_interval>
2648 <output_type>MMAP</output_type>
2649 <tracefile_size>0</tracefile_size>
2650 <tracefile_count>0</tracefile_count>
2651 <live_timer_interval>0</live_timer_interval>
2654 <event><name>*</name>
2655 <type>TRACEPOINT</type>
2656 <enabled>true</enabled>
2657 <filter>false</filter>
2658 <exclusion>false</exclusion>
2670 ####################################################################
2671 # Scenario: Test "lttng load [OPTIONS] [SESSION]"
2672 # "lttng save [OPTIONS] [SESSION]"
2674 ####################################################################
2678 lttng --mi xml load -i /home/user/.lttng/sessions/mysession.lttng
2684 <command><name>load</name><output><load><session><name>*</name></session><path>.lttng/sessions/seqSession2.lttng</path></load></output><success>true</success></command>
2690 lttng --mi xml load -i /home/user/.lttng/sessions/mysession.lttng -f
2696 <command><name>load</name><output><load><session><name>*</name></session><path>.lttng/sessions/seqSession2.lttng</path></load></output><success>true</success></command>
2706 <command><name>save</name><output><save><session><name>*</name></session></save></output><success>true</success></command>
2710 lttng --mi xml save mysession
2716 <command><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>
2720 lttng --mi xml save -f mysession
2726 <command><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>
2730 lttng --mi xml save -o /tmp/test -f mysession
2736 <command><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>