Tests: use babeltrace2 for all tests
[lttng-tools.git] / tests / regression / tools / filtering / test_invalid_filter
index 2c45ee09e75170b0738bec630cb8d6a8d409f893..01306123929a843e5531776deb400660e116c3f7 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/bash
 #
-# Copyright (C) - 2012 Christian Babeux <christian.babeux@efficios.com>
+# Copyright (C) 2012 Christian Babeux <christian.babeux@efficios.com>
+#
+# SPDX-License-Identifier: GPL-2.0-only
 #
 # 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
@@ -19,14 +21,13 @@ TEST_DESC="Filtering - Invalid filters"
 
 CURDIR=$(dirname $0)/
 TESTDIR=$CURDIR/../../..
-LTTNG_BIN="lttng"
 SESSION_NAME="filter-invalid"
 EVENT_NAME="bogus"
 ENABLE_EVENT_STDERR="/tmp/invalid-filters-stderr"
-TRACE_PATH=$(mktemp -d)
+TRACE_PATH=$(mktemp --tmpdir -d tmp.test_filtering_invalid_filters_trace_path.XXXXXX)
 NUM_GLOBAL_TESTS=2
-NUM_UST_TESTS=144
-NUM_KERNEL_TESTS=144
+NUM_UST_TESTS=138
+NUM_KERNEL_TESTS=138
 NUM_TESTS=$(($NUM_UST_TESTS+$NUM_KERNEL_TESTS+$NUM_GLOBAL_TESTS))
 
 source $TESTDIR/utils/utils.sh
@@ -93,6 +94,8 @@ plan_tests $NUM_TESTS
 
 print_test_banner "$TEST_DESC"
 
+bail_out_if_no_babeltrace
+
 OLDIFS="$IFS"
 IFS=$'\n'
 INVALID_FILTERS=(
@@ -101,9 +104,6 @@ INVALID_FILTERS=(
                "intfield/1"
                "intfield+1"
                "intfield-1"
-               "intfield>>1"
-               "intfield<<1"
-               "~intfield"
                "1+11111-3333+1"
                "(1+2)*(55*666)"
                "1+2*55*666"
@@ -153,6 +153,8 @@ INVALID_FILTERS=(
                'field > "hello*world"'
                'field && "hello*world"'
                'field || "hello*world"'
+               # Array expression must contain constant index
+               'field[abc] == 1'
 )
 IFS="$OLDIFS"
 
This page took 0.024161 seconds and 4 git commands to generate.