X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Fregression%2Fust%2Fjava-log4j%2Ftest_java_log4j;h=ed4302879e5ac183f3de1b2e2d987773846e3ce1;hp=a47060559cffcfbace207ab37a0c0b671a25c5e7;hb=c125de8f5c0dc9ba3ada63e9317e468ffb9e335a;hpb=42aad3d2f3388cefce4c976ff3fa87625ee5ab14 diff --git a/tests/regression/ust/java-log4j/test_java_log4j b/tests/regression/ust/java-log4j/test_java_log4j index a47060559..ed4302879 100755 --- a/tests/regression/ust/java-log4j/test_java_log4j +++ b/tests/regression/ust/java-log4j/test_java_log4j @@ -1,19 +1,8 @@ #!/bin/bash # -# Copyright (C) - 2014 David Goulet +# Copyright (C) 2014 David Goulet # -# This program is free software; you can redistribute it and/or modify it under -# the terms of the GNU General Public License, version 2 only, as published by -# the Free Software Foundation. -# -# This program 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 General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 51 -# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# SPDX-License-Identifier: GPL-2.0-only TEST_DESC="Java LOG4J support" @@ -91,8 +80,8 @@ function enable_log4j_filter_loglevel_only() function test_log4j_before_start () { - local file_sync_after_first=$(mktemp -u) - local file_sync_before_last=$(mktemp -u) + local file_sync_after_first=$(mktemp --tmpdir -u "tmp.${FUNCNAME[0]}_sync_after_first.XXXXXX") + local file_sync_before_last=$(mktemp --tmpdir -u "tmp.${FUNCNAME[0]}_sync_before_last.XXXXXX") diag "Test LOG4J application BEFORE tracing starts" create_lttng_session_ok $SESSION_NAME $TRACE_PATH @@ -672,6 +661,8 @@ plan_tests $NUM_TESTS print_test_banner "$TEST_DESC" +bail_out_if_no_babeltrace + if [ ! -f "$TESTAPP_PATH.class" ]; then withapp=0 else @@ -704,7 +695,7 @@ skip $withapp "LOG4J support is needed. Skipping all tests." $NUM_TESTS || for fct_test in ${tests[@]}; do - TRACE_PATH=$(mktemp -d) + TRACE_PATH=$(mktemp --tmpdir -d tmp.test_java_log4j_trace_path.XXXXXX) ${fct_test} if [ $? -ne 0 ]; then