From f0899b1fcbf43c61db4a17f1c665284e96f35997 Mon Sep 17 00:00:00 2001 From: Ilya Maximets Date: Tue, 22 Aug 2023 12:35:40 +0200 Subject: [PATCH] tests: Fix order of includes in barrier/id-fpool/mpsc-queue tests. config.h must be included first, because it affects all the later included headers, even the system ones. Also, struct timeval requires inclusion of sys/time.h. This fixes the build with CC=clang CFLAGS='-std=c99 -fgnuc-version=0' Fixes: aec1081c7df3 ("tests: Add ovs-barrier unit test.") Fixes: 2eac33c6cc4a ("id-fpool: Module for fast ID generation.") Fixes: 5396ba5b21c4 ("mpsc-queue: Module for lock-free message passing.") Acked-by: Eelco Chaudron Signed-off-by: Ilya Maximets --- tests/test-barrier.c | 8 ++++---- tests/test-id-fpool.c | 4 ++-- tests/test-mpsc-queue.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/test-barrier.c b/tests/test-barrier.c index 3bc5291cc..fb0ab0e69 100644 --- a/tests/test-barrier.c +++ b/tests/test-barrier.c @@ -14,13 +14,13 @@ * limitations under the License. */ +#include +#undef NDEBUG #include -#include - -#include "ovs-thread.h" -#include "ovs-rcu.h" #include "ovstest.h" +#include "ovs-rcu.h" +#include "ovs-thread.h" #include "random.h" #include "util.h" diff --git a/tests/test-id-fpool.c b/tests/test-id-fpool.c index 25275d9ae..27800aa9b 100644 --- a/tests/test-id-fpool.c +++ b/tests/test-id-fpool.c @@ -14,12 +14,12 @@ * limitations under the License. */ +#include #undef NDEBUG #include #include #include - -#include +#include #include "command-line.h" #include "id-fpool.h" diff --git a/tests/test-mpsc-queue.c b/tests/test-mpsc-queue.c index a38bf9e6d..16aa804a0 100644 --- a/tests/test-mpsc-queue.c +++ b/tests/test-mpsc-queue.c @@ -14,12 +14,12 @@ * limitations under the License. */ +#include #undef NDEBUG #include #include #include - -#include +#include #include "command-line.h" #include "guarded-list.h"