]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Enable CONFIG_IKCONFIG_PROC in config
authorGeliang Tang <geliang.tang@suse.com>
Thu, 19 May 2022 23:30:11 +0000 (16:30 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 20 May 2022 22:29:00 +0000 (15:29 -0700)
commit88e6c0b0f7de961a7e3ae60c59320b2afbbd7baa
tree52f35fdf7432144ac1b6bbc0bc6698b359db2bf8
parentd1937de37f99719ea2c57fbd0b7fde9156f4e756
selftests/bpf: Enable CONFIG_IKCONFIG_PROC in config

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>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220519233016.105670-3-mathew.j.martineau@linux.intel.com
tools/testing/selftests/bpf/config