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)
commitcaf952288d715df32b2e70c64506849287844fe4
tree95e8ba486548979c4613c0c68b040ace36458d57
parent728461f202c316798e3300674006dce18cfdfcea
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