1 ####################################################################
2 # Copyright (c) 2012, 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 # Bernd Hufmann - Initial API and implementation
11 ####################################################################
12 ####################################################################
13 # Scenario: Test lttng not installed
14 ####################################################################
24 <COMMAND_ERROR_OUTPUT>
26 </COMMAND_ERROR_OUTPUT>
30 ####################################################################
31 # Scenario: Test lttng version
32 ####################################################################
42 lttng version 2.1.0 - Basse Messe
43 Web site: http://lttng.org/
45 lttng is free software and under the GPL license and part LGPL
49 ####################################################################
50 # Scenario: Test lttng version
52 ####################################################################
54 LttngVersionWithPrompt
62 Prompt> lttng version 2.0.0 - Annedd'ale
63 Web site: http://lttng.org/
65 lttng is free software and under the GPL license and part LGPL
69 ####################################################################
70 # Scenario: Test lttng version (unsupported version)
71 ####################################################################
73 LttngUnsupportedVersion
81 lttng version 200.0.0 - Annedd'ale
82 Web site: http://lttng.org/
84 lttng is free software and under the GPL license and part LGPL
89 ####################################################################
90 # Scenario: Test lttng version (noversion)
91 ####################################################################
101 Web site: http://lttng.org/
103 lttng is free software and under the GPL license and part LGPL
107 ####################################################################
108 # Scenario: Test lttng version (compiled from source)
109 ####################################################################
119 lttng version heads/stable-2.5-0-g3910e60 - Fumisterie
121 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.
123 Web site: http://lttng.org
125 lttng is free software and under the GPL license and part LGPL
129 ####################################################################
130 # Scenario: Test no sessions available
131 ####################################################################
141 Currently no available tracing session
145 ####################################################################
146 # Scenario: Test get sessions
147 ####################################################################
157 Available tracing sessions:
158 1) mysession1 (/home/user/lttng-traces/mysession1-20120123-083928) [inactive]
159 2) mysession (/home/user/lttng-traces/mysession-20120123-083318) [inactive]
161 Use lttng list <session_name> for more details
165 ####################################################################
166 # Scenario: Test get sessions with tracing group
167 ####################################################################
169 GetSessionWithTracingGroup
177 Available tracing sessions:
178 1) mysession1 (/home/user/lttng-traces/mysession1-20120123-083928) [inactive]
179 2) mysession (/home/user/lttng-traces/mysession-20120123-083318) [inactive]
181 Use lttng list <session_name> for more details
185 ####################################################################
186 # Scenario: Test lttng list <name> where session doesn't exist
187 ####################################################################
189 GetSessionNameNotExist
197 Session test not found
198 <COMMAND_ERROR_OUTPUT>
199 Error: Session name not found
200 </COMMAND_ERROR_OUTPUT>
204 ####################################################################
205 # Scenario: Test lttng -vvv list <name> where session doesn't exist
206 ####################################################################
208 GetSessionNameNotExistVerbose
216 DEBUG2: Session name: test [in cmd_list() at commands/list.c:618]
217 DEBUG1: Session count 1 [in list_sessions() at commands/list.c:485]
218 <COMMAND_ERROR_OUTPUT>
219 Error: Session 'test' not found
221 </COMMAND_ERROR_OUTPUT>
222 DEBUG1: Clean exit [in clean_exit() at lttng.c:165]
226 ####################################################################
227 # Scenario: Test lttng list with garbage output
228 ####################################################################
238 asdfaereafsdcv 12333456434&*89**(())(^%$*
239 @#$%^&*()@#$%^&*()0834523094578kj;djkfs
240 a;sdf094v5u dsafj;sd9
244 ####################################################################
245 # Scenario: Test lttng list <name> with sample outputs
246 ####################################################################
256 Tracing session mysession: [active]
257 Trace path: /home/user/lttng-traces/mysession-20120129-084256
259 === Domain: Kernel ===
263 - channel0: [enabled]
267 subbufers size: 262144
268 number of subbufers: 4
269 switch timer interval: 0
270 read timer interval: 200
274 block_rq_remap (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
275 block_bio_remap (loglevel: TRACE_EMERG (0)) (type: tracepoint) [disabled]
277 - channel1: [disabled]
281 subbufers size: 524288
282 number of subbufers: 4
283 switch timer interval: 100
284 read timer interval: 400
290 === Domain: UST global ===
294 - mychannel1: [disabled]
299 number of subbufers: 8
300 switch timer interval: 200
301 read timer interval: 100
307 - channel0: [enabled]
312 number of subbufers: 4
313 switch timer interval: 0
314 read timer interval: 200
318 ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint) [disabled]
319 * (type: tracepoint) [enabled]
323 lttng list mysession1
329 Tracing session mysession1: [inactive]
330 Trace path: /home/user/lttng-traces/mysession1-20120203-133225
335 ####################################################################
336 # Scenario: Test lttng list <name> (with live time interval)
337 ####################################################################
339 GetSessionWithLiveInterval
347 Tracing session mysession: [inactive snapshot]
349 Live timer interval (usec): 4294967295
352 #------------------------------------------------------------------------------
354 lttng snapshot list-output -s mysession
360 Snapshot output list for session mysession
361 [1] snapshot-1: /home/user/lttng-traces/mysession-20120129-084256 (max-size: 0)
363 #------------------------------------------------------------------------------
365 lttng list mysession1
371 Tracing session mysession1: [active]
372 Trace path: /home/user/lttng-traces/mysession1-20120129-084256
373 Live timer interval (usec): 0
376 #------------------------------------------------------------------------------
378 lttng list mysession2
384 Tracing session mysession2: [inactive]
385 Trace path: tcp4://172.0.0.1:5342/ [data: 5343]
386 Live timer interval (usec): 1000000
391 ####################################################################
392 # Scenario: Test "lttng list -k" with sample output
393 ####################################################################
405 sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint)
406 sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint)
407 sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint)
412 ####################################################################
413 # Scenario: Test "lttng list -k" with no kernel and no session daemon
414 ####################################################################
424 Spawning session daemon
425 <COMMAND_ERROR_OUTPUT>
426 Error: Unable to list kernel events
427 </COMMAND_ERROR_OUTPUT>
431 ####################################################################
432 # Scenario: Test "lttng list -k" with no kernel and with session daemon
433 ####################################################################
443 <COMMAND_ERROR_OUTPUT>
444 Error: Unable to list kernel events
445 </COMMAND_ERROR_OUTPUT>
449 ####################################################################
450 # Scenario: Test "lttng list -k" with no kernel, with session daemon and verbose
451 ####################################################################
453 ListWithNoKernelVerbose
461 DEBUG2: Session name: (null) [in cmd_list() at commands/list.c:618]
462 DEBUG1: Getting kernel tracing events [in list_kernel_events() at commands/list.c:309]
463 <COMMAND_ERROR_OUTPUT>
464 Error: Unable to list kernel events
465 </COMMAND_ERROR_OUTPUT>
466 DEBUG1: Clean exit [in clean_exit() at lttng.c:165]
470 ####################################################################
471 # Scenario: Test "lttng list -u" with sample output
472 ####################################################################
485 PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
486 ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_MODULE (10)) (type: tracepoint)
487 ust_tests_hello:tptest (loglevel: TRACE_INFO (6)) (type: tracepoint)
489 PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
490 ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
491 ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
496 ####################################################################
497 # Scenario: Test "lttng list -u" with no UST provider available
498 ####################################################################
515 ####################################################################
516 # Scenario: Test "lttng list -u" with no UST available (LTTng 2.0.x)
517 ####################################################################
534 ####################################################################
535 # Scenario: Test "lttng list -u" with no UST available and no session daemon
536 ####################################################################
546 Spawning a session daemon
547 <COMMAND_ERROR_OUTPUT>
548 Error: Unable to list UST events: Listing UST events failed
550 </COMMAND_ERROR_OUTPUT>
554 ####################################################################
555 # Scenario: Test "lttng list -u" with no ust and with session daemon
556 ####################################################################
566 <COMMAND_ERROR_OUTPUT>
567 Error: Unable to list UST events: Listing UST events failed
569 </COMMAND_ERROR_OUTPUT>
573 ####################################################################
574 # Scenario: Test "lttng list -u" with no kernel, with session daemon and verbose
575 ####################################################################
579 lttng -vvv list -u -f
585 DEBUG2: Session name: (null) [in cmd_list() at commands/list.c:618]
586 DEBUG1: Getting kernel tracing events [in list_kernel_events() at commands/list.c:309]
587 Spawning a session daemon
588 <COMMAND_ERROR_OUTPUT>
589 Error: Unable to list UST events: Listing UST events failed
591 </COMMAND_ERROR_OUTPUT>
592 DEBUG1: Clean exit [in clean_exit() at lttng.c:165]
597 ####################################################################
598 # Scenario: Test "lttng list -u -f" with sample output (version 2.1.0)
599 ####################################################################
612 PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
613 ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_MODULE (10)) (type: tracepoint)
614 ust_tests_hello:tptest (loglevel: TRACE_INFO (6)) (type: tracepoint)
615 field: doublefield (float)
616 field: floatfield (float)
617 field: stringfield (string)
619 PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
620 ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
621 ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
622 field: doublefield (float)
623 field: floatfield (float)
624 field: stringfield (string)
630 ####################################################################
631 # Scenario: Test "lttng create <session>
632 ####################################################################
636 lttng create mysession2
642 Session mysession2 created.
643 Traces will be written in /home/user/lttng-traces/mysession2-20120209-095418
647 ####################################################################
648 # Scenario: Test "lttng create <session>
649 ####################################################################
651 CreateSessionWithPrompt
653 lttng create mysession2
659 Prompt> Session mysession2 created.
660 Traces will be written in /home/user/lttng-traces/mysession2-20120209-095418
664 ####################################################################
665 # Scenario: Test "lttng create <session> with different variants
667 ####################################################################
669 CreateSessionVariants
671 lttng create alreadyExist
677 <COMMAND_ERROR_OUTPUT>
678 Error: Session name already exist
679 </COMMAND_ERROR_OUTPUT>
683 lttng create session with spaces
689 Session session with spaces created.
690 Traces will be written in /home/user/lttng-traces/session with spaces-20120209-095418
694 lttng create wrongName
700 Session auto created.
701 Traces will be written in /home/user/lttng-traces/auto-20120209-095418
705 lttng create wrongPath -o /home/user/hallo
711 Session wrongPath created.
712 Traces will be written in /home/user/lttng-traces/wrongPath-20120209-095418
716 lttng create pathWithSpaces -o /home/user/hallo user/here
722 Session pathWithSpaces created.
723 Traces will be written in /home/user/hallo user/here/pathWithSpaces-20120209-095418
727 ####################################################################
728 # Scenario: Test "lttng destroy <session>
729 ####################################################################
734 lttng destroy mysession2
740 Session mysession2 destroyed.
744 ####################################################################
745 # Scenario: Test "lttng -vvv destroy <session>"
746 ####################################################################
749 DestroySessionVerbose
751 lttng -vvv destroy mysession2
757 DEBUG2: Config file path found: /home/eedbhu [in get_session_name() at utils.c:98]
758 DEBUG1: Session name found: mysession2 [in get_session_name() at utils.c:99]
759 Session mysession2 destroyed at /home/eedbhu
764 ####################################################################
765 # Scenario: Test "lttng enable-channel ..." with different inputs
766 ####################################################################
771 lttng enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100 -C 0 -W 10
777 Kernel channel mychannel0 enabled for session mysession2
778 Kernel channel mychannel1 enabled for session mysession2
782 lttng enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100
788 Kernel channel mychannel0 enabled for session mysession2
789 Kernel channel mychannel1 enabled for session mysession2
793 lttng enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 -C 0 -W 20
799 UST channel channel0 enabled for session mysession2
803 lttng enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200
809 UST channel channel0 enabled for session mysession2
813 lttng 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
819 UST channel channel0 enabled for session mysession2
823 lttng enable-channel ustChannel -u -s mysession2 --overwrite --buffers-pid
829 UST channel ustChannel enabled for session mysession2
833 lttng enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 --buffers-uid
839 UST channel channel0 enabled for session mysession2
844 lttng enable-channel mychannel0,mychannel1 -k -s mysession2
850 Kernel channel mychannel0 enabled for session mysession2
851 Kernel channel mychannel1 enabled for session mysession2
855 lttng enable-channel ustChannel -u -s mysession2
861 UST channel mychannel0 enabled for session mysession2
865 lttng disable-channel mychannel0,mychannel1 -k -s mysession2
871 Kernel channel mychannel0 disabled for session mysession2
872 Kernel channel mychannel1 disabled for session mysession2
876 lttng disable-channel ustChannel -u -s mysession2
882 UST channel mychannel0 enabled for session mysession2
887 ####################################################################
888 # Scenario: Test "lttng enable-events ..." with different inputs
889 ####################################################################
893 # Tracepoint test cases
896 lttng enable-event block_rq_remap,block_bio_remap,softirq_entry -k -s mysession2 --tracepoint
902 kernel event block_rq_remap created in channel channel0
903 kernel event block_bio_remap created in channel channel0
904 kernel event softirq_entry created in channel channel0
908 lttng enable-event -a -k -s mysession2 -c mychannel --tracepoint
914 All kernel tracepoints are enabled in channel channel0
918 lttng enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint
924 UST event ust_tests_hello:tptest_sighandler created in channel mychannel
928 lttng enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint --filter intfield==10
934 UST event ust_tests_hello:tptest_sighandler created in channel mychannel
938 lttng enable-event -a -u -s mysession2 -c mychannel --tracepoint
944 All UST tracepoints are enabled in channel mychannel
950 lttng enable-event -a -k -s mysession2 --syscall
956 All kernel system calls are enabled in channel channel0
960 lttng enable-event -a -k -s mysession2 -c mychannel --syscall
966 All kernel system calls are enabled in channel mychannel
969 # dynamic probe/function probe test cases
972 lttng enable-event myevent0 -k -s mysession2 --function 0xc0101340
978 kernel event myevent0 created in channel mychannel
982 lttng enable-event myevent1 -k -s mysession2 -c mychannel --probe init_post
988 kernel event myevent1 created in channel mychannel
991 # log level test cases
994 lttng enable-event myevent4 -u -s mysession2 --loglevel-only TRACE_DEBUG
1000 UST event myevent4 created in channel channel0
1004 lttng enable-event myevent5 -u -s mysession2 -c mychannel --loglevel TRACE_DEBUG_FUNCTION
1010 UST event myevent5 created in channel mychannel
1015 ####################################################################
1016 # Scenario: Test "lttng add-context -h" and lttng add-context ..." with different inputs
1017 ####################################################################
1023 lttng add-context -h
1029 usage: lttng add-context -t TYPE
1031 If no channel and no event is given (-c/-e), the context
1032 will be added to all events and all channels.
1033 Otherwise the context will be added only to the channel (-c)
1034 and/or event (-e) indicated.
1035 Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
1038 -h, --help Show this help
1039 --list-options Simple listing of options
1040 -s, --session NAME Apply to session name
1041 -c, --channel NAME Apply to channel
1042 -e, --event NAME Apply to event
1043 -k, --kernel Apply to the kernel tracer
1044 -u, --userspace Apply to the user-space tracer
1045 -t, --type TYPE Context type. You can repeat that option on
1046 the command line to specify multiple contexts at once.
1047 (--kernel preempts --userspace)
1048 TYPE can be one of the strings below:
1049 pid, procname, prio, nice, vpid, tid, pthread_id,
1050 vtid, ppid, vppid, perf:cpu-cycles, perf:cycles
1052 This command will add the context information 'prio' and two perf
1053 counters (hardware branch misses and cache misses), to all events
1054 in the trace data output:
1055 # lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
1060 lttng add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
1066 UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
1067 UST context pid added to event sched_kthread_stop_ret channel mychannel
1072 ContextErrorHandling
1075 lttng add-context -h
1081 usage: lttng add-context -t TYPE
1083 If no channel and no event is given (-c/-e), the context
1084 will be added to all events and all channels.
1085 Otherwise the context will be added only to the channel (-c)
1086 and/or event (-e) indicated.
1087 Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
1090 -h, --help Show this help
1091 --list-options Simple listing of options
1092 -s, --session NAME Apply to session name
1093 -c, --channel NAME Apply to channel
1094 -e, --event NAME Apply to event
1095 -k, --kernel Apply to the kernel tracer
1096 -u, --userspace Apply to the user-space tracer
1097 -t, --type TYPE Context type. You can repeat that option on
1098 the command line to specify multiple contexts at once.
1099 (--kernel preempts --userspace)
1100 TYPE can be one of the strings below:
1101 pid, procname, prio, nice, vpid, tid, pthread_id,
1102 vtid, ppid, vppid, perf:cpu-cycles, perf:cycles
1104 This command will add the context information 'prio' and two perf
1105 counters (hardware branch misses and cache misses), to all events
1106 in the trace data output:
1107 # lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
1112 lttng add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
1118 UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
1119 UST context pid added to event sched_kthread_stop_ret channel mychannel
1124 ####################################################################
1125 # Scenario: Test "lttng create <session> with LTTng 2.1 options
1126 ####################################################################
1128 CreateSessionLttng2.1
1131 lttng create mysession -U net://172.0.0.1
1137 Session mysession created.
1138 Traces will be written in net://172.0.0.1
1142 lttng create mysession -U file:///tmp
1148 Session mysession created.
1149 Traces will be written in file:///tmp
1153 lttng create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
1159 Session mysession created.
1160 Control URL tcp://172.0.0.1 set for session mysession
1161 Data URL tcp://172.0.0.1:5343 set for session mysession
1165 lttng create mysession -U net://172.0.0.1:1234:2345
1171 Session mysession created.
1172 Traces will be written in net://172.0.0.1:1234:2345
1176 lttng destroy mysession
1182 Session mysession destroyed.
1186 lttng -vvv create mysession -U net://172.0.0.1
1192 DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
1193 DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
1194 DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
1195 DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
1196 Session mysession created.
1197 Traces will be written in net://172.0.0.1
1198 DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
1203 ####################################################################
1204 # Scenario: Test "lttng -vvv create <session> with LTTng 2.1 options"
1205 ####################################################################
1207 CreateSessionLttngVerbose2.1
1209 lttng -vvv create mysession -U net://172.0.0.1
1215 DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
1216 DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
1217 DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
1218 DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
1219 Session mysession created.
1220 Traces will be written in net://172.0.0.1
1221 DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
1225 lttng -vvv destroy mysession
1231 Session mysession destroyed.
1235 ####################################################################
1236 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
1237 ####################################################################
1239 CreateSessionSnapshot
1241 lttng create mysession --snapshot
1247 Session mysession created.
1248 Default snapshot output set to: /home/user/lttng-traces/mysession-20130913-141651
1249 Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
1251 #------------------------------------------------------------------------------
1253 lttng snapshot list-output -s mysession
1259 Snapshot output list for session mysession
1260 [1] snapshot-1: /home/user/lttng-traces/mysession-20130913-141651
1262 #------------------------------------------------------------------------------
1270 1) mysession () [inactive snapshot]
1273 #------------------------------------------------------------------------------
1275 lttng snapshot record -s mysession
1281 Snapshot recorded successfully for session mysession
1283 #------------------------------------------------------------------------------
1285 lttng destroy mysession
1291 Session mysession destroyed.
1295 ####################################################################
1296 # Scenario: Test "lttng create <session> --snapshot -U <URL> (LTTng 2.3)
1297 ####################################################################
1299 CreateSessionStreamedSnapshot
1301 lttng create mysession --snapshot -U net://172.0.0.1
1307 Session mysession created.
1308 Default snapshot output set to: net://172.0.0.1
1309 Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
1311 #------------------------------------------------------------------------------
1313 lttng snapshot list-output -s mysession
1319 Snapshot output list for session mysession
1320 [2] snapshot-2: net4://172.0.0.1:5342/
1322 #------------------------------------------------------------------------------
1330 1) mysession () [inactive snapshot]
1333 #------------------------------------------------------------------------------
1335 lttng snapshot record -s mysession
1341 Snapshot recorded successfully for session mysession
1343 #------------------------------------------------------------------------------
1345 lttng destroy mysession
1351 Session mysession destroyed.
1355 ####################################################################
1356 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
1357 ####################################################################
1359 CreateSessionSnapshotErrors
1361 lttng snapshot list-output -s blabla
1367 <COMMAND_ERROR_OUTPUT>
1368 Error: Session name not found
1369 </COMMAND_ERROR_OUTPUT>
1371 #------------------------------------------------------------------------------
1372 #next is not an error case but good to be tested
1380 1) mysession () [active snapshot]
1383 #------------------------------------------------------------------------------
1385 lttng snapshot record -s blabla
1391 <COMMAND_ERROR_OUTPUT>
1392 Error: Session name not found
1393 </COMMAND_ERROR_OUTPUT>
1395 #------------------------------------------------------------------------------
1397 lttng snapshot record -s mysession
1403 <COMMAND_ERROR_OUTPUT>
1404 Error: Session needs to be started once
1405 </COMMAND_ERROR_OUTPUT>
1410 ####################################################################
1411 # Scenario: Test "lttng create <session> --live [USEC] (LTTng 2.4)
1412 ####################################################################
1416 lttng create mysession --live -U net://127.0.0.1
1422 Session mysession created.
1423 Traces will be written in net://127.0.0.1
1424 Live timer set to 1000000 usec
1426 #------------------------------------------------------------------------------
1434 Available tracing sessions:
1435 1) mysession (net4://127.0.0.1:5342/ [data: 5343]) [inactive]
1437 Use lttng list <session_name> for more details
1439 #------------------------------------------------------------------------------
1441 lttng destroy mysession
1447 Session mysession destroyed.
1451 ####################################################################
1452 # Scenario: Test errors for "lttng create <session> --live [USEC] (LTTng 2.4)
1453 ####################################################################
1455 CreateSessionLiveErrors
1457 lttng create mysession --live --snapshot
1463 <COMMAND_ERROR_OUTPUT>
1464 Error: Snapshot and live modes are mutually exclusive.
1465 Error: Command error
1466 </COMMAND_ERROR_OUTPUT>
1468 #------------------------------------------------------------------------------
1470 lttng create mysession --live -U blah
1476 <COMMAND_ERROR_OUTPUT>
1477 Error: URI parse unknown protocol blah
1478 Error: Unable to parse the URL blah
1479 Error: Invalid parameter
1480 </COMMAND_ERROR_OUTPUT>
1482 #------------------------------------------------------------------------------
1484 lttng create mysession --live -C net://127.0.0.1
1490 <COMMAND_ERROR_OUTPUT>
1491 Error: You need both control and data URL.
1492 Error: Command error
1493 </COMMAND_ERROR_OUTPUT>
1496 ####################################################################
1497 # Scenario: Test "lttng create <session> --snapshot (LTTng 2.5)
1498 ####################################################################
1500 CreateSessionSnapshot2.5
1502 lttng create mysession --snapshot
1508 Session mysession created.
1509 Default snapshot output set to: /home/user/lttng-traces/mysession-20130913-141651
1510 Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
1512 #------------------------------------------------------------------------------
1514 lttng snapshot list-output -s mysession
1520 Snapshot output list for session mysession
1521 [1] snapshot-1: /home/user/lttng-traces/mysession-20130913-141651 (max-size: 0)
1523 #------------------------------------------------------------------------------
1531 1) mysession () [inactive snapshot]
1534 #------------------------------------------------------------------------------
1536 lttng snapshot record -s mysession
1542 Snapshot recorded successfully for session mysession
1544 #-----------------------------------------------------------------------------
1546 lttng destroy mysession
1552 Session mysession destroyed.
1557 ####################################################################
1558 # Scenario: Test "lttng load [OPTIONS] [SESSION]"
1559 # "lttng save [OPTIONS] [SESSION]"
1561 ####################################################################
1565 lttng load -i /home/user/.lttng/sessions/mysession.lttng
1571 All sessions have been loaded successfully.
1577 lttng load -i /home/user/.lttng/sessions/mysession.lttng -f
1583 All sessions have been loaded successfully.
1593 All sessions have been saved successfully.
1597 lttng save mysession
1603 Session mysession saved successfully.
1607 lttng save -f mysession
1613 Session mysession saved successfully.
1617 lttng save -o /tmp/test -f mysession
1623 Session mysession saved successfully.