X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Ffiltering%2Ftest_invalid_filter;h=e566c8b72bc8b56fdf67f0f8cdbdb1189b87f1a3;hb=32f754b34658ed4bda092acc56ec3cdb28e4fe98;hp=700fa236940117fda9d85b78a272fef1a52cbb33;hpb=5d2e1e66a968d9e555f9b8b00d0589ebfaf3de32;p=lttng-tools.git diff --git a/tests/regression/tools/filtering/test_invalid_filter b/tests/regression/tools/filtering/test_invalid_filter index 700fa2369..e566c8b72 100755 --- a/tests/regression/tools/filtering/test_invalid_filter +++ b/tests/regression/tools/filtering/test_invalid_filter @@ -24,12 +24,10 @@ SESSION_NAME="filter-invalid" EVENT_NAME="bogus" ENABLE_EVENT_STDERR="/tmp/invalid-filters-stderr" TRACE_PATH=$(mktemp -d) -NUM_TESTS=119 +NUM_TESTS=146 source $TESTDIR/utils/utils.sh -print_test_banner "$TEST_DESC" - function enable_ust_lttng_event_filter { sess_name="$1" @@ -85,6 +83,8 @@ function test_bytecode_limit plan_tests $NUM_TESTS +print_test_banner "$TEST_DESC" + IFS=$'\n' INVALID_FILTERS=( # Unsupported ops @@ -118,7 +118,7 @@ INVALID_FILTERS=( "!a.f.d" "asdf.asdfsd.sadf < 4" "asdfasdf->asdfasdf < 2" - # String can't be root node + # String can\'t be root node "\"somestring\"" # Unary op on string not allowed "!\"somestring\"" @@ -133,6 +133,18 @@ INVALID_FILTERS=( # Nesting of binary operator not allowed "1 | (1 | (1 | 1))" "1 > (1 > (1 > 1))" + # Exactly one chaining level under \$ctx allowed + "\$ctx.vtid.blah == 0" + "0 == \$ctx.vtid.blah" + "\$ctx.44 == 0" + "0 == \$ctx.44" + "\$ctx == 0" + "0 == \$ctx" + # Only \$ctx is supported for now + "\$global.value == 0" + "0 == \$global.value" + # A wildcard should only appear as the last character in a string literal + "msg == \"my_event*_blah\"" ) start_lttng_sessiond