src.ctf.fs: sort inputs paths
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 15 Nov 2019 22:20:49 +0000 (17:20 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 26 Nov 2019 19:24:17 +0000 (14:24 -0500)
commit18118efb8857e663c1582e438b614a4bc91e1602
treeb2647ab2737489d573dab77bf5ebdfb392159ffb
parentf2ff3e07716405431571e922080367e82da7d04c
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.025981 seconds and 4 git commands to generate.