• Daniel Borkmann's avatar
    selftests/bpf: Add more ring buffer test coverage · 316930d0
    Daniel Borkmann authored
    Add test coverage for reservations beyond the ring buffer size in order
    to validate that bpf_ringbuf_reserve() rejects the request with NULL, all
    other ring buffer tests keep passing as well:
    
      # ./vmtest.sh -- ./test_progs -t ringbuf
      [...]
      ./test_progs -t ringbuf
      [    1.165434] bpf_testmod: loading out-of-tree module taints kernel.
      [    1.165825] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel
      [    1.284001] tsc: Refined TSC clocksource calibration: 3407.982 MHz
      [    1.286871] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fc34e357, max_idle_ns: 440795379773 ns
      [    1.289555] clocksource: Switched to clocksource tsc
      #274/1   ringbuf/ringbuf:OK
      #274/2   ringbuf/ringbuf_n:OK
      #274/3   ringbuf/ringbuf_map_key:OK
      #274/4   ringbuf/ringbuf_write:OK
      #274     ringbuf:OK
      #275     ringbuf_multi:OK
      [...]
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
    [ Test fixups for getting BPF CI back to work ]
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    Link: https://lore.kernel.org/bpf/20240621140828.18238-2-daniel@iogearbox.net
    316930d0
Makefile 30.9 KB