ctf: make src.ctf.fs not recurse
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 28 Aug 2019 17:13:07 +0000 (13:13 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 4 Sep 2019 15:38:52 +0000 (11:38 -0400)
commit48881202c2efbefe80a4989e16941ac4e37a88a0
tree0dd470f08f86ff8503da736f71f043cc3f7e5968
parent493917ba0c27f2fd5d5ed7428fc590a1f03ba5d7
ctf: make src.ctf.fs not recurse

This patch makes the src.ctf.fs component class not recurse into the
directories passed as `inputs`.  This affects instantion of a new
component as well as `babeltrace.trace-info` queries.

Recursion is no longer needed, because it is handled by the automatic
source discovery feature at the CLI and TraceCollectionMessageIterator
levels.

This means that the elements of the `inputs` array must point directly
to traces, i.e. the directory that directly contains the `metadata`
file.

Providing an input path that does not point to such a directory is
unacceptable and will be met with an error of this class:

    CAUSED BY [src.ctf.fs: 'source.ctf.fs'] (/home/smarchi/src/babeltrace/src/plugins/ctf/fs-src/fs.c:1140)
      Path is not a CTF trace (does not contain a metadata file): `/home/smarchi/src/babeltrace/tests/data/ctf-traces/succeed/session-rotation`.

The bulk of the change is mostly in the
ctf_fs_component_create_ctf_fs_traces_one_root, which used to do the
recursion.  It now handles a single path, and is therefore renamed
ctf_fs_component_create_ctf_fs_traces_one_path.

Change-Id: Idb0bbf11f822c50f467fa4e4f661e65242ea78e2
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1989
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/plugins/ctf/fs-src/fs.c
This page took 0.024675 seconds and 4 git commands to generate.