mbox series

[00/14] bpf/tests: Extend the eBPF test suite

Message ID 20210728170502.351010-1-johan.almbladh@anyfinetworks.com (mailing list archive)
Headers show
Series bpf/tests: Extend the eBPF test suite | expand

Message

Johan Almbladh July 28, 2021, 5:04 p.m. UTC
This patch set extends the eBPF test suite in the test_bpf kernel module
to add more extensive tests of corner cases and new tests for operations
not previously covered.

An RFC patch set was previously submitted.

Link: https://lore.kernel.org/bpf/20210726081738.1833704-1-johan.almbladh@anyfinetworks.com/

Changes from RFC patch set:

* Changed tail call count limit test to comply with the new behavior of
  the interpreter, i.e. at most MAX_TAIL_CALL_CNT tail calls are
  permitted.

* Fixed an uninitilized variable in tail call test error path, found by
  the Kernel test robot. Also fixed a warning due to pointer-to-u32 cast
  in IMM64 load instructions.

The checkpatch.pl script reports an error for the multi-line macro in
patch 14/14 ("bpf/tests: Add tail call test suite"). However, it cannot
be enclosed in parenthesis as suggested since it is an array element
initialization, similar the existing BPF_LD_IMM64() helper macro. It can
be replaced, but I do think the code and the intent is clearer this way.

Thanks,
Johan

Johan Almbladh (14):
  bpf/tests: Add BPF_JMP32 test cases
  bpf/tests: Add BPF_MOV tests for zero and sign extension
  bpf/tests: Fix typos in test case descriptions
  bpf/tests: Add more tests of ALU32 and ALU64 bitwise operations
  bpf/tests: Add more ALU32 tests for BPF_LSH/RSH/ARSH
  bpf/tests: Add more BPF_LSH/RSH/ARSH tests for ALU64
  bpf/tests: Add more ALU64 BPF_MUL tests
  bpf/tests: Add tests for ALU operations implemented with function
    calls
  bpf/tests: Add word-order tests for load/store of double words
  bpf/tests: Add branch conversion JIT test
  bpf/tests: Add test for 32-bit context pointer argument passing
  bpf/tests: Add tests for atomic operations
  bpf/tests: Add tests for BPF_CMPXCHG
  bpf/tests: Add tail call test suite

 lib/test_bpf.c | 2732 +++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 2475 insertions(+), 257 deletions(-)