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
diag "Filter: $test_invalid_filter"
# Create session
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
# Apply filter
enable_ust_lttng_event_filter $SESSION_NAME $EVENT_NAME "$test_invalid_filter"
diag "Test filter bytecode limits (64KiB)"
# Create session
- create_lttng_session $SESSION_NAME $TRACE_PATH
+ create_lttng_session_ok $SESSION_NAME $TRACE_PATH
# Apply filter
enable_ust_lttng_event_filter $SESSION_NAME $EVENT_NAME "$BYTECODE_LIMIT"
"!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\""
# 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