]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/net: Use kselftest skip code for skipped tests
authorPo-Hsu Lin <po-hsu.lin@canonical.com>
Mon, 23 Aug 2021 08:58:54 +0000 (16:58 +0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 24 Aug 2021 23:49:09 +0000 (16:49 -0700)
commit88ee18a41b732fd684582031caa52bfc7c4698b4
treec5b2bd3a9dd5648d69b1e894bd6b4ec95767494b
parent1f0b2feeae8f01688d5f88e9e558ce98e5e61be5
selftests/net: Use kselftest skip code for skipped tests

There are several test cases in the net directory are still using
exit 0 or exit 1 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 net directory:
  grep -r "exit [01]" -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>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Link: https://lore.kernel.org/r/20210823085854.40216-1-po-hsu.lin@canonical.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
12 files changed:
tools/testing/selftests/net/fcnal-test.sh
tools/testing/selftests/net/fib_rule_tests.sh
tools/testing/selftests/net/forwarding/devlink_lib.sh
tools/testing/selftests/net/forwarding/lib.sh
tools/testing/selftests/net/forwarding/router_mpath_nh.sh
tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh
tools/testing/selftests/net/run_afpackettests
tools/testing/selftests/net/srv6_end_dt46_l3vpn_test.sh
tools/testing/selftests/net/srv6_end_dt4_l3vpn_test.sh
tools/testing/selftests/net/srv6_end_dt6_l3vpn_test.sh
tools/testing/selftests/net/unicast_extensions.sh
tools/testing/selftests/net/vrf_strict_mode_test.sh