X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Fregression%2Fust%2Ftest_event_basic;h=fd4a632a5f486c75b57d14bae293d8b5f282e403;hp=31931a977b094a7bb373dd3e7358f061460299cc;hb=refs%2Fheads%2Fsow-2019-0002-rev1;hpb=67b4c664e2c6c6dc19920555c0abf094ed6cbe00 diff --git a/tests/regression/ust/test_event_basic b/tests/regression/ust/test_event_basic index 31931a977..fd4a632a5 100755 --- a/tests/regression/ust/test_event_basic +++ b/tests/regression/ust/test_event_basic @@ -1,61 +1,21 @@ #!/bin/bash # -# Copyright (C) - 2013 Christian Babeux +# Copyright (C) 2013 Christian Babeux # -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License, version 2 only, as -# published by the Free Software Foundation. -# -# This program 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 General Public License for -# more details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 51 -# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# SPDX-License-Identifier: GPL-2.0-only TEST_DESC="UST tracer - Basic events" CURDIR=$(dirname $0)/ TESTDIR=$CURDIR/../.. -LTTNG_BIN="lttng" BIN_NAME="gen-ust-events" SESSION_NAME="valid_filter" EVENT_NAME="tp:tptest" -NUM_TESTS=25 - -source $TESTDIR/utils/utils.sh - -function enable_ust_lttng_event_per_chan() -{ - sess_name="$1" - event_name="$2" - chan_name="$3" - - $TESTDIR/../src/bin/lttng/$LTTNG_BIN enable-event "$event_name" -s $sess_name -c $chan_name -u >/dev/null 2>&1 - ok $? "Enable event $event_name for session $sess_name in channel $chan_name" -} - -function disable_ust_lttng_event_per_chan() -{ - sess_name="$1" - event_name="$2" - chan_name="$3" - $TESTDIR/../src/bin/lttng/$LTTNG_BIN disable-event "$event_name" -s $sess_name -c $chan_name -u >/dev/null 2>&1 - ok $? "Disable event $event_name for session $sess_name in channel $chan_name" -} -function add_ust_lttng_context() -{ - sess_name="$1" - chan_name="$2" - type="$3" +NUM_TESTS=25 - $TESTDIR/../src/bin/lttng/$LTTNG_BIN add-context -s $sess_name -c $chan_name -t $type -u >/dev/null 2>&1 - ok $? "Add context $type for session $sess_name in channel $chan_name" -} +source $TESTDIR/utils/utils.sh function test_event_basic() { @@ -74,21 +34,21 @@ function test_event_basic() enable_ust_lttng_channel_ok $SESSION_NAME $CHAN_NAME enable_ust_lttng_channel_ok $SESSION_NAME2 $CHAN_NAME2 - enable_ust_lttng_event_per_chan $SESSION_NAME $EVENT_NAME $CHAN_NAME - enable_ust_lttng_event_per_chan $SESSION_NAME $EVENT_NAME2 $CHAN_NAME - enable_ust_lttng_event_per_chan $SESSION_NAME2 $EVENT_NAME3 $CHAN_NAME2 + enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHAN_NAME + enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME2 $CHAN_NAME + enable_ust_lttng_event_ok $SESSION_NAME2 $EVENT_NAME3 $CHAN_NAME2 - add_ust_lttng_context $SESSION_NAME $CHAN_NAME "vpid" - add_ust_lttng_context $SESSION_NAME $CHAN_NAME "vtid" - add_ust_lttng_context $SESSION_NAME $CHAN_NAME "pthread_id" - add_ust_lttng_context $SESSION_NAME $CHAN_NAME "procname" - add_ust_lttng_context $SESSION_NAME2 $CHAN_NAME2 "procname" + add_context_ust_ok $SESSION_NAME $CHAN_NAME "vpid" + add_context_ust_ok $SESSION_NAME $CHAN_NAME "vtid" + add_context_ust_ok $SESSION_NAME $CHAN_NAME "pthread_id" + add_context_ust_ok $SESSION_NAME $CHAN_NAME "procname" + add_context_ust_ok $SESSION_NAME2 $CHAN_NAME2 "procname" - disable_ust_lttng_event_per_chan $SESSION_NAME $EVENT_NAME $CHAN_NAME - disable_ust_lttng_event_per_chan $SESSION_NAME2 $EVENT_NAME3 $CHAN_NAME2 + disable_ust_lttng_event $SESSION_NAME $EVENT_NAME $CHAN_NAME + disable_ust_lttng_event $SESSION_NAME2 $EVENT_NAME3 $CHAN_NAME2 - enable_ust_lttng_event_per_chan $SESSION_NAME $EVENT_NAME $CHAN_NAME - enable_ust_lttng_event_per_chan $SESSION_NAME2 $EVENT_NAME3 $CHAN_NAME2 + enable_ust_lttng_event_ok $SESSION_NAME $EVENT_NAME $CHAN_NAME + enable_ust_lttng_event_ok $SESSION_NAME2 $EVENT_NAME3 $CHAN_NAME2 start_lttng_tracing_ok stop_lttng_tracing_ok @@ -96,9 +56,8 @@ function test_event_basic() start_lttng_tracing_ok stop_lttng_tracing_ok - TODO="Validate trace output is coherent" + # TODO: Validate trace output is coherent" ok 0 "Validate trace" - unset TODO destroy_lttng_session_ok $SESSION_NAME2 destroy_lttng_session_ok $SESSION_NAME