Tests: Convert the ust_global_event_wildcard test to an equivalent shell test
[lttng-tools.git] / tests / regression / ust / test_event_wildcard
diff --git a/tests/regression/ust/test_event_wildcard b/tests/regression/ust/test_event_wildcard
new file mode 100755 (executable)
index 0000000..88c02b0
--- /dev/null
@@ -0,0 +1,66 @@
+#!/bin/bash
+#
+# Copyright (C) - 2013 Christian Babeux <christian.babeux@efficios.com>
+#
+# 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.
+
+TEST_DESC="UST tracer - Event wildcard"
+
+CURDIR=$(dirname $0)/
+TESTDIR=$CURDIR/../..
+LTTNG_BIN="lttng"
+BIN_NAME="gen-ust-events"
+SESSION_NAME="valid_filter"
+EVENT_NAME="tp:tptest"
+NUM_TESTS=9
+
+source $TESTDIR/utils/utils.sh
+
+print_test_banner "$TEST_DESC"
+
+function test_event_wildcard()
+{
+       TRACE_PATH=$(mktemp -d)
+       SESSION_NAME="ust_event_basic"
+       SESSION_NAME2="ust_event_basic2"
+       CHAN_NAME="mychan"
+       CHAN_NAME2="mychan2"
+       EVENT_NAME="*"
+       EVENT_NAME2="abc*"
+
+       create_lttng_session $SESSION_NAME $TRACE_PATH
+
+       enable_ust_lttng_event $SESSION_NAME "$EVENT_NAME"
+       enable_ust_lttng_event $SESSION_NAME "$EVENT_NAME2"
+
+       start_lttng_tracing
+       stop_lttng_tracing
+
+       TODO="Validate trace output is coherent"
+       ok 0 "Validate trace"
+       unset TODO
+
+       destroy_lttng_session $SESSION_NAME
+
+       rm -rf $TRACE_PATH
+}
+
+# MUST set TESTDIR before calling those functions
+plan_tests $NUM_TESTS
+
+start_lttng_sessiond
+
+test_event_wildcard
+
+stop_lttng_sessiond
This page took 0.023548 seconds and 4 git commands to generate.