#!/bin/bash
#
-# Copyright (C) - 2012 Christian Babeux <christian.babeux@efficios.com>
+# Copyright (C) 2012 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.
+# SPDX-License-Identifier: GPL-2.0-only
#
-# 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="Filtering - Valid filters"
CURDIR=$(dirname $0)/
TESTDIR=$CURDIR/../../..
-LTTNG_BIN="lttng"
STATS_BIN="$TESTDIR/utils/babelstats.pl"
SESSION_NAME="valid_filter"
NR_ITER=100
NUM_GLOBAL_TESTS=2
-NUM_UST_TESTS=1098
-NUM_KERNEL_TESTS=1032
+NUM_UST_TESTS=1110
+NUM_KERNEL_TESTS=1044
NUM_TESTS=$(($NUM_UST_TESTS+$NUM_KERNEL_TESTS+$NUM_GLOBAL_TESTS))
source $TESTDIR/utils/utils.sh
"(1<<63) < 0"
true_statement
- "1<<1==2" # C99 operator priority: comparator before bitwise
+ "(1<<2!=4)==0" # operator priority: shift before equality
- has_no_event
- "!(1<<1==2)" # C99 operator priority: comparator before bitwise
+ true_statement
+ "1&3==1" # operator priority: masks before equality
+
+ true_statement
+ "(3|1==3)==1" # operator priority: masks before equality
+
+ true_statement
+ "(2^1==3)==1" # operator priority: masks before equality
true_statement
"(1 << 32) == 4294967296"
"(1<<63) < 0"
true_statement
- "1<<1==2" # C99 operator priority: comparator before bitwise
+ "(1<<2!=4)==0" # operator priority: shift before equality
- has_no_event
- "!(1<<1==2)" # C99 operator priority: comparator before bitwise
+ true_statement
+ "1&3==1" # operator priority: masks before equality
+
+ true_statement
+ "(3|1==3)==1" # operator priority: masks before equality
+
+ true_statement
+ "(2^1==3)==1" # operator priority: masks before equality
true_statement
"(1 << 32) == 4294967296"
i=$(( i + 2 ))
done
- rmmod lttng-test
+ modprobe --remove lttng-test
}
stop_lttng_sessiond