X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Fregen-statedump%2Ftest_ust;h=1a872c99596d2f5bb653a78fe107f34ca379fd16;hb=HEAD;hp=b01d419faa7e014a662ec1eafd6379d3aa698544;hpb=03f66fb8271904c7bca9d3cfd5b3cf1d9c4e5221;p=lttng-tools.git diff --git a/tests/regression/tools/regen-statedump/test_ust b/tests/regression/tools/regen-statedump/test_ust index b01d419fa..1a872c995 100755 --- a/tests/regression/tools/regen-statedump/test_ust +++ b/tests/regression/tools/regen-statedump/test_ust @@ -1,19 +1,9 @@ #!/bin/bash # -# Copyright (C) - 2016 Julien Desfossez +# Copyright (C) 2016 Julien Desfossez # -# 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="Regenerate the statedump - User-space tracing" CURDIR=$(dirname $0)/ @@ -26,7 +16,7 @@ TESTAPP_BIN="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME" SESSION_NAME="stream" EVENT_NAME="lttng_ust_statedump:start,lttng_ust_statedump:end" -TRACE_PATH=$(mktemp -d) +TRACE_PATH=$(mktemp -d -t tmp.test_regenerate_statedump_ust_trace_path.XXXXXX) NUM_TESTS=11 @@ -38,14 +28,16 @@ fi function test_ust_local () { - local file_sync_after_first=$(mktemp -u) - local file_sync_before_last=$(mktemp -u) + local file_sync_after_first=$(mktemp -u -t tmp.test_${FUNCNAME[0]}_sync_after_first.XXXXXX) + local file_sync_before_last=$(mktemp -u -t tmp.test_${FUNCNAME[0]}_sync_before_last.XXXXXX) diag "Test UST local with statedump regeneration" create_lttng_session_ok $SESSION_NAME $TRACE_PATH enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME - $TESTAPP_BIN $NR_ITER $NR_USEC_WAIT ${file_sync_after_first} ${file_sync_before_last} /dev/null 2>&1 & + $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT \ + --sync-after-first-event ${file_sync_after_first} \ + --sync-before-last-event ${file_sync_before_last} >/dev/null 2>&1 & start_lttng_tracing_ok $SESSION_NAME @@ -72,6 +64,7 @@ function test_ust_local () plan_tests $NUM_TESTS print_test_banner "$TEST_DESC" +bail_out_if_no_babeltrace start_lttng_sessiond