Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/bpf: Select CONFIG_FUNCTION_ERROR_INJECTION

BPF selftests require CONFIG_FUNCTION_ERROR_INJECTION to work. However,
CONFIG_FUNCTION_ERROR_INJECTION is no longer 'y' by default after recent
changes. As a result, we are seeing errors like the following from BPF CI:

bpf_testmod_test_read() is not modifiable
__x64_sys_setdomainname is not sleepable
__x64_sys_getpgid is not sleepable

Fix this by explicitly selecting CONFIG_FUNCTION_ERROR_INJECTION in the
selftest config.

Fixes: a4412fdd49dc ("error-injection: Add prompt for function error injection")
Reported-by: Daniel Müller <deso@posteo.net>
Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Daniel Müller <deso@posteo.net>
Link: https://lore.kernel.org/bpf/20221213220500.3427947-1-song@kernel.org

authored by

Song Liu and committed by
Daniel Borkmann
a8dfde09 ec9230b1

+1
+1
tools/testing/selftests/bpf/config
··· 16 16 CONFIG_DYNAMIC_FTRACE=y 17 17 CONFIG_FPROBE=y 18 18 CONFIG_FTRACE_SYSCALLS=y 19 + CONFIG_FUNCTION_ERROR_INJECTION=y 19 20 CONFIG_FUNCTION_TRACER=y 20 21 CONFIG_GENEVE=y 21 22 CONFIG_IKCONFIG=y