Tests: Fix missing TAP output in overlap test
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/6 Tests: Fix missing TAP output in overlap test
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.
--- tests/regression/ust/overlap/test_overlap | 104 ++++++++++++++---------------- 1 file changed, 50 insertions(+), 54 deletions(-)
tests/regression/ust/overlap/test_overlap +50 -54
@@ -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
Signature · 1 line
1.8.1.3
PATCH 3/6 Tests: Fix tests first line of output to follow TAP guidelines
In reply to a message not in the archiveFrom the Test::Harness::TAP documentation [1]:
The plan tells how many tests will be run, or how many tests have run. It's a check that the test file hasn't stopped prematurely. It must appear once, whether at the beginning or end of the output.
The TAP plan *must* be the first line of output of any tests. Currently, most of the tests output their description and then the TAP plan. This can cause issues while parsing the test output for "strict" TAP parser such as the one used in the prove tool.
This commit ensure that the first line outputted by any tests is the TAP plan.
--- tests/regression/kernel/test_all_events | 4 ++-- tests/regression/kernel/test_event_basic | 4 ++-- tests/regression/tools/filtering/test_invalid_filter | 4 ++-- tests/regression/tools/filtering/test_unsupported_op | 4 ++-- tests/regression/tools/filtering/test_valid_filter | 4 ++-- tests/regression/tools/health/test_thread_exit | 5 +++-- tests/regression/tools/health/test_thread_stall | 4 ++-- tests/regression/tools/health/test_tp_fail | 4 ++-- tests/regression/tools/streaming/test_high_throughput_limits | 4 ++-- tests/regression/tools/streaming/test_kernel | 4 ++-- tests/regression/tools/streaming/test_ust | 4 ++-- tests/regression/ust/before-after/test_before_after | 4 ++-- tests/regression/ust/buffers-uid/test_buffers_uid | 4 ++-- tests/regression/ust/high-throughput/test_high_throughput | 4 ++-- tests/regression/ust/low-throughput/test_low_throughput | 4 ++-- tests/regression/ust/multi-session/test_multi_session | 4 ++-- tests/regression/ust/nprocesses/test_nprocesses | 4 ++-- tests/regression/ust/overlap/test_overlap | 4 ++-- tests/regression/ust/test_event_basic | 4 ++-- tests/regression/ust/test_event_wildcard | 4 ++-- tests/unit/test_kernel_data.c | 4 ++-- tests/unit/test_session.c | 4 ++-- tests/unit/test_uri.c | 4 ++-- tests/unit/test_ust_data.c | 4 ++-- 24 files changed, 49 insertions(+), 48 deletions(-)
tests/regression/kernel/test_all_events +2 -2
@@ -23,8 +23,6 @@ NUM_TESTS=8 source $TESTDIR/utils/utils.sh -print_test_banner "$TEST_DESC" - function test_all_event() { TRACE_PATH=$(mktemp -d)
@@ -47,6 +45,8 @@ function test_all_event() # MUST set TESTDIR before calling those functions plan_tests $NUM_TESTS +print_test_banner "$TEST_DESC" + if [ "$(id -u)" == "0" ]; then isroot=1 else
tests/regression/kernel/test_event_basic +2 -2
@@ -23,8 +23,6 @@ NUM_TESTS=12 source $TESTDIR/utils/utils.sh -print_test_banner "$TEST_DESC" - function test_event_basic() { TRACE_PATH=$(mktemp -d)
@@ -51,6 +49,8 @@ function test_event_basic() # MUST set TESTDIR before calling those functions plan_tests $NUM_TESTS +print_test_banner "$TEST_DESC" + if [ "$(id -u)" == "0" ]; then isroot=1 else
tests/regression/tools/filtering/test_invalid_filter +2 -2
@@ -28,8 +28,6 @@ NUM_TESTS=119 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
tests/regression/tools/filtering/test_unsupported_op +2 -2
@@ -27,8 +27,6 @@ TRACE_PATH=$(mktemp -d) NUM_TESTS=46 source $TESTDIR/utils/utils.sh -print_test_banner "$TEST_DESC" - function enable_ust_lttng_event_filter_unsupported { sess_name=$1
@@ -86,6 +84,8 @@ function test_unsupported_op plan_tests $NUM_TESTS +print_test_banner "$TEST_DESC" + # Unsupported operators OP_STR=("MUL" "DIV" "MOD" "PLUS" "MINUS" "LSHIFT" "RSHIFT" "BIN_AND" "BIN_OR" "BIN_XOR" "UNARY_BIN_NOT")
tests/regression/tools/filtering/test_valid_filter +2 -2
@@ -29,8 +29,6 @@ NUM_TESTS=198 source $TESTDIR/utils/utils.sh -print_test_banner "$TEST_DESC" - if [ ! -x "$CURDIR/$BIN_NAME" ]; then BAIL_OUT "No UST nevents binary detected." fi
@@ -313,6 +311,8 @@ function validator_true_statement plan_tests $NUM_TESTS +print_test_banner "$TEST_DESC" + IFS=$'\n' issue_356_filter="intfield > 0 && intfield > 1 && "
tests/regression/tools/health/test_thread_exit +3 -2
@@ -28,8 +28,6 @@ NUM_TESTS=12 source $TESTDIR/utils/utils.sh -print_test_banner "$TEST_DESC" - if [ ! -f "$CURDIR/$SESSIOND_PRELOAD" ]; then BAIL_OUT "libhealthexit.so not available for this test." fi
@@ -78,8 +76,11 @@ function test_thread_exit return 1 fi } + plan_tests $NUM_TESTS +print_test_banner "$TEST_DESC" + THREAD=("LTTNG_THREAD_MANAGE_CLIENTS" "LTTNG_THREAD_MANAGE_APPS" "LTTNG_THREAD_REG_APPS")
tests/regression/tools/health/test_thread_stall +2 -2
@@ -28,8 +28,6 @@ NUM_TESTS=11 source $TESTDIR/utils/utils.sh -print_test_banner "$TEST_DESC" - if [ ! -f "$CURDIR/$SESSIOND_PRELOAD" ]; then BAIL_OUT "libhealthstall.so not available for this test." fi
@@ -99,6 +97,8 @@ function test_thread_stall plan_tests $NUM_TESTS +print_test_banner "$TEST_DESC" + THREAD=("LTTNG_THREAD_MANAGE_CLIENTS" "LTTNG_THREAD_MANAGE_APPS" # This thread is a little bit tricky to stall,
tests/regression/tools/health/test_tp_fail +2 -2
@@ -28,8 +28,6 @@ NUM_TESTS=9 source $TESTDIR/utils/utils.sh -print_test_banner "$TEST_DESC" - if [ ! -f "$CURDIR/$SESSIOND_PRELOAD" ]; then BAIL_OUT "libhealthtpfail.so not available for this test." fi
@@ -73,6 +71,8 @@ function test_tp_fail plan_tests $NUM_TESTS +print_test_banner "$TEST_DESC" + THREAD=("LTTNG_THREAD_MANAGE_CLIENTS" "LTTNG_THREAD_MANAGE_APPS")
tests/regression/tools/streaming/test_high_throughput_limits +2 -2
@@ -35,8 +35,6 @@ NUM_TESTS=112 source $TESTDIR/utils/utils.sh -print_test_banner "$TEST_DESC" - if [ ! -x "$CURDIR/$BIN_NAME" ]; then BAIL_OUT "No UST nevents binary detected." fi
@@ -162,6 +160,8 @@ function interrupt_cleanup() plan_tests $NUM_TESTS +print_test_banner "$TEST_DESC" + if [ "$(id -u)" == "0" ]; then isroot=1 else
tests/regression/tools/streaming/test_kernel +2 -2
@@ -28,8 +28,6 @@ NUM_TESTS=10 source $TESTDIR/utils/utils.sh -print_test_banner "$TEST_DESC" - # LTTng kernel modules check out=`ls /lib/modules/$(uname -r)/extra | grep lttng` if [ -z "$out" ]; then
@@ -79,6 +77,8 @@ function test_kernel_after_start () plan_tests $NUM_TESTS +print_test_banner "$TEST_DESC" + if [ "$(id -u)" == "0" ]; then isroot=1 else
tests/regression/tools/streaming/test_ust +2 -2
@@ -29,8 +29,6 @@ NUM_TESTS=18 source $TESTDIR/utils/utils.sh -print_test_banner "$TEST_DESC" - if [ ! -x "$CURDIR/$BIN_NAME" ]; then BAIL_OUT "No UST nevents binary detected." fi
@@ -87,6 +85,8 @@ function test_ust_after_start () plan_tests $NUM_TESTS +print_test_banner "$TEST_DESC" + start_lttng_relayd "-o $TRACE_PATH" start_lttng_sessiond
tests/regression/ust/before-after/test_before_after +2 -2
@@ -25,8 +25,6 @@ NUM_TESTS=16 source $TESTDIR/utils/utils.sh -print_test_banner "$TEST_DESC" - if [ ! -x "$CURDIR/gen-nevents" ]; then BAIL_OUT "No UST nevents binary detected." fi
@@ -86,6 +84,8 @@ test_after_apps() { # MUST set TESTDIR before calling those functions plan_tests $NUM_TESTS +print_test_banner "$TEST_DESC" + start_lttng_sessiond diag "Start application BEFORE tracing was started"
tests/regression/ust/buffers-uid/test_buffers_uid +2 -2
@@ -26,8 +26,6 @@ NUM_TESTS=58 source $TESTDIR/utils/utils.sh -print_test_banner "$TEST_DESC" - if [ ! -x "$CURDIR/gen-nevents" ]; then BAIL_OUT "No UST nevents binary detected." fi
@@ -214,6 +212,8 @@ test_multiple_channels() { # MUST set TESTDIR before calling those functions plan_tests $NUM_TESTS +print_test_banner "$TEST_DESC" + TESTS=( "test_before_app" "test_after_app"
tests/regression/ust/high-throughput/test_high_throughput +2 -2
@@ -26,8 +26,6 @@ NUM_TESTS=9 source $TESTDIR/utils/utils.sh -print_test_banner "$TEST_DESC" - if [ ! -x "$CURDIR/$BIN_NAME" ]; then BAIL_OUT "No UST nevents binary detected." fi
@@ -38,6 +36,8 @@ TRACE_PATH=$(mktemp -d) plan_tests $NUM_TESTS +print_test_banner "$TEST_DESC" + start_lttng_sessiond create_lttng_session $SESSION_NAME $TRACE_PATH
tests/regression/ust/low-throughput/test_low_throughput +2 -2
@@ -25,8 +25,6 @@ NUM_TESTS=8 source $TESTDIR/utils/utils.sh -print_test_banner "$TEST_DESC" - if [ ! -x "$CURDIR/$BIN_NAME" ]; then BAIL_OUT "No UST nevents binary detected." fi
@@ -37,6 +35,8 @@ TRACE_PATH=$(mktemp -d) plan_tests $NUM_TESTS +print_test_banner "$TEST_DESC" + start_lttng_sessiond create_lttng_session $SESSION_NAME $TRACE_PATH
tests/regression/ust/multi-session/test_multi_session +2 -2
@@ -25,8 +25,6 @@ NUM_TESTS=28 source $TESTDIR/utils/utils.sh -print_test_banner "$TEST_DESC" - if [ ! -x "$CURDIR/gen-nevents" ]; then BAIL_OUT "No UST nevents binary detected." fi
@@ -76,6 +74,8 @@ test_multi_session() { plan_tests $NUM_TESTS +print_test_banner "$TEST_DESC" + start_lttng_sessiond TRACE_PATH=$(mktemp -d)
tests/regression/ust/nprocesses/test_nprocesses +2 -2
@@ -27,8 +27,6 @@ NUM_TESTS=9 source $TESTDIR/utils/utils.sh -print_test_banner "$TEST_DESC" - if [ ! -x "$CURDIR/$TEST_BIN_NAME" ]; then BAIL_OUT "No UST $TEST_BIN_NAME binary detected." fi
@@ -37,6 +35,8 @@ fi plan_tests $NUM_TESTS +print_test_banner "$TEST_DESC" + start_lttng_sessiond # Start test for 1000 seconds
tests/regression/ust/overlap/test_overlap +2 -2
@@ -34,8 +34,6 @@ NUM_TESTS=259 source $TESTDIR/utils/utils.sh -print_test_banner "$TEST_DESC" - if [ ! -x "$CURDIR/demo/demo" ]; then BAIL_OUT "No UST nevents binary detected." fi
@@ -615,6 +613,8 @@ test_disable_wildcard_overlap() plan_tests $NUM_TESTS +print_test_banner "$TEST_DESC" + TESTS=( "test_enable_wildcard_filter" "test_enable_wildcard_filter_2"
tests/regression/ust/test_event_basic +2 -2
@@ -27,8 +27,6 @@ NUM_TESTS=25 source $TESTDIR/utils/utils.sh -print_test_banner "$TEST_DESC" - function enable_ust_lttng_event_per_chan() { sess_name="$1"
@@ -111,6 +109,8 @@ function test_event_basic() # MUST set TESTDIR before calling those functions plan_tests $NUM_TESTS +print_test_banner "$TEST_DESC" + start_lttng_sessiond test_event_basic
tests/regression/ust/test_event_wildcard +2 -2
@@ -27,8 +27,6 @@ NUM_TESTS=9 source $TESTDIR/utils/utils.sh -print_test_banner "$TEST_DESC" - function test_event_wildcard() { TRACE_PATH=$(mktemp -d)
@@ -59,6 +57,8 @@ function test_event_wildcard() # MUST set TESTDIR before calling those functions plan_tests $NUM_TESTS +print_test_banner "$TEST_DESC" + start_lttng_sessiond test_event_wildcard
tests/unit/test_kernel_data.c +2 -2
@@ -177,10 +177,10 @@ static void test_create_kernel_stream(void)int main (int argc,char **argv) { -diag ("Kernel data structure unit test" ); -plan_tests (NUM_TESTS ); +diag ("Kernel data structure unit test" ); +test_create_one_kernel_session ();test_create_kernel_metadata ();test_create_kernel_channel ();
tests/unit/test_session.c +2 -2
@@ -301,10 +301,10 @@ void test_large_session_number(void)int main (int argc,char **argv) { -diag ("Sessions unit tests" ); -plan_tests (NUM_TESTS ); +diag ("Sessions unit tests" ); +test_session_list ();test_create_one_session ();
tests/unit/test_uri.c +2 -2
@@ -252,10 +252,10 @@ void test_uri_cmp()int main (int argc,char **argv) { -diag ("URI unit tests" ); -plan_tests (NUM_TESTS ); +diag ("URI unit tests" ); +test_uri_parsing ();test_uri_cmp ();
tests/unit/test_ust_data.c +2 -2
@@ -182,10 +182,10 @@ static void test_create_ust_context(void)int main (int argc,char **argv) { -diag ("UST data structures unit test" ); -plan_tests (NUM_TESTS ); +diag ("UST data structures unit test" ); +test_create_one_ust_session ();test_create_ust_metadata ();test_create_ust_channel ();
Signature · 1 line
1.8.1.3
PATCH 4/6 Tests: Use Perl prove as the testsuite runner
In reply to a message not in the archiveCurrently the regression and unit testsuites are runned via a custom runner script. By using the Perl prove utility, we can run the testsuites and also gain additionnal features such as: parallel jobs, separate testlists, etc.
This commit modify the make check target to run Perl prove as the testsuite runner.
Testlist:
tests/unit_tests : unit tests.
tests/fast_regression : a fast regression testsuite. tests/long_regression : a long regression testsuite (includes slow tests such
as test_low_throughput and others).
tests/root_regression : a testsuite for tests that need root access
(mostly tests using lttng-modules and bandwith limits).
Running a testsuite:
$ cd lttng-tools/tests $ ./run.sh <testsuite>
One can also run tests manually using prove:
$ prove --exec '' path/to/test
OR
$ prove --exec '' - < testlist
--- .gitignore | 1 - tests/Makefile.am | 4 +++- tests/fast_regression | 14 ++++++++++++++ tests/long_regression | 16 ++++++++++++++++ tests/root_regression | 4 ++++ tests/run.sh | 6 +++--- tests/unit_tests | 4 ++++ 7 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 tests/fast_regression create mode 100644 tests/long_regression create mode 100644 tests/root_regression create mode 100644 tests/unit_tests
.gitignore +0 -1
@@ -62,7 +62,6 @@ gen-nevents gen-events-time gen-events gen-ust-events -unit_tests health_check tests/regression/ust/overlap/demo/demo
tests/Makefile.am +3 -1
@@ -1,4 +1,6 @@ SUBDIRS = utils regression unit check-am: - ./run.sh + ./run.sh unit_tests + ./run.sh fast_regression +
tests/fast_regression new file +14 -0
@@ -0,0 +1,14 @@ +regression/tools/filtering/test_invalid_filter +regression/tools/filtering/test_unsupported_op +regression/tools/filtering/test_valid_filter +regression/tools/health/test_thread_exit +regression/tools/health/test_thread_stall +regression/tools/health/test_tp_fail +regression/tools/streaming/test_ust +regression/ust/before-after/test_before_after +regression/ust/buffers-uid/test_buffers_uid +regression/ust/multi-session/test_multi_session +regression/ust/nprocesses/test_nprocesses +regression/ust/overlap/test_overlap +regression/ust/test_event_basic +regression/ust/test_event_wildcard
tests/long_regression new file +16 -0
@@ -0,0 +1,16 @@ +regression/tools/filtering/test_invalid_filter +regression/tools/filtering/test_unsupported_op +regression/tools/filtering/test_valid_filter +regression/tools/health/test_thread_exit +regression/tools/health/test_thread_stall +regression/tools/health/test_tp_fail +regression/tools/streaming/test_ust +regression/ust/before-after/test_before_after +regression/ust/buffers-uid/test_buffers_uid +regression/ust/high-throughput/test_high_throughput +regression/ust/low-throughput/test_lo_throughput +regression/ust/multi-session/test_multi_session +regression/ust/nprocesses/test_nprocesses +regression/ust/overlap/test_overlap +regression/ust/test_event_basic +regression/ust/test_event_wildcard
tests/root_regression new file +4 -0
@@ -0,0 +1,4 @@ +regression/kernel/test_all_events +regression/kernel/test_event_basic +regression/tools/streaming/test_high_throughput_limits +regression/tools/streaming/test_kernel
tests/run.sh +3 -3
@@ -16,7 +16,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -DIR=$(dirname $0) -$DIR/regression/run.sh $@ -$DIR/unit/run.sh $@ +[ -z "$1" ] && echo "Error: No testlist. Please specify a testlist to run." && exit 1 + +prove --merge --exec '' - < $1
tests/unit_tests new file +4 -0
@@ -0,0 +1,4 @@ +unit/test_kernel_data +unit/test_session +unit/test_uri +unit/test_ust_data
Signature · 1 line
1.8.1.3
PATCH 5/6 Tests: Cleanup tests runner that are no longer required
In reply to a message not in the archiveTest runners have been superseeded by testlists and the prove utility.
--- tests/regression/Makefile.am | 2 +- tests/regression/kernel/Makefile.am | 2 +- tests/regression/kernel/run.sh | 32 ------------------------- tests/regression/run.sh | 23 ------------------ tests/regression/tools/Makefile.am | 2 -- tests/regression/tools/run.sh | 39 ------------------------------ tests/regression/ust/Makefile.am | 2 +- tests/unit/Makefile.am | 2 -- tests/unit/run.sh | 34 -------------------------- tests/utils/runner.sh | 48 ------------------------------------- 10 files changed, 3 insertions(+), 183 deletions(-) delete mode 100755 tests/regression/kernel/run.sh delete mode 100755 tests/regression/run.sh delete mode 100755 tests/regression/tools/run.sh delete mode 100755 tests/unit/run.sh delete mode 100644 tests/utils/runner.sh
tests/regression/Makefile.am +1 -1
@@ -1,6 +1,6 @@ SUBDIRS = tools kernel ust -EXTRA_DIST = run-report.py test_list.py run.sh +EXTRA_DIST = run-report.py test_list.py if HAVE_LIBLTTNG_UST_CTL SUBDIRS += ust
tests/regression/kernel/Makefile.am +1 -1
@@ -1 +1 @@ -EXTRA_DIST = run.sh test_event_basic test_all_events +EXTRA_DIST = test_event_basic test_all_events
tests/regression/kernel/run.sh deleted +0 -32
@@ -1,32 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2013 - Christian Babeux <[email protected]> -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; only version 2 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# - -DIR=$(dirname $0) -TESTDIR=$DIR/../.. -source $TESTDIR/utils/runner.sh - -#### ADD TESTS HERE #### - -tests=( $DIR/test_event_basic - $DIR/test_all_events ) - -#### END TESTS HERE #### - -opts=("$@") -run_tests tests[@] opts[@]
tests/regression/run.sh deleted +0 -23
@@ -1,23 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2013 - Christian Babeux <[email protected]> -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; only version 2 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -DIR=$(dirname $0) - -$DIR/kernel/run.sh $@ -$DIR/ust/run.sh $@ -$DIR/tools/run.sh $@
tests/regression/tools/Makefile.am +0 -2
@@ -1,3 +1 @@ SUBDIRS = streaming filtering health - -EXTRA_DIST = run.sh
tests/regression/tools/run.sh deleted +0 -39
@@ -1,39 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2013 - Christian Babeux <[email protected]> -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; only version 2 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# - -DIR=$(dirname $0) -TESTDIR=$DIR/../.. -source $TESTDIR/utils/runner.sh - -#### ADD TESTS HERE #### - -tests=( $DIR/filtering/test_invalid_filter - $DIR/filtering/test_unsupported_op - $DIR/filtering/test_valid_filter - $DIR/health/test_thread_exit - $DIR/health/test_thread_stall - $DIR/health/test_tp_fail - $DIR/streaming/test_kernel - $DIR/streaming/test_ust - $DIR/streaming/test_high_throughput_limits ) - -#### END TESTS HERE #### - -opts=("$@") -run_tests tests[@] opts[@]
tests/regression/ust/Makefile.am +1 -1
@@ -2,6 +2,6 @@ if HAVE_LIBLTTNG_UST_CTL SUBDIRS = nprocesses high-throughput low-throughput before-after multi-session \ overlap -EXTRA_DIST = runall.sh run-ust-global-tests.sh test_event_basic test_event_wildcard +EXTRA_DIST = test_event_basic test_event_wildcard endif
tests/unit/Makefile.am +0 -2
@@ -14,8 +14,6 @@ LIBCOMMON=$(top_builddir)/src/common/libcommon.la LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la -EXTRA_DIST = run.sh - if HAVE_LIBLTTNG_UST_CTL noinst_PROGRAMS = test_uri test_session test_ust_data test_kernel_data else
tests/unit/run.sh deleted +0 -34
@@ -1,34 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2013 - Christian Babeux <[email protected]> -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; only version 2 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# - -DIR=$(dirname $0) -TESTDIR=$DIR/.. -source $TESTDIR/utils/runner.sh - -#### ADD TESTS HERE #### - -tests=( $DIR/test_uri - $DIR/test_session - $DIR/test_ust_data - $DIR/test_kernel_data ) - -#### END TESTS HERE #### - -opts=("$@") -run_tests tests[@] opts[@]
tests/utils/runner.sh deleted +0 -48
48 lines not on this page · raw message
Signature · 1 line
1.8.1.3
PATCH 6/6 Tests: Do not exit when a failure occurs in test_buffers_uid
In reply to a message not in the archive--- tests/regression/ust/buffers-uid/test_buffers_uid | 5 ----- 1 file changed, 5 deletions(-)
tests/regression/ust/buffers-uid/test_buffers_uid +0 -5
@@ -230,11 +230,6 @@ start_lttng_sessiond while [ $i -lt $TEST_COUNT ]; do TRACE_PATH=$(mktemp -d) ${TESTS[$i]} - if [ $? -ne 0 ]; then - stop_lttng_sessiond - exit 1 - fi - rm -rf $TRACE_PATH let "i++" done
Signature · 1 line
1.8.1.3
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH lttng-tools 4/6] Tests: Use Perl prove as the testsuite runner
Quoted 5 lines · Christian Babeux
Currently the regression and unit testsuites are runned via a custom runner script. By using the Perl prove utility, we can run the testsuites and also gain additionnal features such as: parallel jobs, separate testlists, etc.
This new dependency should be documented in the README file.
Yannick
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH lttng-tools 4/6] Tests: Use Perl prove as the testsuite runner
Quoted 1 line
This new dependency should be documented in the README file.
Since lttng-tools depends on Automake (which is a Perl script), would that still be relevant to add?
Thanks,
Christian
Quoted 16 lines · Yannick Brosseau
Quoted 5 lines · Christian Babeux
Currently the regression and unit testsuites are runned via a custom runner script. By using the Perl prove utility, we can run the testsuites and also gain additionnal features such as: parallel jobs, separate testlists, etc.
This new dependency should be documented in the README file.
Yannick
_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
A message that is not in the archive (sent off-list or not yet received): CAGDH53nch9AjJP5Y--a=FPWCsCdfWJ0VaPZXAHRBgYcnzL3LjQ@mail.gmail.com
Re: [PATCH lttng-tools 4/6] Tests: Use Perl prove as the testsuite runner
Quoted 4 lines · Christian Babeux
Quoted 1 line
This new dependency should be documented in the README file.
Since lttng-tools depends on Automake (which is a Perl script), would that still be relevant to add?
Automake is not needed if you use the tar.gz, so I think it should be there
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH lttng-tools 4/6] Tests: Use Perl prove as the testsuite runner
Okay I'll post a patch updating the README.
Quoted 6 lines · Yannick Brosseau
Quoted 4 lines · Christian Babeux
Quoted 1 line
This new dependency should be documented in the README file.
Since lttng-tools depends on Automake (which is a Perl script), would that still be relevant to add?
Automake is not needed if you use the tar.gz, so I think it should be there
Re: [PATCH lttng-tools 1/6] Tests: Fix wrong number of tests in test plan of the thread stall test
In reply to a message not in the archiveMerged!
Thanks
David
Christian Babeux:
Quoted 18 lines
Signed-off-by Christian Babeux <[email protected]>--- tests/regression/tools/health/test_thread_stall | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/regression/tools/health/test_thread_stall +1
-1@@ -24,7 +24,7 @@ SESSION_NAME="health_thread_stall" EVENT_NAME="bogus" HEALTH_CHECK_BIN="health_check" SESSIOND_PRELOAD=".libs/libhealthstall.so" -NUM_TESTS=12 +NUM_TESTS=11 source $TESTDIR/utils/utils.sh