#!/bin/bash
#
-# Copyright (C) - 2012 David Goulet <dgoulet@efficios.com>
+# Copyright (C) 2012 David Goulet <dgoulet@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="UST - Wildcard overlap"
CURDIR=$(dirname $0)/
source $TESTDIR/utils/utils.sh
-if [ ! -x "$CURDIR/demo/demo" ]; then
- BAIL_OUT "No UST nevents binary detected."
-fi
-
# MUST set TESTDIR before calling those functions
run_demo_app()
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
trace_match_all_demo_events
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
trace_match_all_demo_events
return $?
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
trace_match_all_demo_events
return $?
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
trace_match_all_demo_events
return $?
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
trace_match_no_demo_events
return $?
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
trace_match_all_demo_events
return $?
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
trace_matches $DEMO_EVENT1 $NUM_DEMO1_EVENT $TRACE_PATH
trace_matches $DEMO_EVENT1_2 0 $TRACE_PATH
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
trace_match_all_demo_events
return $?
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
trace_match_no_demo_events
return $?
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
trace_match_all_demo_events
return $?
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
trace_match_all_demo_events
return $?
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
trace_match_all_demo_events
return $?
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
trace_match_no_demo_events
return $?
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
trace_matches $DEMO_EVENT1 $NUM_DEMO1_EVENT $TRACE_PATH
trace_matches $DEMO_EVENT1_2 0 $TRACE_PATH
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
trace_match_no_demo_events
return $?
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
trace_match_no_demo_events
return $?
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
trace_match_all_demo_events
return $?
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
trace_match_all_demo_events
return $?
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
trace_match_all_demo_events
return $?
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
trace_match_all_demo_events
return $?
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
trace_match_all_demo_events
return $?
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
trace_matches $DEMO_EVENT1 $NUM_DEMO1_EVENT $TRACE_PATH
trace_matches $DEMO_EVENT1_2 0 $TRACE_PATH
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
# No events are expected.
trace_match_no_demo_events
run_demo_app
- stop_lttng_tracing $SESSION_NAME
+ stop_lttng_tracing_ok $SESSION_NAME
# Expect only "ust_tests_demo" events.
trace_matches "$DEMO_EVENT1" $NUM_DEMO1_EVENT $TRACE_PATH
print_test_banner "$TEST_DESC"
+bail_out_if_no_babeltrace
+
+if [ -x "$CURDIR/demo/demo" ]; then
+ foundbin=1
+else
+ foundbin=0
+fi
+
+skip $foundbin "No UST nevents binary detected. Skipping all tests." $NUM_TESTS && exit 0
+
TESTS=(
"test_enable_wildcard_filter"
"test_enable_wildcard_filter_2"
while [ "$i" -lt "$TEST_COUNT" ]; do
- TRACE_PATH=$(mktemp -d)
+ TRACE_PATH=$(mktemp -d -t tmp.test_overlap.XXXXXX)
create_lttng_session_ok $SESSION_NAME $TRACE_PATH
# Execute test
${TESTS[$i]}
- destroy_lttng_session $SESSION_NAME
+ destroy_lttng_session_ok $SESSION_NAME
rm -rf $TRACE_PATH