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 | ||
367 | #################################################################### | |
368 | # Scenario: Test "lttng create <session> | |
369 | #################################################################### | |
370 | <SCENARIO> | |
371 | CreateSession1 | |
372 | <COMMAND_INPUT> | |
373 | lttng create mysession2 | |
374 | </COMMAND_INPUT> | |
375 | <COMMAND_RESULT> | |
376 | 0 | |
377 | </COMMAND_RESULT> | |
378 | <COMMAND_OUTPUT> | |
379 | Session mysession2 created. | |
380 | Traces will be written in /home/user/lttng-traces/mysession2-20120209-095418 | |
381 | </COMMAND_OUTPUT> | |
382 | </SCENARIO> | |
383 | ||
d6fc6e1b BH |
384 | #################################################################### |
385 | # Scenario: Test "lttng create <session> | |
386 | #################################################################### | |
387 | <SCENARIO> | |
388 | CreateSessionWithPrompt | |
389 | <COMMAND_INPUT> | |
390 | lttng create mysession2 | |
391 | </COMMAND_INPUT> | |
392 | <COMMAND_RESULT> | |
393 | 0 | |
394 | </COMMAND_RESULT> | |
395 | <COMMAND_OUTPUT> | |
396 | Prompt> Session mysession2 created. | |
397 | Traces will be written in /home/user/lttng-traces/mysession2-20120209-095418 | |
398 | </COMMAND_OUTPUT> | |
399 | </SCENARIO> | |
400 | ||
d132bcc7 BH |
401 | #################################################################### |
402 | # Scenario: Test "lttng create <session> with different variants | |
403 | # and errors | |
404 | #################################################################### | |
405 | <SCENARIO> | |
406 | CreateSessionVariants | |
407 | <COMMAND_INPUT> | |
408 | lttng create alreadyExist | |
409 | </COMMAND_INPUT> | |
410 | <COMMAND_RESULT> | |
411 | 1 | |
412 | </COMMAND_RESULT> | |
413 | <COMMAND_OUTPUT> | |
414 | Error: Session name already exist | |
415 | </COMMAND_OUTPUT> | |
416 | ||
417 | <COMMAND_INPUT> | |
418 | lttng create "session with spaces" | |
419 | </COMMAND_INPUT> | |
420 | <COMMAND_RESULT> | |
421 | 0 | |
422 | </COMMAND_RESULT> | |
423 | <COMMAND_OUTPUT> | |
424 | Session session with spaces created. | |
425 | Traces will be written in /home/user/lttng-traces/session with spaces-20120209-095418 | |
426 | </COMMAND_OUTPUT> | |
427 | ||
428 | <COMMAND_INPUT> | |
429 | lttng create wrongName | |
430 | </COMMAND_INPUT> | |
431 | <COMMAND_RESULT> | |
432 | 0 | |
433 | </COMMAND_RESULT> | |
434 | <COMMAND_OUTPUT> | |
435 | Session auto created. | |
436 | Traces will be written in /home/user/lttng-traces/auto-20120209-095418 | |
437 | </COMMAND_OUTPUT> | |
438 | ||
439 | <COMMAND_INPUT> | |
440 | lttng create wrongPath -o /home/user/hallo | |
441 | </COMMAND_INPUT> | |
442 | <COMMAND_RESULT> | |
443 | 0 | |
444 | </COMMAND_RESULT> | |
445 | <COMMAND_OUTPUT> | |
446 | Session wrongPath created. | |
447 | Traces will be written in /home/user/lttng-traces/wrongPath-20120209-095418 | |
448 | </COMMAND_OUTPUT> | |
449 | ||
450 | <COMMAND_INPUT> | |
451 | lttng create pathWithSpaces -o "/home/user/hallo user/here" | |
452 | </COMMAND_INPUT> | |
453 | <COMMAND_RESULT> | |
454 | 0 | |
455 | </COMMAND_RESULT> | |
456 | <COMMAND_OUTPUT> | |
457 | Session pathWithSpaces created. | |
458 | Traces will be written in /home/user/hallo user/here/pathWithSpaces-20120209-095418 | |
459 | </COMMAND_OUTPUT> | |
460 | </SCENARIO> | |
461 | ||
462 | #################################################################### | |
463 | # Scenario: Test "lttng destroy <session> | |
464 | #################################################################### | |
465 | ||
466 | <SCENARIO> | |
467 | DestroySession1 | |
468 | <COMMAND_INPUT> | |
469 | lttng destroy mysession2 | |
470 | </COMMAND_INPUT> | |
471 | <COMMAND_RESULT> | |
472 | 0 | |
473 | </COMMAND_RESULT> | |
474 | <COMMAND_OUTPUT> | |
475 | Session mysession2 destroyed. | |
476 | </COMMAND_OUTPUT> | |
477 | </SCENARIO> | |
478 | ||
479 | #################################################################### | |
480 | # Scenario: Test "lttng enable-channel ..." with different inputs | |
481 | #################################################################### | |
482 | ||
483 | <SCENARIO> | |
484 | ChannelHandling | |
485 | <COMMAND_INPUT> | |
486 | lttng enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100 | |
487 | </COMMAND_INPUT> | |
488 | <COMMAND_RESULT> | |
489 | 0 | |
490 | </COMMAND_RESULT> | |
491 | <COMMAND_OUTPUT> | |
492 | Kernel channel mychannel0 enabled for session mysession2 | |
493 | Kernel channel mychannel1 enabled for session mysession2 | |
494 | </COMMAND_OUTPUT> | |
495 | ||
496 | <COMMAND_INPUT> | |
497 | lttng enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 | |
498 | </COMMAND_INPUT> | |
499 | <COMMAND_RESULT> | |
500 | 0 | |
501 | </COMMAND_RESULT> | |
502 | <COMMAND_OUTPUT> | |
503 | UST channel channel0 enabled for session mysession2 | |
504 | </COMMAND_OUTPUT> | |
505 | ||
506 | <COMMAND_INPUT> | |
507 | lttng enable-channel mychannel0,mychannel1 -k -s mysession2 | |
508 | </COMMAND_INPUT> | |
509 | <COMMAND_RESULT> | |
510 | 0 | |
511 | </COMMAND_RESULT> | |
512 | <COMMAND_OUTPUT> | |
513 | Kernel channel mychannel0 enabled for session mysession2 | |
514 | Kernel channel mychannel1 enabled for session mysession2 | |
515 | </COMMAND_OUTPUT> | |
516 | ||
517 | <COMMAND_INPUT> | |
518 | lttng enable-channel ustChannel -u -s mysession2 | |
519 | </COMMAND_INPUT> | |
520 | <COMMAND_RESULT> | |
521 | 0 | |
522 | </COMMAND_RESULT> | |
523 | <COMMAND_OUTPUT> | |
524 | UST channel mychannel0 enabled for session mysession2 | |
525 | </COMMAND_OUTPUT> | |
526 | ||
527 | <COMMAND_INPUT> | |
528 | lttng disable-channel mychannel0,mychannel1 -k -s mysession2 | |
529 | </COMMAND_INPUT> | |
530 | <COMMAND_RESULT> | |
531 | 0 | |
532 | </COMMAND_RESULT> | |
533 | <COMMAND_OUTPUT> | |
534 | Kernel channel mychannel0 disabled for session mysession2 | |
535 | Kernel channel mychannel1 disabled for session mysession2 | |
536 | </COMMAND_OUTPUT> | |
537 | ||
538 | <COMMAND_INPUT> | |
539 | lttng disable-channel ustChannel -u -s mysession2 | |
540 | </COMMAND_INPUT> | |
541 | <COMMAND_RESULT> | |
542 | 0 | |
543 | </COMMAND_RESULT> | |
544 | <COMMAND_OUTPUT> | |
545 | UST channel mychannel0 enabled for session mysession2 | |
546 | </COMMAND_OUTPUT> | |
547 | </SCENARIO> | |
548 | ||
549 | ||
550 | #################################################################### | |
551 | # Scenario: Test "lttng enable-events ..." with different inputs | |
552 | #################################################################### | |
553 | <SCENARIO> | |
554 | EventHandling | |
555 | ||
556 | # Tracepoint test cases | |
557 | ||
558 | <COMMAND_INPUT> | |
559 | lttng enable-event block_rq_remap,block_bio_remap,softirq_entry -k -s mysession2 --tracepoint | |
560 | </COMMAND_INPUT> | |
561 | <COMMAND_RESULT> | |
562 | 0 | |
563 | </COMMAND_RESULT> | |
564 | <COMMAND_OUTPUT> | |
565 | kernel event block_rq_remap created in channel channel0 | |
566 | kernel event block_bio_remap created in channel channel0 | |
567 | kernel event softirq_entry created in channel channel0 | |
568 | </COMMAND_OUTPUT> | |
569 | ||
570 | <COMMAND_INPUT> | |
571 | lttng enable-event -a -k -s mysession2 -c mychannel --tracepoint | |
572 | </COMMAND_INPUT> | |
573 | <COMMAND_RESULT> | |
574 | 0 | |
575 | </COMMAND_RESULT> | |
576 | <COMMAND_OUTPUT> | |
577 | All kernel tracepoints are enabled in channel channel0 | |
578 | </COMMAND_OUTPUT> | |
579 | ||
580 | <COMMAND_INPUT> | |
581 | lttng enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint | |
582 | </COMMAND_INPUT> | |
583 | <COMMAND_RESULT> | |
584 | 0 | |
585 | </COMMAND_RESULT> | |
586 | <COMMAND_OUTPUT> | |
587 | UST event ust_tests_hello:tptest_sighandler created in channel mychannel | |
588 | </COMMAND_OUTPUT> | |
589 | ||
590 | <COMMAND_INPUT> | |
591 | lttng enable-event -a -u -s mysession2 -c mychannel --tracepoint | |
592 | </COMMAND_INPUT> | |
593 | <COMMAND_RESULT> | |
594 | 0 | |
595 | </COMMAND_RESULT> | |
596 | <COMMAND_OUTPUT> | |
597 | All UST tracepoints are enabled in channel mychannel | |
598 | </COMMAND_OUTPUT> | |
599 | ||
600 | # Syscall test cases | |
601 | ||
602 | <COMMAND_INPUT> | |
603 | lttng enable-event -a -k -s mysession2 --syscall | |
604 | </COMMAND_INPUT> | |
605 | <COMMAND_RESULT> | |
606 | 0 | |
607 | </COMMAND_RESULT> | |
608 | <COMMAND_OUTPUT> | |
609 | All kernel system calls are enabled in channel channel0 | |
610 | </COMMAND_OUTPUT> | |
611 | ||
612 | <COMMAND_INPUT> | |
613 | lttng enable-event -a -k -s mysession2 -c mychannel --syscall | |
614 | </COMMAND_INPUT> | |
615 | <COMMAND_RESULT> | |
616 | 0 | |
617 | </COMMAND_RESULT> | |
618 | <COMMAND_OUTPUT> | |
619 | All kernel system calls are enabled in channel mychannel | |
620 | </COMMAND_OUTPUT> | |
621 | ||
622 | # dynamic probe/function probe test cases | |
623 | ||
624 | <COMMAND_INPUT> | |
625 | lttng enable-event myevent0 -k -s mysession2 --function 0xc0101340 | |
626 | </COMMAND_INPUT> | |
627 | <COMMAND_RESULT> | |
628 | 0 | |
629 | </COMMAND_RESULT> | |
630 | <COMMAND_OUTPUT> | |
631 | kernel event myevent0 created in channel mychannel | |
632 | </COMMAND_OUTPUT> | |
633 | ||
634 | <COMMAND_INPUT> | |
635 | lttng enable-event myevent1 -k -s mysession2 -c mychannel --probe init_post | |
636 | </COMMAND_INPUT> | |
637 | <COMMAND_RESULT> | |
638 | 0 | |
639 | </COMMAND_RESULT> | |
640 | <COMMAND_OUTPUT> | |
641 | kernel event myevent1 created in channel mychannel | |
642 | </COMMAND_OUTPUT> | |
643 | ||
644 | # log level test cases | |
645 | ||
646 | <COMMAND_INPUT> | |
647 | lttng enable-event myevent4 -u -s mysession2 --loglevel-only TRACE_DEBUG | |
648 | </COMMAND_INPUT> | |
649 | <COMMAND_RESULT> | |
650 | 0 | |
651 | </COMMAND_RESULT> | |
652 | <COMMAND_OUTPUT> | |
653 | UST event myevent4 created in channel channel0 | |
654 | </COMMAND_OUTPUT> | |
655 | ||
656 | <COMMAND_INPUT> | |
657 | lttng enable-event myevent5 -u -s mysession2 -c mychannel --loglevel TRACE_DEBUG_FUNCTION | |
658 | </COMMAND_INPUT> | |
659 | <COMMAND_RESULT> | |
660 | 0 | |
661 | </COMMAND_RESULT> | |
662 | <COMMAND_OUTPUT> | |
663 | UST event myevent5 created in channel mychannel | |
664 | </COMMAND_OUTPUT> | |
665 | ||
666 | </SCENARIO> | |
667 | ||
4ea599a5 BH |
668 | #################################################################### |
669 | # Scenario: Test "lttng add-context -h" and lttng add-context ..." with different inputs | |
670 | #################################################################### | |
671 | ||
672 | <SCENARIO> | |
673 | ContextHandling | |
674 | ||
675 | <COMMAND_INPUT> | |
676 | lttng add-context -h | |
677 | </COMMAND_INPUT> | |
678 | <COMMAND_RESULT> | |
679 | 0 | |
680 | </COMMAND_RESULT> | |
681 | <COMMAND_OUTPUT> | |
682 | usage: lttng add-context -t TYPE | |
683 | ||
684 | If no channel and no event is given (-c/-e), the context | |
685 | will be added to all events and all channels. | |
686 | Otherwise the context will be added only to the channel (-c) | |
687 | and/or event (-e) indicated. | |
688 | Exactly one domain (-k/--kernel or -u/--userspace) must be specified. | |
689 | ||
690 | Options: | |
691 | -h, --help Show this help | |
692 | --list-options Simple listing of options | |
693 | -s, --session NAME Apply to session name | |
694 | -c, --channel NAME Apply to channel | |
695 | -e, --event NAME Apply to event | |
696 | -k, --kernel Apply to the kernel tracer | |
697 | -u, --userspace Apply to the user-space tracer | |
698 | -t, --type TYPE Context type. You can repeat that option on | |
699 | the command line to specify multiple contexts at once. | |
700 | (--kernel preempts --userspace) | |
701 | TYPE can be one of the strings below: | |
702 | pid, procname, prio, nice, vpid, tid, pthread_id, | |
703 | vtid, ppid, vppid, perf:cpu-cycles, perf:cycles | |
704 | Example: | |
705 | This command will add the context information 'prio' and two perf | |
706 | counters (hardware branch misses and cache misses), to all events | |
707 | in the trace data output: | |
708 | # lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses | |
709 | ||
710 | </COMMAND_OUTPUT> | |
711 | ||
712 | <COMMAND_INPUT> | |
713 | lttng add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid | |
714 | </COMMAND_INPUT> | |
715 | <COMMAND_RESULT> | |
716 | 0 | |
717 | </COMMAND_RESULT> | |
718 | <COMMAND_OUTPUT> | |
719 | UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel | |
720 | UST context pid added to event sched_kthread_stop_ret channel mychannel | |
721 | </COMMAND_OUTPUT> | |
722 | </SCENARIO> | |
723 | ||
724 | <SCENARIO> | |
725 | ContextErrorHandling | |
726 | ||
727 | <COMMAND_INPUT> | |
728 | lttng add-context -h | |
729 | </COMMAND_INPUT> | |
730 | <COMMAND_RESULT> | |
731 | 1 | |
732 | </COMMAND_RESULT> | |
733 | <COMMAND_OUTPUT> | |
734 | usage: lttng add-context -t TYPE | |
d132bcc7 | 735 | |
4ea599a5 BH |
736 | If no channel and no event is given (-c/-e), the context |
737 | will be added to all events and all channels. | |
738 | Otherwise the context will be added only to the channel (-c) | |
739 | and/or event (-e) indicated. | |
740 | Exactly one domain (-k/--kernel or -u/--userspace) must be specified. | |
741 | ||
742 | Options: | |
743 | -h, --help Show this help | |
744 | --list-options Simple listing of options | |
745 | -s, --session NAME Apply to session name | |
746 | -c, --channel NAME Apply to channel | |
747 | -e, --event NAME Apply to event | |
748 | -k, --kernel Apply to the kernel tracer | |
749 | -u, --userspace Apply to the user-space tracer | |
750 | -t, --type TYPE Context type. You can repeat that option on | |
751 | the command line to specify multiple contexts at once. | |
752 | (--kernel preempts --userspace) | |
753 | TYPE can be one of the strings below: | |
754 | pid, procname, prio, nice, vpid, tid, pthread_id, | |
755 | vtid, ppid, vppid, perf:cpu-cycles, perf:cycles | |
756 | Example: | |
757 | This command will add the context information 'prio' and two perf | |
758 | counters (hardware branch misses and cache misses), to all events | |
759 | in the trace data output: | |
760 | # lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses | |
761 | ||
762 | </COMMAND_OUTPUT> | |
763 | ||
764 | <COMMAND_INPUT> | |
765 | lttng add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid | |
766 | </COMMAND_INPUT> | |
767 | <COMMAND_RESULT> | |
768 | 1 | |
769 | </COMMAND_RESULT> | |
770 | <COMMAND_OUTPUT> | |
771 | UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel | |
772 | UST context pid added to event sched_kthread_stop_ret channel mychannel | |
773 | </COMMAND_OUTPUT> | |
774 | ||
775 | </SCENARIO> | |
776 | ||
777 | <SCENARIO> | |
778 | CalibrateHandling | |
779 | <COMMAND_INPUT> | |
780 | lttng calibrate -k --function | |
781 | </COMMAND_INPUT> | |
782 | <COMMAND_RESULT> | |
783 | 0 | |
784 | </COMMAND_RESULT> | |
785 | <COMMAND_OUTPUT> | |
786 | Kernel calibration done | |
787 | </COMMAND_OUTPUT> | |
788 | ||
789 | <COMMAND_INPUT> | |
790 | lttng calibrate -u --function | |
791 | </COMMAND_INPUT> | |
792 | <COMMAND_RESULT> | |
793 | 1 | |
794 | </COMMAND_RESULT> | |
795 | <COMMAND_OUTPUT> | |
796 | Kernel calibration done | |
797 | </COMMAND_OUTPUT> | |
798 | ||
799 | </SCENARIO> |