From ce5b5a750a3339ff9dcc6502a44dafe2fbbb04b7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 28 Nov 2014 11:51:49 -0500 Subject: [PATCH] Tests: Add a test to check disabled events are loaded in the correct state MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- .../tools/save-load/load-42-complex.lttng | 7 +++++++ tests/regression/tools/save-load/test_load | 14 +++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) 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 -- 2.34.1