[RFC 04/47] test: remove unnecessary inclusion of sys/queue.h

Stephen Hemminger
2025-08-18T23:33:04Z

Those macros are not directly in most of the test code.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/test/commands.c | 2 +-
app/test/test.c | 1 -
app/test/test.h | 2 +-
app/test/test_atomic.c | 1 -
app/test/test_cmdline_lib.c | 1 -
app/test/test_func_reentrancy.c | 1 -
app/test/test_hash.c | 1 -
app/test/test_hash_functions.c | 1 -
app/test/test_link_bonding.c | 1 -
app/test/test_link_bonding_mode4.c | 1 -
app/test/test_link_bonding_rssconf.c | 1 -
app/test/test_logs.c | 1 -
app/test/test_malloc.c | 1 -
app/test/test_mbuf.c | 1 -
app/test/test_mcslock.c | 1 -
app/test/test_mempool.c | 1 -
app/test/test_mempool_perf.c | 1 -
app/test/test_memzone.c | 1 -
app/test/test_mp_secondary.c | 1 -
app/test/test_per_lcore.c | 1 -
app/test/test_pflock.c | 1 -
app/test/test_ring.c | 1 -
app/test/test_rwlock.c | 1 -
app/test/test_soring.c | 1 -
app/test/test_spinlock.c | 1 -
app/test/test_tailq.c | 1 -
app/test/test_ticketlock.c | 1 -
app/test/test_timer.c | 1 -
28 files changed, 2 insertions(+), 28 deletions(-)

diff --git a/app/test/commands.c b/app/test/commands.c
index 497d8e9952..6328ff3ed6 100644
--- a/app/test/commands.c
+++ b/app/test/commands.c
@@ -10,8 +10,8 @@
#include <stdlib.h>
#include <inttypes.h>
#include <errno.h>
-#include <sys/queue.h>

+#include <bsd_queue.h>
#include <rte_common.h>
#include <rte_log.h>
#include <rte_debug.h>
diff --git a/app/test/test.c b/app/test/test.c
index fd653cbbfd..b3a15529d9 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -9,7 +9,6 @@
#include <stdlib.h>
#include <errno.h>
#include <ctype.h>
-#include <sys/queue.h>

#include <cmdline_rdline.h>
#include <cmdline_parse.h>
diff --git a/app/test/test.h b/app/test/test.h
index ebc4864bf8..a8a1ac9e76 100644
--- a/app/test/test.h
+++ b/app/test/test.h
@@ -8,8 +8,8 @@
#include <errno.h>
#include <stddef.h>
#include <stdlib.h>
-#include <sys/queue.h>

+#include <bsd_queue.h>
#include <rte_hexdump.h>
#include <rte_common.h>
#include <rte_os_shim.h>
diff --git a/app/test/test_atomic.c b/app/test/test_atomic.c
index 3f26ce88d9..d98f7b1d09 100644
--- a/app/test/test_atomic.c
+++ b/app/test/test_atomic.c
@@ -7,7 +7,6 @@
#include <stdint.h>
#include <unistd.h>
#include <inttypes.h>
-#include <sys/queue.h>

#include <rte_memory.h>
#include <rte_per_lcore.h>
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index 87c1059366..67a2d73137 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -9,7 +9,6 @@
#include <stdlib.h>
#include <errno.h>
#include <ctype.h>
-#include <sys/queue.h>

#include <rte_common.h>

diff --git a/app/test/test_func_reentrancy.c b/app/test/test_func_reentrancy.c
index 34d685d493..c7f359e360 100644
--- a/app/test/test_func_reentrancy.c
+++ b/app/test/test_func_reentrancy.c
@@ -9,7 +9,6 @@
#include <inttypes.h>
#include <stdarg.h>
#include <errno.h>
-#include <sys/queue.h>

#include <rte_common.h>
#include <rte_log.h>
diff --git a/app/test/test_hash.c b/app/test/test_hash.c
index 5791fd7f4c..f538053367 100644
--- a/app/test/test_hash.c
+++ b/app/test/test_hash.c
@@ -8,7 +8,6 @@
#include <stdlib.h>
#include <stdarg.h>
#include <errno.h>
-#include <sys/queue.h>

#include <rte_common.h>
#include <rte_malloc.h>
diff --git a/app/test/test_hash_functions.c b/app/test/test_hash_functions.c
index 70820d1f19..0d9f1dc0f6 100644
--- a/app/test/test_hash_functions.c
+++ b/app/test/test_hash_functions.c
@@ -8,7 +8,6 @@
#include <stdlib.h>
#include <stdarg.h>
#include <errno.h>
-#include <sys/queue.h>

#include <rte_cycles.h>
#include <rte_random.h>
diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c
index 19b064771a..39541b04b0 100644
--- a/app/test/test_link_bonding.c
+++ b/app/test/test_link_bonding.c
@@ -11,7 +11,6 @@
#include <inttypes.h>
#include <errno.h>
#include <pthread.h>
-#include <sys/queue.h>
#include <sys/time.h>

#include <rte_cycles.h>
diff --git a/app/test/test_link_bonding_mode4.c b/app/test/test_link_bonding_mode4.c
index ff13dbed93..0df83d94d3 100644
--- a/app/test/test_link_bonding_mode4.c
+++ b/app/test/test_link_bonding_mode4.c
@@ -10,7 +10,6 @@
#include <inttypes.h>
#include <errno.h>
#include <rte_cycles.h>
-#include <sys/queue.h>

#include <rte_byteorder.h>
#include <rte_common.h>
diff --git a/app/test/test_link_bonding_rssconf.c b/app/test/test_link_bonding_rssconf.c
index 2cb689b1de..50bdc909f5 100644
--- a/app/test/test_link_bonding_rssconf.c
+++ b/app/test/test_link_bonding_rssconf.c
@@ -10,7 +10,6 @@
#include <inttypes.h>
#include <errno.h>
#include <rte_cycles.h>
-#include <sys/queue.h>

#include <rte_byteorder.h>
#include <rte_common.h>
diff --git a/app/test/test_logs.c b/app/test/test_logs.c
index 43b09704a3..a02e4b7860 100644
--- a/app/test/test_logs.c
+++ b/app/test/test_logs.c
@@ -5,7 +5,6 @@
#include <stdio.h>
#include <stdint.h>
#include <stdarg.h>
-#include <sys/queue.h>

#include <rte_log.h>
#include <rte_memory.h>
diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c
index ce8fc5dd06..c74ebaad10 100644
--- a/app/test/test_malloc.c
+++ b/app/test/test_malloc.c
@@ -13,7 +13,6 @@
#ifndef RTE_EXEC_ENV_WINDOWS
#include <sys/mman.h>
#endif
-#include <sys/queue.h>
#include <unistd.h>

#include <rte_common.h>
diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 17be977f31..b057ae79b4 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -12,7 +12,6 @@
#include <stdint.h>
#include <inttypes.h>
#include <errno.h>
-#include <sys/queue.h>

#include <rte_common.h>
#include <rte_errno.h>
diff --git a/app/test/test_mcslock.c b/app/test/test_mcslock.c
index 8fcbc11a08..e88da6d8de 100644
--- a/app/test/test_mcslock.c
+++ b/app/test/test_mcslock.c
@@ -7,7 +7,6 @@
#include <inttypes.h>
#include <string.h>
#include <unistd.h>
-#include <sys/queue.h>

#include <rte_common.h>
#include <rte_memory.h>
diff --git a/app/test/test_mempool.c b/app/test/test_mempool.c
index 61385e096e..6e6431e422 100644
--- a/app/test/test_mempool.c
+++ b/app/test/test_mempool.c
@@ -9,7 +9,6 @@
#include <inttypes.h>
#include <stdarg.h>
#include <errno.h>
-#include <sys/queue.h>

#include <rte_common.h>
#include <rte_eal_paging.h>
diff --git a/app/test/test_mempool_perf.c b/app/test/test_mempool_perf.c
index e164eca788..775d61461d 100644
--- a/app/test/test_mempool_perf.c
+++ b/app/test/test_mempool_perf.c
@@ -10,7 +10,6 @@
#include <inttypes.h>
#include <stdarg.h>
#include <errno.h>
-#include <sys/queue.h>

#include <rte_common.h>
#include <rte_log.h>
diff --git a/app/test/test_memzone.c b/app/test/test_memzone.c
index 506725ea41..8080501a89 100644
--- a/app/test/test_memzone.c
+++ b/app/test/test_memzone.c
@@ -6,7 +6,6 @@
#include <stdint.h>
#include <string.h>
#include <inttypes.h>
-#include <sys/queue.h>

#include <rte_random.h>
#include <rte_cycles.h>
diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c
index f3694530a8..72a50c92e4 100644
--- a/app/test/test_mp_secondary.c
+++ b/app/test/test_mp_secondary.c
@@ -10,7 +10,6 @@
#include <stdlib.h>
#include <stdarg.h>
#include <inttypes.h>
-#include <sys/queue.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
diff --git a/app/test/test_per_lcore.c b/app/test/test_per_lcore.c
index e0674b0e70..a3e56b5c9d 100644
--- a/app/test/test_per_lcore.c
+++ b/app/test/test_per_lcore.c
@@ -4,7 +4,6 @@

#include <stdio.h>
#include <stdint.h>
-#include <sys/queue.h>

#include <rte_common.h>
#include <rte_memory.h>
diff --git a/app/test/test_pflock.c b/app/test/test_pflock.c
index 162049201f..5fb7f21d50 100644
--- a/app/test/test_pflock.c
+++ b/app/test/test_pflock.c
@@ -6,7 +6,6 @@
#include <stdint.h>
#include <inttypes.h>
#include <unistd.h>
-#include <sys/queue.h>
#include <string.h>

#include <rte_common.h>
diff --git a/app/test/test_ring.c b/app/test/test_ring.c
index ba1fec1de3..1487093bc4 100644
--- a/app/test/test_ring.c
+++ b/app/test/test_ring.c
@@ -10,7 +10,6 @@
#include <stdint.h>
#include <inttypes.h>
#include <errno.h>
-#include <sys/queue.h>

#include <rte_common.h>
#include <rte_log.h>
diff --git a/app/test/test_rwlock.c b/app/test/test_rwlock.c
index 785317621d..3bbcd8100e 100644
--- a/app/test/test_rwlock.c
+++ b/app/test/test_rwlock.c
@@ -6,7 +6,6 @@
#include <stdint.h>
#include <inttypes.h>
#include <unistd.h>
-#include <sys/queue.h>
#include <string.h>

#include <rte_common.h>
diff --git a/app/test/test_soring.c b/app/test/test_soring.c
index 3c1944424e..d75054d95c 100644
--- a/app/test/test_soring.c
+++ b/app/test/test_soring.c
@@ -9,7 +9,6 @@
#include <stdint.h>
#include <inttypes.h>
#include <errno.h>
-#include <sys/queue.h>

#include <rte_common.h>
#include <rte_log.h>
diff --git a/app/test/test_spinlock.c b/app/test/test_spinlock.c
index 34e0ef9422..5b2064ee9a 100644
--- a/app/test/test_spinlock.c
+++ b/app/test/test_spinlock.c
@@ -7,7 +7,6 @@
#include <inttypes.h>
#include <string.h>
#include <unistd.h>
-#include <sys/queue.h>

#include <rte_common.h>
#include <rte_memory.h>
diff --git a/app/test/test_tailq.c b/app/test/test_tailq.c
index 2ff2877344..edb671a2be 100644
--- a/app/test/test_tailq.c
+++ b/app/test/test_tailq.c
@@ -7,7 +7,6 @@
#include <stdarg.h>
#include <string.h>
#include <errno.h>
-#include <sys/queue.h>

#include <rte_eal.h>
#include <rte_string_fns.h>
diff --git a/app/test/test_ticketlock.c b/app/test/test_ticketlock.c
index 8ac2e90876..2de7cc71c0 100644
--- a/app/test/test_ticketlock.c
+++ b/app/test/test_ticketlock.c
@@ -6,7 +6,6 @@
#include <stdint.h>
#include <stdio.h>
#include <string.h>
-#include <sys/queue.h>
#include <unistd.h>

#include <rte_common.h>
diff --git a/app/test/test_timer.c b/app/test/test_timer.c
index 3411b7fe20..5efcc7e61d 100644
--- a/app/test/test_timer.c
+++ b/app/test/test_timer.c
@@ -91,7 +91,6 @@
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h>
-#include <sys/queue.h>
#include <math.h>

#include <rte_common.h>
--
2.47.2