X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Ftools%2Ftest_sessions.c;h=a6d76c73df49a96a8300f4ca3834811e9d87c441;hp=cd8003dda5b17342e98c614232ec062989d3e9ff;hb=ffadb7d34f0cfd59405e075d84dc10512e832446;hpb=a4b92340642035d1eafeb1eead0ad01f64d2007d diff --git a/tests/tools/test_sessions.c b/tests/tools/test_sessions.c index cd8003dda..a6d76c73d 100644 --- a/tests/tools/test_sessions.c +++ b/tests/tools/test_sessions.c @@ -28,6 +28,7 @@ #include #include +#include #include "utils.h" @@ -132,7 +133,7 @@ static int create_one_session(char *name, char *path) int ret; ret = session_create(name, path, geteuid(), getegid()); - if (ret == LTTCOMM_OK) { + if (ret == LTTNG_OK) { /* Validate */ ret = find_session_name(name); if (ret < 0) { @@ -144,7 +145,7 @@ static int create_one_session(char *name, char *path) return 0; } } else { - if (ret == LTTCOMM_EXIST_SESS) { + if (ret == LTTNG_ERR_EXIST_SESS) { printf("(session already exists) "); } return -1; @@ -162,7 +163,7 @@ static int destroy_one_session(struct ltt_session *session) ret = session_destroy(session); - if (ret == LTTCOMM_OK) { + if (ret == LTTNG_OK) { /* Validate */ if (session == NULL) { return 0; @@ -202,22 +203,6 @@ static int fuzzing_create_args(void) return 0; } -static int fuzzing_destroy_args(void) -{ - int ret; - - ret = destroy_one_session(NULL); - if (ret > 0) { - printf("Session destroyed with (null)\n"); - return -1; - } - - /* Session list must be 0 */ - assert(!session_list_count()); - - return 0; -} - /* * This test is supposed to fail at the second create call. If so, return 0 for * test success, else -1. @@ -306,14 +291,6 @@ int main(int argc, char **argv) } PRINT_OK(); - printf("Fuzzing destroy_session argument: "); - fflush(stdout); - ret = fuzzing_destroy_args(); - if (ret < 0) { - return -1; - } - PRINT_OK(); - printf("Creating %d sessions: ", MAX_SESSIONS); fflush(stdout); for (i = 0; i < MAX_SESSIONS; i++) {