lttng: update enable channel for UST buffer type
[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
e799e5f3
SD
653<COMMAND_INPUT>
654lttng enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100 -C 0 -W 10
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
d132bcc7
BH
664<COMMAND_INPUT>
665lttng enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100
666</COMMAND_INPUT>
667<COMMAND_RESULT>
6680
669</COMMAND_RESULT>
670<COMMAND_OUTPUT>
671Kernel channel mychannel0 enabled for session mysession2
672Kernel channel mychannel1 enabled for session mysession2
673</COMMAND_OUTPUT>
674
e799e5f3
SD
675<COMMAND_INPUT>
676lttng enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 -C 0 -W 20
677</COMMAND_INPUT>
678<COMMAND_RESULT>
6790
680</COMMAND_RESULT>
681<COMMAND_OUTPUT>
682UST channel channel0 enabled for session mysession2
683</COMMAND_OUTPUT>
684
d132bcc7
BH
685<COMMAND_INPUT>
686lttng enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200
687</COMMAND_INPUT>
688<COMMAND_RESULT>
6890
690</COMMAND_RESULT>
691<COMMAND_OUTPUT>
692UST channel channel0 enabled for session mysession2
693</COMMAND_OUTPUT>
694
e799e5f3
SD
695<COMMAND_INPUT>
696lttng 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
697</COMMAND_INPUT>
698<COMMAND_RESULT>
6990
700</COMMAND_RESULT>
701<COMMAND_OUTPUT>
702UST channel channel0 enabled for session mysession2
703</COMMAND_OUTPUT>
704
83051fc3
BH
705<COMMAND_INPUT>
706lttng enable-channel ustChannel -u -s mysession2 --overwrite --buffers-pid
707</COMMAND_INPUT>
708<COMMAND_RESULT>
7090
710</COMMAND_RESULT>
711<COMMAND_OUTPUT>
712UST channel ustChannel enabled for session mysession2
713</COMMAND_OUTPUT>
714
e799e5f3
SD
715<COMMAND_INPUT>
716lttng enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 --buffers-uid
717</COMMAND_INPUT>
718<COMMAND_RESULT>
7190
720</COMMAND_RESULT>
721<COMMAND_OUTPUT>
722UST channel channel0 enabled for session mysession2
723</COMMAND_OUTPUT>
724
83051fc3 725
d132bcc7
BH
726<COMMAND_INPUT>
727lttng enable-channel mychannel0,mychannel1 -k -s mysession2
728</COMMAND_INPUT>
729<COMMAND_RESULT>
7300
731</COMMAND_RESULT>
732<COMMAND_OUTPUT>
733Kernel channel mychannel0 enabled for session mysession2
734Kernel channel mychannel1 enabled for session mysession2
735</COMMAND_OUTPUT>
736
737<COMMAND_INPUT>
738lttng enable-channel ustChannel -u -s mysession2
739</COMMAND_INPUT>
740<COMMAND_RESULT>
7410
742</COMMAND_RESULT>
743<COMMAND_OUTPUT>
744UST channel mychannel0 enabled for session mysession2
745</COMMAND_OUTPUT>
746
747<COMMAND_INPUT>
748lttng disable-channel mychannel0,mychannel1 -k -s mysession2
749</COMMAND_INPUT>
750<COMMAND_RESULT>
7510
752</COMMAND_RESULT>
753<COMMAND_OUTPUT>
754Kernel channel mychannel0 disabled for session mysession2
755Kernel channel mychannel1 disabled for session mysession2
756</COMMAND_OUTPUT>
757
758<COMMAND_INPUT>
759lttng disable-channel ustChannel -u -s mysession2
760</COMMAND_INPUT>
761<COMMAND_RESULT>
7620
763</COMMAND_RESULT>
764<COMMAND_OUTPUT>
765UST channel mychannel0 enabled for session mysession2
766</COMMAND_OUTPUT>
767</SCENARIO>
768
769
770####################################################################
771# Scenario: Test "lttng enable-events ..." with different inputs
772####################################################################
773<SCENARIO>
774EventHandling
775
776# Tracepoint test cases
777
778<COMMAND_INPUT>
779lttng enable-event block_rq_remap,block_bio_remap,softirq_entry -k -s mysession2 --tracepoint
780</COMMAND_INPUT>
781<COMMAND_RESULT>
7820
783</COMMAND_RESULT>
784<COMMAND_OUTPUT>
785kernel event block_rq_remap created in channel channel0
786kernel event block_bio_remap created in channel channel0
787kernel event softirq_entry created in channel channel0
788</COMMAND_OUTPUT>
789
790<COMMAND_INPUT>
791lttng enable-event -a -k -s mysession2 -c mychannel --tracepoint
792</COMMAND_INPUT>
793<COMMAND_RESULT>
7940
795</COMMAND_RESULT>
796<COMMAND_OUTPUT>
797All kernel tracepoints are enabled in channel channel0
798</COMMAND_OUTPUT>
799
800<COMMAND_INPUT>
801lttng enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint
802</COMMAND_INPUT>
803<COMMAND_RESULT>
8040
805</COMMAND_RESULT>
d4514365
BH
806<COMMAND_OUTPUT>
807UST event ust_tests_hello:tptest_sighandler created in channel mychannel
808</COMMAND_OUTPUT>
809
810<COMMAND_INPUT>
811lttng enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint --filter 'intfield==10'
812</COMMAND_INPUT>
813<COMMAND_RESULT>
8140
815</COMMAND_RESULT>
d132bcc7
BH
816<COMMAND_OUTPUT>
817UST event ust_tests_hello:tptest_sighandler created in channel mychannel
818</COMMAND_OUTPUT>
819
820<COMMAND_INPUT>
821lttng enable-event -a -u -s mysession2 -c mychannel --tracepoint
822</COMMAND_INPUT>
823<COMMAND_RESULT>
8240
825</COMMAND_RESULT>
826<COMMAND_OUTPUT>
827All UST tracepoints are enabled in channel mychannel
828</COMMAND_OUTPUT>
829
830# Syscall test cases
831
832<COMMAND_INPUT>
833lttng enable-event -a -k -s mysession2 --syscall
834</COMMAND_INPUT>
835<COMMAND_RESULT>
8360
837</COMMAND_RESULT>
838<COMMAND_OUTPUT>
839All kernel system calls are enabled in channel channel0
840</COMMAND_OUTPUT>
841
842<COMMAND_INPUT>
843lttng enable-event -a -k -s mysession2 -c mychannel --syscall
844</COMMAND_INPUT>
845<COMMAND_RESULT>
8460
847</COMMAND_RESULT>
848<COMMAND_OUTPUT>
849All kernel system calls are enabled in channel mychannel
850</COMMAND_OUTPUT>
851
852# dynamic probe/function probe test cases
853
854<COMMAND_INPUT>
855lttng enable-event myevent0 -k -s mysession2 --function 0xc0101340
856</COMMAND_INPUT>
857<COMMAND_RESULT>
8580
859</COMMAND_RESULT>
860<COMMAND_OUTPUT>
861kernel event myevent0 created in channel mychannel
862</COMMAND_OUTPUT>
863
864<COMMAND_INPUT>
865lttng enable-event myevent1 -k -s mysession2 -c mychannel --probe init_post
866</COMMAND_INPUT>
867<COMMAND_RESULT>
8680
869</COMMAND_RESULT>
870<COMMAND_OUTPUT>
871kernel event myevent1 created in channel mychannel
872</COMMAND_OUTPUT>
873
874# log level test cases
875
876<COMMAND_INPUT>
877lttng enable-event myevent4 -u -s mysession2 --loglevel-only TRACE_DEBUG
878</COMMAND_INPUT>
879<COMMAND_RESULT>
8800
881</COMMAND_RESULT>
882<COMMAND_OUTPUT>
883UST event myevent4 created in channel channel0
884</COMMAND_OUTPUT>
885
886<COMMAND_INPUT>
887lttng enable-event myevent5 -u -s mysession2 -c mychannel --loglevel TRACE_DEBUG_FUNCTION
888</COMMAND_INPUT>
889<COMMAND_RESULT>
8900
891</COMMAND_RESULT>
892<COMMAND_OUTPUT>
893UST event myevent5 created in channel mychannel
894</COMMAND_OUTPUT>
895
896</SCENARIO>
897
4ea599a5
BH
898####################################################################
899# Scenario: Test "lttng add-context -h" and lttng add-context ..." with different inputs
900####################################################################
901
902<SCENARIO>
903ContextHandling
904
905<COMMAND_INPUT>
906lttng add-context -h
907</COMMAND_INPUT>
908<COMMAND_RESULT>
9090
910</COMMAND_RESULT>
911<COMMAND_OUTPUT>
912usage: lttng add-context -t TYPE
913
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>
9460
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</SCENARIO>
953
954<SCENARIO>
955ContextErrorHandling
956
957<COMMAND_INPUT>
958lttng add-context -h
959</COMMAND_INPUT>
960<COMMAND_RESULT>
9611
962</COMMAND_RESULT>
963<COMMAND_OUTPUT>
964usage: lttng add-context -t TYPE
d132bcc7 965
4ea599a5
BH
966If no channel and no event is given (-c/-e), the context
967will be added to all events and all channels.
968Otherwise the context will be added only to the channel (-c)
969and/or event (-e) indicated.
970Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
971
972Options:
973 -h, --help Show this help
974 --list-options Simple listing of options
975 -s, --session NAME Apply to session name
976 -c, --channel NAME Apply to channel
977 -e, --event NAME Apply to event
978 -k, --kernel Apply to the kernel tracer
979 -u, --userspace Apply to the user-space tracer
980 -t, --type TYPE Context type. You can repeat that option on
981 the command line to specify multiple contexts at once.
982 (--kernel preempts --userspace)
983 TYPE can be one of the strings below:
984 pid, procname, prio, nice, vpid, tid, pthread_id,
985 vtid, ppid, vppid, perf:cpu-cycles, perf:cycles
986Example:
987This command will add the context information 'prio' and two perf
988counters (hardware branch misses and cache misses), to all events
989in the trace data output:
990# lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
991
992</COMMAND_OUTPUT>
993
994<COMMAND_INPUT>
995lttng add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
996</COMMAND_INPUT>
997<COMMAND_RESULT>
9981
999</COMMAND_RESULT>
1000<COMMAND_OUTPUT>
1001UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
1002UST context pid added to event sched_kthread_stop_ret channel mychannel
1003</COMMAND_OUTPUT>
1004
1005</SCENARIO>
1006
1007<SCENARIO>
1008CalibrateHandling
1009<COMMAND_INPUT>
1010lttng calibrate -k --function
1011</COMMAND_INPUT>
1012<COMMAND_RESULT>
10130
1014</COMMAND_RESULT>
1015<COMMAND_OUTPUT>
1016Kernel calibration done
1017</COMMAND_OUTPUT>
1018
1019<COMMAND_INPUT>
1020lttng calibrate -u --function
1021</COMMAND_INPUT>
1022<COMMAND_RESULT>
10231
1024</COMMAND_RESULT>
1025<COMMAND_OUTPUT>
1026Kernel calibration done
1027</COMMAND_OUTPUT>
1028
1029</SCENARIO>
f3b33d40
BH
1030
1031####################################################################
1032# Scenario: Test "lttng create <session> with LTTng 2.1 options
1033####################################################################
1034<SCENARIO>
1035CreateSessionLttng2.1
f3b33d40
BH
1036
1037<COMMAND_INPUT>
a30e79fe 1038lttng create mysession -U net://172.0.0.1
f3b33d40
BH
1039</COMMAND_INPUT>
1040<COMMAND_RESULT>
10410
1042</COMMAND_RESULT>
1043<COMMAND_OUTPUT>
1044Session mysession created.
1045Traces will be written in net://172.0.0.1
1046</COMMAND_OUTPUT>
1047
1048<COMMAND_INPUT>
1049lttng create mysession -U file:///tmp
1050</COMMAND_INPUT>
1051<COMMAND_RESULT>
10520
1053</COMMAND_RESULT>
1054<COMMAND_OUTPUT>
1055Session mysession created.
1056Traces will be written in file:///tmp
1057</COMMAND_OUTPUT>
1058
1059<COMMAND_INPUT>
1060lttng create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
1061</COMMAND_INPUT>
1062<COMMAND_RESULT>
10630
1064</COMMAND_RESULT>
1065<COMMAND_OUTPUT>
1066Session mysession created.
1067Control URL tcp://172.0.0.1 set for session mysession
1068Data URL tcp://172.0.0.1:5343 set for session mysession
1069</COMMAND_OUTPUT>
1070
1071<COMMAND_INPUT>
1072lttng create mysession -U net://172.0.0.1:1234:2345
1073</COMMAND_INPUT>
1074<COMMAND_RESULT>
10750
1076</COMMAND_RESULT>
1077<COMMAND_OUTPUT>
1078Session mysession created.
1079Traces will be written in net://172.0.0.1:1234:2345
1080</COMMAND_OUTPUT>
1081
a30e79fe
BH
1082<COMMAND_INPUT>
1083lttng destroy mysession
1084</COMMAND_INPUT>
1085<COMMAND_RESULT>
10860
1087</COMMAND_RESULT>
1088<COMMAND_OUTPUT>
1089Session mysession destroyed.
1090</COMMAND_OUTPUT>
1091
d128c979
BH
1092<COMMAND_INPUT>
1093lttng -vvv create mysession -U net://172.0.0.1
1094</COMMAND_INPUT>
1095<COMMAND_RESULT>
10960
1097</COMMAND_RESULT>
1098<COMMAND_OUTPUT>
1099DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
1100DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
1101DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
1102DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
1103Session mysession created.
1104Traces will be written in net://172.0.0.1
1105DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
1106</COMMAND_OUTPUT>
1107
f3b33d40 1108</SCENARIO>
d128c979
BH
1109
1110####################################################################
1111# Scenario: Test "lttng -vvv create <session> with LTTng 2.1 options"
1112####################################################################
1113<SCENARIO>
1114CreateSessionLttngVerbose2.1
1115<COMMAND_INPUT>
1116lttng -vvv create mysession -U net://172.0.0.1
1117</COMMAND_INPUT>
1118<COMMAND_RESULT>
11190
1120</COMMAND_RESULT>
1121<COMMAND_OUTPUT>
1122DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
1123DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
1124DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
1125DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
1126Session mysession created.
1127Traces will be written in net://172.0.0.1
1128DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
1129</COMMAND_OUTPUT>
1130
1131<COMMAND_INPUT>
1132lttng -vvv destroy mysession
1133</COMMAND_INPUT>
1134<COMMAND_RESULT>
11350
1136</COMMAND_RESULT>
1137<COMMAND_OUTPUT>
1138Session mysession destroyed.
1139</COMMAND_OUTPUT>
1140
1141</SCENARIO>
This page took 0.11782 seconds and 5 git commands to generate.