projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: consumerd: crash occurs when taking snapshot of ust channel
[lttng-tools.git]
/
tests
/
unit
/
test_session.c
diff --git
a/tests/unit/test_session.c
b/tests/unit/test_session.c
index cdb1bb88d7046cbe46218324db8031deddde00d1..b538bddc6bac261ca2a6615d065ebcce11b71126 100644
(file)
--- a/
tests/unit/test_session.c
+++ b/
tests/unit/test_session.c
@@
-132,7
+132,7
@@
static int create_one_session(char *name)
struct ltt_session *session = NULL;
session_lock_list();
struct ltt_session *session = NULL;
session_lock_list();
- ret_code = session_create(name, geteuid(), getegid(), &session);
+ ret_code = session_create(name, geteuid(), getegid(),
NULL,
&session);
session_put(session);
if (ret_code == LTTNG_OK) {
/* Validate */
session_put(session);
if (ret_code == LTTNG_OK) {
/* Validate */
@@
-141,21
+141,17
@@
static int create_one_session(char *name)
/* Session not found by name */
printf("session not found after creation\n");
ret = -1;
/* Session not found by name */
printf("session not found after creation\n");
ret = -1;
- goto end;
} else {
/* Success */
ret = 0;
} else {
/* Success */
ret = 0;
- goto end;
}
} else {
if (ret_code == LTTNG_ERR_EXIST_SESS) {
printf("(session already exists) ");
}
ret = -1;
}
} else {
if (ret_code == LTTNG_ERR_EXIST_SESS) {
printf("(session already exists) ");
}
ret = -1;
- goto end;
}
}
- ret = 0;
-end:
+
session_unlock_list();
return ret;
}
session_unlock_list();
return ret;
}
@@
-292,7
+288,7
@@
void test_session_name_generation(void)
const char *expected_session_name_prefix = DEFAULT_SESSION_NAME;
session_lock_list();
const char *expected_session_name_prefix = DEFAULT_SESSION_NAME;
session_lock_list();
- ret_code = session_create(NULL, geteuid(), getegid(), &session);
+ ret_code = session_create(NULL, geteuid(), getegid(),
NULL,
&session);
ok(ret_code == LTTNG_OK,
"Create session with a NULL name (auto-generate a name)");
if (!session) {
ok(ret_code == LTTNG_OK,
"Create session with a NULL name (auto-generate a name)");
if (!session) {
This page took
0.023563 seconds
and
4
git commands to generate.