Tests: Fix missing TAP output in overlap test
authorChristian Babeux <christian.babeux@efficios.com>
Thu, 21 Mar 2013 19:56:43 +0000 (15:56 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 25 Mar 2013 14:05:09 +0000 (10:05 -0400)
The start and stop tracing shell functions are currently redirected to
/dev/null. This has the unfortunate side-effect of silencing the TAP
output thus producing an incomplete test output.

This commit remove the /dev/null redirection of those commands.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
tests/regression/ust/overlap/test_overlap

index 4e0d90cc83b457a881ba9e3ff5f17234f597a81b..e82307251baf033466970ca1c4d672ac430124f7 100755 (executable)
@@ -88,11 +88,11 @@ test_enable_simple_wildcard()
        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
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        trace_match_all_demo_events
 
@@ -110,11 +110,11 @@ test_enable_wildcard_filter()
        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
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -131,11 +131,11 @@ test_enable_wildcard_filter_2()
        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
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -152,11 +152,11 @@ test_enable_wildcard_filter_3()
        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
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -173,11 +173,11 @@ test_enable_wildcard_filter_4()
        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
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        trace_match_no_demo_events
        return $?
@@ -194,11 +194,11 @@ test_enable_wildcard_filter_5()
        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
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -215,11 +215,11 @@ test_enable_wildcard_filter_6()
        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
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        trace_matches $DEMO_EVENT1 $NUM_DEMO1_EVENT $TRACE_PATH
        trace_matches $DEMO_EVENT1_2 0 $TRACE_PATH
@@ -239,11 +239,11 @@ test_enable_wildcard_filter_7()
        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
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -260,11 +260,11 @@ test_enable_wildcard_filter_8()
        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
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        trace_match_no_demo_events
        return $?
@@ -281,11 +281,11 @@ test_enable_same_wildcard_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"
 
-       start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -309,11 +309,11 @@ test_enable_same_wildcard_filter_2()
            fail "Enable event $event_name with filtering for session $sess_name twice failure NOT detected"
        fi
 
-       start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -330,11 +330,11 @@ test_enable_same_wildcard_filter_3()
        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
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -351,11 +351,11 @@ test_enable_same_wildcard_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"
 
-       start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        trace_match_no_demo_events
        return $?
@@ -372,11 +372,11 @@ test_enable_same_event_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"
 
-       start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        trace_matches $DEMO_EVENT1 $NUM_DEMO1_EVENT $TRACE_PATH
        trace_matches $DEMO_EVENT1_2 0 $TRACE_PATH
@@ -398,11 +398,11 @@ test_disable_same_wildcard_filter()
 
        disable_ust_lttng_event $SESSION_NAME "ust*"
 
-       start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        trace_match_no_demo_events
        return $?
@@ -422,11 +422,11 @@ test_enable_bad_wildcard()
        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
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        trace_match_no_demo_events
        return $?
@@ -443,11 +443,11 @@ test_enable_simple_wildcard_2()
        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
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -464,11 +464,11 @@ test_enable_loglevel_overlap()
        enable_ust_lttng_event_loglevel $SESSION_NAME "$event_wild1" "TRACE_WARNING"
        enable_ust_lttng_event_loglevel $SESSION_NAME "$event_wild2" "TRACE_CRIT"
 
-       start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -485,11 +485,11 @@ test_enable_loglevel_only_overlap()
        enable_ust_lttng_event_loglevel $SESSION_NAME "$event_wild1" "TRACE_WARNING"
        enable_ust_lttng_event_loglevel_only $SESSION_NAME "$event_wild2" "TRACE_CRIT"
 
-       start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -506,11 +506,11 @@ test_enable_loglevel_overlap_2()
        enable_ust_lttng_event_loglevel $SESSION_NAME "$event_wild1" "TRACE_WARNING"
        enable_ust_lttng_event_loglevel $SESSION_NAME "$event_wild2" "TRACE_CRIT"
 
-       start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -527,11 +527,11 @@ test_enable_same_wildcard_loglevels()
        enable_ust_lttng_event_loglevel $SESSION_NAME "$event_wild1" "TRACE_CRIT"
        enable_ust_lttng_event_loglevel $SESSION_NAME "$event_wild2" "TRACE_WARNING"
 
-       start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        trace_match_all_demo_events
        return $?
@@ -548,11 +548,11 @@ test_enable_same_event_loglevels()
        enable_ust_lttng_event_loglevel $SESSION_NAME "$event_wild1" "TRACE_CRIT"
        enable_ust_lttng_event_loglevel $SESSION_NAME "$event_wild2" "TRACE_WARNING"
 
-       start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        trace_matches $DEMO_EVENT1 $NUM_DEMO1_EVENT $TRACE_PATH
        trace_matches $DEMO_EVENT1_2 0 $TRACE_PATH
@@ -575,11 +575,11 @@ test_disable_simple_wildcard()
        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
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        # No events are expected.
        trace_match_no_demo_events
@@ -599,11 +599,11 @@ test_disable_wildcard_overlap()
 
        disable_ust_lttng_event $SESSION_NAME "$event_wild1"
 
-       start_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       start_lttng_tracing $SESSION_NAME
 
        run_demo_app
 
-       stop_lttng_tracing $SESSION_NAME >/dev/null 2>&1
+       stop_lttng_tracing $SESSION_NAME
 
        # Expect only "ust_tests_demo" events.
        trace_matches "$DEMO_EVENT1" $NUM_DEMO1_EVENT $TRACE_PATH
@@ -650,16 +650,12 @@ while [ "$i" -lt "$TEST_COUNT" ]; do
 
        TRACE_PATH=$(mktemp -d)
 
-       create_lttng_session $SESSION_NAME $TRACE_PATH >/dev/null 2>&1
+       create_lttng_session $SESSION_NAME $TRACE_PATH
 
        # Execute test
        ${TESTS[$i]}
-       if [ $? -ne 0 ]; then
-               stop_lttng_sessiond
-               exit 1
-       fi
 
-       destroy_lttng_session $SESSION_NAME >/dev/null 2>&1
+       destroy_lttng_session $SESSION_NAME
 
        rm -rf $TRACE_PATH
 
This page took 0.031872 seconds and 4 git commands to generate.