selftests/net: make udpgso_bench skip unsupported testcases
authorWillem de Bruijn <willemb@google.com>
Tue, 18 Jun 2019 20:03:04 +0000 (16:03 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Jun 2019 21:33:47 +0000 (17:33 -0400)
commit22f1a38a547b5ce5e73b0a77339cbf23f70dee5d
tree1981a8e92e2ffb9d80506f26e0548b249fcde5dd
parent25cec756891e8733433efea63b2254ddc93aa5cc
selftests/net: make udpgso_bench skip unsupported testcases

Kselftest can be run against older kernels. Instead of failing hard
when a feature is unsupported, return the KSFT_SKIP exit code.

Specifically, do not fail hard on missing udp zerocopy.

The udp gso bench test runs multiple test cases from a single script.
Fail if any case fails, else return skip if any test is skipped.

Link: https://lore.kernel.org/lkml/20190618171516.GA17547@kroah.com/
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/udpgso_bench.sh
tools/testing/selftests/net/udpgso_bench_tx.c