Tests: same event name with different descriptor on load
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 26 Oct 2015 14:21:05 +0000 (10:21 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 20 May 2016 20:21:38 +0000 (16:21 -0400)
Refs #959

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/regression/tools/save-load/load-42-complex.lttng
tests/regression/tools/save-load/test_load

index 749359bfeb139be87ff840ef3b05e010614d62f8..9eff5eb785b7598b55195be5d40738b62bf9c9e7 100644 (file)
                                                                <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>
index da1e6c6c3ac1dfa20be923316c6f1f4e7820dcff..1680f7d42fc6fcc98a5dea7366a471f3bc433d18 100755 (executable)
@@ -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
This page took 0.027283 seconds and 4 git commands to generate.