X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Ffiltering%2Ftest_valid_filter;h=7e764ca5d0caf10fc5ecee465dbca50ba719e932;hp=6d1009a48eeaa881f11a02e186726a4b4238826c;hb=c125de8f5c0dc9ba3ada63e9317e468ffb9e335a;hpb=9d16b343fb9e781fc8d8fa3c448a3f382306dd33 diff --git a/tests/regression/tools/filtering/test_valid_filter b/tests/regression/tools/filtering/test_valid_filter index 6d1009a48..7e764ca5d 100755 --- a/tests/regression/tools/filtering/test_valid_filter +++ b/tests/regression/tools/filtering/test_valid_filter @@ -13,8 +13,8 @@ STATS_BIN="$TESTDIR/utils/babelstats.pl" SESSION_NAME="valid_filter" NR_ITER=100 NUM_GLOBAL_TESTS=2 -NUM_UST_TESTS=1110 -NUM_KERNEL_TESTS=1044 +NUM_UST_TESTS=1122 +NUM_KERNEL_TESTS=1056 NUM_TESTS=$(($NUM_UST_TESTS+$NUM_KERNEL_TESTS+$NUM_GLOBAL_TESTS)) source $TESTDIR/utils/utils.sh @@ -94,11 +94,10 @@ function test_valid_filter event_name="$3" filter="$4" validator="$5" + local trace_path=$(mktemp --tmpdir -d tmp.test_filtering_invalid_filters_trace_path.XXXXXX) diag "Test valid $domain_name filter: $filter" - trace_path=$(mktemp -d) - # Create session create_lttng_session_ok $SESSION_NAME $trace_path @@ -113,7 +112,7 @@ function test_valid_filter # Destroy session destroy_lttng_session_ok $SESSION_NAME - stats=`babeltrace $trace_path | $STATS_BIN --tracepoint $event_name` + stats=`"$BABELTRACE_BIN" $trace_path | $STATS_BIN --tracepoint $event_name` rm -rf $trace_path @@ -402,6 +401,8 @@ plan_tests $NUM_TESTS print_test_banner "$TEST_DESC" +bail_out_if_no_babeltrace + issue_356_filter="intfield > 0 && intfield > 1 && " issue_356_filter+="intfield > 2 && intfield > 3 && " issue_356_filter+="intfield > 4 && intfield > 5 && " @@ -833,6 +834,16 @@ UST_FILTERS=( has_no_event "0 == \$ctx.vtid.blah" + # check that bytecode linker refuses to link against a + # non-string array. + has_no_event + 'arrfield1 != "dontmatch"' + + # check that bytecode linker refuses to link against a + # non-string sequence. + has_no_event + 'seqfield1 != "dontmatch"' + END ) @@ -1426,6 +1437,16 @@ KERNEL_FILTERS=( has_no_event 'stringfield == "test\*"' + # check that bytecode linker refuses to link against a + # non-string array. + has_no_event + 'arrfield1 != "dontmatch"' + + # check that bytecode linker refuses to link against a + # non-string sequence. + has_no_event + 'seqfield1 != "dontmatch"' + ${KIRK_KRAUSS_TESTS[@]} END @@ -1465,7 +1486,7 @@ skip $isroot "Root access is needed. Skipping all kernel valid filter tests." $N i=$(( i + 2 )) done - rmmod lttng-test + modprobe --remove lttng-test } stop_lttng_sessiond