Fix: ust metadata: resample clock on regenerate metadata
Observed issue
==============
The system test jobs complain that the clock regeneration is broken
since the move to the tsdl visitor approach for metadata generation.
# Test UST local with metadata regeneration
# destructive//../../src/bin/lttng/lttng create regen -o /tmp/tmp.metadata_regen_after_data_change.Vzb0vL
ok 23 - Create session regen in -o /tmp/tmp.metadata_regen_after_data_change.Vzb0vL
# destructive//../../src/bin/lttng/lttng enable-event tp:tptest -s regen -u
ok 24 - Enable ust event tp:tptest for session regen
# destructive//../../src/bin/lttng/lttng start regen
ok 25 - Start tracing for session regen
# destructive//../../src/bin/lttng/lttng stop regen
ok 26 - Stop lttng tracing for session regen
ok 27 - Validate trace at date 1970-02-02
# destructive//../../src/bin/lttng/lttng start regen
ok 28 - Start tracing for session regen
# destructive//../../src/bin/lttng/lttng regenerate metadata -s regen
ok 29 - Metadata regenerate regen
# destructive//../../src/bin/lttng/lttng stop regen
ok 30 - Stop lttng tracing for session regen
# destructive//../../src/bin/lttng/lttng destroy regen
ok 31 - Destroy session regen
not ok 32 - The trace is not at the expected date
# Failed test 'The trace is not at the expected date'
# in destructive//../utils/tap/tap.sh:fail() at line 159.
Cause
=====
Previously the clock was sampled on each call to `ust_metadata_session_statedump`
, currently the clock is only sampled on creation of the
`lttng::sessiond::ust::registry_session::registry_session` object.
Solution
========
On `lsu::registry_session::regenerate_metadata`, sample the clock and
replace the registry_session _clock object.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Change-Id: I6f671e4c01f71e1574824236cef03915a9c79b36
This page took 0.026119 seconds and 4 git commands to generate.