Since both path uses information that can now be identical for N "apps"
(N lttng-ust instances for a single PID), we need to make sure that they
do not clash.
For now use the ua_session id which is monotonic.
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Change-Id: Ie7aea6c159ffd921d06763f251633441e7ac06d3
switch (ua_sess->buffer_type) {
case LTTNG_BUFFER_PER_PID:
ret = snprintf(ua_sess->path, sizeof(ua_sess->path),
switch (ua_sess->buffer_type) {
case LTTNG_BUFFER_PER_PID:
ret = snprintf(ua_sess->path, sizeof(ua_sess->path),
- DEFAULT_UST_TRACE_PID_PATH "/%s-%d-%s", app->name, app->pid,
- datetime);
+ DEFAULT_UST_TRACE_PID_PATH "/%s-%d-%s-%ld", app->name, app->pid,
+ datetime, ua_sess->id);
break;
case LTTNG_BUFFER_PER_UID:
ret = snprintf(ua_sess->path, sizeof(ua_sess->path),
break;
case LTTNG_BUFFER_PER_UID:
ret = snprintf(ua_sess->path, sizeof(ua_sess->path),
switch (ua_sess->buffer_type) {
case LTTNG_BUFFER_PER_PID:
ret = snprintf(tmp_shm_path, sizeof(tmp_shm_path),
switch (ua_sess->buffer_type) {
case LTTNG_BUFFER_PER_PID:
ret = snprintf(tmp_shm_path, sizeof(tmp_shm_path),
- "/" DEFAULT_UST_TRACE_PID_PATH "/%s-%d-%s",
- app->name, app->pid, datetime);
+ "/" DEFAULT_UST_TRACE_PID_PATH "/%s-%d-%s-%ld",
+ app->name, app->pid, datetime, ua_sess->id);
break;
case LTTNG_BUFFER_PER_UID:
ret = snprintf(tmp_shm_path, sizeof(tmp_shm_path),
break;
case LTTNG_BUFFER_PER_UID:
ret = snprintf(tmp_shm_path, sizeof(tmp_shm_path),
export LTTNG_HOME
start_lttng_sessiond
export LTTNG_HOME
start_lttng_sessiond
-tests=( test_per_uid test_per_pid )
+# test_per_pid is invalid since the session_id (monotonic) is suffixed to the
+# path for to support multi-ust instance for a given pid and it is not
+# available in the env. Note that if we want
+# to upstream the support of multi-ust, we will need the figure out a way to
+# comply with the requirement of the readers.
+
+#tests=( test_per_uid test_per_pid )
+tests=( test_per_uid )
for fct_test in "${tests[@]}";
do
for fct_test in "${tests[@]}";
do
session_name="$session_name-$date_time_pattern"
fi
session_name="$session_name-$date_time_pattern"
fi
- pattern="$trace_path/$session_name/ust/pid/$pid/$app_string-*-$date_time_pattern/metadata"
+ pattern="$trace_path/$session_name/ust/pid/$pid/$app_string-*-$date_time_pattern-*/metadata"
validate_path_pattern "UST per-pid trace path is valid" "$pattern" "$trace_path"
}
validate_path_pattern "UST per-pid trace path is valid" "$pattern" "$trace_path"
}