Tests: test_session: include tap.h last
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 6 Jun 2022 16:07:15 +0000 (12:07 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 13 Jun 2022 20:34:46 +0000 (16:34 -0400)
tap.h defines a number of macros that are very likely to clash with
other headers (e.g. ok, fail, etc.). On gcc 7.5.0, builds fail whenever
tap.h is included before an header that transitively includes
basic_ios.h.

This clash doesn't occur with more recent gcc releases (tested with 11.2
on my local machine).

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I62aaa14a6d1f20c77073ab2e481eddcb28fb78f3

tests/unit/test_session.cpp

index 05c1f81b687fdabe6698cfb715927defca9aef90..c19a1afddfc0a17a445b71d367b74dfaaf7444b6 100644 (file)
@@ -13,8 +13,6 @@
 #include <unistd.h>
 #include <urcu.h>
 
-#include <tap/tap.h>
-
 #include <bin/lttng-sessiond/health-sessiond.hpp>
 #include <bin/lttng-sessiond/session.hpp>
 #include <bin/lttng-sessiond/thread.hpp>
@@ -23,6 +21,8 @@
 #include <common/compat/errno.hpp>
 #include <common/sessiond-comm/sessiond-comm.hpp>
 
+#include <tap/tap.h>
+
 #define SESSION1 "test1"
 
 #define MAX_SESSIONS 10000
This page took 0.024783 seconds and 4 git commands to generate.