Tests: use babeltrace2 for all tests
[lttng-tools.git] / tests / regression / tools / base-path / test_ust
index 84d4345510207c5104b06554b1cad564c6100fe6..38a0877531c8ea94ace15f2000140f40a5e0cda9 100755 (executable)
@@ -1,19 +1,9 @@
 #!/bin/bash
 #
-# Copyright (C) 2019 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+# Copyright (C) 2019 Mathieu Desnoyers <mathieu.desnoyers@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="Streaming Base Path Override - User space tracing"
 
 CURDIR=$(dirname "$0")/
@@ -23,9 +13,9 @@ TESTAPP_NAME="gen-ust-events"
 TESTAPP_BIN="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME"
 EVENT_NAME="tp:tptest"
 
-TRACE_PATH=$(mktemp -d)
+TRACE_PATH=$(mktemp --tmpdir -d tmp.test_base_path_ust_trace_path.XXXXXX)
 
-NUM_TESTS=37
+NUM_TESTS=42
 
 source "$TESTDIR/utils/utils.sh"
 
@@ -50,6 +40,7 @@ function ust_app_stream_base_path ()
        destroy_lttng_session_ok $session_name
 
        # validate test
+       validate_trace_path_ust_uid_network "$TRACE_PATH" "" "$base_path"
        if validate_trace $EVENT_NAME "$TRACE_PATH/$HOSTNAME/$base_path"; then
                # only delete if successful
                rm -rf "$TRACE_PATH"
@@ -77,6 +68,7 @@ function ust_app_snapshot_create_base_path ()
        destroy_lttng_session_ok $session_name
 
        # validate test
+       validate_trace_path_ust_uid_snapshot_network "$TRACE_PATH" "" "snapshot-1" 0 "$base_path"
        if validate_trace $EVENT_NAME "$TRACE_PATH/$HOSTNAME/$base_path"; then
                # only delete if successful
                rm -rf "$TRACE_PATH"
@@ -103,6 +95,7 @@ function ust_app_snapshot_base_path ()
        destroy_lttng_session_ok $session_name
 
        # validate test
+       validate_trace_path_ust_uid_snapshot_network "$TRACE_PATH" "" "snapshot-0" 0 "$base_path"
        if validate_trace $EVENT_NAME "$TRACE_PATH/$HOSTNAME/$base_path"; then
                # only delete if successful
                rm -rf "$TRACE_PATH"
@@ -130,6 +123,7 @@ function ust_app_snapshot_add_output_base_path ()
        destroy_lttng_session_ok $session_name
 
        # validate test
+       validate_trace_path_ust_uid_snapshot_network "$TRACE_PATH" "" "snapshot-1" 0 "$base_path"
        if validate_trace $EVENT_NAME "$TRACE_PATH/$HOSTNAME/$base_path"; then
                # only delete if successful
                rm -rf "$TRACE_PATH"
@@ -151,6 +145,7 @@ function ust_app_stream_base_path_via_load ()
        destroy_lttng_session_ok $session_name
 
        # validate test
+       validate_trace_path_ust_uid_network "$TRACE_PATH" "" "$base_path"
        if validate_trace $EVENT_NAME "$TRACE_PATH/$HOSTNAME/$base_path"; then
                # only delete if successful
                rm -rf "$TRACE_PATH"
@@ -160,6 +155,7 @@ function ust_app_stream_base_path_via_load ()
 plan_tests $NUM_TESTS
 
 print_test_banner "$TEST_DESC"
+bail_out_if_no_babeltrace
 
 start_lttng_relayd "-o $TRACE_PATH"
 start_lttng_sessiond
This page took 0.024978 seconds and 4 git commands to generate.