Fix: sink.ctf.fs: fix logic of make_unique_stream_file_name
The logic in make_unique_stream_file_name is wrong. It tries names as
long as the candidate exists _and_ is named "metadata". The intent here
is that we keep trying names as long as the candidate name names an
already existing file _or_ is named "metadata". So the && should be a
||.
The impact of this bug is that if two streams have the same name,
they'll write to the same file, with troubling consequences (see bug
1279 [1]).
Add a test where `sink.ctf.fs` writes a trace with two streams with the
same name, and one stream named "metadata".
[1] https://bugs.lttng.org/issues/1279
Change-Id: Ifaa30459574229aa5e607095f65033d2caae188f
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/4483
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/4492
This page took 0.025631 seconds and 4 git commands to generate.