~lttng/lttng-tools/trunk

« back to all changes in this revision

Viewing changes to tests/regression/tools/snapshots/test_ust_streaming

  • Committer: David Goulet
  • Author(s): Christian Babeux
  • Date: 2013-09-17 18:08:39 UTC
  • Revision ID: git-v1:847b88a94cf5af8246eced35e944dc82ae7a0382
Tests: Add UST snapshots streaming test with custom URI

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
TRACE_PATH=$(mktemp -d)
33
33
 
34
 
NUM_TESTS=39
 
34
NUM_TESTS=49
35
35
 
36
36
source $TESTDIR/utils/utils.sh
37
37
 
119
119
        return $out
120
120
}
121
121
 
 
122
function test_ust_default_name_custom_uri()
 
123
{
 
124
        diag "Test UST snapshot streaming with default name with custom URL"
 
125
        create_lttng_session_no_output $SESSION_NAME
 
126
        enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME
 
127
        enable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
 
128
        start_lttng_tracing $SESSION_NAME
 
129
        $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT &
 
130
        ok $? "Start application to trace"
 
131
        snapshot_add_output $SESSION_NAME "-C tcp://localhost:5342 -D tcp://localhost:5343"
 
132
        lttng_snapshot_record $SESSION_NAME
 
133
        stop_lttng_tracing $SESSION_NAME
 
134
        destroy_lttng_session $SESSION_NAME
 
135
        # Validate test
 
136
        validate_trace $EVENT_NAME $TRACE_PATH/$HOSTNAME/snapshot-1*
 
137
        out=$?
 
138
 
 
139
        diag "Killing $TESTAPP_NAME"
 
140
        PID_APP=`pidof $TESTAPP_NAME`
 
141
        kill $PID_APP >/dev/null 2>&1
 
142
 
 
143
        return $out
 
144
}
 
145
 
122
146
# Test a snapshot using a custom name for the output destination.
123
147
function test_ust_custom_name()
124
148
{
167
191
start_lttng_relayd "-o $TRACE_PATH"
168
192
start_lttng_sessiond
169
193
 
170
 
tests=( test_ust_default_name_with_del test_ust_default_name test_ust_custom_name )
 
194
tests=( test_ust_default_name_with_del test_ust_default_name test_ust_custom_name test_ust_default_name_custom_uri )
171
195
 
172
196
for fct_test in ${tests[@]};
173
197
do