X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;ds=sidebyside;f=tests%2Fregression%2Ftools%2Fstreaming%2Ftest_high_throughput_limits;h=359cc101a5dcf3036101ee72d6c8850a796c43a1;hb=b7a2f86d3d9b2554f80dcf684d9bd90bbf7a3213;hp=1bcf35328691e7807a51523374bab2a097f40b9d;hpb=3be453c9ec6469235f0dc6cdaec9d55f0a6ee517;p=lttng-tools.git diff --git a/tests/regression/tools/streaming/test_high_throughput_limits b/tests/regression/tools/streaming/test_high_throughput_limits index 1bcf35328..359cc101a 100755 --- a/tests/regression/tools/streaming/test_high_throughput_limits +++ b/tests/regression/tools/streaming/test_high_throughput_limits @@ -1,20 +1,9 @@ #!/bin/bash # -# Copyright (C) - 2012 Christian Babeux -# David Goulet +# Copyright (C) 2012 Christian Babeux +# Copyright (C) 2012 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 - High throughput with bandwidth limits" @@ -31,7 +20,7 @@ SESSIOND_CTRL_PORT=5342 SESSIOND_DATA_PORT=5343 DEFAULT_IF="lo" -TRACE_PATH=$(mktemp -d) +TRACE_PATH=$(mktemp -d -t tmp.test_streaming_high_throughput_limits_trace_path.XXXXXX) NUM_TESTS=104 @@ -116,7 +105,7 @@ function run_apps # due to very slow communication between the consumer and relayd making # the status reply from the consumer quite slow thus delaying the # registration done message. - LTTNG_UST_REGISTER_TIMEOUT=-1 $TESTAPP_BIN $NR_ITER & >/dev/null 2>&1 + LTTNG_UST_REGISTER_TIMEOUT=-1 $TESTAPP_BIN -i $NR_ITER & >/dev/null 2>&1 done } @@ -137,12 +126,11 @@ function test_high_throughput function validate_event_count { + TEMP_FILE=$(mktemp -t tmp.streaming_high_throughput_limit_file1.XXXXXX) + TEMP_FILE_2=$(mktemp -t tmp.streaming_high_throughput_limit_file2.XXXXXX) - TEMP_FILE=$(mktemp) - TEMP_FILE_2=$(mktemp) - - traced=$(babeltrace $TRACE_PATH 2>/dev/null | wc -l) - babeltrace $TRACE_PATH >/dev/null 2>$TEMP_FILE_2 + traced=$("$BABELTRACE_BIN" $TRACE_PATH 2>/dev/null | wc -l) + "$BABELTRACE_BIN" $TRACE_PATH >/dev/null 2>$TEMP_FILE_2 cat $TEMP_FILE_2 | cut -f4 -d " " >$TEMP_FILE @@ -182,6 +170,8 @@ plan_tests $NUM_TESTS print_test_banner "$TEST_DESC" +bail_out_if_no_babeltrace + if [ "$(id -u)" == "0" ]; then isroot=1 else