ctf: make src.ctf.fs not recurse
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 28 Aug 2019 17:13:07 +0000 (13:13 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 4 Sep 2019 15:58:23 +0000 (11:58 -0400)
commit54e1a1aa3cc923d43623eb45c7f140f2185b8646
treea715d2e869d8537ccad57136759696794f3bdcc2
parent1d3426bc601401d5d74f8a6b07b9af2acaa0a700
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.025136 seconds and 4 git commands to generate.