From: Jérémie Galarneau Date: Fri, 28 Nov 2014 16:51:49 +0000 (-0500) Subject: Tests: Add a test to check disabled events are loaded in the correct state X-Git-Tag: v2.6.0-rc4~7 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ce5b5a750a3339ff9dcc6502a44dafe2fbbb04b7;p=lttng-tools.git Tests: Add a test to check disabled events are loaded in the correct state 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 e8a360bab..749359bfe 100644 --- a/tests/regression/tools/save-load/load-42-complex.lttng +++ b/tests/regression/tools/save-load/load-42-complex.lttng @@ -60,6 +60,13 @@ RANGE 6 + + uevent_disabled + false + TRACEPOINT + ALL + -1 + diff --git a/tests/regression/tools/save-load/test_load b/tests/regression/tools/save-load/test_load index 4ae04c74a..198104d62 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=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