Commit | Line | Data |
---|---|---|
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> | |
16 | LttngNotInstalled | |
17 | <COMMAND_INPUT> | |
18 | lttng list | |
19 | </COMMAND_INPUT> | |
20 | <COMMAND_RESULT> | |
21 | 1 | |
22 | </COMMAND_RESULT> | |
23 | <COMMAND_OUTPUT> | |
24 | Command not found | |
25 | </COMMAND_OUTPUT> | |
26 | </SCENARIO> | |
27 | ||
276c17e7 BH |
28 | #################################################################### |
29 | # Scenario: Test lttng version | |
30 | #################################################################### | |
31 | <SCENARIO> | |
32 | LttngVersion | |
33 | <COMMAND_INPUT> | |
34 | lttng version | |
35 | </COMMAND_INPUT> | |
36 | <COMMAND_RESULT> | |
37 | 0 | |
38 | </COMMAND_RESULT> | |
39 | <COMMAND_OUTPUT> | |
cfe737e4 | 40 | lttng version 2.1.0 - Basse Messe |
276c17e7 BH |
41 | Web site: http://lttng.org/ |
42 | ||
43 | lttng 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> | |
52 | LttngVersionWithPrompt | |
53 | <COMMAND_INPUT> | |
54 | lttng version | |
55 | </COMMAND_INPUT> | |
56 | <COMMAND_RESULT> | |
57 | 0 | |
58 | </COMMAND_RESULT> | |
59 | <COMMAND_OUTPUT> | |
60 | Prompt> lttng version 2.0.0 - Annedd'ale | |
61 | Web site: http://lttng.org/ | |
62 | ||
63 | lttng 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> | |
71 | LttngUnsupportedVersion | |
72 | <COMMAND_INPUT> | |
73 | lttng version | |
74 | </COMMAND_INPUT> | |
75 | <COMMAND_RESULT> | |
76 | 0 | |
77 | </COMMAND_RESULT> | |
78 | <COMMAND_OUTPUT> | |
79 | lttng version 200.0.0 - Annedd'ale | |
80 | Web site: http://lttng.org/ | |
81 | ||
82 | lttng 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> | |
91 | LttngNoVersion | |
92 | <COMMAND_INPUT> | |
93 | lttng version | |
94 | </COMMAND_INPUT> | |
95 | <COMMAND_RESULT> | |
96 | 0 | |
97 | </COMMAND_RESULT> | |
98 | <COMMAND_OUTPUT> | |
99 | Web site: http://lttng.org/ | |
100 | ||
101 | lttng 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> | |
109 | NoSessionAvailable | |
110 | <COMMAND_INPUT> | |
111 | lttng list | |
112 | </COMMAND_INPUT> | |
113 | <COMMAND_RESULT> | |
114 | 0 | |
115 | </COMMAND_RESULT> | |
116 | <COMMAND_OUTPUT> | |
117 | Currently no available tracing session | |
118 | </COMMAND_OUTPUT> | |
119 | </SCENARIO> | |
120 | ||
121 | #################################################################### | |
122 | # Scenario: Test get sessions | |
123 | #################################################################### | |
124 | <SCENARIO> | |
125 | GetSessionNames1 | |
126 | <COMMAND_INPUT> | |
127 | lttng list | |
128 | </COMMAND_INPUT> | |
129 | <COMMAND_RESULT> | |
130 | 0 | |
131 | </COMMAND_RESULT> | |
132 | <COMMAND_OUTPUT> | |
133 | Available 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> | |
145 | GetSessionNameNotExist | |
146 | <COMMAND_INPUT> | |
147 | lttng list test | |
148 | </COMMAND_INPUT> | |
149 | <COMMAND_RESULT> | |
150 | 1 | |
151 | </COMMAND_RESULT> | |
152 | <COMMAND_OUTPUT> | |
153 | Session test not found | |
154 | Error: Session name not found | |
155 | </COMMAND_OUTPUT> | |
156 | </SCENARIO> | |
157 | ||
158 | #################################################################### | |
159 | # Scenario: Test lttng list with garbage output | |
160 | #################################################################### | |
161 | <SCENARIO> | |
162 | GetSessionGarbageOut | |
163 | <COMMAND_INPUT> | |
164 | lttng list | |
165 | </COMMAND_INPUT> | |
166 | <COMMAND_RESULT> | |
167 | 0 | |
168 | </COMMAND_RESULT> | |
169 | <COMMAND_OUTPUT> | |
170 | asdfaereafsdcv 12333456434&*89**(())(^%$* | |
171 | @#$%^&*()@#$%^&*()0834523094578kj;djkfs | |
172 | a;sdf094v5u dsafj;sd9 | |
173 | </COMMAND_OUTPUT> | |
174 | </SCENARIO> | |
175 | ||
176 | #################################################################### | |
177 | # Scenario: Test lttng list <name> with sample outputs | |
178 | #################################################################### | |
179 | <SCENARIO> | |
180 | GetSession1 | |
181 | <COMMAND_INPUT> | |
182 | lttng list mysession | |
183 | </COMMAND_INPUT> | |
184 | <COMMAND_RESULT> | |
185 | 0 | |
186 | </COMMAND_RESULT> | |
187 | <COMMAND_OUTPUT> | |
188 | Tracing session mysession: [active] | |
189 | Trace path: /home/user/lttng-traces/mysession-20120129-084256 | |
190 | ||
191 | === Domain: Kernel === | |
192 | ||
193 | Channels: | |
194 | ------------- | |
195 | - channel0: [enabled] | |
196 | ||
197 | Attributes: | |
198 | overwrite mode: 0 | |
199 | subbufers size: 262144 | |
200 | number of subbufers: 4 | |
201 | switch timer interval: 0 | |
202 | read timer interval: 200 | |
203 | output: splice() | |
204 | ||
205 | Events: | |
206 | block_rq_remap (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled] | |
207 | block_bio_remap (loglevel: TRACE_EMERG (0)) (type: tracepoint) [disabled] | |
208 | ||
209 | - channel1: [disabled] | |
210 | ||
211 | Attributes: | |
212 | overwrite mode: 1 | |
213 | subbufers size: 524288 | |
214 | number of subbufers: 4 | |
215 | switch timer interval: 100 | |
216 | read timer interval: 400 | |
217 | output: splice() | |
218 | ||
219 | Events: | |
220 | None | |
221 | ||
222 | === Domain: UST global === | |
223 | ||
224 | Channels: | |
225 | ------------- | |
226 | - mychannel1: [disabled] | |
227 | ||
228 | Attributes: | |
229 | overwrite mode: 1 | |
230 | subbufers size: 8192 | |
231 | number of subbufers: 8 | |
232 | switch timer interval: 200 | |
233 | read timer interval: 100 | |
234 | output: mmap() | |
235 | ||
236 | Events: | |
237 | None | |
238 | ||
239 | - channel0: [enabled] | |
240 | ||
241 | Attributes: | |
242 | overwrite mode: 0 | |
243 | subbufers size: 4096 | |
244 | number of subbufers: 4 | |
245 | switch timer interval: 0 | |
246 | read timer interval: 200 | |
247 | output: mmap() | |
248 | ||
249 | Events: | |
250 | ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint) [disabled] | |
251 | * (type: tracepoint) [enabled] | |
252 | ||
253 | </COMMAND_OUTPUT> | |
254 | <COMMAND_INPUT> | |
255 | lttng list mysession1 | |
256 | </COMMAND_INPUT> | |
257 | <COMMAND_RESULT> | |
258 | 0 | |
259 | </COMMAND_RESULT> | |
260 | <COMMAND_OUTPUT> | |
261 | Tracing session mysession1: [inactive] | |
262 | Trace path: /home/user/lttng-traces/mysession1-20120203-133225 | |
263 | ||
264 | </COMMAND_OUTPUT> | |
265 | </SCENARIO> | |
266 | ||
267 | ||
268 | #################################################################### | |
269 | # Scenario: Test "lttng list -k" with sample output | |
270 | #################################################################### | |
271 | <SCENARIO> | |
272 | GetKernelProvider1 | |
273 | <COMMAND_INPUT> | |
274 | lttng list -k | |
275 | </COMMAND_INPUT> | |
276 | <COMMAND_RESULT> | |
277 | 0 | |
278 | </COMMAND_RESULT> | |
279 | <COMMAND_OUTPUT> | |
280 | Kernel events | |
281 | ------------- | |
282 | sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) | |
283 | sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) | |
284 | sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) | |
285 | ||
286 | </COMMAND_OUTPUT> | |
287 | </SCENARIO> | |
288 | ||
a07c7629 BH |
289 | #################################################################### |
290 | # Scenario: Test "lttng list -k" with no kernel and no session daemon | |
291 | #################################################################### | |
292 | <SCENARIO> | |
293 | ListWithNoKernel1 | |
294 | <COMMAND_INPUT> | |
295 | lttng list -k | |
296 | </COMMAND_INPUT> | |
297 | <COMMAND_RESULT> | |
298 | 1 | |
299 | </COMMAND_RESULT> | |
300 | <COMMAND_OUTPUT> | |
301 | Spawning session daemon | |
302 | Error: Unable to list kernel events | |
303 | </COMMAND_OUTPUT> | |
304 | </SCENARIO> | |
305 | ||
306 | #################################################################### | |
307 | # Scenario: Test "lttng list -k" with no kernel and with session daemon | |
308 | #################################################################### | |
309 | <SCENARIO> | |
310 | ListWithNoKernel2 | |
311 | <COMMAND_INPUT> | |
312 | lttng list -k | |
313 | </COMMAND_INPUT> | |
314 | <COMMAND_RESULT> | |
315 | 1 | |
316 | </COMMAND_RESULT> | |
317 | <COMMAND_OUTPUT> | |
318 | Error: Unable to list kernel events | |
319 | </COMMAND_OUTPUT> | |
320 | </SCENARIO> | |
321 | ||
d132bcc7 BH |
322 | #################################################################### |
323 | # Scenario: Test "lttng list -u" with sample output | |
324 | #################################################################### | |
325 | <SCENARIO> | |
326 | GetUstProvider1 | |
327 | <COMMAND_INPUT> | |
328 | lttng list -u | |
329 | </COMMAND_INPUT> | |
330 | <COMMAND_RESULT> | |
331 | 0 | |
332 | </COMMAND_RESULT> | |
333 | <COMMAND_OUTPUT> | |
334 | UST events: | |
335 | ------------- | |
336 | ||
337 | PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello | |
338 | ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_MODULE (10)) (type: tracepoint) | |
339 | ust_tests_hello:tptest (loglevel: TRACE_INFO (6)) (type: tracepoint) | |
340 | ||
341 | PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello | |
342 | ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint) | |
343 | ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint) | |
344 | ||
345 | </COMMAND_OUTPUT> | |
346 | </SCENARIO> | |
347 | ||
348 | #################################################################### | |
349 | # Scenario: Test "lttng list -u" with no UST provider available | |
350 | #################################################################### | |
351 | <SCENARIO> | |
352 | GetUstProvider2 | |
353 | <COMMAND_INPUT> | |
354 | lttng list -u | |
355 | </COMMAND_INPUT> | |
356 | <COMMAND_RESULT> | |
357 | 0 | |
358 | </COMMAND_RESULT> | |
359 | <COMMAND_OUTPUT> | |
360 | UST events: | |
361 | ------------- | |
362 | None | |
363 | ||
364 | </COMMAND_OUTPUT> | |
365 | </SCENARIO> | |
366 | ||
d4514365 BH |
367 | #################################################################### |
368 | # Scenario: Test "lttng list -u -f" with sample output (version 2.1.0) | |
369 | #################################################################### | |
370 | <SCENARIO> | |
371 | GetUstProvider3 | |
372 | <COMMAND_INPUT> | |
373 | lttng list -u -f | |
374 | </COMMAND_INPUT> | |
375 | <COMMAND_RESULT> | |
376 | 0 | |
377 | </COMMAND_RESULT> | |
378 | <COMMAND_OUTPUT> | |
379 | UST events: | |
380 | ------------- | |
381 | ||
382 | PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello | |
383 | ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_MODULE (10)) (type: tracepoint) | |
384 | ust_tests_hello:tptest (loglevel: TRACE_INFO (6)) (type: tracepoint) | |
385 | field: doublefield (float) | |
386 | field: floatfield (float) | |
387 | field: stringfield (string) | |
388 | ||
389 | PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello | |
390 | ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint) | |
391 | ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint) | |
392 | field: doublefield (float) | |
393 | field: floatfield (float) | |
394 | field: stringfield (string) | |
395 | ||
396 | </COMMAND_OUTPUT> | |
397 | </SCENARIO> | |
398 | ||
399 | ||
d132bcc7 BH |
400 | #################################################################### |
401 | # Scenario: Test "lttng create <session> | |
402 | #################################################################### | |
403 | <SCENARIO> | |
404 | CreateSession1 | |
405 | <COMMAND_INPUT> | |
406 | lttng create mysession2 | |
407 | </COMMAND_INPUT> | |
408 | <COMMAND_RESULT> | |
409 | 0 | |
410 | </COMMAND_RESULT> | |
411 | <COMMAND_OUTPUT> | |
412 | Session mysession2 created. | |
413 | Traces will be written in /home/user/lttng-traces/mysession2-20120209-095418 | |
414 | </COMMAND_OUTPUT> | |
415 | </SCENARIO> | |
416 | ||
d6fc6e1b BH |
417 | #################################################################### |
418 | # Scenario: Test "lttng create <session> | |
419 | #################################################################### | |
420 | <SCENARIO> | |
421 | CreateSessionWithPrompt | |
422 | <COMMAND_INPUT> | |
423 | lttng create mysession2 | |
424 | </COMMAND_INPUT> | |
425 | <COMMAND_RESULT> | |
426 | 0 | |
427 | </COMMAND_RESULT> | |
428 | <COMMAND_OUTPUT> | |
429 | Prompt> Session mysession2 created. | |
430 | Traces will be written in /home/user/lttng-traces/mysession2-20120209-095418 | |
431 | </COMMAND_OUTPUT> | |
432 | </SCENARIO> | |
433 | ||
d132bcc7 BH |
434 | #################################################################### |
435 | # Scenario: Test "lttng create <session> with different variants | |
436 | # and errors | |
437 | #################################################################### | |
438 | <SCENARIO> | |
439 | CreateSessionVariants | |
440 | <COMMAND_INPUT> | |
441 | lttng create alreadyExist | |
442 | </COMMAND_INPUT> | |
443 | <COMMAND_RESULT> | |
444 | 1 | |
445 | </COMMAND_RESULT> | |
446 | <COMMAND_OUTPUT> | |
447 | Error: Session name already exist | |
448 | </COMMAND_OUTPUT> | |
449 | ||
450 | <COMMAND_INPUT> | |
451 | lttng create "session with spaces" | |
452 | </COMMAND_INPUT> | |
453 | <COMMAND_RESULT> | |
454 | 0 | |
455 | </COMMAND_RESULT> | |
456 | <COMMAND_OUTPUT> | |
457 | Session session with spaces created. | |
458 | Traces will be written in /home/user/lttng-traces/session with spaces-20120209-095418 | |
459 | </COMMAND_OUTPUT> | |
460 | ||
461 | <COMMAND_INPUT> | |
462 | lttng create wrongName | |
463 | </COMMAND_INPUT> | |
464 | <COMMAND_RESULT> | |
465 | 0 | |
466 | </COMMAND_RESULT> | |
467 | <COMMAND_OUTPUT> | |
468 | Session auto created. | |
469 | Traces will be written in /home/user/lttng-traces/auto-20120209-095418 | |
470 | </COMMAND_OUTPUT> | |
471 | ||
472 | <COMMAND_INPUT> | |
473 | lttng create wrongPath -o /home/user/hallo | |
474 | </COMMAND_INPUT> | |
475 | <COMMAND_RESULT> | |
476 | 0 | |
477 | </COMMAND_RESULT> | |
478 | <COMMAND_OUTPUT> | |
479 | Session wrongPath created. | |
480 | Traces will be written in /home/user/lttng-traces/wrongPath-20120209-095418 | |
481 | </COMMAND_OUTPUT> | |
482 | ||
483 | <COMMAND_INPUT> | |
484 | lttng create pathWithSpaces -o "/home/user/hallo user/here" | |
485 | </COMMAND_INPUT> | |
486 | <COMMAND_RESULT> | |
487 | 0 | |
488 | </COMMAND_RESULT> | |
489 | <COMMAND_OUTPUT> | |
490 | Session pathWithSpaces created. | |
491 | Traces will be written in /home/user/hallo user/here/pathWithSpaces-20120209-095418 | |
492 | </COMMAND_OUTPUT> | |
493 | </SCENARIO> | |
494 | ||
495 | #################################################################### | |
496 | # Scenario: Test "lttng destroy <session> | |
497 | #################################################################### | |
498 | ||
499 | <SCENARIO> | |
500 | DestroySession1 | |
501 | <COMMAND_INPUT> | |
502 | lttng destroy mysession2 | |
503 | </COMMAND_INPUT> | |
504 | <COMMAND_RESULT> | |
505 | 0 | |
506 | </COMMAND_RESULT> | |
507 | <COMMAND_OUTPUT> | |
508 | Session mysession2 destroyed. | |
509 | </COMMAND_OUTPUT> | |
510 | </SCENARIO> | |
511 | ||
512 | #################################################################### | |
513 | # Scenario: Test "lttng enable-channel ..." with different inputs | |
514 | #################################################################### | |
515 | ||
516 | <SCENARIO> | |
517 | ChannelHandling | |
518 | <COMMAND_INPUT> | |
519 | lttng enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100 | |
520 | </COMMAND_INPUT> | |
521 | <COMMAND_RESULT> | |
522 | 0 | |
523 | </COMMAND_RESULT> | |
524 | <COMMAND_OUTPUT> | |
525 | Kernel channel mychannel0 enabled for session mysession2 | |
526 | Kernel channel mychannel1 enabled for session mysession2 | |
527 | </COMMAND_OUTPUT> | |
528 | ||
529 | <COMMAND_INPUT> | |
530 | lttng enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 | |
531 | </COMMAND_INPUT> | |
532 | <COMMAND_RESULT> | |
533 | 0 | |
534 | </COMMAND_RESULT> | |
535 | <COMMAND_OUTPUT> | |
536 | UST channel channel0 enabled for session mysession2 | |
537 | </COMMAND_OUTPUT> | |
538 | ||
539 | <COMMAND_INPUT> | |
540 | lttng enable-channel mychannel0,mychannel1 -k -s mysession2 | |
541 | </COMMAND_INPUT> | |
542 | <COMMAND_RESULT> | |
543 | 0 | |
544 | </COMMAND_RESULT> | |
545 | <COMMAND_OUTPUT> | |
546 | Kernel channel mychannel0 enabled for session mysession2 | |
547 | Kernel channel mychannel1 enabled for session mysession2 | |
548 | </COMMAND_OUTPUT> | |
549 | ||
550 | <COMMAND_INPUT> | |
551 | lttng enable-channel ustChannel -u -s mysession2 | |
552 | </COMMAND_INPUT> | |
553 | <COMMAND_RESULT> | |
554 | 0 | |
555 | </COMMAND_RESULT> | |
556 | <COMMAND_OUTPUT> | |
557 | UST channel mychannel0 enabled for session mysession2 | |
558 | </COMMAND_OUTPUT> | |
559 | ||
560 | <COMMAND_INPUT> | |
561 | lttng disable-channel mychannel0,mychannel1 -k -s mysession2 | |
562 | </COMMAND_INPUT> | |
563 | <COMMAND_RESULT> | |
564 | 0 | |
565 | </COMMAND_RESULT> | |
566 | <COMMAND_OUTPUT> | |
567 | Kernel channel mychannel0 disabled for session mysession2 | |
568 | Kernel channel mychannel1 disabled for session mysession2 | |
569 | </COMMAND_OUTPUT> | |
570 | ||
571 | <COMMAND_INPUT> | |
572 | lttng disable-channel ustChannel -u -s mysession2 | |
573 | </COMMAND_INPUT> | |
574 | <COMMAND_RESULT> | |
575 | 0 | |
576 | </COMMAND_RESULT> | |
577 | <COMMAND_OUTPUT> | |
578 | UST channel mychannel0 enabled for session mysession2 | |
579 | </COMMAND_OUTPUT> | |
580 | </SCENARIO> | |
581 | ||
582 | ||
583 | #################################################################### | |
584 | # Scenario: Test "lttng enable-events ..." with different inputs | |
585 | #################################################################### | |
586 | <SCENARIO> | |
587 | EventHandling | |
588 | ||
589 | # Tracepoint test cases | |
590 | ||
591 | <COMMAND_INPUT> | |
592 | lttng enable-event block_rq_remap,block_bio_remap,softirq_entry -k -s mysession2 --tracepoint | |
593 | </COMMAND_INPUT> | |
594 | <COMMAND_RESULT> | |
595 | 0 | |
596 | </COMMAND_RESULT> | |
597 | <COMMAND_OUTPUT> | |
598 | kernel event block_rq_remap created in channel channel0 | |
599 | kernel event block_bio_remap created in channel channel0 | |
600 | kernel event softirq_entry created in channel channel0 | |
601 | </COMMAND_OUTPUT> | |
602 | ||
603 | <COMMAND_INPUT> | |
604 | lttng enable-event -a -k -s mysession2 -c mychannel --tracepoint | |
605 | </COMMAND_INPUT> | |
606 | <COMMAND_RESULT> | |
607 | 0 | |
608 | </COMMAND_RESULT> | |
609 | <COMMAND_OUTPUT> | |
610 | All kernel tracepoints are enabled in channel channel0 | |
611 | </COMMAND_OUTPUT> | |
612 | ||
613 | <COMMAND_INPUT> | |
614 | lttng enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint | |
615 | </COMMAND_INPUT> | |
616 | <COMMAND_RESULT> | |
617 | 0 | |
618 | </COMMAND_RESULT> | |
d4514365 BH |
619 | <COMMAND_OUTPUT> |
620 | UST event ust_tests_hello:tptest_sighandler created in channel mychannel | |
621 | </COMMAND_OUTPUT> | |
622 | ||
623 | <COMMAND_INPUT> | |
624 | lttng enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint --filter 'intfield==10' | |
625 | </COMMAND_INPUT> | |
626 | <COMMAND_RESULT> | |
627 | 0 | |
628 | </COMMAND_RESULT> | |
d132bcc7 BH |
629 | <COMMAND_OUTPUT> |
630 | UST event ust_tests_hello:tptest_sighandler created in channel mychannel | |
631 | </COMMAND_OUTPUT> | |
632 | ||
633 | <COMMAND_INPUT> | |
634 | lttng enable-event -a -u -s mysession2 -c mychannel --tracepoint | |
635 | </COMMAND_INPUT> | |
636 | <COMMAND_RESULT> | |
637 | 0 | |
638 | </COMMAND_RESULT> | |
639 | <COMMAND_OUTPUT> | |
640 | All UST tracepoints are enabled in channel mychannel | |
641 | </COMMAND_OUTPUT> | |
642 | ||
643 | # Syscall test cases | |
644 | ||
645 | <COMMAND_INPUT> | |
646 | lttng enable-event -a -k -s mysession2 --syscall | |
647 | </COMMAND_INPUT> | |
648 | <COMMAND_RESULT> | |
649 | 0 | |
650 | </COMMAND_RESULT> | |
651 | <COMMAND_OUTPUT> | |
652 | All kernel system calls are enabled in channel channel0 | |
653 | </COMMAND_OUTPUT> | |
654 | ||
655 | <COMMAND_INPUT> | |
656 | lttng enable-event -a -k -s mysession2 -c mychannel --syscall | |
657 | </COMMAND_INPUT> | |
658 | <COMMAND_RESULT> | |
659 | 0 | |
660 | </COMMAND_RESULT> | |
661 | <COMMAND_OUTPUT> | |
662 | All kernel system calls are enabled in channel mychannel | |
663 | </COMMAND_OUTPUT> | |
664 | ||
665 | # dynamic probe/function probe test cases | |
666 | ||
667 | <COMMAND_INPUT> | |
668 | lttng enable-event myevent0 -k -s mysession2 --function 0xc0101340 | |
669 | </COMMAND_INPUT> | |
670 | <COMMAND_RESULT> | |
671 | 0 | |
672 | </COMMAND_RESULT> | |
673 | <COMMAND_OUTPUT> | |
674 | kernel event myevent0 created in channel mychannel | |
675 | </COMMAND_OUTPUT> | |
676 | ||
677 | <COMMAND_INPUT> | |
678 | lttng enable-event myevent1 -k -s mysession2 -c mychannel --probe init_post | |
679 | </COMMAND_INPUT> | |
680 | <COMMAND_RESULT> | |
681 | 0 | |
682 | </COMMAND_RESULT> | |
683 | <COMMAND_OUTPUT> | |
684 | kernel event myevent1 created in channel mychannel | |
685 | </COMMAND_OUTPUT> | |
686 | ||
687 | # log level test cases | |
688 | ||
689 | <COMMAND_INPUT> | |
690 | lttng enable-event myevent4 -u -s mysession2 --loglevel-only TRACE_DEBUG | |
691 | </COMMAND_INPUT> | |
692 | <COMMAND_RESULT> | |
693 | 0 | |
694 | </COMMAND_RESULT> | |
695 | <COMMAND_OUTPUT> | |
696 | UST event myevent4 created in channel channel0 | |
697 | </COMMAND_OUTPUT> | |
698 | ||
699 | <COMMAND_INPUT> | |
700 | lttng enable-event myevent5 -u -s mysession2 -c mychannel --loglevel TRACE_DEBUG_FUNCTION | |
701 | </COMMAND_INPUT> | |
702 | <COMMAND_RESULT> | |
703 | 0 | |
704 | </COMMAND_RESULT> | |
705 | <COMMAND_OUTPUT> | |
706 | UST event myevent5 created in channel mychannel | |
707 | </COMMAND_OUTPUT> | |
708 | ||
709 | </SCENARIO> | |
710 | ||
4ea599a5 BH |
711 | #################################################################### |
712 | # Scenario: Test "lttng add-context -h" and lttng add-context ..." with different inputs | |
713 | #################################################################### | |
714 | ||
715 | <SCENARIO> | |
716 | ContextHandling | |
717 | ||
718 | <COMMAND_INPUT> | |
719 | lttng add-context -h | |
720 | </COMMAND_INPUT> | |
721 | <COMMAND_RESULT> | |
722 | 0 | |
723 | </COMMAND_RESULT> | |
724 | <COMMAND_OUTPUT> | |
725 | usage: lttng add-context -t TYPE | |
726 | ||
727 | If no channel and no event is given (-c/-e), the context | |
728 | will be added to all events and all channels. | |
729 | Otherwise the context will be added only to the channel (-c) | |
730 | and/or event (-e) indicated. | |
731 | Exactly one domain (-k/--kernel or -u/--userspace) must be specified. | |
732 | ||
733 | Options: | |
734 | -h, --help Show this help | |
735 | --list-options Simple listing of options | |
736 | -s, --session NAME Apply to session name | |
737 | -c, --channel NAME Apply to channel | |
738 | -e, --event NAME Apply to event | |
739 | -k, --kernel Apply to the kernel tracer | |
740 | -u, --userspace Apply to the user-space tracer | |
741 | -t, --type TYPE Context type. You can repeat that option on | |
742 | the command line to specify multiple contexts at once. | |
743 | (--kernel preempts --userspace) | |
744 | TYPE can be one of the strings below: | |
745 | pid, procname, prio, nice, vpid, tid, pthread_id, | |
746 | vtid, ppid, vppid, perf:cpu-cycles, perf:cycles | |
747 | Example: | |
748 | This command will add the context information 'prio' and two perf | |
749 | counters (hardware branch misses and cache misses), to all events | |
750 | in the trace data output: | |
751 | # lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses | |
752 | ||
753 | </COMMAND_OUTPUT> | |
754 | ||
755 | <COMMAND_INPUT> | |
756 | lttng add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid | |
757 | </COMMAND_INPUT> | |
758 | <COMMAND_RESULT> | |
759 | 0 | |
760 | </COMMAND_RESULT> | |
761 | <COMMAND_OUTPUT> | |
762 | UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel | |
763 | UST context pid added to event sched_kthread_stop_ret channel mychannel | |
764 | </COMMAND_OUTPUT> | |
765 | </SCENARIO> | |
766 | ||
767 | <SCENARIO> | |
768 | ContextErrorHandling | |
769 | ||
770 | <COMMAND_INPUT> | |
771 | lttng add-context -h | |
772 | </COMMAND_INPUT> | |
773 | <COMMAND_RESULT> | |
774 | 1 | |
775 | </COMMAND_RESULT> | |
776 | <COMMAND_OUTPUT> | |
777 | usage: lttng add-context -t TYPE | |
d132bcc7 | 778 | |
4ea599a5 BH |
779 | If no channel and no event is given (-c/-e), the context |
780 | will be added to all events and all channels. | |
781 | Otherwise the context will be added only to the channel (-c) | |
782 | and/or event (-e) indicated. | |
783 | Exactly one domain (-k/--kernel or -u/--userspace) must be specified. | |
784 | ||
785 | Options: | |
786 | -h, --help Show this help | |
787 | --list-options Simple listing of options | |
788 | -s, --session NAME Apply to session name | |
789 | -c, --channel NAME Apply to channel | |
790 | -e, --event NAME Apply to event | |
791 | -k, --kernel Apply to the kernel tracer | |
792 | -u, --userspace Apply to the user-space tracer | |
793 | -t, --type TYPE Context type. You can repeat that option on | |
794 | the command line to specify multiple contexts at once. | |
795 | (--kernel preempts --userspace) | |
796 | TYPE can be one of the strings below: | |
797 | pid, procname, prio, nice, vpid, tid, pthread_id, | |
798 | vtid, ppid, vppid, perf:cpu-cycles, perf:cycles | |
799 | Example: | |
800 | This command will add the context information 'prio' and two perf | |
801 | counters (hardware branch misses and cache misses), to all events | |
802 | in the trace data output: | |
803 | # lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses | |
804 | ||
805 | </COMMAND_OUTPUT> | |
806 | ||
807 | <COMMAND_INPUT> | |
808 | lttng add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid | |
809 | </COMMAND_INPUT> | |
810 | <COMMAND_RESULT> | |
811 | 1 | |
812 | </COMMAND_RESULT> | |
813 | <COMMAND_OUTPUT> | |
814 | UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel | |
815 | UST context pid added to event sched_kthread_stop_ret channel mychannel | |
816 | </COMMAND_OUTPUT> | |
817 | ||
818 | </SCENARIO> | |
819 | ||
820 | <SCENARIO> | |
821 | CalibrateHandling | |
822 | <COMMAND_INPUT> | |
823 | lttng calibrate -k --function | |
824 | </COMMAND_INPUT> | |
825 | <COMMAND_RESULT> | |
826 | 0 | |
827 | </COMMAND_RESULT> | |
828 | <COMMAND_OUTPUT> | |
829 | Kernel calibration done | |
830 | </COMMAND_OUTPUT> | |
831 | ||
832 | <COMMAND_INPUT> | |
833 | lttng calibrate -u --function | |
834 | </COMMAND_INPUT> | |
835 | <COMMAND_RESULT> | |
836 | 1 | |
837 | </COMMAND_RESULT> | |
838 | <COMMAND_OUTPUT> | |
839 | Kernel calibration done | |
840 | </COMMAND_OUTPUT> | |
841 | ||
842 | </SCENARIO> |