iterator.c, muxer: tweak clock compatibility validation error messages
In general, make the prose part of the messages be a bit more in line
with the enumerator names, which usually ends up a bit more specific
than the current messages.
In muxer's msg-iter.cpp:
- Split the ExpectingOriginUnixGotNone,
ExpectingOriginUnknownWithUuidGotNone and
ExpectingOriginUnknownWithoutUuidGotNone, to provide slightly more
precise error messages about what kind of clock class is expected.
- Always include the stream class information, whenever there is a
stream class (message iterator inactivity messages don't have an
associated stream class). Factor this out in a `formatStreamCls`
lambda.
- Factor out the formatting of the clock class info, and print an
additional `clock-class-origin-is-unix-epoch` and `clock-class-uuid`
fields. This factorisation will be helpful when adding support for
MIP 1, since the fields to format will change. We will need to
update fewer places.
In iterator.c:
- Print the actual clock class info in a few more places.
- Change phrases like "has non Unix epoch origin" for "has unknown
origin", both in human-readable messages and conditions IDs.
- Tweak the "Expecting a clock class, got none." messages to be a bit
more specific, differentiating the three cases.
- Print the expected UUID whenever we expect a clock class with a
specific UUID.
Instead of cherry-picking the information we print for each case, we
could also print the entire reference clock class information (making it
clear that we don't necessarily expect this particular clock class
instance, perhaps with a `reference-` prefix). It would probably make
the implementation simpler, but it would print a bit more unnecessary
information. The user would have to infer from the error message what
is the relevant information in there. I don't have a strong preference
for either approach.
Change-Id: I0ce2ab5b146a79baa5aa0afbd9d5de4f79f283a1
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12784
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
This page took 0.029598 seconds and 4 git commands to generate.