X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Fsnapshots%2Ftest_ust_streaming;h=2b20ccaf0357ef68c43414aac589b4689d512d72;hb=bd6661538d573c0798439f2933474f677a857728;hp=eecd0253bd6fe56cfa16ef3c65eaa193f05331de;hpb=b178f53e90c376dd44b020535c32649edef8f80e;p=lttng-tools.git diff --git a/tests/regression/tools/snapshots/test_ust_streaming b/tests/regression/tools/snapshots/test_ust_streaming index eecd0253b..2b20ccaf0 100755 --- a/tests/regression/tools/snapshots/test_ust_streaming +++ b/tests/regression/tools/snapshots/test_ust_streaming @@ -2,18 +2,8 @@ # # Copyright (C) - 2013 David Goulet # -# This library is free software; you can redistribute it and/or modify it under -# the terms of the GNU Lesser General Public License as published by the Free -# Software Foundation; version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more -# details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this library; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# SPDX-License-Identifier: LGPL-2.1-only + TEST_DESC="Streaming - Snapshot UST tracing" CURDIR=$(dirname $0)/ @@ -31,7 +21,7 @@ APPS_PID= TRACE_PATH=$(mktemp -d) -NUM_TESTS=75 +NUM_TESTS=85 source $TESTDIR/utils/utils.sh @@ -60,7 +50,7 @@ function start_test_app() local tmp_file=$(mktemp -u) # Start application with a temporary file. - $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT $tmp_file & + $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT --sync-after-first-event $tmp_file & ret=$? APPS_PID="${APPS_PID} ${!}" ok $ret "Start application to trace" @@ -99,6 +89,7 @@ function test_ust_default_name_with_del() lttng_snapshot_record $SESSION_NAME # Validate test + validate_trace_path_ust_uid_snapshot_network "$TRACE_PATH" "$SESSION_NAME" "snapshot-1" 0 validate_trace $EVENT_NAME $TRACE_PATH/$HOSTNAME/$SESSION_NAME*/snapshot-1* if [ $? -ne 0 ]; then stop_test_apps @@ -110,6 +101,7 @@ function test_ust_default_name_with_del() lttng_snapshot_record $SESSION_NAME # Validate test with the next ID since a del output was done prior. + validate_trace_path_ust_uid_snapshot_network "$TRACE_PATH" "$SESSION_NAME" "snapshot-2" 1 validate_trace $EVENT_NAME $TRACE_PATH/$HOSTNAME/$SESSION_NAME*/snapshot-2* if [ $? -ne 0 ]; then stop_test_apps @@ -140,6 +132,7 @@ function test_ust_default_name() stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session_ok $SESSION_NAME # Validate test + validate_trace_path_ust_uid_snapshot_network "$TRACE_PATH" "$SESSION_NAME" "snapshot-1" 0 validate_trace $EVENT_NAME $TRACE_PATH/$HOSTNAME/$SESSION_NAME*/snapshot-1* out=$? @@ -163,6 +156,7 @@ function test_ust_default_name_custom_uri() stop_lttng_tracing_ok $SESSION_NAME destroy_lttng_session_ok $SESSION_NAME # Validate test + validate_trace_path_ust_uid_snapshot_network "$TRACE_PATH" "$SESSION_NAME" "snapshot-1" 0 validate_trace $EVENT_NAME $TRACE_PATH/$HOSTNAME/$SESSION_NAME*/snapshot-1* out=$? @@ -193,6 +187,7 @@ function test_ust_custom_name() if ls $TRACE_PATH/$HOSTNAME/$SESSION_NAME*/$name* &> /dev/null; then ok 0 "Custom name snapshot exists" # Validate test + validate_trace_path_ust_uid_snapshot_network "$TRACE_PATH" "$SESSION_NAME" "$name" 0 validate_trace $EVENT_NAME $TRACE_PATH/$HOSTNAME/$SESSION_NAME*/$name-* out=$? else @@ -211,13 +206,14 @@ function test_ust_n_snapshot() create_lttng_session_no_output $SESSION_NAME enable_lttng_mmap_overwrite_ust_channel $SESSION_NAME $CHANNEL_NAME enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHANNEL_NAME - snapshot_add_output $SESSION_NAME "net://localhost" $name + snapshot_add_output $SESSION_NAME "net://localhost" start_test_app - for i in {1..5}; + for i in {0..4}; do start_lttng_tracing_ok $SESSION_NAME lttng_snapshot_record $SESSION_NAME stop_lttng_tracing_ok $SESSION_NAME + validate_trace_path_ust_uid_snapshot_network "$TRACE_PATH" "$SESSION_NAME" "snapshot-1" $i validate_trace $EVENT_NAME $TRACE_PATH/$HOSTNAME/$SESSION_NAME*/snapshot-1* if [ $? -ne 0 ]; then return 1