From 654f9f5e49aae2669d8ae771650b5e2dce5d660f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 26 Feb 2016 17:08:33 -0500 Subject: [PATCH] Bump LTTng MI schema to 3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The machine interface schema now allows LTTng to express filter expressions. It also introduces "any" clauses at various points to allow the extension of the schema in a non-breaking way. Signed-off-by: Jérémie Galarneau --- src/common/Makefile.am | 2 +- src/common/{mi_lttng.xsd => mi-lttng-3.0.xsd} | 4 ++-- src/common/mi-lttng.c | 10 ++-------- tests/regression/tools/mi/test_mi | 2 +- 4 files changed, 6 insertions(+), 12 deletions(-) rename src/common/{mi_lttng.xsd => mi-lttng-3.0.xsd} (99%) diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 66146bb73..c1b9d4e7a 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -65,7 +65,7 @@ noinst_HEADERS = lttng-kernel.h defaults.h macros.h error.h futex.h \ # Common library noinst_LTLIBRARIES = libcommon.la -EXTRA_DIST = mi_lttng.xsd +EXTRA_DIST = mi-lttng-3.0.xsd libcommon_la_SOURCES = error.h error.c utils.c utils.h runas.c runas.h \ common.h futex.c futex.h uri.c uri.h defaults.c \ diff --git a/src/common/mi_lttng.xsd b/src/common/mi-lttng-3.0.xsd similarity index 99% rename from src/common/mi_lttng.xsd rename to src/common/mi-lttng-3.0.xsd index 3992a8e71..5be477f32 100644 --- a/src/common/mi_lttng.xsd +++ b/src/common/mi-lttng-3.0.xsd @@ -2,6 +2,7 @@ + elementFormDefault="qualified" version="3.0"> @@ -196,7 +197,6 @@ THE SOFTWARE. - diff --git a/src/common/mi-lttng.c b/src/common/mi-lttng.c index ef98687d8..30bd60328 100644 --- a/src/common/mi-lttng.c +++ b/src/common/mi-lttng.c @@ -951,22 +951,16 @@ int mi_lttng_event_common_attributes(struct mi_writer *writer, goto end; } - /* Event filter enabled? */ - ret = mi_lttng_writer_write_element_bool(writer, - config_element_filter, event->filter); - /* Event filter expression */ ret = lttng_event_get_filter_string(event, &filter_expression); - if (ret) { goto end; } if (filter_expression) { ret = mi_lttng_writer_write_element_string(writer, - config_element_filter_expression, - filter_expression); - + config_element_filter_expression, + filter_expression); if (ret) { goto end; } diff --git a/tests/regression/tools/mi/test_mi b/tests/regression/tools/mi/test_mi index 47ec1b16a..cb0470bb7 100755 --- a/tests/regression/tools/mi/test_mi +++ b/tests/regression/tools/mi/test_mi @@ -19,7 +19,7 @@ TEST_DESC="Machine interface testing" CURDIR=$(dirname $0)/ TESTDIR=$CURDIR/../../../ -XSD_PATH=$TESTDIR/../src/common/mi_lttng.xsd +XSD_PATH=$TESTDIR/../src/common/mi-lttng-3.0.xsd SESSIOND_BIN="lttng-sessiond" RELAYD_BIN="lttng-relayd" -- 2.34.1