Tests: ctf: add tracers timestamp quirks workaround test cases
This commit adds test traces and test cases to cover the `src.ctf.fs`
workarounds used to support timestamp corner cases or bugs in the
tracers.
Note: I manually modified the test traces to contain problematic
timestamp values using an hex editor as if there would be created by an
affected tracer.
Test traces
===========
* `event-after-packet` lttng test trace
This trace `event-after-packet` was modified manually to simulate the
hard to reproduce `event-after-packet` LTTng tracers bug.
When the bug occurs, the timestamp of the last event of a packet is larger than
the `timestamp_end` of it's own packet. It makes it look like the event
happened after the packet was closed which is non compliant with the CTF
specification.
To create a trace exhibiting this bug, the `timestamp_end` field of
the last 2 packets was made one clock cycle smaller than the timestamp
of the last event of the said packet.
This bug was fixed in the follow versions of the LTTng tracers:
- lttng-ust 2.11.0
- lttng-module 2.11.0
- lttng-module 2.10.10
- lttng-module 2.9.13
* `lttng-crash` test trace
This trace was modified manually to simulate a trace resulting from the
lttng-crash utility.
When extracting a trace using the lttng-crash utility the `timestamp_end` of
some packets may be left uninitialized with the default value of 0.
To create a trace exhibiting this behavior, the `timestamp_end` of the last
three packets were set to 0.
This is _not_ a bug and all LTTng tracers can produce such trace.
* `event-before-packet` barectf test trace
This trace `event-before-packet` exhibits a barectf bug where the first
event of the second packet has a timestamp smaller than the
`timestamp_begin` field of its own packet.
This bug was fixed in barectf tracer version 2.3.1.
Test cases
==========
* `trace-info` query
- Add test case for `event-after-packet` LTTng quirk,
- Add test case for `lttng-crash` workaround.
Both of this test traces used in these test cases are based on the same
trace and the end result on the `trace-info` query is the same. We use
the same code for both test cases.
* Trace decoding
-Add `test_succeed` cases for all three of the above test traces.
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: Icfdb8052aa2a88038e22ad6a58f391b6d8dbd3df
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1542
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
This page took 0.027481 seconds and 4 git commands to generate.