X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Fnotification%2Ftest_rotation;h=5d6db8f557cde6484685fba5d5f27552d01b1f22;hb=ccfd51622dd086077c992d841dcc1ed1fab6b794;hp=250f1b3f631770b97c364ec3c3087ccbd1babe69;hpb=88a5c0a9ce2333f12a1bd5d6b0ea527b86cde819;p=lttng-tools.git diff --git a/tests/regression/tools/notification/test_rotation b/tests/regression/tools/notification/test_rotation index 250f1b3f6..5d6db8f55 100755 --- a/tests/regression/tools/notification/test_rotation +++ b/tests/regression/tools/notification/test_rotation @@ -1,19 +1,8 @@ #!/bin/bash # -# Copyright (C) - 2017 Jérémie Galarneau +# Copyright (C) 2017 Jérémie Galarneau # -# 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 CURDIR=$(dirname $0)/ TESTDIR=$CURDIR/../../../ @@ -23,14 +12,13 @@ TESTAPP_NAME="gen-ust-events" TESTAPP_BIN="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME" SESSION_NAME="my_session" -TMP_DIR=$(mktemp -d) -SESSION_OUTPUT_PATH=$TMP_DIR/output +SESSION_OUTPUT_PATH=$(mktemp -d -t tmp.test_notif_rotation_trace_path.XXXXXX) EVENT_NAME="tp:tptest" PAGE_SIZE=$(getconf PAGE_SIZE) SUBBUF_SIZE=$(expr $PAGE_SIZE \* 8) -FILE_SYNC_AFTER_FIRST_EVENT=$(mktemp -u) +FILE_SYNC_AFTER_FIRST_EVENT=$(mktemp -u -t tmp.test_rotation_sync_after_first.XXXXXX) NR_ITER=-1 NR_USEC_WAIT=5 @@ -47,7 +35,7 @@ enable_ust_lttng_event_notap $SESSION_NAME $EVENT_NAME $CHANNEL_NAME start_lttng_tracing_notap $SESSION_NAME -$TESTAPP_BIN $NR_ITER $NR_USEC_WAIT $FILE_SYNC_AFTER_FIRST_EVENT & +$TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT --sync-after-first-event $FILE_SYNC_AFTER_FIRST_EVENT & APP_PID=$! while [ ! -f "${FILE_SYNC_AFTER_FIRST_EVENT}" ]; do sleep 0.5 @@ -69,5 +57,5 @@ stop_lttng_sessiond_notap kill -9 $APP_PID wait $APP_PID 2> /dev/null -rm -rf $TMP_DIR -rm $FILE_SYNC_AFTER_FIRST_EVENT 2> /dev/null +rm -rf $SESSION_OUTPUT_PATH +rm -f $FILE_SYNC_AFTER_FIRST_EVENT