SoW-2020-0002: Trace Hit Counters: trigger error reporting integration
[lttng-tools.git] / tests / regression / tools / snapshots / test_kernel
index f6f9508ebb07b3527b7cae00d855cedcaaed394e..24b0ad4a2b6f43dc222cf42c6607807713718f50 100755 (executable)
@@ -1,19 +1,9 @@
 #!/bin/bash
 #
-# Copyright (C) 2013 Julien Desfossez <jdesfossez@efficios.com>
+# Copyright (C) 2013 Julien Desfossez <jdesfossez@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="Snapshots - Kernel tracing"
 
 CURDIR=$(dirname $0)/
@@ -35,7 +25,7 @@ function test_kernel_local_snapshot ()
        enable_lttng_mmap_overwrite_kernel_channel $SESSION_NAME $CHANNEL_NAME
        lttng_enable_kernel_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
        start_lttng_tracing_ok $SESSION_NAME
-       lttng_snapshot_add_output_ok $SESSION_NAME $TRACE_PATH
+       lttng_snapshot_add_output_ok $SESSION_NAME file://$TRACE_PATH
        lttng_snapshot_record $SESSION_NAME
        stop_lttng_tracing_ok $SESSION_NAME
        destroy_lttng_session_ok $SESSION_NAME
@@ -58,7 +48,7 @@ function test_kernel_local_snapshot_after_stop ()
        lttng_enable_kernel_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
        start_lttng_tracing_ok $SESSION_NAME
        stop_lttng_tracing_ok $SESSION_NAME
-       lttng_snapshot_add_output_ok $SESSION_NAME $TRACE_PATH
+       lttng_snapshot_add_output_ok $SESSION_NAME file://$TRACE_PATH
        lttng_snapshot_record $SESSION_NAME
        destroy_lttng_session_ok $SESSION_NAME
 
@@ -82,7 +72,7 @@ function test_kernel_local_snapshot_append_to_metadata ()
        enable_lttng_mmap_overwrite_kernel_channel $SESSION_NAME $CHANNEL_NAME
        lttng_enable_kernel_event $SESSION_NAME $EVENT1 $CHANNEL_NAME
        start_lttng_tracing_ok $SESSION_NAME
-       lttng_snapshot_add_output_ok $SESSION_NAME $TRACE_PATH
+       lttng_snapshot_add_output_ok $SESSION_NAME file://$TRACE_PATH
 
        # first snapshot with only 1 event
        lttng_snapshot_record $SESSION_NAME
@@ -127,7 +117,7 @@ function test_kernel_local_snapshot_discard ()
                        $CHANNEL_NAME
        lttng_enable_kernel_syscall_ok $SESSION_NAME -a $CHANNEL_NAME
        start_lttng_tracing_ok $SESSION_NAME
-       lttng_snapshot_add_output_ok $SESSION_NAME $TRACE_PATH
+       lttng_snapshot_add_output_ok $SESSION_NAME file://$TRACE_PATH
 
        true_loop_cpu0 10000
 
@@ -148,9 +138,9 @@ function test_kernel_local_snapshot_discard ()
        rm -rf $TRACE_PATH
 
        if [ x"$FIRST_LINE" != x"$FIRST_LINE_2" ]; then
-               fail "First snapshot event do not match."
+               fail "First snapshot event do not match"
        else
-               pass "First snapshot event match."
+               pass "First snapshot event match"
        fi
 
        stop_lttng_tracing_ok $SESSION_NAME
@@ -165,7 +155,7 @@ function test_kernel_local_snapshot_overwrite_small_buffers ()
                        $CHANNEL_NAME
        lttng_enable_kernel_syscall_ok $SESSION_NAME -a $CHANNEL_NAME
        start_lttng_tracing_ok $SESSION_NAME
-       lttng_snapshot_add_output_ok $SESSION_NAME $TRACE_PATH
+       lttng_snapshot_add_output_ok $SESSION_NAME file://$TRACE_PATH
 
        true_loop_cpu0 10000
 
@@ -186,9 +176,9 @@ function test_kernel_local_snapshot_overwrite_small_buffers ()
        rm -rf $TRACE_PATH
 
        if [ x"$FIRST_LINE" != x"$FIRST_LINE_2" ]; then
-               pass "First snapshot event do not match."
+               pass "First snapshot event do not match"
        else
-               fail "First snapshot event match."
+               fail "First snapshot event match"
        fi
 
        stop_lttng_tracing_ok $SESSION_NAME
@@ -204,7 +194,7 @@ function test_kernel_1000_local_snapshots ()
        enable_lttng_mmap_overwrite_kernel_channel $SESSION_NAME $CHANNEL_NAME
        lttng_enable_kernel_event $SESSION_NAME $EVENT_NAME $CHANNEL_NAME
        start_lttng_tracing_ok $SESSION_NAME
-       lttng_snapshot_add_output_ok $SESSION_NAME $TRACE_PATH
+       lttng_snapshot_add_output_ok $SESSION_NAME file://$TRACE_PATH
        for i in $(seq 1 $NB_SNAP); do
                diag "Snapshot $i/$NB_SNAP"
                rm -rf $TRACE_PATH/snapshot/* 2>/dev/null
@@ -232,7 +222,7 @@ else
        isroot=0
 fi
 
-skip $isroot "Root access is needed. Skipping all kernel snapshot tests." $NUM_TESTS ||
+skip $isroot "Root access is needed. Skipping all kernel snapshot tests" $NUM_TESTS ||
 {
 
        validate_lttng_modules_present
This page took 0.025861 seconds and 5 git commands to generate.