#!/bin/bash
#
-# Copyright (C) - 2018 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
+# Copyright (C) 2018 Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
#
-# 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="LTTng relayd filesystem grouping - Userspace tracing"
EVENT_NAME="tp:tptest"
CHANNEL_NAME="my_channel"
-XSD_PATH=$TESTDIR/../src/common/mi-lttng-4.0.xsd
-
-XML_VALIDATE="$TESTDIR/regression/tools/mi/validate_xml $XSD_PATH"
-XML_EXTRACT="$TESTDIR/regression/tools/mi/extract_xml"
-
XPATH_CMD_OUTPUT="//lttng:command/lttng:output"
XPATH_SESSION="$XPATH_CMD_OUTPUT/lttng:sessions/lttng:session"
-
NUM_TESTS=688
source "$TESTDIR/utils/utils.sh"
local lttng_bin=$LTTNG_BIN
LTTNG_BIN="${lttng_bin} --mi xml"
- OUTPUT_DEST=$(mktemp)
+ OUTPUT_DEST=$(mktemp --tmpdir "tmp.${FUNCNAME[0]}_output.XXXXXX")
list_lttng_with_opts
- $XML_VALIDATE "$OUTPUT_DEST"
+ $MI_VALIDATE "$OUTPUT_DEST"
ok $? "Valid lttng list XML"
value=$($XML_EXTRACT "$OUTPUT_DEST" ${XPATH_SESSION}/lttng:name/text\(\))
ok $? "Extraction of session name"
+ rm -f $OUTPUT_DEST
OUTPUT_DEST=/dev/null
LTTNG_BIN=$lttng_bin
local file_sync_after_first
local file_sync_before_last
- file_sync_after_first=$(mktemp -u)
- file_sync_before_last=$(mktemp -u)
+ file_sync_after_first=$(mktemp --tmpdir -u "tmp.${FUNCNAME[0]}_sync_after_first.XXXXXX")
+ file_sync_before_last=$(mktemp --tmpdir -u "tmp.${FUNCNAME[0]}_sync_before_last.XXXXXX")
if [ -z "$session_name" ]; then
is_automatic_session=true
do
for grouping in "${grouping_types[@]}";
do
- TRACE_PATH=$(mktemp -d)
+ TRACE_PATH=$(mktemp --tmpdir -d tmp.test_relayd_grouping_ust_trace_path.XXXXXX)
# Set the relayd in --group-output-by-session mode
start_lttng_relayd "-o $TRACE_PATH $grouping"
start_lttng_sessiond