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 | ||
d128c979 BH |
158 | #################################################################### |
159 | # Scenario: Test lttng -vvv list <name> where session doesn't exist | |
160 | #################################################################### | |
161 | <SCENARIO> | |
162 | GetSessionNameNotExistVerbose | |
163 | <COMMAND_INPUT> | |
164 | lttng -vvv list test | |
165 | </COMMAND_INPUT> | |
166 | <COMMAND_RESULT> | |
167 | 1 | |
168 | </COMMAND_RESULT> | |
169 | <COMMAND_OUTPUT> | |
170 | DEBUG2: Session name: test [in cmd_list() at commands/list.c:618] | |
171 | DEBUG1: Session count 1 [in list_sessions() at commands/list.c:485] | |
172 | Error: Session 'test' not found | |
173 | Error: Command error | |
174 | DEBUG1: 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> | |
182 | GetSessionGarbageOut | |
183 | <COMMAND_INPUT> | |
184 | lttng list | |
185 | </COMMAND_INPUT> | |
186 | <COMMAND_RESULT> | |
187 | 0 | |
188 | </COMMAND_RESULT> | |
189 | <COMMAND_OUTPUT> | |
190 | asdfaereafsdcv 12333456434&*89**(())(^%$* | |
191 | @#$%^&*()@#$%^&*()0834523094578kj;djkfs | |
192 | a;sdf094v5u dsafj;sd9 | |
193 | </COMMAND_OUTPUT> | |
194 | </SCENARIO> | |
195 | ||
196 | #################################################################### | |
197 | # Scenario: Test lttng list <name> with sample outputs | |
198 | #################################################################### | |
199 | <SCENARIO> | |
200 | GetSession1 | |
201 | <COMMAND_INPUT> | |
202 | lttng list mysession | |
203 | </COMMAND_INPUT> | |
204 | <COMMAND_RESULT> | |
205 | 0 | |
206 | </COMMAND_RESULT> | |
207 | <COMMAND_OUTPUT> | |
208 | Tracing session mysession: [active] | |
209 | Trace path: /home/user/lttng-traces/mysession-20120129-084256 | |
210 | ||
211 | === Domain: Kernel === | |
212 | ||
213 | Channels: | |
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 | ||
244 | Channels: | |
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> | |
275 | lttng list mysession1 | |
276 | </COMMAND_INPUT> | |
277 | <COMMAND_RESULT> | |
278 | 0 | |
279 | </COMMAND_RESULT> | |
280 | <COMMAND_OUTPUT> | |
281 | Tracing 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> | |
292 | GetKernelProvider1 | |
293 | <COMMAND_INPUT> | |
294 | lttng list -k | |
295 | </COMMAND_INPUT> | |
296 | <COMMAND_RESULT> | |
297 | 0 | |
298 | </COMMAND_RESULT> | |
299 | <COMMAND_OUTPUT> | |
300 | Kernel 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> | |
313 | ListWithNoKernel1 | |
314 | <COMMAND_INPUT> | |
315 | lttng list -k | |
316 | </COMMAND_INPUT> | |
317 | <COMMAND_RESULT> | |
318 | 1 | |
319 | </COMMAND_RESULT> | |
320 | <COMMAND_OUTPUT> | |
321 | Spawning session daemon | |
322 | Error: 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> | |
330 | ListWithNoKernel2 | |
331 | <COMMAND_INPUT> | |
332 | lttng list -k | |
333 | </COMMAND_INPUT> | |
334 | <COMMAND_RESULT> | |
335 | 1 | |
336 | </COMMAND_RESULT> | |
337 | <COMMAND_OUTPUT> | |
338 | Error: 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> | |
346 | ListWithNoKernelVerbose | |
347 | <COMMAND_INPUT> | |
348 | lttng -vvv list -k | |
349 | </COMMAND_INPUT> | |
350 | <COMMAND_RESULT> | |
351 | 1 | |
352 | </COMMAND_RESULT> | |
353 | <COMMAND_OUTPUT> | |
354 | DEBUG2: Session name: (null) [in cmd_list() at commands/list.c:618] | |
355 | DEBUG1: Getting kernel tracing events [in list_kernel_events() at commands/list.c:309] | |
356 | Error: Unable to list kernel events | |
357 | DEBUG1: 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> | |
365 | GetUstProvider1 | |
366 | <COMMAND_INPUT> | |
367 | lttng list -u | |
368 | </COMMAND_INPUT> | |
369 | <COMMAND_RESULT> | |
370 | 0 | |
371 | </COMMAND_RESULT> | |
372 | <COMMAND_OUTPUT> | |
373 | UST events: | |
374 | ------------- | |
375 | ||
376 | PID: 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 | ||
380 | PID: 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> | |
391 | GetUstProvider2 | |
392 | <COMMAND_INPUT> | |
393 | lttng list -u | |
394 | </COMMAND_INPUT> | |
395 | <COMMAND_RESULT> | |
396 | 0 | |
397 | </COMMAND_RESULT> | |
398 | <COMMAND_OUTPUT> | |
399 | UST events: | |
400 | ------------- | |
401 | None | |
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> | |
410 | ListWithNoUst1 | |
411 | <COMMAND_INPUT> | |
412 | lttng list -u | |
413 | </COMMAND_INPUT> | |
414 | <COMMAND_RESULT> | |
415 | 1 | |
416 | </COMMAND_RESULT> | |
417 | <COMMAND_OUTPUT> | |
418 | UST events: | |
419 | ------------- | |
420 | None | |
421 | Segmentation 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> | |
429 | ListWithNoUst2 | |
430 | <COMMAND_INPUT> | |
431 | lttng list -u -f | |
432 | </COMMAND_INPUT> | |
433 | <COMMAND_RESULT> | |
434 | 1 | |
435 | </COMMAND_RESULT> | |
436 | <COMMAND_OUTPUT> | |
437 | Spawning a session daemon | |
438 | Error: Unable to list UST events: Listing UST events failed | |
439 | Error: 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> | |
447 | ListWithNoUst3 | |
448 | <COMMAND_INPUT> | |
449 | lttng list -u -f | |
450 | </COMMAND_INPUT> | |
451 | <COMMAND_RESULT> | |
452 | 1 | |
453 | </COMMAND_RESULT> | |
454 | <COMMAND_OUTPUT> | |
455 | Error: Unable to list UST events: Listing UST events failed | |
456 | Error: 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> | |
464 | ListWithNoUstVerbose | |
465 | <COMMAND_INPUT> | |
466 | lttng -vvv list -u -f | |
467 | </COMMAND_INPUT> | |
468 | <COMMAND_RESULT> | |
469 | 1 | |
470 | </COMMAND_RESULT> | |
471 | <COMMAND_OUTPUT> | |
472 | DEBUG2: Session name: (null) [in cmd_list() at commands/list.c:618] | |
473 | DEBUG1: Getting kernel tracing events [in list_kernel_events() at commands/list.c:309] | |
474 | Spawning a session daemon | |
475 | Error: Unable to list UST events: Listing UST events failed | |
476 | Error: Command Error | |
477 | DEBUG1: 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> | |
486 | GetUstProvider3 | |
487 | <COMMAND_INPUT> | |
488 | lttng list -u -f | |
489 | </COMMAND_INPUT> | |
490 | <COMMAND_RESULT> | |
491 | 0 | |
492 | </COMMAND_RESULT> | |
493 | <COMMAND_OUTPUT> | |
494 | UST events: | |
495 | ------------- | |
496 | ||
497 | PID: 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 | ||
504 | PID: 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> | |
519 | CreateSession1 | |
520 | <COMMAND_INPUT> | |
521 | lttng create mysession2 | |
522 | </COMMAND_INPUT> | |
523 | <COMMAND_RESULT> | |
524 | 0 | |
525 | </COMMAND_RESULT> | |
526 | <COMMAND_OUTPUT> | |
527 | Session mysession2 created. | |
528 | Traces 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> | |
536 | CreateSessionWithPrompt | |
537 | <COMMAND_INPUT> | |
538 | lttng create mysession2 | |
539 | </COMMAND_INPUT> | |
540 | <COMMAND_RESULT> | |
541 | 0 | |
542 | </COMMAND_RESULT> | |
543 | <COMMAND_OUTPUT> | |
544 | Prompt> Session mysession2 created. | |
545 | Traces 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> | |
554 | CreateSessionVariants | |
555 | <COMMAND_INPUT> | |
556 | lttng create alreadyExist | |
557 | </COMMAND_INPUT> | |
558 | <COMMAND_RESULT> | |
559 | 1 | |
560 | </COMMAND_RESULT> | |
561 | <COMMAND_OUTPUT> | |
562 | Error: Session name already exist | |
563 | </COMMAND_OUTPUT> | |
564 | ||
565 | <COMMAND_INPUT> | |
566 | lttng create "session with spaces" | |
567 | </COMMAND_INPUT> | |
568 | <COMMAND_RESULT> | |
569 | 0 | |
570 | </COMMAND_RESULT> | |
571 | <COMMAND_OUTPUT> | |
572 | Session session with spaces created. | |
573 | Traces will be written in /home/user/lttng-traces/session with spaces-20120209-095418 | |
574 | </COMMAND_OUTPUT> | |
575 | ||
576 | <COMMAND_INPUT> | |
577 | lttng create wrongName | |
578 | </COMMAND_INPUT> | |
579 | <COMMAND_RESULT> | |
580 | 0 | |
581 | </COMMAND_RESULT> | |
582 | <COMMAND_OUTPUT> | |
583 | Session auto created. | |
584 | Traces will be written in /home/user/lttng-traces/auto-20120209-095418 | |
585 | </COMMAND_OUTPUT> | |
586 | ||
587 | <COMMAND_INPUT> | |
588 | lttng create wrongPath -o /home/user/hallo | |
589 | </COMMAND_INPUT> | |
590 | <COMMAND_RESULT> | |
591 | 0 | |
592 | </COMMAND_RESULT> | |
593 | <COMMAND_OUTPUT> | |
594 | Session wrongPath created. | |
595 | Traces will be written in /home/user/lttng-traces/wrongPath-20120209-095418 | |
596 | </COMMAND_OUTPUT> | |
597 | ||
598 | <COMMAND_INPUT> | |
599 | lttng create pathWithSpaces -o "/home/user/hallo user/here" | |
600 | </COMMAND_INPUT> | |
601 | <COMMAND_RESULT> | |
602 | 0 | |
603 | </COMMAND_RESULT> | |
604 | <COMMAND_OUTPUT> | |
605 | Session pathWithSpaces created. | |
606 | Traces 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> | |
615 | DestroySession1 | |
616 | <COMMAND_INPUT> | |
617 | lttng destroy mysession2 | |
618 | </COMMAND_INPUT> | |
619 | <COMMAND_RESULT> | |
620 | 0 | |
621 | </COMMAND_RESULT> | |
622 | <COMMAND_OUTPUT> | |
623 | Session mysession2 destroyed. | |
624 | </COMMAND_OUTPUT> | |
625 | </SCENARIO> | |
626 | ||
d128c979 BH |
627 | #################################################################### |
628 | # Scenario: Test "lttng -vvv destroy <session>" | |
629 | #################################################################### | |
630 | ||
631 | <SCENARIO> | |
632 | DestroySessionVerbose | |
633 | <COMMAND_INPUT> | |
634 | lttng -vvv destroy mysession2 | |
635 | </COMMAND_INPUT> | |
636 | <COMMAND_RESULT> | |
637 | 0 | |
638 | </COMMAND_RESULT> | |
639 | <COMMAND_OUTPUT> | |
640 | DEBUG2: Config file path found: /home/eedbhu [in get_session_name() at utils.c:98] | |
641 | DEBUG1: Session name found: mysession2 [in get_session_name() at utils.c:99] | |
642 | Session 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> | |
652 | ChannelHandling | |
653 | <COMMAND_INPUT> | |
654 | lttng enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100 | |
655 | </COMMAND_INPUT> | |
656 | <COMMAND_RESULT> | |
657 | 0 | |
658 | </COMMAND_RESULT> | |
659 | <COMMAND_OUTPUT> | |
660 | Kernel channel mychannel0 enabled for session mysession2 | |
661 | Kernel channel mychannel1 enabled for session mysession2 | |
662 | </COMMAND_OUTPUT> | |
663 | ||
664 | <COMMAND_INPUT> | |
665 | lttng enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 | |
666 | </COMMAND_INPUT> | |
667 | <COMMAND_RESULT> | |
668 | 0 | |
669 | </COMMAND_RESULT> | |
670 | <COMMAND_OUTPUT> | |
671 | UST channel channel0 enabled for session mysession2 | |
672 | </COMMAND_OUTPUT> | |
673 | ||
674 | <COMMAND_INPUT> | |
675 | lttng enable-channel mychannel0,mychannel1 -k -s mysession2 | |
676 | </COMMAND_INPUT> | |
677 | <COMMAND_RESULT> | |
678 | 0 | |
679 | </COMMAND_RESULT> | |
680 | <COMMAND_OUTPUT> | |
681 | Kernel channel mychannel0 enabled for session mysession2 | |
682 | Kernel channel mychannel1 enabled for session mysession2 | |
683 | </COMMAND_OUTPUT> | |
684 | ||
685 | <COMMAND_INPUT> | |
686 | lttng enable-channel ustChannel -u -s mysession2 | |
687 | </COMMAND_INPUT> | |
688 | <COMMAND_RESULT> | |
689 | 0 | |
690 | </COMMAND_RESULT> | |
691 | <COMMAND_OUTPUT> | |
692 | UST channel mychannel0 enabled for session mysession2 | |
693 | </COMMAND_OUTPUT> | |
694 | ||
695 | <COMMAND_INPUT> | |
696 | lttng disable-channel mychannel0,mychannel1 -k -s mysession2 | |
697 | </COMMAND_INPUT> | |
698 | <COMMAND_RESULT> | |
699 | 0 | |
700 | </COMMAND_RESULT> | |
701 | <COMMAND_OUTPUT> | |
702 | Kernel channel mychannel0 disabled for session mysession2 | |
703 | Kernel channel mychannel1 disabled for session mysession2 | |
704 | </COMMAND_OUTPUT> | |
705 | ||
706 | <COMMAND_INPUT> | |
707 | lttng disable-channel ustChannel -u -s mysession2 | |
708 | </COMMAND_INPUT> | |
709 | <COMMAND_RESULT> | |
710 | 0 | |
711 | </COMMAND_RESULT> | |
712 | <COMMAND_OUTPUT> | |
713 | UST channel mychannel0 enabled for session mysession2 | |
714 | </COMMAND_OUTPUT> | |
715 | </SCENARIO> | |
716 | ||
717 | ||
718 | #################################################################### | |
719 | # Scenario: Test "lttng enable-events ..." with different inputs | |
720 | #################################################################### | |
721 | <SCENARIO> | |
722 | EventHandling | |
723 | ||
724 | # Tracepoint test cases | |
725 | ||
726 | <COMMAND_INPUT> | |
727 | lttng enable-event block_rq_remap,block_bio_remap,softirq_entry -k -s mysession2 --tracepoint | |
728 | </COMMAND_INPUT> | |
729 | <COMMAND_RESULT> | |
730 | 0 | |
731 | </COMMAND_RESULT> | |
732 | <COMMAND_OUTPUT> | |
733 | kernel event block_rq_remap created in channel channel0 | |
734 | kernel event block_bio_remap created in channel channel0 | |
735 | kernel event softirq_entry created in channel channel0 | |
736 | </COMMAND_OUTPUT> | |
737 | ||
738 | <COMMAND_INPUT> | |
739 | lttng enable-event -a -k -s mysession2 -c mychannel --tracepoint | |
740 | </COMMAND_INPUT> | |
741 | <COMMAND_RESULT> | |
742 | 0 | |
743 | </COMMAND_RESULT> | |
744 | <COMMAND_OUTPUT> | |
745 | All kernel tracepoints are enabled in channel channel0 | |
746 | </COMMAND_OUTPUT> | |
747 | ||
748 | <COMMAND_INPUT> | |
749 | lttng enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint | |
750 | </COMMAND_INPUT> | |
751 | <COMMAND_RESULT> | |
752 | 0 | |
753 | </COMMAND_RESULT> | |
d4514365 BH |
754 | <COMMAND_OUTPUT> |
755 | UST event ust_tests_hello:tptest_sighandler created in channel mychannel | |
756 | </COMMAND_OUTPUT> | |
757 | ||
758 | <COMMAND_INPUT> | |
759 | lttng enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint --filter 'intfield==10' | |
760 | </COMMAND_INPUT> | |
761 | <COMMAND_RESULT> | |
762 | 0 | |
763 | </COMMAND_RESULT> | |
d132bcc7 BH |
764 | <COMMAND_OUTPUT> |
765 | UST event ust_tests_hello:tptest_sighandler created in channel mychannel | |
766 | </COMMAND_OUTPUT> | |
767 | ||
768 | <COMMAND_INPUT> | |
769 | lttng enable-event -a -u -s mysession2 -c mychannel --tracepoint | |
770 | </COMMAND_INPUT> | |
771 | <COMMAND_RESULT> | |
772 | 0 | |
773 | </COMMAND_RESULT> | |
774 | <COMMAND_OUTPUT> | |
775 | All UST tracepoints are enabled in channel mychannel | |
776 | </COMMAND_OUTPUT> | |
777 | ||
778 | # Syscall test cases | |
779 | ||
780 | <COMMAND_INPUT> | |
781 | lttng enable-event -a -k -s mysession2 --syscall | |
782 | </COMMAND_INPUT> | |
783 | <COMMAND_RESULT> | |
784 | 0 | |
785 | </COMMAND_RESULT> | |
786 | <COMMAND_OUTPUT> | |
787 | All kernel system calls are enabled in channel channel0 | |
788 | </COMMAND_OUTPUT> | |
789 | ||
790 | <COMMAND_INPUT> | |
791 | lttng enable-event -a -k -s mysession2 -c mychannel --syscall | |
792 | </COMMAND_INPUT> | |
793 | <COMMAND_RESULT> | |
794 | 0 | |
795 | </COMMAND_RESULT> | |
796 | <COMMAND_OUTPUT> | |
797 | All kernel system calls are enabled in channel mychannel | |
798 | </COMMAND_OUTPUT> | |
799 | ||
800 | # dynamic probe/function probe test cases | |
801 | ||
802 | <COMMAND_INPUT> | |
803 | lttng enable-event myevent0 -k -s mysession2 --function 0xc0101340 | |
804 | </COMMAND_INPUT> | |
805 | <COMMAND_RESULT> | |
806 | 0 | |
807 | </COMMAND_RESULT> | |
808 | <COMMAND_OUTPUT> | |
809 | kernel event myevent0 created in channel mychannel | |
810 | </COMMAND_OUTPUT> | |
811 | ||
812 | <COMMAND_INPUT> | |
813 | lttng enable-event myevent1 -k -s mysession2 -c mychannel --probe init_post | |
814 | </COMMAND_INPUT> | |
815 | <COMMAND_RESULT> | |
816 | 0 | |
817 | </COMMAND_RESULT> | |
818 | <COMMAND_OUTPUT> | |
819 | kernel event myevent1 created in channel mychannel | |
820 | </COMMAND_OUTPUT> | |
821 | ||
822 | # log level test cases | |
823 | ||
824 | <COMMAND_INPUT> | |
825 | lttng enable-event myevent4 -u -s mysession2 --loglevel-only TRACE_DEBUG | |
826 | </COMMAND_INPUT> | |
827 | <COMMAND_RESULT> | |
828 | 0 | |
829 | </COMMAND_RESULT> | |
830 | <COMMAND_OUTPUT> | |
831 | UST event myevent4 created in channel channel0 | |
832 | </COMMAND_OUTPUT> | |
833 | ||
834 | <COMMAND_INPUT> | |
835 | lttng enable-event myevent5 -u -s mysession2 -c mychannel --loglevel TRACE_DEBUG_FUNCTION | |
836 | </COMMAND_INPUT> | |
837 | <COMMAND_RESULT> | |
838 | 0 | |
839 | </COMMAND_RESULT> | |
840 | <COMMAND_OUTPUT> | |
841 | UST event myevent5 created in channel mychannel | |
842 | </COMMAND_OUTPUT> | |
843 | ||
844 | </SCENARIO> | |
845 | ||
4ea599a5 BH |
846 | #################################################################### |
847 | # Scenario: Test "lttng add-context -h" and lttng add-context ..." with different inputs | |
848 | #################################################################### | |
849 | ||
850 | <SCENARIO> | |
851 | ContextHandling | |
852 | ||
853 | <COMMAND_INPUT> | |
854 | lttng add-context -h | |
855 | </COMMAND_INPUT> | |
856 | <COMMAND_RESULT> | |
857 | 0 | |
858 | </COMMAND_RESULT> | |
859 | <COMMAND_OUTPUT> | |
860 | usage: lttng add-context -t TYPE | |
861 | ||
862 | If no channel and no event is given (-c/-e), the context | |
863 | will be added to all events and all channels. | |
864 | Otherwise the context will be added only to the channel (-c) | |
865 | and/or event (-e) indicated. | |
866 | Exactly one domain (-k/--kernel or -u/--userspace) must be specified. | |
867 | ||
868 | Options: | |
869 | -h, --help Show this help | |
870 | --list-options Simple listing of options | |
871 | -s, --session NAME Apply to session name | |
872 | -c, --channel NAME Apply to channel | |
873 | -e, --event NAME Apply to event | |
874 | -k, --kernel Apply to the kernel tracer | |
875 | -u, --userspace Apply to the user-space tracer | |
876 | -t, --type TYPE Context type. You can repeat that option on | |
877 | the command line to specify multiple contexts at once. | |
878 | (--kernel preempts --userspace) | |
879 | TYPE can be one of the strings below: | |
880 | pid, procname, prio, nice, vpid, tid, pthread_id, | |
881 | vtid, ppid, vppid, perf:cpu-cycles, perf:cycles | |
882 | Example: | |
883 | This command will add the context information 'prio' and two perf | |
884 | counters (hardware branch misses and cache misses), to all events | |
885 | in the trace data output: | |
886 | # lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses | |
887 | ||
888 | </COMMAND_OUTPUT> | |
889 | ||
890 | <COMMAND_INPUT> | |
891 | lttng add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid | |
892 | </COMMAND_INPUT> | |
893 | <COMMAND_RESULT> | |
894 | 0 | |
895 | </COMMAND_RESULT> | |
896 | <COMMAND_OUTPUT> | |
897 | UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel | |
898 | UST context pid added to event sched_kthread_stop_ret channel mychannel | |
899 | </COMMAND_OUTPUT> | |
900 | </SCENARIO> | |
901 | ||
902 | <SCENARIO> | |
903 | ContextErrorHandling | |
904 | ||
905 | <COMMAND_INPUT> | |
906 | lttng add-context -h | |
907 | </COMMAND_INPUT> | |
908 | <COMMAND_RESULT> | |
909 | 1 | |
910 | </COMMAND_RESULT> | |
911 | <COMMAND_OUTPUT> | |
912 | usage: lttng add-context -t TYPE | |
d132bcc7 | 913 | |
4ea599a5 BH |
914 | If no channel and no event is given (-c/-e), the context |
915 | will be added to all events and all channels. | |
916 | Otherwise the context will be added only to the channel (-c) | |
917 | and/or event (-e) indicated. | |
918 | Exactly one domain (-k/--kernel or -u/--userspace) must be specified. | |
919 | ||
920 | Options: | |
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 | |
934 | Example: | |
935 | This command will add the context information 'prio' and two perf | |
936 | counters (hardware branch misses and cache misses), to all events | |
937 | in 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> | |
943 | lttng add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid | |
944 | </COMMAND_INPUT> | |
945 | <COMMAND_RESULT> | |
946 | 1 | |
947 | </COMMAND_RESULT> | |
948 | <COMMAND_OUTPUT> | |
949 | UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel | |
950 | UST context pid added to event sched_kthread_stop_ret channel mychannel | |
951 | </COMMAND_OUTPUT> | |
952 | ||
953 | </SCENARIO> | |
954 | ||
955 | <SCENARIO> | |
956 | CalibrateHandling | |
957 | <COMMAND_INPUT> | |
958 | lttng calibrate -k --function | |
959 | </COMMAND_INPUT> | |
960 | <COMMAND_RESULT> | |
961 | 0 | |
962 | </COMMAND_RESULT> | |
963 | <COMMAND_OUTPUT> | |
964 | Kernel calibration done | |
965 | </COMMAND_OUTPUT> | |
966 | ||
967 | <COMMAND_INPUT> | |
968 | lttng calibrate -u --function | |
969 | </COMMAND_INPUT> | |
970 | <COMMAND_RESULT> | |
971 | 1 | |
972 | </COMMAND_RESULT> | |
973 | <COMMAND_OUTPUT> | |
974 | Kernel calibration done | |
975 | </COMMAND_OUTPUT> | |
976 | ||
977 | </SCENARIO> | |
f3b33d40 BH |
978 | |
979 | #################################################################### | |
980 | # Scenario: Test "lttng create <session> with LTTng 2.1 options | |
981 | #################################################################### | |
982 | <SCENARIO> | |
983 | CreateSessionLttng2.1 | |
f3b33d40 BH |
984 | |
985 | <COMMAND_INPUT> | |
a30e79fe | 986 | lttng create mysession -U net://172.0.0.1 |
f3b33d40 BH |
987 | </COMMAND_INPUT> |
988 | <COMMAND_RESULT> | |
989 | 0 | |
990 | </COMMAND_RESULT> | |
991 | <COMMAND_OUTPUT> | |
992 | Session mysession created. | |
993 | Traces will be written in net://172.0.0.1 | |
994 | </COMMAND_OUTPUT> | |
995 | ||
996 | <COMMAND_INPUT> | |
997 | lttng create mysession -U file:///tmp | |
998 | </COMMAND_INPUT> | |
999 | <COMMAND_RESULT> | |
1000 | 0 | |
1001 | </COMMAND_RESULT> | |
1002 | <COMMAND_OUTPUT> | |
1003 | Session mysession created. | |
1004 | Traces will be written in file:///tmp | |
1005 | </COMMAND_OUTPUT> | |
1006 | ||
1007 | <COMMAND_INPUT> | |
1008 | lttng create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343 | |
1009 | </COMMAND_INPUT> | |
1010 | <COMMAND_RESULT> | |
1011 | 0 | |
1012 | </COMMAND_RESULT> | |
1013 | <COMMAND_OUTPUT> | |
1014 | Session mysession created. | |
1015 | Control URL tcp://172.0.0.1 set for session mysession | |
1016 | Data URL tcp://172.0.0.1:5343 set for session mysession | |
1017 | </COMMAND_OUTPUT> | |
1018 | ||
1019 | <COMMAND_INPUT> | |
1020 | lttng create mysession -U net://172.0.0.1:1234:2345 | |
1021 | </COMMAND_INPUT> | |
1022 | <COMMAND_RESULT> | |
1023 | 0 | |
1024 | </COMMAND_RESULT> | |
1025 | <COMMAND_OUTPUT> | |
1026 | Session mysession created. | |
1027 | Traces will be written in net://172.0.0.1:1234:2345 | |
1028 | </COMMAND_OUTPUT> | |
1029 | ||
a30e79fe BH |
1030 | <COMMAND_INPUT> |
1031 | lttng destroy mysession | |
1032 | </COMMAND_INPUT> | |
1033 | <COMMAND_RESULT> | |
1034 | 0 | |
1035 | </COMMAND_RESULT> | |
1036 | <COMMAND_OUTPUT> | |
1037 | Session mysession destroyed. | |
1038 | </COMMAND_OUTPUT> | |
1039 | ||
d128c979 BH |
1040 | <COMMAND_INPUT> |
1041 | lttng -vvv create mysession -U net://172.0.0.1 | |
1042 | </COMMAND_INPUT> | |
1043 | <COMMAND_RESULT> | |
1044 | 0 | |
1045 | </COMMAND_RESULT> | |
1046 | <COMMAND_OUTPUT> | |
1047 | DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253] | |
1048 | DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132] | |
1049 | DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467] | |
1050 | DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261] | |
1051 | Session mysession created. | |
1052 | Traces will be written in net://172.0.0.1 | |
1053 | DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294] | |
1054 | </COMMAND_OUTPUT> | |
1055 | ||
f3b33d40 | 1056 | </SCENARIO> |
d128c979 BH |
1057 | |
1058 | #################################################################### | |
1059 | # Scenario: Test "lttng -vvv create <session> with LTTng 2.1 options" | |
1060 | #################################################################### | |
1061 | <SCENARIO> | |
1062 | CreateSessionLttngVerbose2.1 | |
1063 | <COMMAND_INPUT> | |
1064 | lttng -vvv create mysession -U net://172.0.0.1 | |
1065 | </COMMAND_INPUT> | |
1066 | <COMMAND_RESULT> | |
1067 | 0 | |
1068 | </COMMAND_RESULT> | |
1069 | <COMMAND_OUTPUT> | |
1070 | DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253] | |
1071 | DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132] | |
1072 | DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467] | |
1073 | DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261] | |
1074 | Session mysession created. | |
1075 | Traces will be written in net://172.0.0.1 | |
1076 | DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294] | |
1077 | </COMMAND_OUTPUT> | |
1078 | ||
1079 | <COMMAND_INPUT> | |
1080 | lttng -vvv destroy mysession | |
1081 | </COMMAND_INPUT> | |
1082 | <COMMAND_RESULT> | |
1083 | 0 | |
1084 | </COMMAND_RESULT> | |
1085 | <COMMAND_OUTPUT> | |
1086 | Session mysession destroyed. | |
1087 | </COMMAND_OUTPUT> | |
1088 | ||
1089 | </SCENARIO> |