tools/testing/selftests/bpf/config | 2 ++ 1 file changed, 2 insertions(+)
CONFIG_IKCONFIG_PROC is required by BPF selftests, otherwise we get
errors like this:
libbpf: failed to open system Kconfig
libbpf: failed to load object 'kprobe_multi'
libbpf: failed to load BPF skeleton 'kprobe_multi': -22
It's because /proc/config.gz is opened in bpf_object__read_kconfig_file()
in tools/lib/bpf/libbpf.c:
file = gzopen("/proc/config.gz", "r");
So this patch enables CONFIG_IKCONFIG and CONFIG_IKCONFIG_PROC in
tools/testing/selftests/bpf/config.
Suggested-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
v2:
- as a dedicated patch, not a squash-to one.
- apply this patch before "bpf: expose is_mptcp flag to bpf_tcp_sock"
---
tools/testing/selftests/bpf/config | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config
index 763db63a3890..8d7faff33c54 100644
--- a/tools/testing/selftests/bpf/config
+++ b/tools/testing/selftests/bpf/config
@@ -53,3 +53,5 @@ CONFIG_NF_DEFRAG_IPV4=y
CONFIG_NF_DEFRAG_IPV6=y
CONFIG_NF_CONNTRACK=y
CONFIG_USERFAULTFD=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
--
2.34.1
On Thu, 28 Apr 2022, Geliang Tang wrote: > CONFIG_IKCONFIG_PROC is required by BPF selftests, otherwise we get > errors like this: > > libbpf: failed to open system Kconfig > libbpf: failed to load object 'kprobe_multi' > libbpf: failed to load BPF skeleton 'kprobe_multi': -22 > > It's because /proc/config.gz is opened in bpf_object__read_kconfig_file() > in tools/lib/bpf/libbpf.c: > > file = gzopen("/proc/config.gz", "r"); > > So this patch enables CONFIG_IKCONFIG and CONFIG_IKCONFIG_PROC in > tools/testing/selftests/bpf/config. > > Suggested-by: Mat Martineau <mathew.j.martineau@linux.intel.com> > Signed-off-by: Geliang Tang <geliang.tang@suse.com> > --- > v2: > - as a dedicated patch, not a squash-to one. > - apply this patch before "bpf: expose is_mptcp flag to bpf_tcp_sock" Thanks - I'll send this as part of the v2 series for bpf-next. Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com> > --- > tools/testing/selftests/bpf/config | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config > index 763db63a3890..8d7faff33c54 100644 > --- a/tools/testing/selftests/bpf/config > +++ b/tools/testing/selftests/bpf/config > @@ -53,3 +53,5 @@ CONFIG_NF_DEFRAG_IPV4=y > CONFIG_NF_DEFRAG_IPV6=y > CONFIG_NF_CONNTRACK=y > CONFIG_USERFAULTFD=y > +CONFIG_IKCONFIG=y > +CONFIG_IKCONFIG_PROC=y > -- > 2.34.1 > > -- Mat Martineau Intel
Hi Geliang, Mat, On 29/04/2022 01:29, Mat Martineau wrote: > On Thu, 28 Apr 2022, Geliang Tang wrote: > >> CONFIG_IKCONFIG_PROC is required by BPF selftests, otherwise we get >> errors like this: >> >> libbpf: failed to open system Kconfig >> libbpf: failed to load object 'kprobe_multi' >> libbpf: failed to load BPF skeleton 'kprobe_multi': -22 >> >> It's because /proc/config.gz is opened in bpf_object__read_kconfig_file() >> in tools/lib/bpf/libbpf.c: >> >> file = gzopen("/proc/config.gz", "r"); >> >> So this patch enables CONFIG_IKCONFIG and CONFIG_IKCONFIG_PROC in >> tools/testing/selftests/bpf/config. Thank you for the patch and the review: New patches for t/upstream: - 94d844c712d5: selftests: bpf: Enable CONFIG_IKCONFIG_PROC in config - be5f5a7b44f8: conflict in t/selftests-bpf-add-MPTCP-test-base - Results: f1fcfe627540..2767792d035c (export) Builds and tests are now in progress: https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20220502T201958 https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export Cheers, Matt -- Tessares | Belgium | Hybrid Access Solutions www.tessares.net
© 2016 - 2025 Red Hat, Inc.