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)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 3 May 2019 20:33:24 +0000 (16:33 -0400)
commitd907165ce769b0eba30683cd5a4565242f8884c3
tree0c4f6dd8c5f0d8f50bc1e29555533323dad5cb11
parent5ec1bd5c3200e4eb986299bad81d15fc319b60e3
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.025623 seconds and 4 git commands to generate.