X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Frotation%2Ftest_save_load_mi;h=24e1efc67be76db71536ca9236481bdebd6f7ad1;hb=fc2dd19e2c7dbeaa86654b47c0a2c221b7018ecf;hp=494d375f6fd701c5eb80c5fb8ba19fd9e67db053;hpb=66ea93b10c703e1b3dda1e17109eed9138e4ece2;p=lttng-tools.git diff --git a/tests/regression/tools/rotation/test_save_load_mi b/tests/regression/tools/rotation/test_save_load_mi index 494d375f6..24e1efc67 100755 --- a/tests/regression/tools/rotation/test_save_load_mi +++ b/tests/regression/tools/rotation/test_save_load_mi @@ -1,19 +1,8 @@ #!/bin/bash # -# Copyright (C) - 2017 Julien Desfossez +# Copyright (C) 2017 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="Rotation - Save/Load/List/MI" @@ -29,7 +18,7 @@ source $CURDIR/rotate_utils.sh # Overwrite the lttng_bin to get mi output LTTNG_BIN="lttng --mi xml" -XSD_PATH=$TESTDIR/../src/common/mi-lttng-3.0.xsd +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" @@ -44,9 +33,9 @@ XPATH_LIST_ROTATE_SIZE="$XPATH_SESSION/lttng:rotation_schedules/lttng:size_thres function test_save_load_mi () { - tmp_xml_output=$(mktemp -u) - tmp_save_output=$(mktemp -d) - trace_path=$(mktemp -d) + local tmp_xml_output=$(mktemp -u) + local tmp_save_output=$(mktemp -d) + local trace_path=$(mktemp -d) diag "Test save/load/list/MI with rotation" create_lttng_session_ok $SESSION_NAME $trace_path @@ -87,9 +76,9 @@ function test_save_load_mi () # save, destroy and reload the same session OUTPUT_DEST=/dev/null - lttng_save $SESSION_NAME "-o $tmp_save_output$SESSION_NAME" + lttng_save $SESSION_NAME "-o $tmp_save_output/$SESSION_NAME" destroy_lttng_session_ok $SESSION_NAME - lttng_load_ok "-i $tmp_save_output$SESSION_NAME" + lttng_load_ok "-i $tmp_save_output/$SESSION_NAME" OUTPUT_DEST=${tmp_xml_output} # Check the output of lttng list with the 2 rotation parameters after the load @@ -108,9 +97,9 @@ function test_save_load_mi () OUTPUT_DEST=/dev/null destroy_lttng_session_ok $SESSION_NAME - rm -rf ${trace_path} - rm $tmp_xml_output - rm -rf $tmp_save_output + rm -rf "$trace_path" + rm "$tmp_xml_output" + rm -rf "$tmp_save_output" } plan_tests $NUM_TESTS