projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: test test_ust_data.c: check OOM
[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 dd00089266ad7770ce4c64e18b1340439f167c9b..6df66acbe6ee9e6d6f1ffe5fc083885e673893f9 100644
(file)
--- a/
tests/unit/test_ust_data.c
+++ b/
tests/unit/test_ust_data.c
@@
-39,7
+39,7
@@
#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 error.h */
int lttng_opt_quiet = 1;
/* For error.h */
int lttng_opt_quiet = 1;
@@
-157,6
+157,12
@@
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);
This page took
0.023666 seconds
and
4
git commands to generate.