From: Jonathan Rajotte Date: Mon, 26 Oct 2015 14:21:05 +0000 (-0400) Subject: Tests: same event name with different descriptor on load X-Git-Tag: v2.7.3~11 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=00929fde57b532c7ac907f06f14b233883609bf6;p=lttng-tools.git Tests: same event name with different descriptor on load Refs #959 Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- diff --git a/tests/regression/tools/save-load/load-42-complex.lttng b/tests/regression/tools/save-load/load-42-complex.lttng index 749359bfe..9eff5eb78 100644 --- a/tests/regression/tools/save-load/load-42-complex.lttng +++ b/tests/regression/tools/save-load/load-42-complex.lttng @@ -60,6 +60,20 @@ RANGE 6 + + uevent_same_name_diff_llevel + true + TRACEPOINT + RANGE + 6 + + + uevent_same_name_diff_llevel + false + TRACEPOINT + RANGE + -1 + uevent_disabled false diff --git a/tests/regression/tools/save-load/test_load b/tests/regression/tools/save-load/test_load index da1e6c6c3..1680f7d42 100755 --- a/tests/regression/tools/save-load/test_load +++ b/tests/regression/tools/save-load/test_load @@ -29,7 +29,7 @@ EVENT_NAME="tp:tptest" DIR=$(readlink -f $TESTDIR) -NUM_TESTS=28 +NUM_TESTS=30 source $TESTDIR/utils/utils.sh @@ -50,6 +50,8 @@ function test_basic_load() function test_complex_load() { local sess="$SESSION_NAME-complex" + local mi_result="" + local ret=1 diag "Test complex load" # Start relayd with localhost binding. The complex session uses those @@ -80,6 +82,18 @@ function test_complex_load() else fail "Disabled event is loaded in disabled state" fi + + mi_result=$($CURDIR/../mi/extract_xml $mi_output_file "//command/output/sessions/session/domains/domain/channels/channel[name='chan2']/events/event[name='uevent_disabled']/enabled/text()") + test $mi_result = "false" + ok $? "Disabled event is loaded in disabled state" + + # Check that uevent_same_name_diff_llevel with log level 6 (TRACE_INFO) is enabled + # This ensure that the state of events with similar name but not same + # descriptor tuple (exclusion,filter,loglevel) is restored correctly. + mi_result=$($CURDIR/../mi/extract_xml $mi_output_file "//command/output/sessions/session/domains/domain/channels/channel[name='chan2']/events/event[name='uevent_same_name_diff_llevel' and loglevel='TRACE_INFO']/enabled/text()") + test $mi_result = "true" + ok $? "Enabled event with same name but different loglevel is in disabled state" + destroy_lttng_session_ok $sess stop_lttng_relayd