From: Michael Jeanson Date: Thu, 27 Oct 2022 21:06:22 +0000 (-0400) Subject: Fix: tap.h conflicts with Clang C++ headers X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=e30c79d231a46b314854f9da823e9045aa78a844 Fix: tap.h conflicts with Clang C++ headers Always include tap.h last since it defines a 'fail' macro that clashes with some version of the clang++ system headers. Change-Id: I20938697045d00b467b12ca1e6dae159c634720a Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- diff --git a/tests/regression/tools/live/live_test.cpp b/tests/regression/tools/live/live_test.cpp index 559b9a7b1..08eb8197c 100644 --- a/tests/regression/tools/live/live_test.cpp +++ b/tests/regression/tools/live/live_test.cpp @@ -20,7 +20,6 @@ #include #include -#include #include #include @@ -32,6 +31,8 @@ #include #include +#include + #define SESSION1 "test1" #define RELAYD_URL "net://localhost" #define LIVE_TIMER 2000000 diff --git a/tests/unit/test_event_rule.cpp b/tests/unit/test_event_rule.cpp index a6bf6180a..c3fd01a81 100644 --- a/tests/unit/test_event_rule.cpp +++ b/tests/unit/test_event_rule.cpp @@ -12,8 +12,6 @@ #include #include -#include - #include #include #include @@ -38,6 +36,8 @@ #include #include "bin/lttng/loglevel.hpp" +#include + /* For error.h. */ int lttng_opt_quiet = 1; int lttng_opt_verbose; diff --git a/tests/unit/test_relayd_backward_compat_group_by_session.cpp b/tests/unit/test_relayd_backward_compat_group_by_session.cpp index 4b794faf7..602376c43 100644 --- a/tests/unit/test_relayd_backward_compat_group_by_session.cpp +++ b/tests/unit/test_relayd_backward_compat_group_by_session.cpp @@ -9,12 +9,13 @@ #include #include #include -#include #include #include "backward-compatibility-group-by.hpp" +#include + /* Number of TAP tests in this file */ #define NUM_TESTS_PER_TEST 1 diff --git a/tests/unit/test_utils_compat_poll.cpp b/tests/unit/test_utils_compat_poll.cpp index 697440963..49cd4a1eb 100644 --- a/tests/unit/test_utils_compat_poll.cpp +++ b/tests/unit/test_utils_compat_poll.cpp @@ -16,13 +16,13 @@ #include #include -#include - #include #include #include #include +#include + /* Verification without trashing test order in the child process */ #define childok(e, test, ...) do { \ if (!(e)) { \ diff --git a/tests/unit/test_utils_expand_path.cpp b/tests/unit/test_utils_expand_path.cpp index 9892727ba..9fe1619ee 100644 --- a/tests/unit/test_utils_expand_path.cpp +++ b/tests/unit/test_utils_expand_path.cpp @@ -13,12 +13,12 @@ #include #include -#include - #include #include #include +#include + /* For error.h */ int lttng_opt_quiet = 1; int lttng_opt_verbose = 3; diff --git a/tests/unit/test_uuid.cpp b/tests/unit/test_uuid.cpp index 07a2f4afb..3ead2a254 100644 --- a/tests/unit/test_uuid.cpp +++ b/tests/unit/test_uuid.cpp @@ -9,10 +9,10 @@ #include #include -#include - #include "common/uuid.hpp" +#include + #define NR_TESTS 21 static const char valid_str_1[] = "3d260c88-75ea-47b8-a7e2-d6077c0378d9";