projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Port: Remove _GNU_SOURCE, defined in config.h
[lttng-tools.git]
/
tests
/
unit
/
test_ust_data.c
diff --git
a/tests/unit/test_ust_data.c
b/tests/unit/test_ust_data.c
index 52b93e9f6b87013bda56f56c34e1d7f65cfabc1c..40010a862168e0adef190f411016a3c7f4f3095f 100644
(file)
--- a/
tests/unit/test_ust_data.c
+++ b/
tests/unit/test_ust_data.c
@@
-16,7
+16,6
@@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#define _GNU_SOURCE
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <assert.h>
#include <errno.h>
#include <stdio.h>
@@
-39,15
+38,19
@@
#define RANDOM_STRING_LEN 11
/* Number of TAP tests in this file */
#define RANDOM_STRING_LEN 11
/* Number of TAP tests in this file */
-#define NUM_TESTS 1
0
+#define NUM_TESTS 1
1
-/* For
lttnger
r.h */
+/* For
erro
r.h */
int lttng_opt_quiet = 1;
int lttng_opt_verbose;
int lttng_opt_quiet = 1;
int lttng_opt_verbose;
+int lttng_opt_mi;
int ust_consumerd32_fd;
int ust_consumerd64_fd;
int ust_consumerd32_fd;
int ust_consumerd64_fd;
+/* Global variable required by sessiond objects being linked-in */
+struct lttng_ht *agent_apps_ht_by_sock;
+
static const char alphanum[] =
"0123456789"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
static const char alphanum[] =
"0123456789"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
@@
-82,7
+85,7
@@
static void test_create_one_ust_session(void)
ok(usess != NULL, "Create UST session");
ok(usess->id == 42 &&
ok(usess != NULL, "Create UST session");
ok(usess->id == 42 &&
- usess->
start_trac
e == 0 &&
+ usess->
activ
e == 0 &&
usess->domain_global.channels != NULL &&
usess->uid == 0 &&
usess->gid == 0,
usess->domain_global.channels != NULL &&
usess->uid == 0 &&
usess->gid == 0,
@@
-100,7
+103,7
@@
static void test_create_ust_channel(void)
strncpy(attr.name, "channel0", 8);
strncpy(attr.name, "channel0", 8);
- uchan = trace_ust_create_channel(&attr);
+ uchan = trace_ust_create_channel(&attr
, LTTNG_DOMAIN_UST
);
ok(uchan != NULL, "Create UST channel");
ok(uchan->enabled == 0 &&
ok(uchan != NULL, "Create UST channel");
ok(uchan->enabled == 0 &&
@@
-124,7
+127,7
@@
static void test_create_ust_event(void)
ev.type = LTTNG_EVENT_TRACEPOINT;
ev.loglevel_type = LTTNG_EVENT_LOGLEVEL_ALL;
ev.type = LTTNG_EVENT_TRACEPOINT;
ev.loglevel_type = LTTNG_EVENT_LOGLEVEL_ALL;
- event = trace_ust_create_event(&ev, NULL, NULL);
+ event = trace_ust_create_event(&ev, NULL, NULL
, NULL, false
);
ok(event != NULL, "Create UST event");
ok(event != NULL, "Create UST event");
@@
-156,10
+159,16
@@
static void test_create_ust_event_exclusion(void)
/* set up an exclusion set */
exclusion = zmalloc(sizeof(*exclusion) + LTTNG_SYMBOL_NAME_LEN);
/* set up an exclusion set */
exclusion = zmalloc(sizeof(*exclusion) + LTTNG_SYMBOL_NAME_LEN);
+ if (!exclusion) {
+ PERROR("zmalloc");
+ }
+
+ ok(exclusion != NULL, "Create UST exclusion");
+
exclusion->count = 1;
strncpy((char *)(exclusion->names), get_random_string(), LTTNG_SYMBOL_NAME_LEN);
exclusion->count = 1;
strncpy((char *)(exclusion->names), get_random_string(), LTTNG_SYMBOL_NAME_LEN);
- event = trace_ust_create_event(&ev, NULL,
exclusion
);
+ event = trace_ust_create_event(&ev, NULL,
NULL, exclusion, false
);
ok(event != NULL, "Create UST event with exclusion");
ok(event != NULL, "Create UST event with exclusion");
@@
-172,7
+181,6
@@
static void test_create_ust_event_exclusion(void)
event->attr.name[LTTNG_UST_SYM_NAME_LEN - 1] == '\0',
"Validate UST event and exclusion");
event->attr.name[LTTNG_UST_SYM_NAME_LEN - 1] == '\0',
"Validate UST event and exclusion");
- free(exclusion);
trace_ust_destroy_event(event);
}
trace_ust_destroy_event(event);
}
This page took
0.027344 seconds
and
5
git commands to generate.