]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: add checks on extack messages for eBPF hw offload tests
authorQuentin Monnet <quentin.monnet@netronome.com>
Tue, 23 Jan 2018 19:22:53 +0000 (11:22 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Jan 2018 01:24:31 +0000 (20:24 -0500)
commitfb641f7eab0236fdb5da1be79d62fb10bf720b59
tree95e8ba486548979c4613c0c68b040ace36458d57
parenta8af2a944d42839dd83cc50f98bbc156169b46d9
selftests/bpf: add checks on extack messages for eBPF hw offload tests

Add checks to test that netlink extack messages are correctly displayed
in some expected error cases for eBPF offload to netdevsim with TC and
XDP.

iproute2 may be built without libmnl support, in which case the extack
messages will not be reported.  Try to detect this condition, and when
enountered print a mild warning to the user and skip the extack validation.

Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/bpf/test_offload.py