src.ctf.fs: sort inputs paths
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 15 Nov 2019 22:20:49 +0000 (17:20 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 20 Nov 2019 22:45:43 +0000 (17:45 -0500)
commit7b69723d5301785f7ea9b7bfec0165b47a8cf0e5
tree25053ba8b32303a237059e91e8e981284f7fa0e0
parent927c069356ec0754daf592601145313155e9ce94
src.ctf.fs: sort inputs paths

Sort input paths to make the behavior of the component more
deterministic.

For example, when there are duplicated packets in the trace and we pick
one copy, this will ensure that we always process the data stream files in
the same order, and that we always pick the same copy of the packet.

In practice, this will reduce the chances of observing different
behaviors on different platforms where glib reports the files of a trace
in different orders.

A test is added to verify that the choice of which copy of a packet to
choose, in case a packet is present in multiple copies, is independent
from the order of the inputs paths passed to the component.

Change-Id: I034ba8c909e76a1e89589e1f0e0f37512c9d88bf
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2396
src/plugins/ctf/fs-src/fs.c
tests/Makefile.am
tests/data/ctf-traces/deterministic-ordering/a-corrupted/dummystream [new file with mode: 0644]
tests/data/ctf-traces/deterministic-ordering/a-corrupted/metadata [new file with mode: 0644]
tests/data/ctf-traces/deterministic-ordering/b-c.expect [new file with mode: 0644]
tests/data/ctf-traces/deterministic-ordering/b-not-corrupted/dummystream [new file with mode: 0644]
tests/data/ctf-traces/deterministic-ordering/b-not-corrupted/metadata [new file with mode: 0644]
tests/data/ctf-traces/deterministic-ordering/c-corrupted/dummystream [new file with mode: 0644]
tests/data/ctf-traces/deterministic-ordering/c-corrupted/metadata [new file with mode: 0644]
tests/plugins/src.ctf.fs/Makefile.am
tests/plugins/src.ctf.fs/test_deterministic_ordering [new file with mode: 0755]
This page took 0.024851 seconds and 4 git commands to generate.