Tests: Add a test to check disabled events are loaded in the correct state
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 28 Nov 2014 16:51:49 +0000 (11:51 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 1 Dec 2014 02:39:04 +0000 (21:39 -0500)
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 e8a360bab796ea40e65a6c120b3e9d5ea3d3855f..749359bfeb139be87ff840ef3b05e010614d62f8 100644 (file)
                                                                <loglevel_type>RANGE</loglevel_type>
                                                                <loglevel>6</loglevel>
                                                        </event>
+                                                       <event>
+                                                               <name>uevent_disabled</name>
+                                                               <enabled>false</enabled>
+                                                               <type>TRACEPOINT</type>
+                                                               <loglevel_type>ALL</loglevel_type>
+                                                               <loglevel>-1</loglevel>
+                                                       </event>
                                                </events>
                                                <contexts/>
                                        </channel>
index 4ae04c74a162b94dd489c1a846ffe53034473adb..198104d62374d5f93d6d7043d082d2c02ceea7a5 100755 (executable)
@@ -29,7 +29,7 @@ EVENT_NAME="tp:tptest"
 
 DIR=$(readlink -f $TESTDIR)
 
-NUM_TESTS=20
+NUM_TESTS=21
 
 source $TESTDIR/utils/utils.sh
 
@@ -78,6 +78,18 @@ function test_complex_load()
        disable_ust_lttng_channel $sess chan2
        disable_ust_lttng_channel $sess chan3
 
+       # Confirm that an event stored as disabled is restored in its disabled state
+       local mi_output_file=$(mktemp)
+       if [ $? -ne 0 ]; then
+               break;
+       fi
+       lttng --mi XML list $sess -c chan2 > $mi_output_file
+       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()")
+       if [[ $mi_result = "false" ]]; then
+           ok 0 "Disabled event is loaded in disabled state"
+       else
+           fail "Disabled event is loaded in disabled state"
+       fi
        destroy_lttng_session $sess
 
        stop_lttng_relayd_nocheck
This page took 0.02626 seconds and 4 git commands to generate.