run_demo_app()
{
- local dir=`pwd`
-
cd $CURDIR/demo
# Start test
# Ease our life a bit ;)
trace_match_demo1_events()
{
- trace_matches $DEMO_EVENT1 $NUM_DEMO1_EVENT $TRACE_PATH
- trace_matches $DEMO_EVENT1_2 $NUM_DEMO1_EVENT $TRACE_PATH
+ trace_matches "$DEMO_EVENT1" $NUM_DEMO1_EVENT $TRACE_PATH
+ trace_matches "$DEMO_EVENT1_2" $NUM_DEMO1_EVENT $TRACE_PATH
}
# Ease our life a bit ;)
trace_match_all_demo_events()
{
trace_match_demo1_events
- trace_matches $DEMO_EVENT2 $NUM_DEMO2_EVENT $TRACE_PATH
- trace_matches $DEMO_EVENT3 $NUM_DEMO3_EVENT $TRACE_PATH
+ trace_matches "$DEMO_EVENT2" $NUM_DEMO2_EVENT $TRACE_PATH
+ trace_matches "$DEMO_EVENT3" $NUM_DEMO3_EVENT $TRACE_PATH
}
# Ease our life a bit ;)
trace_match_no_demo_events()
{
- trace_matches $DEMO_EVENT1 0 $TRACE_PATH
- trace_matches $DEMO_EVENT1_2 0 $TRACE_PATH
- trace_matches $DEMO_EVENT2 0 $TRACE_PATH
- trace_matches $DEMO_EVENT3 0 $TRACE_PATH
+ trace_matches "$DEMO_EVENT1" 0 $TRACE_PATH
+ trace_matches "$DEMO_EVENT1_2" 0 $TRACE_PATH
+ trace_matches "$DEMO_EVENT2" 0 $TRACE_PATH
+ trace_matches "$DEMO_EVENT3" 0 $TRACE_PATH
}
# Expect all "demo" events, no duplicate.
echo ""
echo "=== Simple wildcard overlap"
- enable_ust_lttng_event $SESSION_NAME $event_wild1
- enable_ust_lttng_event $SESSION_NAME $event_wild2
+ enable_ust_lttng_event $SESSION_NAME "$event_wild1"
+ enable_ust_lttng_event $SESSION_NAME "$event_wild2"
start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
echo ""
echo "=== Wildcard overlap with filter"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild1 "1==1"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild2 "1==0"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild1" "1==1"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild2" "1==0"
start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
echo ""
echo "=== Wildcard overlap with filter 2"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild1 "1==0"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild2 "1==1"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild1" "1==0"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild2" "1==1"
start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
echo ""
echo "=== Wildcard overlap with filter 3"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild1 "1==1"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild2 "1==1"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild1" "1==1"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild2" "1==1"
start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
echo ""
echo "=== Wildcard overlap with filter 4"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild1 "1==0"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild2 "1==0"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild1" "1==0"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild2" "1==0"
start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
echo ""
echo "=== Wildcard overlap with filter 5"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild1 "1==1"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild2 "1==0"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild1" "1==1"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild2" "1==0"
start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
echo ""
echo "=== Wildcard overlap with filter 6"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild1 "1==0"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild2 "1==1"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild1" "1==0"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild2" "1==1"
start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
echo ""
echo "=== Wildcard overlap with filter 7"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild1 "1==1"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild2 "1==1"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild1" "1==1"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild2" "1==1"
start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
echo ""
echo "=== Wildcard overlap with filter 8"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild1 "1==0"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild2 "1==0"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild1" "1==0"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild2" "1==0"
start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
echo ""
echo "=== Same wildcard overlap with filter"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild1 "1==1&&1==1"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild2 "1==1"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild1" "1==1&&1==1"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild2" "1==1"
start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
echo ""
echo "=== Same wildcard overlap with filter 2"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild1 "1==1"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild2 "1==1"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild1" "1==1"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild2" "1==1"
if [ $? -eq 1 ]; then
echo -n "FAIL is normal. Same event with same filter is denied by the sessiond "
print_ok
echo ""
echo "=== Same wildcard overlap with filter 3"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild1 "1==1"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild2 "1==0"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild1" "1==1"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild2" "1==0"
start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
echo ""
echo "=== Same wildcard overlap with filter 4"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild1 "1==0&&1==0"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild2 "1==0"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild1" "1==0&&1==0"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild2" "1==0"
start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
echo ""
echo "=== Enable same event with filter."
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild1 "1==1&&1==1"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild2 "1==1"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild1" "1==1&&1==1"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild2" "1==1"
disable_ust_lttng_event $SESSION_NAME "ust*"
echo ""
echo "=== Disable same wildcard with filter."
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild1 "1==1&&1==1"
- enable_ust_lttng_event_filter $SESSION_NAME $event_wild2 "1==1"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild1" "1==1&&1==1"
+ enable_ust_lttng_event_filter $SESSION_NAME "$event_wild2" "1==1"
disable_ust_lttng_event $SESSION_NAME "ust*"
echo ""
echo "=== Enable bad wildcard"
- enable_ust_lttng_event $SESSION_NAME $event_wild1
- enable_ust_lttng_event $SESSION_NAME $event_wild2
- enable_ust_lttng_event $SESSION_NAME $event_wild3
+ enable_ust_lttng_event $SESSION_NAME "$event_wild1"
+ enable_ust_lttng_event $SESSION_NAME "$event_wild2"
+ enable_ust_lttng_event $SESSION_NAME "$event_wild3"
start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
echo ""
echo "=== Simple wildcard 2"
- enable_ust_lttng_event $SESSION_NAME $event_wild1
- enable_ust_lttng_event $SESSION_NAME $event_wild2
+ enable_ust_lttng_event $SESSION_NAME "$event_wild1"
+ enable_ust_lttng_event $SESSION_NAME "$event_wild2"
start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
echo ""
echo "=== Disable simple wildcard"
- enable_ust_lttng_event $SESSION_NAME $event_wild1
- enable_ust_lttng_event $SESSION_NAME $event_wild2
+ enable_ust_lttng_event $SESSION_NAME "$event_wild1"
+ enable_ust_lttng_event $SESSION_NAME "$event_wild2"
- disable_ust_lttng_event $SESSION_NAME $event_wild1
- disable_ust_lttng_event $SESSION_NAME $event_wild2
+ disable_ust_lttng_event $SESSION_NAME "$event_wild1"
+ disable_ust_lttng_event $SESSION_NAME "$event_wild2"
start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
echo ""
echo "=== Disable wildcard overlap"
- enable_ust_lttng_event $SESSION_NAME $event_wild1
- enable_ust_lttng_event $SESSION_NAME $event_wild2
+ enable_ust_lttng_event $SESSION_NAME "$event_wild1"
+ enable_ust_lttng_event $SESSION_NAME "$event_wild2"
- disable_ust_lttng_event $SESSION_NAME $event_wild1
+ disable_ust_lttng_event $SESSION_NAME "$event_wild1"
start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
# Expect only "ust_tests_demo" events.
- trace_matches $DEMO_EVENT1 $NUM_DEMO1_EVENT $TRACE_PATH
- trace_matches $DEMO_EVENT1_2 0 $TRACE_PATH
- trace_matches $DEMO_EVENT2 0 $TRACE_PATH
- trace_matches $DEMO_EVENT3 0 $TRACE_PATH
+ trace_matches "$DEMO_EVENT1" $NUM_DEMO1_EVENT $TRACE_PATH
+ trace_matches "$DEMO_EVENT1_2" 0 $TRACE_PATH
+ trace_matches "$DEMO_EVENT2" 0 $TRACE_PATH
+ trace_matches "$DEMO_EVENT3" 0 $TRACE_PATH
return $?
}