X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=tests%2Funit%2Ftest_utils_compat_poll.c;h=b0bd623d13053c11084455f6db74980bab40cf71;hb=2a635488acf0c56ffb9b66c57f6bf97a95c53be6;hp=1eb327a6a708c2137aa22d75a120f3de67bbb19d;hpb=b12e37246d50f74583cd29b4d766f6f4fb4e8656;p=lttng-tools.git diff --git a/tests/unit/test_utils_compat_poll.c b/tests/unit/test_utils_compat_poll.c index 1eb327a6a..b0bd623d1 100644 --- a/tests/unit/test_utils_compat_poll.c +++ b/tests/unit/test_utils_compat_poll.c @@ -41,10 +41,17 @@ int lttng_opt_quiet = 1; int lttng_opt_verbose; int lttng_opt_mi; +/* + * Non-zero 8-bits arbitrary value below 0x7f to ensure no sign extension + * occurs. Used to verify that the value is properly propagated through the + * pipe. + */ +#define MAGIC_VALUE ((char) 0x5A) + #ifdef HAVE_EPOLL -#define NUM_TESTS 46 +#define NUM_TESTS 47 #else -#define NUM_TESTS 45 +#define NUM_TESTS 46 #endif #ifdef HAVE_EPOLL @@ -54,11 +61,6 @@ int lttng_opt_mi; #define CLOE_VALUE FD_CLOEXEC #endif -/* Non-zero 8-bits arbitrary value below 0x7f to ensure no sign extension - * used to verify that the value is properly propagated throught the pipe. - */ -#define MAGIC_VALUE ((char)0x5A) - void test_epoll_compat(void) { /* @@ -99,7 +101,7 @@ void test_add_del(void) ok(lttng_poll_add(&poll_events, 1, LPOLLIN) != 0, "Adding to uninitialized structure fails"); ok(lttng_poll_add(&poll_events, -1, LPOLLIN) != 0, "Adding invalid FD fails"); - lttng_poll_create(&poll_events, 1, 0); + ok(lttng_poll_create(&poll_events, 1, 0) == 0, "Create a poll set succeeds"); ok(LTTNG_POLL_GETNB(&poll_events) == 0, "Set created empty"); ok(lttng_poll_add(NULL, 1, LPOLLIN) != 0, "Adding to NULL set fails");