From bd2d5dd19e3017f119491213003ef069b8008b24 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Mon, 11 Mar 2013 13:19:28 -0400 Subject: [PATCH] Fix: remove uri switch test from cbab merge commit Also add a file to .gitignore. Signed-off-by: David Goulet --- .gitignore | 2 +- tests/regression/tools/run.sh | 1 - tests/regression/tools/streaming/Makefile.am | 4 +- .../tools/streaming/test_uri_switch | 215 ------------------ 4 files changed, 3 insertions(+), 219 deletions(-) delete mode 100755 tests/regression/tools/streaming/test_uri_switch diff --git a/.gitignore b/.gitignore index 5dc73aec9..ac72bf4fe 100644 --- a/.gitignore +++ b/.gitignore @@ -64,6 +64,6 @@ gen-events gen-ust-events unit_tests health_check -tests/ust/overlap/demo/demo +tests/regression/ust/overlap/demo/demo benchmark/ diff --git a/tests/regression/tools/run.sh b/tests/regression/tools/run.sh index 63154ac26..4f7d2c9f7 100755 --- a/tests/regression/tools/run.sh +++ b/tests/regression/tools/run.sh @@ -31,7 +31,6 @@ tests=( $DIR/filtering/test_invalid_filter $DIR/health/test_tp_fail $DIR/streaming/test_kernel $DIR/streaming/test_ust - $DIR/streaming/test_uri_switch $DIR/streaming/test_high_throughput_limits ) #### END TESTS HERE #### diff --git a/tests/regression/tools/streaming/Makefile.am b/tests/regression/tools/streaming/Makefile.am index 2dbb4d5ab..e42435011 100644 --- a/tests/regression/tools/streaming/Makefile.am +++ b/tests/regression/tools/streaming/Makefile.am @@ -14,5 +14,5 @@ gen_ust_events_SOURCES = gen-ust-events.c tp.c tp.h gen_ust_events_LDADD = -llttng-ust endif -noinst_SCRIPTS = test_ust test_kernel test_uri_switch test_high_throughput_limits -EXTRA_DIST = test_ust test_kernel test_uri_switch test_high_throughput_limits +noinst_SCRIPTS = test_ust test_kernel test_high_throughput_limits +EXTRA_DIST = test_ust test_kernel test_high_throughput_limits diff --git a/tests/regression/tools/streaming/test_uri_switch b/tests/regression/tools/streaming/test_uri_switch deleted file mode 100755 index c340bd597..000000000 --- a/tests/regression/tools/streaming/test_uri_switch +++ /dev/null @@ -1,215 +0,0 @@ -#!/bin/bash -# -# Copyright (C) - 2012 Christian Babeux -# 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 -TEST_DESC="Streaming - URI switching" - -CURDIR=$(dirname $0)/ -TESTDIR=$CURDIR/../../.. -BIN_NAME="gen-ust-events" -SESSION_NAME="stream" -EVENT_NAME="tp:tptest" -PID_RELAYD=0 - -TRACE_PATH=$(mktemp -d) - -NUM_TESTS=186 - -source $TESTDIR/utils/utils.sh - -print_test_banner "$TEST_DESC" - -if [ ! -x "$CURDIR/$BIN_NAME" ]; then - BAIL_OUT "No UST nevents binary detected. Skipping." -fi - -function lttng_create_session -{ - URI=$1 - # Create session with custom URI - $TESTDIR/../src/bin/lttng/$LTTNG_BIN create -U $URI $SESSION_NAME >/dev/null 2>&1 - ok $? "Create session with uri $URI" -} - -function lttng_enable_consumer -{ - URI=$1 - # Create session with custom URI - $TESTDIR/../src/bin/lttng/$LTTNG_BIN enable-consumer -u $URI >/dev/null 2>&1 - ok $? "Enable consumer with uri $URI" -} - -function run_apps -{ - # Run 5 times with a 1 second delay - COUNT=5 - APP_DELAY=1000000 - ./$CURDIR/$BIN_NAME $COUNT $APP_DELAY >/dev/null 2>&1 & -} - -function wait_apps -{ - while [ -n "$(pidof $BIN_NAME)" ]; do - sleep 0.5 - done - pass "Wait for applications to end" -} - -function test_uri_switch_localhost_folder -{ - IPVER=$1 - - diag "Test switch of localhost folder ($IPVER)" - - if [ "$IPVER" == "IPv6" ]; then - BASE_URI="net6://localhost" - else - BASE_URI="net://localhost" - fi - - RANDCOUNT=10 - RAND="" - i=1 - - lttng_create_session $BASE_URI - - while [ "$i" -le $RANDCOUNT ] - do - RAND=$(randstring 16 0) - lttng_enable_consumer "$BASE_URI/$RAND" - let "i += 1" - done - - pass "Randomize output folder on $BASE_URI" - - enable_ust_lttng_event $SESSION_NAME $EVENT_NAME - start_lttng_tracing $SESSION_NAME - run_apps - wait_apps - stop_lttng_tracing $SESSION_NAME - destroy_lttng_session $SESSION_NAME - validate_trace $EVENT_NAME $TRACE_PATH/$HOSTNAME/$RAND - - if [ $? -eq 0 ]; then - # Only delete if successful - rm -rf $TRACE_PATH - fi -} - -function test_uri_switch_file_network -{ - IPVER=$1 - - diag "Test switch file -> network ($IPVER)" - - TMP_PATH=$(mktemp -d) - FILE_URI="file://$TMP_PATH" - - if [ "$IPVER" == "IPv6" ]; then - NETWORK_URIS=("net6://localhost" "net6://[::1]") - else - NETWORK_URIS=("net://localhost" "net://127.0.0.1") - fi - - NET_PATHS=("foo/bar" "OohEehOohAhAahTingTangWallaWallaBingBang" ".") - - for NETWORK_URI in ${NETWORK_URIS[@]}; - do - for NET_PATH in ${NET_PATHS[@]}; - do - SESSION_NAME=$(randstring 16 0) - diag "$FILE_URI -> $NETWORK_URI/$NET_PATH" - - lttng_create_session $FILE_URI - lttng_enable_consumer "$NETWORK_URI/$NET_PATH" - enable_ust_lttng_event $SESSION_NAME $EVENT_NAME - start_lttng_tracing $SESSION_NAME - run_apps - wait_apps - stop_lttng_tracing $SESSION_NAME - destroy_lttng_session $SESSION_NAME - validate_trace $EVENT_NAME $TRACE_PATH/$HOSTNAME/$NET_PATH - - if [ $? -eq 0 ]; then - # Only delete if successful - rm -rf $TRACE_PATH - else - break - fi - done - done - rm -rf $TMP_PATH -} - -function test_uri_switch_network_file -{ - IPVER=$1 - diag "Test switch network ($IPVER) -> file" - - if [ "$IPVER" == "IPv6" ]; then - NETWORK_URI="net6://localhost" - else - NETWORK_URI="net://localhost" - fi - - FILE_PATHS=("." "foo/bar" "42") - - for FILE_PATH in ${FILE_PATHS[@]}; - do - TMP_PATH=$(mktemp -d) - FILE_URI="file://$TMP_PATH" - SESSION_NAME=$(randstring 16 0) - - diag "$NETWORK_URI -> $FILE_URI/$FILE_PATH" - - lttng_create_session $NETWORK_URI - lttng_enable_consumer "$FILE_URI/$FILE_PATH" - enable_ust_lttng_event $SESSION_NAME $EVENT_NAME - start_lttng_tracing $SESSION_NAME - run_apps - wait_apps - stop_lttng_tracing $SESSION_NAME - destroy_lttng_session $SESSION_NAME - validate_trace $EVENT_NAME $TMP_PATH/$FILE_PATH - - if [ $? -eq 0 ]; then - # Only delete if successful - rm -rf $TMP_PATH - else - break - fi - done -} - -plan_tests $NUM_TESTS - -start_lttng_sessiond - -diag "Test with IPv4" -start_lttng_relayd "-o $TRACE_PATH" -test_uri_switch_localhost_folder "IPv4" -test_uri_switch_file_network "IPv4" -test_uri_switch_network_file "IPv4" -stop_lttng_relayd - -diag "Test with IPv6" -start_lttng_relayd "-o $TRACE_PATH -C tcp6://localhost:5342 -D tcp6://localhost:5343" -test_uri_switch_localhost_folder "IPv6" -test_uri_switch_file_network "IPv6" -test_uri_switch_network_file "IPv6" -stop_lttng_relayd - -stop_lttng_sessiond -- 2.34.1