<loglevel_type>RANGE</loglevel_type>
<loglevel>6</loglevel>
</event>
+ <event>
+ <name>uevent_same_name_diff_llevel</name>
+ <enabled>true</enabled>
+ <type>TRACEPOINT</type>
+ <loglevel_type>RANGE</loglevel_type>
+ <loglevel>6</loglevel>
+ </event>
+ <event>
+ <name>uevent_same_name_diff_llevel</name>
+ <enabled>false</enabled>
+ <type>TRACEPOINT</type>
+ <loglevel_type>RANGE</loglevel_type>
+ <loglevel>-1</loglevel>
+ </event>
<event>
<name>uevent_disabled</name>
<enabled>false</enabled>
DIR=$(readlink -f $TESTDIR)
-NUM_TESTS=28
+NUM_TESTS=30
source $TESTDIR/utils/utils.sh
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
else
fail "Disabled event is loaded in disabled state"
fi
+
+ mi_result=$($CURDIR/../mi/extract_xml $mi_output_file "//lttng:command/lttng:output/lttng:sessions/lttng:session/lttng:domains/lttng:domain/lttng:channels/lttng:channel[lttng:name='chan2']/lttng:events/lttng:event[lttng:name='uevent_disabled']/lttng: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 "//lttng:command/lttng:output/lttng:sessions/lttng:session/lttng:domains/lttng:domain/lttng:channels/lttng:channel[lttng:name='chan2']/lttng:events/lttng:event[lttng:name='uevent_same_name_diff_llevel' and lttng:loglevel='TRACE_INFO']/lttng: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