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>
1835 lttng --mi xml enable-event -a -k -s mysession2
1841 <?xml version="1.0" encoding="UTF-8"?>
1843 <name>enable-event</name>
1849 <enabled>true</enabled>
1850 <filter>false</filter>
1851 <success>true</success>
1855 <success>true</success>
1861 ####################################################################
1862 # Scenario: Test "lttng add-context -h" and lttng --mi xml add-context ..." with different inputs
1863 ####################################################################
1869 lttng --mi xml add-context -h
1875 usage: lttng add-context -t TYPE [-k|-u] [OPTIONS]
1877 If no channel is given (-c), the context is added to
1880 Otherwise the context is added only to the channel (-c).
1882 Exactly one domain (-k or -u) must be specified.
1885 -h, --help Show this help
1886 --list-options Simple listing of options
1887 -s, --session NAME Apply to session name
1888 -c, --channel NAME Apply to channel
1889 -k, --kernel Apply to the kernel tracer
1890 -u, --userspace Apply to the user-space tracer
1893 -t, --type TYPE Context type. You can repeat that option on
1894 the command line to specify multiple contexts at once.
1895 (--kernel preempts --userspace)
1896 TYPE can be one of the strings below:
1897 pid, procname, prio, nice, vpid, tid, pthread_id,
1898 vtid, ppid, vppid, perf:cpu:cpu-cycles, perf:cpu:cycles
1899 Note that the vpid, vppid and vtid context types represent the virtual process id,
1900 virtual parent process id and virtual thread id as seen from the current execution context
1901 as opposed to the pid, ppid and tid which are kernel internal data structures.
1904 This command will add the context information 'prio' and two per-cpu
1905 perf counters (hardware branch misses and cache misses), to all channels
1906 in the trace data output:
1907 # lttng add-context -k -t prio -t perf:cpu:branch-misses -t perf:cpu:cache-misses
1911 lttng --mi xml add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
1917 UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
1918 UST context pid added to event sched_kthread_stop_ret channel mychannel
1923 ContextErrorHandling
1926 lttng --mi xml add-context -h
1932 usage: lttng add-context -t TYPE
1934 If no channel and no event is given (-c/-e), the context
1935 will be added to all events and all channels.
1936 Otherwise the context will be added only to the channel (-c)
1937 and/or event (-e) indicated.
1938 Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
1941 -h, --help Show this help
1942 --list-options Simple listing of options
1943 -s, --session NAME Apply to session name
1944 -c, --channel NAME Apply to channel
1945 -e, --event NAME Apply to event
1946 -k, --kernel Apply to the kernel tracer
1947 -u, --userspace Apply to the user-space tracer
1948 -t, --type TYPE Context type. You can repeat that option on
1949 the command line to specify multiple contexts at once.
1950 (--kernel preempts --userspace)
1951 TYPE can be one of the strings below:
1952 pid, procname, prio, nice, vpid, tid, pthread_id,
1953 vtid, ppid, vppid, perf:cpu-cycles, perf:cycles
1955 This command will add the context information 'prio' and two perf
1956 counters (hardware branch misses and cache misses), to all events
1957 in the trace data output:
1958 # lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
1963 lttng --mi xml add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
1969 UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
1970 UST context pid added to event sched_kthread_stop_ret channel mychannel
1975 ####################################################################
1976 # Scenario: Test "lttng create <session> with LTTng 2.1 options
1977 ####################################################################
1979 CreateSessionLttng2.1
1982 lttng --mi xml create mysession -U net://172.0.0.1
1988 <?xml version="1.0" encoding="UTF-8"?>
1993 <name>mysession</name>
1994 <path>tcp4://172.0.0.1:5342/mysession-20140813-095804 [data: 5343]</path>
1995 <enabled>false</enabled>
1996 <snapshot_mode>0</snapshot_mode>
1997 <live_timer_interval>0</live_timer_interval>
2000 <success>true</success>
2005 lttng --mi xml create mysession -U file:///tmp
2011 <?xml version="1.0" encoding="UTF-8"?>
2016 <name>mysession</name>
2018 <enabled>false</enabled>
2019 <snapshot_mode>0</snapshot_mode>
2020 <live_timer_interval>0</live_timer_interval>
2023 <success>true</success>
2028 lttng --mi xml create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
2034 <?xml version="1.0" encoding="UTF-8"?>
2039 <name>mysession</name>
2040 <path>tcp4://172.0.0.1:5342/ [data: 5343]</path>
2041 <enabled>false</enabled>
2042 <snapshot_mode>0</snapshot_mode>
2043 <live_timer_interval>0</live_timer_interval>
2046 <success>true</success>
2051 lttng --mi xml create mysession -U 172.0.0.1:1234:2345
2057 <?xml version="1.0" encoding="UTF-8"?>
2062 <name>mysession</name>
2063 <path>tcp4://172.0.0.1:1234/mysession-20140813-102225 [data: 2345]</path>
2064 <enabled>false</enabled>
2065 <snapshot_mode>0</snapshot_mode>
2066 <live_timer_interval>0</live_timer_interval>
2069 <success>true</success>
2074 lttng --mi xml destroy mysession
2080 <?xml version="1.0" encoding="UTF-8"?>
2082 <name>destroy</name>
2086 <name>mysession</name>
2087 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2088 <enabled>false</enabled>
2089 <snapshot_mode>0</snapshot_mode>
2090 <live_timer_interval>0</live_timer_interval>
2094 <success>true</success>
2099 lttng --mi xml -vvv create mysession -U net://172.0.0.1
2105 DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
2106 DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
2107 DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
2108 DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
2109 Session mysession created.
2110 Traces will be written in net://172.0.0.1
2111 DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
2116 ####################################################################
2117 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
2118 ####################################################################
2120 CreateSessionSnapshot
2122 lttng --mi xml create mysession --snapshot
2128 <?xml version="1.0" encoding="UTF-8"?>
2133 <name>mysession</name>
2135 <enabled>false</enabled>
2136 <snapshot_mode>1</snapshot_mode>
2137 <live_timer_interval>4294967295</live_timer_interval>
2140 <success>true</success>
2143 #------------------------------------------------------------------------------
2145 lttng --mi xml snapshot list-output -s mysession
2151 <?xml version="1.0" encoding="UTF-8"?>
2153 <name>snapshot</name>
2156 <name>list-output</name>
2159 <name>mysession</name>
2163 <name>snapshot-1</name>
2164 <ctrl_url>/home/user/lttng-traces/mysession-20130913-141651</ctrl_url>
2166 <max_size>0</max_size>
2173 <success>true</success>
2176 #------------------------------------------------------------------------------
2184 <?xml version="1.0" encoding="UTF-8"?>
2190 <name>mysession</name>
2192 <enabled>false</enabled>
2193 <snapshot_mode>1</snapshot_mode>
2194 <live_timer_interval>4294967295</live_timer_interval>
2200 #------------------------------------------------------------------------------
2202 lttng --mi xml snapshot record -s mysession
2208 Snapshot recorded successfully for session mysession
2210 #------------------------------------------------------------------------------
2212 lttng --mi xml destroy mysession
2218 <?xml version="1.0" encoding="UTF-8"?>
2220 <name>destroy</name>
2224 <name>mysession</name>
2225 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2226 <enabled>false</enabled>
2227 <snapshot_mode>0</snapshot_mode>
2228 <live_timer_interval>0</live_timer_interval>
2232 <success>true</success>
2237 ####################################################################
2238 # Scenario: Test "lttng create <session> --snapshot -U <URL> (LTTng 2.3)
2239 ####################################################################
2241 CreateSessionStreamedSnapshot
2243 lttng --mi xml create mysession --snapshot -U net://172.0.0.1
2249 Session mysession created.
2250 Default snapshot output set to: net://172.0.0.1
2251 Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
2253 #------------------------------------------------------------------------------
2255 lttng --mi xml snapshot list-output -s mysession
2261 Snapshot output list for session mysession
2262 [2] snapshot-2: net4://172.0.0.1:5342/
2264 #------------------------------------------------------------------------------
2272 1) mysession () [inactive snapshot]
2275 #------------------------------------------------------------------------------
2277 lttng --mi xml snapshot record -s mysession
2283 Snapshot recorded successfully for session mysession
2285 #------------------------------------------------------------------------------
2287 lttng --mi xml destroy mysession
2293 <?xml version="1.0" encoding="UTF-8"?>
2295 <name>destroy</name>
2299 <name>mysession</name>
2300 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2301 <enabled>false</enabled>
2302 <snapshot_mode>0</snapshot_mode>
2303 <live_timer_interval>0</live_timer_interval>
2307 <success>true</success>
2312 ####################################################################
2313 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
2314 ####################################################################
2316 CreateSessionSnapshotErrors
2318 lttng --mi xml snapshot list-output -s blabla
2324 <COMMAND_ERROR_OUTPUT>
2325 <?xml version="1.0" encoding="UTF-8"?>
2327 <name>snapshot</name>
2330 <name>list-output</name>
2334 <success>false</success>
2336 </COMMAND_ERROR_OUTPUT>
2338 #------------------------------------------------------------------------------
2339 #next is not an error case but good to be tested
2347 <?xml version="1.0" encoding="UTF-8"?>
2353 <name>mysession</name>
2355 <enabled>true</enabled>
2356 <snapshot_mode>1</snapshot_mode>
2357 <live_timer_interval>4294967295</live_timer_interval>
2363 #------------------------------------------------------------------------------
2365 lttng --mi xml snapshot record -s blabla
2371 <COMMAND_ERROR_OUTPUT>
2372 Error: Session name not found
2373 </COMMAND_ERROR_OUTPUT>
2374 <?xml version="1.0" encoding="UTF-8"?>
2376 <name>snapshot</name>
2383 <success>false</success>
2386 #------------------------------------------------------------------------------
2388 lttng --mi xml snapshot record -s mysession
2394 <COMMAND_ERROR_OUTPUT>
2395 Error: Session needs to be started once
2396 </COMMAND_ERROR_OUTPUT>
2397 <?xml version="1.0" encoding="UTF-8"?>
2399 <name>snapshot</name>
2406 <success>false</success>
2412 ####################################################################
2413 # Scenario: Test "lttng create <session> --live [USEC] (LTTng 2.4)
2414 ####################################################################
2418 lttng --mi xml create mysession --live -U net://127.0.0.1
2424 <?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>
2436 <success>true</success>
2439 #------------------------------------------------------------------------------
2447 <?xml version="1.0" encoding="UTF-8"?>
2453 <name>mysession</name>
2454 <path>tcp4://127.0.0.1:5342/ [data: 5343]</path>
2455 <enabled>false</enabled>
2456 <snapshot_mode>0</snapshot_mode>
2457 <live_timer_interval>1000000</live_timer_interval>
2463 #------------------------------------------------------------------------------
2465 lttng --mi xml destroy mysession
2471 <?xml version="1.0" encoding="UTF-8"?>
2473 <name>destroy</name>
2477 <name>mysession</name>
2478 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2479 <enabled>false</enabled>
2480 <snapshot_mode>0</snapshot_mode>
2481 <live_timer_interval>0</live_timer_interval>
2485 <success>true</success>
2490 ####################################################################
2491 # Scenario: Test errors for "lttng create <session> --live [USEC] (LTTng 2.4)
2492 ####################################################################
2494 CreateSessionLiveErrors
2496 lttng --mi xml create mysession --live --snapshot
2502 <COMMAND_ERROR_OUTPUT>
2503 Error: Snapshot and live modes are mutually exclusive.
2504 Error: Command error
2505 </COMMAND_ERROR_OUTPUT>
2507 #------------------------------------------------------------------------------
2509 lttng --mi xml create mysession --live -U blah
2515 <COMMAND_ERROR_OUTPUT>
2516 Error: URI parse unknown protocol blah
2517 Error: Unable to parse the URL blah
2518 Error: Invalid parameter
2519 </COMMAND_ERROR_OUTPUT>
2521 #------------------------------------------------------------------------------
2523 lttng --mi xml create mysession --live -C net://127.0.0.1
2529 <COMMAND_ERROR_OUTPUT>
2530 Error: You need both control and data URL.
2531 Error: Command error
2532 </COMMAND_ERROR_OUTPUT>
2536 ####################################################################
2537 # Scenario: Test "lttng list <session> (version 2.6.0, syscalls)
2538 ####################################################################
2540 GetSessionWithSyscalls
2542 lttng --mi xml list mysession
2548 <?xml version="1.0" encoding="UTF-8"?>
2554 <name>mysession</name>
2555 <path>/home/user/lttng-traces/mysession-20120129-084256</path>
2556 <enabled>false</enabled><snapshot_mode>0</snapshot_mode>
2557 <live_timer_interval>0</live_timer_interval>
2561 <buffer_type>PER_PID</buffer_type>
2564 <name>channel0</name>
2565 <enabled>true</enabled>
2567 <overwrite_mode>DISCARD</overwrite_mode>
2568 <subbuffer_size>262144</subbuffer_size>
2569 <subbuffer_count>4</subbuffer_count>
2570 <switch_timer_interval>0</switch_timer_interval>
2571 <read_timer_interval>200</read_timer_interval>
2572 <output_type>SPLICE</output_type>
2573 <tracefile_size>0</tracefile_size>
2574 <tracefile_count>0</tracefile_count>
2575 <live_timer_interval>0</live_timer_interval>
2576 </attributes><events>
2579 <type>SYSCALL</type>
2580 <enabled>true</enabled>
2581 <filter>false</filter>
2585 <type>SYSCALL</type>
2586 <enabled>true</enabled>
2587 <filter>false</filter>
2600 ListSession2.7Compat
2602 lttng --mi xml list mysession
2608 <?xml version="1.0" encoding="UTF-8"?>
2614 <name>mysession</name>
2615 <path>/home/user/lttng-traces/mysession-20151020-085614</path>
2616 <enabled>false</enabled>
2617 <snapshot_mode>0</snapshot_mode>
2618 <live_timer_interval>0</live_timer_interval>
2622 <buffer_type>GLOBAL</buffer_type>
2626 <name>channel0</name>
2627 <enabled>true</enabled>
2629 <overwrite_mode>DISCARD</overwrite_mode>
2630 <subbuffer_size>262144</subbuffer_size>
2631 <subbuffer_count>4</subbuffer_count>
2632 <switch_timer_interval>0</switch_timer_interval>
2633 <read_timer_interval>200000</read_timer_interval>
2634 <output_type>SPLICE</output_type>
2635 <tracefile_size>0</tracefile_size>
2636 <tracefile_count>0</tracefile_count>
2637 <live_timer_interval>0</live_timer_interval>
2640 <event><name>*</name>
2641 <type>SYSCALL</type>
2642 <enabled>true</enabled>
2643 <filter>false</filter>
2647 <type>TRACEPOINT</type>
2648 <enabled>true</enabled>
2649 <filter>false</filter>
2650 <loglevel>TRACE_EMERG</loglevel>
2651 <loglevel_type>ALL</loglevel_type>
2652 <exclusion>false</exclusion>
2660 <buffer_type>PER_PID</buffer_type>
2664 <name>channel0</name>
2665 <enabled>true</enabled>
2667 <overwrite_mode>DISCARD</overwrite_mode>
2668 <subbuffer_size>4096</subbuffer_size>
2669 <subbuffer_count>4</subbuffer_count>
2670 <switch_timer_interval>0</switch_timer_interval>
2671 <read_timer_interval>0</read_timer_interval>
2672 <output_type>MMAP</output_type>
2673 <tracefile_size>0</tracefile_size>
2674 <tracefile_count>0</tracefile_count>
2675 <live_timer_interval>0</live_timer_interval>
2678 <event><name>*</name>
2679 <type>TRACEPOINT</type>
2680 <enabled>true</enabled>
2681 <filter>false</filter>
2682 <exclusion>false</exclusion>
2694 ####################################################################
2695 # Scenario: Test "lttng load [OPTIONS] [SESSION]"
2696 # "lttng save [OPTIONS] [SESSION]"
2698 ####################################################################
2702 lttng --mi xml load -i /home/user/.lttng/sessions/mysession.lttng
2708 <command><name>load</name><output><load><session><name>*</name></session><path>.lttng/sessions/seqSession2.lttng</path></load></output><success>true</success></command>
2714 lttng --mi xml load -i /home/user/.lttng/sessions/mysession.lttng -f
2720 <command><name>load</name><output><load><session><name>*</name></session><path>.lttng/sessions/seqSession2.lttng</path></load></output><success>true</success></command>
2730 <command><name>save</name><output><save><session><name>*</name></session></save></output><success>true</success></command>
2734 lttng --mi xml save mysession
2740 <command><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>
2744 lttng --mi xml save -f mysession
2750 <command><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>
2754 lttng --mi xml save -o /tmp/test -f mysession
2760 <command><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>