]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Use kselftest skip code for skipped tests
authorPo-Hsu Lin <po-hsu.lin@canonical.com>
Wed, 29 Sep 2021 05:12:50 +0000 (13:12 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 30 Sep 2021 21:09:17 +0000 (23:09 +0200)
commit8929907d64d7e5387ac271124d6e7650c0be46d5
tree51f13bd5cd3d8568c5445d5e85f41c7345cd836e
parent3c38cb7d87ba86a29087819c2e145ee7fc1fe6e1
selftests/bpf: Use kselftest skip code for skipped tests

There are several test cases in the bpf directory are still using
exit 0 when they need to be skipped. Use kselftest framework skip
code instead so it can help us to distinguish the return status.

Criterion to filter out what should be fixed in bpf directory:
  grep -r "exit 0" -B1 | grep -i skip

This change might cause some false-positives if people are running
these test scripts directly and only checking their return codes,
which will change from 0 to 4. However I think the impact should be
small as most of our scripts here are already using this skip code.
And there will be no such issue if running them with the kselftest
framework.

Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20210929051250.13831-1-po-hsu.lin@canonical.com
tools/testing/selftests/bpf/test_xdp_meta.sh
tools/testing/selftests/bpf/test_xdp_vlan.sh