From 41b42b3b7f1d94d5caff7e6ecf1a8b3f1f1441ae Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 18 Jul 2019 15:51:49 -0400 Subject: [PATCH] Tests build fix: undefined MAGIC_VALUE macro MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The MAGIC_VALUE macro is only defined when the build is configured in epoll mode. This value should be defined unconditionally as it is used in both poll and epoll test modes. Signed-off-by: Jérémie Galarneau --- tests/unit/test_utils_compat_poll.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/unit/test_utils_compat_poll.c b/tests/unit/test_utils_compat_poll.c index 1eb327a6a..24a74d76f 100644 --- a/tests/unit/test_utils_compat_poll.c +++ b/tests/unit/test_utils_compat_poll.c @@ -41,6 +41,13 @@ 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 #else @@ -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) { /* -- 2.34.1