public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/3] Separate tests that need error injection
@ 2026-02-10 12:40 Viktor Malik
  2026-02-10 12:40 ` [PATCH bpf-next 1/3] selftests/bpf: Split module_attach into subtests Viktor Malik
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Viktor Malik @ 2026-02-10 12:40 UTC (permalink / raw)
  To: bpf
  Cc: Andrii Nakryiko, Eduard Zingerman, Alexei Starovoitov,
	Daniel Borkmann, Martin KaFai Lau, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
	Shuah Khan, Viktor Malik, Jordan Rome, Qais Yousef, Hou Tao

Some enterprise kernels (such as RHEL) do not enable error injection via
BPF (CONFIG_FUNCTION_ERROR_INJECTION and CONFIG_BPF_KPROBE_OVERRIDE).
When running test_progs on such kernels, a lot of test cases fail since
they use sleepable fentry or fmod_ret program types which require error
injection to be enabled. While it is possible to skip these via custom
DENYLIST, some test_progs are not properly split into subtests and
therefore must be entirely skipped.

This patch series split such tests into subtests, namely module_attach
and read_vsyscall. In addition, the last patch separates a sleepable
fentry test out of the LSM test suite into a separate test so that it
can be skipped without skipping other LSM tests.

Viktor Malik (3):
  selftests/bpf: Split module_attach into subtests
  selftests/bpf: Split read_vsyscall into subtests
  selftests/bpf: Split sleepable fentry from LSM test

 .../bpf/prog_tests/fentry_sleepable.c         |  28 +++
 .../selftests/bpf/prog_tests/module_attach.c  | 168 +++++++++++++-----
 .../selftests/bpf/prog_tests/read_vsyscall.c  |  41 ++++-
 .../selftests/bpf/prog_tests/test_lsm.c       |   8 -
 .../selftests/bpf/progs/fentry_sleepable.c    |  28 +++
 tools/testing/selftests/bpf/progs/lsm.c       |  21 ---
 .../selftests/bpf/progs/read_vsyscall.c       |   8 +-
 .../selftests/bpf/progs/test_module_attach.c  |  63 +++----
 8 files changed, 244 insertions(+), 121 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/fentry_sleepable.c
 create mode 100644 tools/testing/selftests/bpf/progs/fentry_sleepable.c

-- 
2.53.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-02-10 20:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-10 12:40 [PATCH bpf-next 0/3] Separate tests that need error injection Viktor Malik
2026-02-10 12:40 ` [PATCH bpf-next 1/3] selftests/bpf: Split module_attach into subtests Viktor Malik
2026-02-10 15:26   ` Jiri Olsa
2026-02-10 20:37     ` Viktor Malik
2026-02-10 12:40 ` [PATCH bpf-next 2/3] selftests/bpf: Split read_vsyscall " Viktor Malik
2026-02-10 12:40 ` [PATCH bpf-next 3/3] selftests/bpf: Split sleepable fentry from LSM test Viktor Malik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox