[Linux-mlxsw] [RFC PATCH] selftests: forwarding: Allow running specific tests
Ido Schimmel
idosch at mellanox.com
Tue Apr 24 00:23:46 AEST 2018
Similar to commit a511858c7536 ("selftests: fib_tests: Allow user to run
a specific test"), allow user to run only a subset of the tests using
the TEST environment variable.
This is useful when not all the tests can pass on a given device.
Specifically, mlxsw does not support the 'continue' action used by
match_ip_flags_test().
Signed-off-by: Ido Schimmel <idosch at mellanox.com>
---
Ignore. Test patch to see if patchwork is working.
---
.../testing/selftests/net/forwarding/tc_flower.sh | 28 ++++++++++++++--------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/tools/testing/selftests/net/forwarding/tc_flower.sh b/tools/testing/selftests/net/forwarding/tc_flower.sh
index 0c54059f1875..7e396ccf69ac 100755
--- a/tools/testing/selftests/net/forwarding/tc_flower.sh
+++ b/tools/testing/selftests/net/forwarding/tc_flower.sh
@@ -245,17 +245,9 @@ trap cleanup EXIT
setup_prepare
setup_wait
-match_dst_mac_test
-match_src_mac_test
-match_dst_ip_test
-match_src_ip_test
-match_ip_flags_test
-
-tc_offload_check
-if [[ $? -ne 0 ]]; then
- log_info "Could not test offloaded functionality"
+if [ -n "$TEST" ]; then
+ eval $TEST
else
- tcflags="skip_sw"
match_dst_mac_test
match_src_mac_test
match_dst_ip_test
@@ -263,4 +255,20 @@ else
match_ip_flags_test
fi
+tc_offload_check
+if [[ $? -ne 0 ]]; then
+ log_info "Could not test offloaded functionality"
+else
+ tcflags="skip_sw"
+ if [ -n "$TEST" ]; then
+ eval $TEST
+ else
+ match_dst_mac_test
+ match_src_mac_test
+ match_dst_ip_test
+ match_src_ip_test
+ match_ip_flags_test
+ fi
+fi
+
exit $EXIT_STATUS
--
2.14.3
More information about the Linux-mlxsw
mailing list