tests: Move to kernel style SPDX license identifiers
[lttng-tools.git] / tests / regression / ust / overlap / test_overlap
index f85a0ccc0551f2e61a08929e1af15b5bea4060c1..c399c688d075431149a617bd060f615344680e94 100755 (executable)
@@ -1,19 +1,9 @@
 #!/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)/
@@ -34,10 +24,6 @@ NUM_TESTS=259
 
 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()
@@ -91,7 +77,7 @@ test_enable_simple_wildcard()
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME
+       stop_lttng_tracing_ok $SESSION_NAME
 
        trace_match_all_demo_events
 
@@ -113,7 +99,7 @@ test_enable_wildcard_filter()
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME
+       stop_lttng_tracing_ok $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -134,7 +120,7 @@ test_enable_wildcard_filter_2()
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME
+       stop_lttng_tracing_ok $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -155,7 +141,7 @@ test_enable_wildcard_filter_3()
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME
+       stop_lttng_tracing_ok $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -176,7 +162,7 @@ test_enable_wildcard_filter_4()
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME
+       stop_lttng_tracing_ok $SESSION_NAME
 
        trace_match_no_demo_events
        return $?
@@ -197,7 +183,7 @@ test_enable_wildcard_filter_5()
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME
+       stop_lttng_tracing_ok $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -218,7 +204,7 @@ test_enable_wildcard_filter_6()
 
        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
@@ -242,7 +228,7 @@ test_enable_wildcard_filter_7()
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME
+       stop_lttng_tracing_ok $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -263,7 +249,7 @@ test_enable_wildcard_filter_8()
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME
+       stop_lttng_tracing_ok $SESSION_NAME
 
        trace_match_no_demo_events
        return $?
@@ -284,7 +270,7 @@ test_enable_same_wildcard_filter()
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME
+       stop_lttng_tracing_ok $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -312,7 +298,7 @@ test_enable_same_wildcard_filter_2()
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME
+       stop_lttng_tracing_ok $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -333,7 +319,7 @@ test_enable_same_wildcard_filter_3()
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME
+       stop_lttng_tracing_ok $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -354,7 +340,7 @@ test_enable_same_wildcard_filter_4()
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME
+       stop_lttng_tracing_ok $SESSION_NAME
 
        trace_match_no_demo_events
        return $?
@@ -375,7 +361,7 @@ test_enable_same_event_filter()
 
        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
@@ -401,7 +387,7 @@ test_disable_same_wildcard_filter()
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME
+       stop_lttng_tracing_ok $SESSION_NAME
 
        trace_match_no_demo_events
        return $?
@@ -425,7 +411,7 @@ test_enable_bad_wildcard()
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME
+       stop_lttng_tracing_ok $SESSION_NAME
 
        trace_match_no_demo_events
        return $?
@@ -446,7 +432,7 @@ test_enable_simple_wildcard_2()
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME
+       stop_lttng_tracing_ok $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -467,7 +453,7 @@ test_enable_loglevel_overlap()
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME
+       stop_lttng_tracing_ok $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -488,7 +474,7 @@ test_enable_loglevel_only_overlap()
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME
+       stop_lttng_tracing_ok $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -509,7 +495,7 @@ test_enable_loglevel_overlap_2()
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME
+       stop_lttng_tracing_ok $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -530,7 +516,7 @@ test_enable_same_wildcard_loglevels()
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME
+       stop_lttng_tracing_ok $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -551,7 +537,7 @@ test_enable_same_event_loglevels()
 
        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
@@ -578,7 +564,7 @@ test_disable_simple_wildcard()
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME
+       stop_lttng_tracing_ok $SESSION_NAME
 
        # No events are expected.
        trace_match_no_demo_events
@@ -602,7 +588,7 @@ test_disable_wildcard_overlap()
 
        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
@@ -616,6 +602,14 @@ plan_tests $NUM_TESTS
 
 print_test_banner "$TEST_DESC"
 
+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"
@@ -656,7 +650,7 @@ while [ "$i" -lt "$TEST_COUNT" ]; do
        # Execute test
        ${TESTS[$i]}
 
-       destroy_lttng_session $SESSION_NAME
+       destroy_lttng_session_ok $SESSION_NAME
 
        rm -rf $TRACE_PATH
 
This page took 0.026891 seconds and 4 git commands to generate.