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
1954 lttng --mi xml calibrate -k --function
1960 <?xml version="1.0" encoding="UTF-8"?>
1962 <name>calibrate</name>
1965 <type>FUNCTION</type>
1968 <success>true</success>
1973 lttng --mi xml calibrate -u --function
1979 <?xml version="1.0" encoding="UTF-8"?>
1981 <name>calibrate</name>
1984 <type>FUNCTION</type>
1987 <success>true</success>
1993 ####################################################################
1994 # Scenario: Test "lttng create <session> with LTTng 2.1 options
1995 ####################################################################
1997 CreateSessionLttng2.1
2000 lttng --mi xml create mysession -U net://172.0.0.1
2006 <?xml version="1.0" encoding="UTF-8"?>
2011 <name>mysession</name>
2012 <path>tcp4://172.0.0.1:5342/mysession-20140813-095804 [data: 5343]</path>
2013 <enabled>false</enabled>
2014 <snapshot_mode>0</snapshot_mode>
2015 <live_timer_interval>0</live_timer_interval>
2018 <success>true</success>
2023 lttng --mi xml create mysession -U file:///tmp
2029 <?xml version="1.0" encoding="UTF-8"?>
2034 <name>mysession</name>
2036 <enabled>false</enabled>
2037 <snapshot_mode>0</snapshot_mode>
2038 <live_timer_interval>0</live_timer_interval>
2041 <success>true</success>
2046 lttng --mi xml create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
2052 <?xml version="1.0" encoding="UTF-8"?>
2057 <name>mysession</name>
2058 <path>tcp4://172.0.0.1:5342/ [data: 5343]</path>
2059 <enabled>false</enabled>
2060 <snapshot_mode>0</snapshot_mode>
2061 <live_timer_interval>0</live_timer_interval>
2064 <success>true</success>
2069 lttng --mi xml create mysession -U 172.0.0.1:1234:2345
2075 <?xml version="1.0" encoding="UTF-8"?>
2080 <name>mysession</name>
2081 <path>tcp4://172.0.0.1:1234/mysession-20140813-102225 [data: 2345]</path>
2082 <enabled>false</enabled>
2083 <snapshot_mode>0</snapshot_mode>
2084 <live_timer_interval>0</live_timer_interval>
2087 <success>true</success>
2092 lttng --mi xml destroy mysession
2098 <?xml version="1.0" encoding="UTF-8"?>
2100 <name>destroy</name>
2104 <name>mysession</name>
2105 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2106 <enabled>false</enabled>
2107 <snapshot_mode>0</snapshot_mode>
2108 <live_timer_interval>0</live_timer_interval>
2112 <success>true</success>
2117 lttng --mi xml -vvv create mysession -U net://172.0.0.1
2123 DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
2124 DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
2125 DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
2126 DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
2127 Session mysession created.
2128 Traces will be written in net://172.0.0.1
2129 DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
2134 ####################################################################
2135 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
2136 ####################################################################
2138 CreateSessionSnapshot
2140 lttng --mi xml create mysession --snapshot
2146 <?xml version="1.0" encoding="UTF-8"?>
2151 <name>mysession</name>
2153 <enabled>false</enabled>
2154 <snapshot_mode>1</snapshot_mode>
2155 <live_timer_interval>4294967295</live_timer_interval>
2158 <success>true</success>
2161 #------------------------------------------------------------------------------
2163 lttng --mi xml snapshot list-output -s mysession
2169 <?xml version="1.0" encoding="UTF-8"?>
2171 <name>snapshot</name>
2174 <name>list-output</name>
2177 <name>mysession</name>
2181 <name>snapshot-1</name>
2182 <ctrl_url>/home/user/lttng-traces/mysession-20130913-141651</ctrl_url>
2184 <max_size>0</max_size>
2191 <success>true</success>
2194 #------------------------------------------------------------------------------
2202 <?xml version="1.0" encoding="UTF-8"?>
2208 <name>mysession</name>
2210 <enabled>false</enabled>
2211 <snapshot_mode>1</snapshot_mode>
2212 <live_timer_interval>4294967295</live_timer_interval>
2218 #------------------------------------------------------------------------------
2220 lttng --mi xml snapshot record -s mysession
2226 Snapshot recorded successfully for session mysession
2228 #------------------------------------------------------------------------------
2230 lttng --mi xml destroy mysession
2236 <?xml version="1.0" encoding="UTF-8"?>
2238 <name>destroy</name>
2242 <name>mysession</name>
2243 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2244 <enabled>false</enabled>
2245 <snapshot_mode>0</snapshot_mode>
2246 <live_timer_interval>0</live_timer_interval>
2250 <success>true</success>
2255 ####################################################################
2256 # Scenario: Test "lttng create <session> --snapshot -U <URL> (LTTng 2.3)
2257 ####################################################################
2259 CreateSessionStreamedSnapshot
2261 lttng --mi xml create mysession --snapshot -U net://172.0.0.1
2267 Session mysession created.
2268 Default snapshot output set to: net://172.0.0.1
2269 Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
2271 #------------------------------------------------------------------------------
2273 lttng --mi xml snapshot list-output -s mysession
2279 Snapshot output list for session mysession
2280 [2] snapshot-2: net4://172.0.0.1:5342/
2282 #------------------------------------------------------------------------------
2290 1) mysession () [inactive snapshot]
2293 #------------------------------------------------------------------------------
2295 lttng --mi xml snapshot record -s mysession
2301 Snapshot recorded successfully for session mysession
2303 #------------------------------------------------------------------------------
2305 lttng --mi xml destroy mysession
2311 <?xml version="1.0" encoding="UTF-8"?>
2313 <name>destroy</name>
2317 <name>mysession</name>
2318 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2319 <enabled>false</enabled>
2320 <snapshot_mode>0</snapshot_mode>
2321 <live_timer_interval>0</live_timer_interval>
2325 <success>true</success>
2330 ####################################################################
2331 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
2332 ####################################################################
2334 CreateSessionSnapshotErrors
2336 lttng --mi xml snapshot list-output -s blabla
2342 <COMMAND_ERROR_OUTPUT>
2343 <?xml version="1.0" encoding="UTF-8"?>
2345 <name>snapshot</name>
2348 <name>list-output</name>
2352 <success>false</success>
2354 </COMMAND_ERROR_OUTPUT>
2356 #------------------------------------------------------------------------------
2357 #next is not an error case but good to be tested
2365 <?xml version="1.0" encoding="UTF-8"?>
2371 <name>mysession</name>
2373 <enabled>true</enabled>
2374 <snapshot_mode>1</snapshot_mode>
2375 <live_timer_interval>4294967295</live_timer_interval>
2381 #------------------------------------------------------------------------------
2383 lttng --mi xml snapshot record -s blabla
2389 <COMMAND_ERROR_OUTPUT>
2390 Error: Session name not found
2391 </COMMAND_ERROR_OUTPUT>
2392 <?xml version="1.0" encoding="UTF-8"?>
2394 <name>snapshot</name>
2401 <success>false</success>
2404 #------------------------------------------------------------------------------
2406 lttng --mi xml snapshot record -s mysession
2412 <COMMAND_ERROR_OUTPUT>
2413 Error: Session needs to be started once
2414 </COMMAND_ERROR_OUTPUT>
2415 <?xml version="1.0" encoding="UTF-8"?>
2417 <name>snapshot</name>
2424 <success>false</success>
2430 ####################################################################
2431 # Scenario: Test "lttng create <session> --live [USEC] (LTTng 2.4)
2432 ####################################################################
2436 lttng --mi xml create mysession --live -U net://127.0.0.1
2442 <?xml version="1.0" encoding="UTF-8"?>
2447 <name>mysession</name>
2448 <path>tcp4://127.0.0.1:5342/ [data: 5343]</path>
2449 <enabled>false</enabled>
2450 <snapshot_mode>0</snapshot_mode>
2451 <live_timer_interval>1000000</live_timer_interval>
2454 <success>true</success>
2457 #------------------------------------------------------------------------------
2465 <?xml version="1.0" encoding="UTF-8"?>
2471 <name>mysession</name>
2472 <path>tcp4://127.0.0.1:5342/ [data: 5343]</path>
2473 <enabled>false</enabled>
2474 <snapshot_mode>0</snapshot_mode>
2475 <live_timer_interval>1000000</live_timer_interval>
2481 #------------------------------------------------------------------------------
2483 lttng --mi xml destroy mysession
2489 <?xml version="1.0" encoding="UTF-8"?>
2491 <name>destroy</name>
2495 <name>mysession</name>
2496 <path>/home/user/lttng-traces/mysession-20140818-100114</path>
2497 <enabled>false</enabled>
2498 <snapshot_mode>0</snapshot_mode>
2499 <live_timer_interval>0</live_timer_interval>
2503 <success>true</success>
2508 ####################################################################
2509 # Scenario: Test errors for "lttng create <session> --live [USEC] (LTTng 2.4)
2510 ####################################################################
2512 CreateSessionLiveErrors
2514 lttng --mi xml create mysession --live --snapshot
2520 <COMMAND_ERROR_OUTPUT>
2521 Error: Snapshot and live modes are mutually exclusive.
2522 Error: Command error
2523 </COMMAND_ERROR_OUTPUT>
2525 #------------------------------------------------------------------------------
2527 lttng --mi xml create mysession --live -U blah
2533 <COMMAND_ERROR_OUTPUT>
2534 Error: URI parse unknown protocol blah
2535 Error: Unable to parse the URL blah
2536 Error: Invalid parameter
2537 </COMMAND_ERROR_OUTPUT>
2539 #------------------------------------------------------------------------------
2541 lttng --mi xml create mysession --live -C net://127.0.0.1
2547 <COMMAND_ERROR_OUTPUT>
2548 Error: You need both control and data URL.
2549 Error: Command error
2550 </COMMAND_ERROR_OUTPUT>
2554 ####################################################################
2555 # Scenario: Test "lttng list <session> (version 2.6.0, syscalls)
2556 ####################################################################
2558 GetSessionWithSyscalls
2560 lttng --mi xml list mysession
2566 <?xml version="1.0" encoding="UTF-8"?>
2572 <name>mysession</name>
2573 <path>/home/user/lttng-traces/mysession-20120129-084256</path>
2574 <enabled>false</enabled><snapshot_mode>0</snapshot_mode>
2575 <live_timer_interval>0</live_timer_interval>
2579 <buffer_type>PER_PID</buffer_type>
2582 <name>channel0</name>
2583 <enabled>true</enabled>
2585 <overwrite_mode>DISCARD</overwrite_mode>
2586 <subbuffer_size>262144</subbuffer_size>
2587 <subbuffer_count>4</subbuffer_count>
2588 <switch_timer_interval>0</switch_timer_interval>
2589 <read_timer_interval>200</read_timer_interval>
2590 <output_type>SPLICE</output_type>
2591 <tracefile_size>0</tracefile_size>
2592 <tracefile_count>0</tracefile_count>
2593 <live_timer_interval>0</live_timer_interval>
2594 </attributes><events>
2597 <type>SYSCALL</type>
2598 <enabled>true</enabled>
2599 <filter>false</filter>
2603 <type>SYSCALL</type>
2604 <enabled>true</enabled>
2605 <filter>false</filter>
2618 ListSession2.7Compat
2620 lttng --mi xml list mysession
2626 <?xml version="1.0" encoding="UTF-8"?>
2632 <name>mysession</name>
2633 <path>/home/user/lttng-traces/mysession-20151020-085614</path>
2634 <enabled>false</enabled>
2635 <snapshot_mode>0</snapshot_mode>
2636 <live_timer_interval>0</live_timer_interval>
2640 <buffer_type>GLOBAL</buffer_type>
2644 <name>channel0</name>
2645 <enabled>true</enabled>
2647 <overwrite_mode>DISCARD</overwrite_mode>
2648 <subbuffer_size>262144</subbuffer_size>
2649 <subbuffer_count>4</subbuffer_count>
2650 <switch_timer_interval>0</switch_timer_interval>
2651 <read_timer_interval>200000</read_timer_interval>
2652 <output_type>SPLICE</output_type>
2653 <tracefile_size>0</tracefile_size>
2654 <tracefile_count>0</tracefile_count>
2655 <live_timer_interval>0</live_timer_interval>
2658 <event><name>*</name>
2659 <type>SYSCALL</type>
2660 <enabled>true</enabled>
2661 <filter>false</filter>
2665 <type>TRACEPOINT</type>
2666 <enabled>true</enabled>
2667 <filter>false</filter>
2668 <loglevel>TRACE_EMERG</loglevel>
2669 <loglevel_type>ALL</loglevel_type>
2670 <exclusion>false</exclusion>
2678 <buffer_type>PER_PID</buffer_type>
2682 <name>channel0</name>
2683 <enabled>true</enabled>
2685 <overwrite_mode>DISCARD</overwrite_mode>
2686 <subbuffer_size>4096</subbuffer_size>
2687 <subbuffer_count>4</subbuffer_count>
2688 <switch_timer_interval>0</switch_timer_interval>
2689 <read_timer_interval>0</read_timer_interval>
2690 <output_type>MMAP</output_type>
2691 <tracefile_size>0</tracefile_size>
2692 <tracefile_count>0</tracefile_count>
2693 <live_timer_interval>0</live_timer_interval>
2696 <event><name>*</name>
2697 <type>TRACEPOINT</type>
2698 <enabled>true</enabled>
2699 <filter>false</filter>
2700 <exclusion>false</exclusion>
2712 ####################################################################
2713 # Scenario: Test "lttng load [OPTIONS] [SESSION]"
2714 # "lttng save [OPTIONS] [SESSION]"
2716 ####################################################################
2720 lttng --mi xml load -i /home/user/.lttng/sessions/mysession.lttng
2726 <command><name>load</name><output><load><session><name>*</name></session><path>.lttng/sessions/seqSession2.lttng</path></load></output><success>true</success></command>
2732 lttng --mi xml load -i /home/user/.lttng/sessions/mysession.lttng -f
2738 <command><name>load</name><output><load><session><name>*</name></session><path>.lttng/sessions/seqSession2.lttng</path></load></output><success>true</success></command>
2748 <command><name>save</name><output><save><session><name>*</name></session></save></output><success>true</success></command>
2752 lttng --mi xml save mysession
2758 <command><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>
2762 lttng --mi xml save -f mysession
2768 <command><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>
2772 lttng --mi xml save -o /tmp/test -f mysession
2778 <command><name>save</name><output><save><session><name>seqSession2</name></session></save></output><success>true</success></command>