selftests/bpf: Extend netkit tests to validate set {head,tail}room
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 20 Dec 2024 23:46:58 +0000 (00:46 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 6 Jan 2025 08:48:58 +0000 (09:48 +0100)
commit058268e23fcadc2bdb9297c6dff3a010c70f9762
treea72e73870ee9061c0f9fbda05ddff413f23b3071
parentcc529a33d559cc75eb7250a4f4e2b9e431761312
selftests/bpf: Extend netkit tests to validate set {head,tail}room

Extend the netkit selftests to specify and validate the {head,tail}room
on the netdevice:

  # ./vmtest.sh -- ./test_progs -t netkit
  [...]
  ./test_progs -t netkit
  [    1.174147] bpf_testmod: loading out-of-tree module taints kernel.
  [    1.174585] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel
  [    1.422307] tsc: Refined TSC clocksource calibration: 3407.983 MHz
  [    1.424511] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fc3e5084, max_idle_ns: 440795359833 ns
  [    1.428092] clocksource: Switched to clocksource tsc
  #363     tc_netkit_basic:OK
  #364     tc_netkit_device:OK
  #365     tc_netkit_multi_links:OK
  #366     tc_netkit_multi_opts:OK
  #367     tc_netkit_neigh_links:OK
  #368     tc_netkit_pkt_type:OK
  #369     tc_netkit_scrub:OK
  Summary: 7/0 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://lore.kernel.org/bpf/20241220234658.490686-3-daniel@iogearbox.net
tools/testing/selftests/bpf/prog_tests/tc_netkit.c
tools/testing/selftests/bpf/progs/test_tc_link.c