src.ctf.fs: make trace-info query accept clock-class-offset-{s,ns} parameters
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 2 May 2019 16:21:20 +0000 (12:21 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 3 May 2019 22:19:40 +0000 (18:19 -0400)
commitc80d4c65ee2320f014281e979bb732ad1bf14ce9
treeba1b1d7aa724f5f29915a3726f8e088cebc72e33
parentcca91513321176e147e04c9d1457a34044f244f0
src.ctf.fs: make trace-info query accept clock-class-offset-{s,ns} parameters

The src.ctf.fs components accept clock-class-offset-s and
clock-class-offset-ns parameters, allowing to add an offset to the
clock.

The trace-info query currently doesn't accept the same parameters.  In
general, I think we'll want the components and trace-info to accept
pretty much the same set of parameters, so that the information reported
by trace-info accurately represents how an eventual component reading
the same traces will work.

This patch splits the parameter handling of the component in a
standalone function re-used by the query.  The advantage of sharing a
function like this is that if we add a parameter to the component, we'll
be forced to think about what happens to the trace-info query.

One behavior change is that trace_info_query now returns
BT_QUERY_STATUS_INVALID_PARAMS if the passed parameters are invalid.

A test is added to test the new functionality.

Change-Id: I3d917b8713fce4ce56a79a6e7c7bdc3e32d9ec0c
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1244
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
configure.ac
plugins/ctf/fs-src/fs.c
plugins/ctf/fs-src/fs.h
plugins/ctf/fs-src/query.c
tests/plugins/Makefile.am
tests/plugins/ctf/Makefile.am [new file with mode: 0644]
tests/plugins/ctf/test_ctf_plugin.in [new file with mode: 0644]
tests/plugins/ctf/test_query_trace_info.py [new file with mode: 0644]
This page took 0.024755 seconds and 4 git commands to generate.