summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
01fac81)
A value of 0 for the metadata key indicates that the metadata channel
was never created/pushed on the consumer side.
This can occur in scenario where a tracker(s) (vuid/vgid/vpid) is present.
The metadata channel might never be created/pushed since no applications
are actually tracing. Still, the uid registry exists due to the order
in which the sessiond received the client commands (create,
enable-channel, lttng track/untrack).
See included test for a complete reproducer.
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Change-Id: Id7ef34ebc48333f47db4bdca907cf81911b60d1d
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
struct buffer_reg_channel *reg_chan;
struct consumer_socket *socket;
struct buffer_reg_channel *reg_chan;
struct consumer_socket *socket;
+ if (!reg->registry->reg.ust->metadata_key) {
+ /* Skip since no metadata is present */
+ continue;
+ }
+
/* Get consumer socket to use to push the metadata.*/
socket = consumer_find_socket_by_bitness(reg->bits_per_long,
usess->consumer);
/* Get consumer socket to use to push the metadata.*/
socket = consumer_find_socket_by_bitness(reg->bits_per_long,
usess->consumer);
SESSION_NAME="tracker"
NR_ITER=100
NUM_GLOBAL_TESTS=2
SESSION_NAME="tracker"
NR_ITER=100
NUM_GLOBAL_TESTS=2
NUM_KERNEL_TESTS=462
NUM_TESTS=$((NUM_UST_TESTS+NUM_KERNEL_TESTS+NUM_GLOBAL_TESTS))
NUM_KERNEL_TESTS=462
NUM_TESTS=$((NUM_UST_TESTS+NUM_KERNEL_TESTS+NUM_GLOBAL_TESTS))
+function test_event_ust_vpid_untrack_snapshot()
+{
+ local trace_path
+
+ trace_path=$(mktemp -d)
+
+ diag "Test_event_ust_vpid_untrack_snapshot"
+
+ create_lttng_session_ok $SESSION_NAME "$trace_path" "--snapshot"
+
+ enable_ust_lttng_event_ok $SESSION_NAME "$EVENT_NAME"
+
+ prepare_ust_app
+
+ lttng_untrack_ust_ok "--vpid --all"
+
+ start_lttng_tracing_ok
+
+ trace_ust_app
+ lttng_snapshot_record $SESSION_NAME
+
+ stop_lttng_tracing_ok
+ destroy_lttng_session_ok $SESSION_NAME
+
+ snapshot_count=$(find "$trace_path" -name metadata | wc -l)
+ is "$snapshot_count" 0 "Number of snapshot is zero"
+
+ rm -rf "$trace_path"
+}
+
# MUST set TESTDIR before calling those functions
plan_tests $NUM_TESTS
# MUST set TESTDIR before calling those functions
plan_tests $NUM_TESTS
test_event_tracker ust 1 "${EVENT_NAME}" "--vpid --all"
test_event_vpid_tracker ust 1 "${EVENT_NAME}"
test_event_tracker ust 1 "${EVENT_NAME}" "--vpid --all"
test_event_vpid_tracker ust 1 "${EVENT_NAME}"
+#snapshot untrack vpid
+
+test_event_ust_vpid_untrack_snapshot
+
#pid (backward compat)
#non-matching
#pid (backward compat)
#non-matching