Thread (17 messages) 17 messages, 5 authors, 8d ago

Re: [PATCH v2 4/4] selftests: net: add TAP socket filter attach tests

flat view

From: bot+bpf-ci@kernel.org
Date: 2026-09-29 10:34:35

quoted hunk ↗ jump to hunk
diff --git a/tools/testing/selftests/net/tun.c b/tools/testing/selftests/net/tun.c
index abe488bac50b..bf8d4d6f21f7 100644
--- a/tools/testing/selftests/net/tun.c
+++ b/tools/testing/selftests/net/tun.c
@@ -8,13 +8,19 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <linux/filter.h>
 #include <linux/if_tun.h>
 #include <sys/ioctl.h>
+#include <sys/mman.h>
 #include <sys/socket.h>

 #include "kselftest_harness.h"
 #include "tuntap_helpers.h"

+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+#endif
This isn't a bug, but kselftest.h already provides ARRAY_SIZE through
kselftest_harness.h. Is this #ifndef block needed, or can it be dropped?

Looking at the include chain: kselftest_harness.h includes kselftest.h,
and kselftest.h defines ARRAY_SIZE at line 63-65. kselftest_harness.h also
defines it again at line 749. Other harness-based tests in the same
directory (tls.c, ip_local_port_range.c) use ARRAY_SIZE without defining
it themselves.

[ ... ]


---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/36552651982
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help