selftests/bpf: fix selftests build with old system-wide headers
Subsystems (5)
Andrii Nakryiko
maintainerPATCH 1/1 selftests/bpf: fix selftests build with old system-wide headers
migrate_reuseport.c selftest relies on having TCP_FASTOPEN_CONNECT defined in system-wide netinet/tcp.h. Selftests can use up-to-date uapi/linux/tcp.h, but that one doesn't have SOL_TCP. So instead of switching everything to uapi header, add #define for TCP_FASTOPEN_CONNECT to fix the build.
--- tools/testing/selftests/bpf/prog_tests/migrate_reuseport.c | 4 ++++ 1 file changed, 4 insertions(+)
tools/testing/selftests/bpf/prog_tests/migrate_reuseport.c +4 -0
@@ -30,6 +30,10 @@#include "test_migrate_reuseport.skel.h" #include "network_helpers.h" +#ifndef TCP_FASTOPEN_CONNECT +#define TCP_FASTOPEN_CONNECT 30 +#endif +#define IFINDEX_LO 1#define NR_SERVERS 5
Signature · 1 line
2.30.2
From: Andrii Nakryiko <[email protected]> Date: Wed, 16 Jun 2021 21:14:46 -0700
Quoted 4 lines
migrate_reuseport.cselftest relies on havingTCP_FASTOPEN_CONNECTdefined in system-widenetinet/tcp.h. Selftests can use up-to-dateuapi/linux/tcp.h, but that one doesn't haveSOL_TCP. So instead of switching everything to uapi header, add #define forTCP_FASTOPEN_CONNECTto fix the build.
Thank you!
This patch was applied to bpf/bpf-next.git (refs/heads/master):
Hello:
This patch was applied to bpf/bpf-next.git (refs/heads/master):
Quoted 10 lines · On Wed, 16 Jun 2021 21:14:46 -0700 you wrote:
migrate_reuseport.cselftest relies on havingTCP_FASTOPEN_CONNECTdefined in system-widenetinet/tcp.h. Selftests can use up-to-dateuapi/linux/tcp.h, but that one doesn't haveSOL_TCP. So instead of switching everything to uapi header, add #define forTCP_FASTOPEN_CONNECTto fix the build.Cc Kuniyuki Iwashima <[email protected]>Fixes c9d0bdef89a6 ("bpf: Test BPF_SK_REUSEPORT_SELECT_OR_MIGRATE.")Signed-off-by Andrii Nakryiko <[email protected]>[...]
Here is the summary with links:
- [bpf-next] selftests/bpf: fix selftests build with old system-wide headers
https://git.kernel.org/bpf/bpf-next/c/f20792d425d2
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html