goto error;
}
+ if (!session->has_been_started) {
+ if (!session->snapshot_mode && session->output_traces) {
+ ret = session_mkdir(session);
+ if (ret) {
+ ERR("Failed to create the session directories");
+ ret = LTTNG_ERR_CREATE_DIR_FAIL;
+ goto error;
+ }
+ }
+ }
+
/* Kernel tracing */
if (ksession != NULL) {
+ DBG("Start kernel tracing session %s", session->name);
ret = start_kernel_session(ksession, kernel_tracer_fd);
if (ret != LTTNG_OK) {
goto error;
goto error;
}
- /* Create directory(ies) on local filesystem. */
- if (session->kernel_session->consumer->type == CONSUMER_DST_LOCAL &&
- strlen(session->kernel_session->consumer->dst.session_root_path) > 0) {
- ret = run_as_mkdir_recursive(
- session->kernel_session->consumer->dst.session_root_path,
- S_IRWXU | S_IRWXG, session->uid, session->gid);
- if (ret < 0) {
- if (errno != EEXIST) {
- ERR("Trace directory creation error");
- goto error;
- }
- }
- }
-
session->kernel_session->uid = session->uid;
session->kernel_session->gid = session->gid;
session->kernel_session->output_traces = session->output_traces;
print_test_result(demo_process.returncode == 0, current_test,\
"Running application dynamically linked to providers, no preload")
current_test += 1
- print_test_result(not os.path.exists(session_info.trace_path), current_test,\
+ trace_path = os.path.join(session_info.trace_path, "ust", "uid")
+ print_test_result(not os.path.exists(trace_path), current_test,\
"No events logged when running demo application without preloading providers")
current_test += 1