Commit | Line | Data |
---|---|---|
3de31d0b CB |
1 | #!/bin/bash |
2 | # | |
3 | # Copyright (C) - 2013 Christian Babeux <christian.babeux@efficios.com> | |
4 | # | |
5 | # This program is free software; you can redistribute it and/or modify it | |
6 | # under the terms of the GNU General Public License, version 2 only, as | |
7 | # published by the Free Software Foundation. | |
8 | # | |
9 | # This program is distributed in the hope that it will be useful, but WITHOUT | |
10 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
12 | # more details. | |
13 | # | |
14 | # You should have received a copy of the GNU General Public License along with | |
15 | # this program; if not, write to the Free Software Foundation, Inc., 51 | |
16 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
17 | ||
18 | TEST_DESC="UST tracer - Event wildcard" | |
19 | ||
20 | CURDIR=$(dirname $0)/ | |
21 | TESTDIR=$CURDIR/../.. | |
22 | LTTNG_BIN="lttng" | |
23 | BIN_NAME="gen-ust-events" | |
24 | SESSION_NAME="valid_filter" | |
25 | EVENT_NAME="tp:tptest" | |
26 | NUM_TESTS=9 | |
27 | ||
28 | source $TESTDIR/utils/utils.sh | |
29 | ||
30 | print_test_banner "$TEST_DESC" | |
31 | ||
32 | function test_event_wildcard() | |
33 | { | |
34 | TRACE_PATH=$(mktemp -d) | |
35 | SESSION_NAME="ust_event_basic" | |
36 | SESSION_NAME2="ust_event_basic2" | |
37 | CHAN_NAME="mychan" | |
38 | CHAN_NAME2="mychan2" | |
39 | EVENT_NAME="*" | |
40 | EVENT_NAME2="abc*" | |
41 | ||
42 | create_lttng_session $SESSION_NAME $TRACE_PATH | |
43 | ||
44 | enable_ust_lttng_event $SESSION_NAME "$EVENT_NAME" | |
45 | enable_ust_lttng_event $SESSION_NAME "$EVENT_NAME2" | |
46 | ||
47 | start_lttng_tracing | |
48 | stop_lttng_tracing | |
49 | ||
50 | TODO="Validate trace output is coherent" | |
51 | ok 0 "Validate trace" | |
52 | unset TODO | |
53 | ||
54 | destroy_lttng_session $SESSION_NAME | |
55 | ||
56 | rm -rf $TRACE_PATH | |
57 | } | |
58 | ||
59 | # MUST set TESTDIR before calling those functions | |
60 | plan_tests $NUM_TESTS | |
61 | ||
62 | start_lttng_sessiond | |
63 | ||
64 | test_event_wildcard | |
65 | ||
66 | stop_lttng_sessiond |