Update LTTng User Guide for time range and event range selection
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.ui.tests / testfiles / LTTngServiceTest.cfg
CommitLineData
d132bcc7
BH
1####################################################################
2# Copyright (c) 2012 Ericsson
3#
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
8#
9# Contributors:
10# Bernd Hufmann - Initial API and implementation
11####################################################################
12####################################################################
13# Scenario: Test lttng not installed
14####################################################################
15<SCENARIO>
16LttngNotInstalled
17<COMMAND_INPUT>
18lttng list
19</COMMAND_INPUT>
20<COMMAND_RESULT>
211
22</COMMAND_RESULT>
23<COMMAND_OUTPUT>
24Command not found
25</COMMAND_OUTPUT>
26</SCENARIO>
27
276c17e7
BH
28####################################################################
29# Scenario: Test lttng version
30####################################################################
31<SCENARIO>
32LttngVersion
33<COMMAND_INPUT>
34lttng version
35</COMMAND_INPUT>
36<COMMAND_RESULT>
370
38</COMMAND_RESULT>
39<COMMAND_OUTPUT>
cfe737e4 40lttng version 2.1.0 - Basse Messe
276c17e7
BH
41Web site: http://lttng.org/
42
43lttng is free software and under the GPL license and part LGPL
44</COMMAND_OUTPUT>
45</SCENARIO>
46
d6fc6e1b
BH
47####################################################################
48# Scenario: Test lttng version
49# output with prompt
50####################################################################
51<SCENARIO>
52LttngVersionWithPrompt
53<COMMAND_INPUT>
54lttng version
55</COMMAND_INPUT>
56<COMMAND_RESULT>
570
58</COMMAND_RESULT>
59<COMMAND_OUTPUT>
60Prompt> lttng version 2.0.0 - Annedd'ale
61Web site: http://lttng.org/
62
63lttng is free software and under the GPL license and part LGPL
64</COMMAND_OUTPUT>
65</SCENARIO>
66
276c17e7
BH
67####################################################################
68# Scenario: Test lttng version (unsupported version)
69####################################################################
70<SCENARIO>
71LttngUnsupportedVersion
72<COMMAND_INPUT>
73lttng version
74</COMMAND_INPUT>
75<COMMAND_RESULT>
760
77</COMMAND_RESULT>
78<COMMAND_OUTPUT>
79lttng version 200.0.0 - Annedd'ale
80Web site: http://lttng.org/
81
82lttng is free software and under the GPL license and part LGPL
83</COMMAND_OUTPUT>
84</SCENARIO>
85
86
87####################################################################
88# Scenario: Test lttng version (noversion)
89####################################################################
90<SCENARIO>
91LttngNoVersion
92<COMMAND_INPUT>
93lttng version
94</COMMAND_INPUT>
95<COMMAND_RESULT>
960
97</COMMAND_RESULT>
98<COMMAND_OUTPUT>
99Web site: http://lttng.org/
100
101lttng is free software and under the GPL license and part LGPL
102</COMMAND_OUTPUT>
103</SCENARIO>
104
d132bcc7
BH
105####################################################################
106# Scenario: Test no sessions available
107####################################################################
108<SCENARIO>
109NoSessionAvailable
110<COMMAND_INPUT>
111lttng list
112</COMMAND_INPUT>
113<COMMAND_RESULT>
1140
115</COMMAND_RESULT>
116<COMMAND_OUTPUT>
117Currently no available tracing session
118</COMMAND_OUTPUT>
119</SCENARIO>
120
121####################################################################
122# Scenario: Test get sessions
123####################################################################
124<SCENARIO>
125GetSessionNames1
126<COMMAND_INPUT>
127lttng list
128</COMMAND_INPUT>
129<COMMAND_RESULT>
1300
131</COMMAND_RESULT>
132<COMMAND_OUTPUT>
133Available tracing sessions:
134 1) mysession1 (/home/user/lttng-traces/mysession1-20120123-083928) [inactive]
135 2) mysession (/home/user/lttng-traces/mysession-20120123-083318) [inactive]
136
137 Use lttng list <session_name> for more details
138</COMMAND_OUTPUT>
139</SCENARIO>
140
141####################################################################
142# Scenario: Test lttng list <name> where session doesn't exist
143####################################################################
144<SCENARIO>
145GetSessionNameNotExist
146<COMMAND_INPUT>
147lttng list test
148</COMMAND_INPUT>
149<COMMAND_RESULT>
1501
151</COMMAND_RESULT>
152<COMMAND_OUTPUT>
153Session test not found
154Error: Session name not found
155</COMMAND_OUTPUT>
156</SCENARIO>
157
d128c979
BH
158####################################################################
159# Scenario: Test lttng -vvv list <name> where session doesn't exist
160####################################################################
161<SCENARIO>
162GetSessionNameNotExistVerbose
163<COMMAND_INPUT>
164lttng -vvv list test
165</COMMAND_INPUT>
166<COMMAND_RESULT>
1671
168</COMMAND_RESULT>
169<COMMAND_OUTPUT>
170DEBUG2: Session name: test [in cmd_list() at commands/list.c:618]
171DEBUG1: Session count 1 [in list_sessions() at commands/list.c:485]
172Error: Session 'test' not found
173Error: Command error
174DEBUG1: Clean exit [in clean_exit() at lttng.c:165]
175</COMMAND_OUTPUT>
176</SCENARIO>
177
d132bcc7
BH
178####################################################################
179# Scenario: Test lttng list with garbage output
180####################################################################
181<SCENARIO>
182GetSessionGarbageOut
183<COMMAND_INPUT>
184lttng list
185</COMMAND_INPUT>
186<COMMAND_RESULT>
1870
188</COMMAND_RESULT>
189<COMMAND_OUTPUT>
190asdfaereafsdcv 12333456434&*89**(())(^%$*
191@#$%^&*()@#$%^&*()0834523094578kj;djkfs
192a;sdf094v5u dsafj;sd9
193</COMMAND_OUTPUT>
194</SCENARIO>
195
196####################################################################
197# Scenario: Test lttng list <name> with sample outputs
198####################################################################
199<SCENARIO>
200GetSession1
201<COMMAND_INPUT>
202lttng list mysession
203</COMMAND_INPUT>
204<COMMAND_RESULT>
2050
206</COMMAND_RESULT>
207<COMMAND_OUTPUT>
208Tracing session mysession: [active]
209 Trace path: /home/user/lttng-traces/mysession-20120129-084256
210
211=== Domain: Kernel ===
212
213Channels:
214-------------
215- channel0: [enabled]
216
217 Attributes:
218 overwrite mode: 0
219 subbufers size: 262144
220 number of subbufers: 4
221 switch timer interval: 0
222 read timer interval: 200
223 output: splice()
224
225 Events:
226 block_rq_remap (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
227 block_bio_remap (loglevel: TRACE_EMERG (0)) (type: tracepoint) [disabled]
228
229- channel1: [disabled]
230
231 Attributes:
232 overwrite mode: 1
233 subbufers size: 524288
234 number of subbufers: 4
235 switch timer interval: 100
236 read timer interval: 400
237 output: splice()
238
239 Events:
240 None
241
242=== Domain: UST global ===
243
244Channels:
245-------------
246- mychannel1: [disabled]
247
248 Attributes:
249 overwrite mode: 1
250 subbufers size: 8192
251 number of subbufers: 8
252 switch timer interval: 200
253 read timer interval: 100
254 output: mmap()
255
256 Events:
257 None
258
259- channel0: [enabled]
260
261 Attributes:
262 overwrite mode: 0
263 subbufers size: 4096
264 number of subbufers: 4
265 switch timer interval: 0
266 read timer interval: 200
267 output: mmap()
268
269 Events:
270 ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint) [disabled]
271 * (type: tracepoint) [enabled]
272
273</COMMAND_OUTPUT>
274<COMMAND_INPUT>
275lttng list mysession1
276</COMMAND_INPUT>
277<COMMAND_RESULT>
2780
279</COMMAND_RESULT>
280<COMMAND_OUTPUT>
281Tracing session mysession1: [inactive]
282 Trace path: /home/user/lttng-traces/mysession1-20120203-133225
283
284</COMMAND_OUTPUT>
285</SCENARIO>
286
287
288####################################################################
289# Scenario: Test "lttng list -k" with sample output
290####################################################################
291<SCENARIO>
292GetKernelProvider1
293<COMMAND_INPUT>
294lttng list -k
295</COMMAND_INPUT>
296<COMMAND_RESULT>
2970
298</COMMAND_RESULT>
299<COMMAND_OUTPUT>
300Kernel events
301-------------
302 sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint)
303 sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint)
304 sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint)
305
306</COMMAND_OUTPUT>
307</SCENARIO>
308
a07c7629
BH
309####################################################################
310# Scenario: Test "lttng list -k" with no kernel and no session daemon
311####################################################################
312<SCENARIO>
313ListWithNoKernel1
314<COMMAND_INPUT>
315lttng list -k
316</COMMAND_INPUT>
317<COMMAND_RESULT>
3181
319</COMMAND_RESULT>
320<COMMAND_OUTPUT>
321Spawning session daemon
322Error: Unable to list kernel events
323</COMMAND_OUTPUT>
324</SCENARIO>
325
326####################################################################
327# Scenario: Test "lttng list -k" with no kernel and with session daemon
328####################################################################
329<SCENARIO>
330ListWithNoKernel2
331<COMMAND_INPUT>
332lttng list -k
333</COMMAND_INPUT>
334<COMMAND_RESULT>
3351
336</COMMAND_RESULT>
337<COMMAND_OUTPUT>
338Error: Unable to list kernel events
339</COMMAND_OUTPUT>
340</SCENARIO>
341
d128c979
BH
342####################################################################
343# Scenario: Test "lttng list -k" with no kernel, with session daemon and verbose
344####################################################################
345<SCENARIO>
346ListWithNoKernelVerbose
347<COMMAND_INPUT>
348lttng -vvv list -k
349</COMMAND_INPUT>
350<COMMAND_RESULT>
3511
352</COMMAND_RESULT>
353<COMMAND_OUTPUT>
354DEBUG2: Session name: (null) [in cmd_list() at commands/list.c:618]
355DEBUG1: Getting kernel tracing events [in list_kernel_events() at commands/list.c:309]
356Error: Unable to list kernel events
357DEBUG1: Clean exit [in clean_exit() at lttng.c:165]
358</COMMAND_OUTPUT>
359</SCENARIO>
360
d132bcc7
BH
361####################################################################
362# Scenario: Test "lttng list -u" with sample output
363####################################################################
364<SCENARIO>
365GetUstProvider1
366<COMMAND_INPUT>
367lttng list -u
368</COMMAND_INPUT>
369<COMMAND_RESULT>
3700
371</COMMAND_RESULT>
372<COMMAND_OUTPUT>
373UST events:
374-------------
375
376PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
377 ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_MODULE (10)) (type: tracepoint)
378 ust_tests_hello:tptest (loglevel: TRACE_INFO (6)) (type: tracepoint)
379
380PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
381 ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
382 ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
383
384</COMMAND_OUTPUT>
385</SCENARIO>
386
387####################################################################
388# Scenario: Test "lttng list -u" with no UST provider available
389####################################################################
390<SCENARIO>
391GetUstProvider2
392<COMMAND_INPUT>
393lttng list -u
394</COMMAND_INPUT>
395<COMMAND_RESULT>
3960
397</COMMAND_RESULT>
398<COMMAND_OUTPUT>
399UST events:
400-------------
401None
402
403</COMMAND_OUTPUT>
404</SCENARIO>
405
f3e2f354
BH
406####################################################################
407# Scenario: Test "lttng list -u" with no UST available (LTTng 2.0.x)
408####################################################################
409<SCENARIO>
410ListWithNoUst1
411<COMMAND_INPUT>
412lttng list -u
413</COMMAND_INPUT>
414<COMMAND_RESULT>
4151
416</COMMAND_RESULT>
417<COMMAND_OUTPUT>
418UST events:
419-------------
420None
421Segmentation Fault
422</COMMAND_OUTPUT>
423</SCENARIO>
424
425####################################################################
426# Scenario: Test "lttng list -u" with no UST available and no session daemon
427####################################################################
428<SCENARIO>
429ListWithNoUst2
430<COMMAND_INPUT>
431lttng list -u -f
432</COMMAND_INPUT>
433<COMMAND_RESULT>
4341
435</COMMAND_RESULT>
436<COMMAND_OUTPUT>
437Spawning a session daemon
438Error: Unable to list UST events: Listing UST events failed
439Error: Command Error
440</COMMAND_OUTPUT>
441</SCENARIO>
442
443####################################################################
444# Scenario: Test "lttng list -k" with no kernel and with session daemon
445####################################################################
446<SCENARIO>
447ListWithNoUst3
448<COMMAND_INPUT>
449lttng list -u -f
450</COMMAND_INPUT>
451<COMMAND_RESULT>
4521
453</COMMAND_RESULT>
454<COMMAND_OUTPUT>
455Error: Unable to list UST events: Listing UST events failed
456Error: Command Error
457</COMMAND_OUTPUT>
458</SCENARIO>
459
460####################################################################
461# Scenario: Test "lttng list -u" with no kernel, with session daemon and verbose
462####################################################################
463<SCENARIO>
464ListWithNoUstVerbose
465<COMMAND_INPUT>
466lttng -vvv list -u -f
467</COMMAND_INPUT>
468<COMMAND_RESULT>
4691
470</COMMAND_RESULT>
471<COMMAND_OUTPUT>
472DEBUG2: Session name: (null) [in cmd_list() at commands/list.c:618]
473DEBUG1: Getting kernel tracing events [in list_kernel_events() at commands/list.c:309]
474Spawning a session daemon
475Error: Unable to list UST events: Listing UST events failed
476Error: Command Error
477DEBUG1: Clean exit [in clean_exit() at lttng.c:165]
478</COMMAND_OUTPUT>
479</SCENARIO>
480
481
d4514365
BH
482####################################################################
483# Scenario: Test "lttng list -u -f" with sample output (version 2.1.0)
484####################################################################
485<SCENARIO>
486GetUstProvider3
487<COMMAND_INPUT>
488lttng list -u -f
489</COMMAND_INPUT>
490<COMMAND_RESULT>
4910
492</COMMAND_RESULT>
493<COMMAND_OUTPUT>
494UST events:
495-------------
496
497PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
498 ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_MODULE (10)) (type: tracepoint)
499 ust_tests_hello:tptest (loglevel: TRACE_INFO (6)) (type: tracepoint)
500 field: doublefield (float)
501 field: floatfield (float)
502 field: stringfield (string)
503
504PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
505 ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
506 ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
507 field: doublefield (float)
508 field: floatfield (float)
509 field: stringfield (string)
510
511</COMMAND_OUTPUT>
512</SCENARIO>
513
514
d132bcc7
BH
515####################################################################
516# Scenario: Test "lttng create <session>
517####################################################################
518<SCENARIO>
519CreateSession1
520<COMMAND_INPUT>
521lttng create mysession2
522</COMMAND_INPUT>
523<COMMAND_RESULT>
5240
525</COMMAND_RESULT>
526<COMMAND_OUTPUT>
527Session mysession2 created.
528Traces will be written in /home/user/lttng-traces/mysession2-20120209-095418
529</COMMAND_OUTPUT>
530</SCENARIO>
531
d6fc6e1b
BH
532####################################################################
533# Scenario: Test "lttng create <session>
534####################################################################
535<SCENARIO>
536CreateSessionWithPrompt
537<COMMAND_INPUT>
538lttng create mysession2
539</COMMAND_INPUT>
540<COMMAND_RESULT>
5410
542</COMMAND_RESULT>
543<COMMAND_OUTPUT>
544Prompt> Session mysession2 created.
545Traces will be written in /home/user/lttng-traces/mysession2-20120209-095418
546</COMMAND_OUTPUT>
547</SCENARIO>
548
d132bcc7
BH
549####################################################################
550# Scenario: Test "lttng create <session> with different variants
551# and errors
552####################################################################
553<SCENARIO>
554CreateSessionVariants
555<COMMAND_INPUT>
556lttng create alreadyExist
557</COMMAND_INPUT>
558<COMMAND_RESULT>
5591
560</COMMAND_RESULT>
561<COMMAND_OUTPUT>
562Error: Session name already exist
563</COMMAND_OUTPUT>
564
565<COMMAND_INPUT>
566lttng create "session with spaces"
567</COMMAND_INPUT>
568<COMMAND_RESULT>
5690
570</COMMAND_RESULT>
571<COMMAND_OUTPUT>
572Session session with spaces created.
573Traces will be written in /home/user/lttng-traces/session with spaces-20120209-095418
574</COMMAND_OUTPUT>
575
576<COMMAND_INPUT>
577lttng create wrongName
578</COMMAND_INPUT>
579<COMMAND_RESULT>
5800
581</COMMAND_RESULT>
582<COMMAND_OUTPUT>
583Session auto created.
584Traces will be written in /home/user/lttng-traces/auto-20120209-095418
585</COMMAND_OUTPUT>
586
587<COMMAND_INPUT>
588lttng create wrongPath -o /home/user/hallo
589</COMMAND_INPUT>
590<COMMAND_RESULT>
5910
592</COMMAND_RESULT>
593<COMMAND_OUTPUT>
594Session wrongPath created.
595Traces will be written in /home/user/lttng-traces/wrongPath-20120209-095418
596</COMMAND_OUTPUT>
597
598<COMMAND_INPUT>
599lttng create pathWithSpaces -o "/home/user/hallo user/here"
600</COMMAND_INPUT>
601<COMMAND_RESULT>
6020
603</COMMAND_RESULT>
604<COMMAND_OUTPUT>
605Session pathWithSpaces created.
606Traces will be written in /home/user/hallo user/here/pathWithSpaces-20120209-095418
607</COMMAND_OUTPUT>
608</SCENARIO>
609
610####################################################################
611# Scenario: Test "lttng destroy <session>
612####################################################################
613
614<SCENARIO>
615DestroySession1
616<COMMAND_INPUT>
617lttng destroy mysession2
618</COMMAND_INPUT>
619<COMMAND_RESULT>
6200
621</COMMAND_RESULT>
622<COMMAND_OUTPUT>
623Session mysession2 destroyed.
624</COMMAND_OUTPUT>
625</SCENARIO>
626
d128c979
BH
627####################################################################
628# Scenario: Test "lttng -vvv destroy <session>"
629####################################################################
630
631<SCENARIO>
632DestroySessionVerbose
633<COMMAND_INPUT>
634lttng -vvv destroy mysession2
635</COMMAND_INPUT>
636<COMMAND_RESULT>
6370
638</COMMAND_RESULT>
639<COMMAND_OUTPUT>
640DEBUG2: Config file path found: /home/eedbhu [in get_session_name() at utils.c:98]
641DEBUG1: Session name found: mysession2 [in get_session_name() at utils.c:99]
642Session mysession2 destroyed at /home/eedbhu
643</COMMAND_OUTPUT>
644</SCENARIO>
645
646
d132bcc7
BH
647####################################################################
648# Scenario: Test "lttng enable-channel ..." with different inputs
649####################################################################
650
651<SCENARIO>
652ChannelHandling
653<COMMAND_INPUT>
654lttng enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100
655</COMMAND_INPUT>
656<COMMAND_RESULT>
6570
658</COMMAND_RESULT>
659<COMMAND_OUTPUT>
660Kernel channel mychannel0 enabled for session mysession2
661Kernel channel mychannel1 enabled for session mysession2
662</COMMAND_OUTPUT>
663
664<COMMAND_INPUT>
665lttng enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200
666</COMMAND_INPUT>
667<COMMAND_RESULT>
6680
669</COMMAND_RESULT>
670<COMMAND_OUTPUT>
671UST channel channel0 enabled for session mysession2
672</COMMAND_OUTPUT>
673
674<COMMAND_INPUT>
675lttng enable-channel mychannel0,mychannel1 -k -s mysession2
676</COMMAND_INPUT>
677<COMMAND_RESULT>
6780
679</COMMAND_RESULT>
680<COMMAND_OUTPUT>
681Kernel channel mychannel0 enabled for session mysession2
682Kernel channel mychannel1 enabled for session mysession2
683</COMMAND_OUTPUT>
684
685<COMMAND_INPUT>
686lttng enable-channel ustChannel -u -s mysession2
687</COMMAND_INPUT>
688<COMMAND_RESULT>
6890
690</COMMAND_RESULT>
691<COMMAND_OUTPUT>
692UST channel mychannel0 enabled for session mysession2
693</COMMAND_OUTPUT>
694
695<COMMAND_INPUT>
696lttng disable-channel mychannel0,mychannel1 -k -s mysession2
697</COMMAND_INPUT>
698<COMMAND_RESULT>
6990
700</COMMAND_RESULT>
701<COMMAND_OUTPUT>
702Kernel channel mychannel0 disabled for session mysession2
703Kernel channel mychannel1 disabled for session mysession2
704</COMMAND_OUTPUT>
705
706<COMMAND_INPUT>
707lttng disable-channel ustChannel -u -s mysession2
708</COMMAND_INPUT>
709<COMMAND_RESULT>
7100
711</COMMAND_RESULT>
712<COMMAND_OUTPUT>
713UST channel mychannel0 enabled for session mysession2
714</COMMAND_OUTPUT>
715</SCENARIO>
716
717
718####################################################################
719# Scenario: Test "lttng enable-events ..." with different inputs
720####################################################################
721<SCENARIO>
722EventHandling
723
724# Tracepoint test cases
725
726<COMMAND_INPUT>
727lttng enable-event block_rq_remap,block_bio_remap,softirq_entry -k -s mysession2 --tracepoint
728</COMMAND_INPUT>
729<COMMAND_RESULT>
7300
731</COMMAND_RESULT>
732<COMMAND_OUTPUT>
733kernel event block_rq_remap created in channel channel0
734kernel event block_bio_remap created in channel channel0
735kernel event softirq_entry created in channel channel0
736</COMMAND_OUTPUT>
737
738<COMMAND_INPUT>
739lttng enable-event -a -k -s mysession2 -c mychannel --tracepoint
740</COMMAND_INPUT>
741<COMMAND_RESULT>
7420
743</COMMAND_RESULT>
744<COMMAND_OUTPUT>
745All kernel tracepoints are enabled in channel channel0
746</COMMAND_OUTPUT>
747
748<COMMAND_INPUT>
749lttng enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint
750</COMMAND_INPUT>
751<COMMAND_RESULT>
7520
753</COMMAND_RESULT>
d4514365
BH
754<COMMAND_OUTPUT>
755UST event ust_tests_hello:tptest_sighandler created in channel mychannel
756</COMMAND_OUTPUT>
757
758<COMMAND_INPUT>
759lttng enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint --filter 'intfield==10'
760</COMMAND_INPUT>
761<COMMAND_RESULT>
7620
763</COMMAND_RESULT>
d132bcc7
BH
764<COMMAND_OUTPUT>
765UST event ust_tests_hello:tptest_sighandler created in channel mychannel
766</COMMAND_OUTPUT>
767
768<COMMAND_INPUT>
769lttng enable-event -a -u -s mysession2 -c mychannel --tracepoint
770</COMMAND_INPUT>
771<COMMAND_RESULT>
7720
773</COMMAND_RESULT>
774<COMMAND_OUTPUT>
775All UST tracepoints are enabled in channel mychannel
776</COMMAND_OUTPUT>
777
778# Syscall test cases
779
780<COMMAND_INPUT>
781lttng enable-event -a -k -s mysession2 --syscall
782</COMMAND_INPUT>
783<COMMAND_RESULT>
7840
785</COMMAND_RESULT>
786<COMMAND_OUTPUT>
787All kernel system calls are enabled in channel channel0
788</COMMAND_OUTPUT>
789
790<COMMAND_INPUT>
791lttng enable-event -a -k -s mysession2 -c mychannel --syscall
792</COMMAND_INPUT>
793<COMMAND_RESULT>
7940
795</COMMAND_RESULT>
796<COMMAND_OUTPUT>
797All kernel system calls are enabled in channel mychannel
798</COMMAND_OUTPUT>
799
800# dynamic probe/function probe test cases
801
802<COMMAND_INPUT>
803lttng enable-event myevent0 -k -s mysession2 --function 0xc0101340
804</COMMAND_INPUT>
805<COMMAND_RESULT>
8060
807</COMMAND_RESULT>
808<COMMAND_OUTPUT>
809kernel event myevent0 created in channel mychannel
810</COMMAND_OUTPUT>
811
812<COMMAND_INPUT>
813lttng enable-event myevent1 -k -s mysession2 -c mychannel --probe init_post
814</COMMAND_INPUT>
815<COMMAND_RESULT>
8160
817</COMMAND_RESULT>
818<COMMAND_OUTPUT>
819kernel event myevent1 created in channel mychannel
820</COMMAND_OUTPUT>
821
822# log level test cases
823
824<COMMAND_INPUT>
825lttng enable-event myevent4 -u -s mysession2 --loglevel-only TRACE_DEBUG
826</COMMAND_INPUT>
827<COMMAND_RESULT>
8280
829</COMMAND_RESULT>
830<COMMAND_OUTPUT>
831UST event myevent4 created in channel channel0
832</COMMAND_OUTPUT>
833
834<COMMAND_INPUT>
835lttng enable-event myevent5 -u -s mysession2 -c mychannel --loglevel TRACE_DEBUG_FUNCTION
836</COMMAND_INPUT>
837<COMMAND_RESULT>
8380
839</COMMAND_RESULT>
840<COMMAND_OUTPUT>
841UST event myevent5 created in channel mychannel
842</COMMAND_OUTPUT>
843
844</SCENARIO>
845
4ea599a5
BH
846####################################################################
847# Scenario: Test "lttng add-context -h" and lttng add-context ..." with different inputs
848####################################################################
849
850<SCENARIO>
851ContextHandling
852
853<COMMAND_INPUT>
854lttng add-context -h
855</COMMAND_INPUT>
856<COMMAND_RESULT>
8570
858</COMMAND_RESULT>
859<COMMAND_OUTPUT>
860usage: lttng add-context -t TYPE
861
862If no channel and no event is given (-c/-e), the context
863will be added to all events and all channels.
864Otherwise the context will be added only to the channel (-c)
865and/or event (-e) indicated.
866Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
867
868Options:
869 -h, --help Show this help
870 --list-options Simple listing of options
871 -s, --session NAME Apply to session name
872 -c, --channel NAME Apply to channel
873 -e, --event NAME Apply to event
874 -k, --kernel Apply to the kernel tracer
875 -u, --userspace Apply to the user-space tracer
876 -t, --type TYPE Context type. You can repeat that option on
877 the command line to specify multiple contexts at once.
878 (--kernel preempts --userspace)
879 TYPE can be one of the strings below:
880 pid, procname, prio, nice, vpid, tid, pthread_id,
881 vtid, ppid, vppid, perf:cpu-cycles, perf:cycles
882Example:
883This command will add the context information 'prio' and two perf
884counters (hardware branch misses and cache misses), to all events
885in the trace data output:
886# lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
887
888</COMMAND_OUTPUT>
889
890<COMMAND_INPUT>
891lttng add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
892</COMMAND_INPUT>
893<COMMAND_RESULT>
8940
895</COMMAND_RESULT>
896<COMMAND_OUTPUT>
897UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
898UST context pid added to event sched_kthread_stop_ret channel mychannel
899</COMMAND_OUTPUT>
900</SCENARIO>
901
902<SCENARIO>
903ContextErrorHandling
904
905<COMMAND_INPUT>
906lttng add-context -h
907</COMMAND_INPUT>
908<COMMAND_RESULT>
9091
910</COMMAND_RESULT>
911<COMMAND_OUTPUT>
912usage: lttng add-context -t TYPE
d132bcc7 913
4ea599a5
BH
914If no channel and no event is given (-c/-e), the context
915will be added to all events and all channels.
916Otherwise the context will be added only to the channel (-c)
917and/or event (-e) indicated.
918Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
919
920Options:
921 -h, --help Show this help
922 --list-options Simple listing of options
923 -s, --session NAME Apply to session name
924 -c, --channel NAME Apply to channel
925 -e, --event NAME Apply to event
926 -k, --kernel Apply to the kernel tracer
927 -u, --userspace Apply to the user-space tracer
928 -t, --type TYPE Context type. You can repeat that option on
929 the command line to specify multiple contexts at once.
930 (--kernel preempts --userspace)
931 TYPE can be one of the strings below:
932 pid, procname, prio, nice, vpid, tid, pthread_id,
933 vtid, ppid, vppid, perf:cpu-cycles, perf:cycles
934Example:
935This command will add the context information 'prio' and two perf
936counters (hardware branch misses and cache misses), to all events
937in the trace data output:
938# lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
939
940</COMMAND_OUTPUT>
941
942<COMMAND_INPUT>
943lttng add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
944</COMMAND_INPUT>
945<COMMAND_RESULT>
9461
947</COMMAND_RESULT>
948<COMMAND_OUTPUT>
949UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
950UST context pid added to event sched_kthread_stop_ret channel mychannel
951</COMMAND_OUTPUT>
952
953</SCENARIO>
954
955<SCENARIO>
956CalibrateHandling
957<COMMAND_INPUT>
958lttng calibrate -k --function
959</COMMAND_INPUT>
960<COMMAND_RESULT>
9610
962</COMMAND_RESULT>
963<COMMAND_OUTPUT>
964Kernel calibration done
965</COMMAND_OUTPUT>
966
967<COMMAND_INPUT>
968lttng calibrate -u --function
969</COMMAND_INPUT>
970<COMMAND_RESULT>
9711
972</COMMAND_RESULT>
973<COMMAND_OUTPUT>
974Kernel calibration done
975</COMMAND_OUTPUT>
976
977</SCENARIO>
f3b33d40
BH
978
979####################################################################
980# Scenario: Test "lttng create <session> with LTTng 2.1 options
981####################################################################
982<SCENARIO>
983CreateSessionLttng2.1
f3b33d40
BH
984
985<COMMAND_INPUT>
a30e79fe 986lttng create mysession -U net://172.0.0.1
f3b33d40
BH
987</COMMAND_INPUT>
988<COMMAND_RESULT>
9890
990</COMMAND_RESULT>
991<COMMAND_OUTPUT>
992Session mysession created.
993Traces will be written in net://172.0.0.1
994</COMMAND_OUTPUT>
995
996<COMMAND_INPUT>
997lttng create mysession -U file:///tmp
998</COMMAND_INPUT>
999<COMMAND_RESULT>
10000
1001</COMMAND_RESULT>
1002<COMMAND_OUTPUT>
1003Session mysession created.
1004Traces will be written in file:///tmp
1005</COMMAND_OUTPUT>
1006
1007<COMMAND_INPUT>
1008lttng create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
1009</COMMAND_INPUT>
1010<COMMAND_RESULT>
10110
1012</COMMAND_RESULT>
1013<COMMAND_OUTPUT>
1014Session mysession created.
1015Control URL tcp://172.0.0.1 set for session mysession
1016Data URL tcp://172.0.0.1:5343 set for session mysession
1017</COMMAND_OUTPUT>
1018
1019<COMMAND_INPUT>
1020lttng create mysession -U net://172.0.0.1:1234:2345
1021</COMMAND_INPUT>
1022<COMMAND_RESULT>
10230
1024</COMMAND_RESULT>
1025<COMMAND_OUTPUT>
1026Session mysession created.
1027Traces will be written in net://172.0.0.1:1234:2345
1028</COMMAND_OUTPUT>
1029
a30e79fe
BH
1030<COMMAND_INPUT>
1031lttng destroy mysession
1032</COMMAND_INPUT>
1033<COMMAND_RESULT>
10340
1035</COMMAND_RESULT>
1036<COMMAND_OUTPUT>
1037Session mysession destroyed.
1038</COMMAND_OUTPUT>
1039
d128c979
BH
1040<COMMAND_INPUT>
1041lttng -vvv create mysession -U net://172.0.0.1
1042</COMMAND_INPUT>
1043<COMMAND_RESULT>
10440
1045</COMMAND_RESULT>
1046<COMMAND_OUTPUT>
1047DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
1048DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
1049DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
1050DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
1051Session mysession created.
1052Traces will be written in net://172.0.0.1
1053DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
1054</COMMAND_OUTPUT>
1055
f3b33d40 1056</SCENARIO>
d128c979
BH
1057
1058####################################################################
1059# Scenario: Test "lttng -vvv create <session> with LTTng 2.1 options"
1060####################################################################
1061<SCENARIO>
1062CreateSessionLttngVerbose2.1
1063<COMMAND_INPUT>
1064lttng -vvv create mysession -U net://172.0.0.1
1065</COMMAND_INPUT>
1066<COMMAND_RESULT>
10670
1068</COMMAND_RESULT>
1069<COMMAND_OUTPUT>
1070DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
1071DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
1072DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
1073DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
1074Session mysession created.
1075Traces will be written in net://172.0.0.1
1076DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
1077</COMMAND_OUTPUT>
1078
1079<COMMAND_INPUT>
1080lttng -vvv destroy mysession
1081</COMMAND_INPUT>
1082<COMMAND_RESULT>
10830
1084</COMMAND_RESULT>
1085<COMMAND_OUTPUT>
1086Session mysession destroyed.
1087</COMMAND_OUTPUT>
1088
1089</SCENARIO>
This page took 0.077728 seconds and 5 git commands to generate.