]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests/bpf: add selftests for new insn_array map
authorAnton Protopopov <a.s.protopopov@gmail.com>
Wed, 5 Nov 2025 09:04:02 +0000 (09:04 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 6 Nov 2025 01:53:18 +0000 (17:53 -0800)
commit218edd6db6b984d09d9965553b1742f42138754b
tree7b035c6cceb077bf62d2e8b06e5dbd0f722edd14
parentcbef91de0271b3d0c965a9eee5c33d49db24cd20
selftests/bpf: add selftests for new insn_array map

Add the following selftests for new insn_array map:

  * Incorrect instruction indexes are rejected
  * Two programs can't use the same map
  * BPF progs can't operate the map
  * no changes to code => map is the same
  * expected changes when instructions are added
  * expected changes when instructions are deleted
  * expected changes when multiple functions are present

Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20251105090410.1250500-5-a.s.protopopov@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/bpf_insn_array.c [new file with mode: 0644]