From: Simon Marchi Date: Wed, 28 Aug 2019 17:13:07 +0000 (-0400) Subject: ctf: make src.ctf.fs not recurse X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=48881202c2efbefe80a4989e16941ac4e37a88a0;hp=48881202c2efbefe80a4989e16941ac4e37a88a0;p=babeltrace.git 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 Reviewed-on: https://review.lttng.org/c/babeltrace/+/1989 Tested-by: jenkins Reviewed-by: Francis Deslauriers Reviewed-by: Philippe Proulx ---