* [PATCH net] selftests: loopback.sh: skip this test if the driver does not support
@ 2020-01-03 7:41 Hangbin Liu
2020-01-03 8:29 ` Simon Horman
2020-01-03 20:23 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Hangbin Liu @ 2020-01-03 7:41 UTC (permalink / raw)
To: netdev; +Cc: Jiri Pirko, Ido Schimmel, David S . Miller, Hangbin Liu
The loopback feature is only supported on a few drivers like broadcom,
mellanox, etc. The default veth driver has not supported it yet. To avoid
returning failed and making the runner feel confused, let's just skip
the test on drivers that not support loopback.
Fixes: ad11340994d5 ("selftests: Add loopback test")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
tools/testing/selftests/net/forwarding/loopback.sh | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/testing/selftests/net/forwarding/loopback.sh b/tools/testing/selftests/net/forwarding/loopback.sh
index 6e4626ae71b0..8f4057310b5b 100755
--- a/tools/testing/selftests/net/forwarding/loopback.sh
+++ b/tools/testing/selftests/net/forwarding/loopback.sh
@@ -1,6 +1,9 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
+# Kselftest framework requirement - SKIP code is 4.
+ksft_skip=4
+
ALL_TESTS="loopback_test"
NUM_NETIFS=2
source tc_common.sh
@@ -72,6 +75,11 @@ setup_prepare()
h1_create
h2_create
+
+ if ethtool -k $h1 | grep loopback | grep -q fixed; then
+ log_test "SKIP: dev $h1 does not support loopback feature"
+ exit $ksft_skip
+ fi
}
cleanup()
--
2.19.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] selftests: loopback.sh: skip this test if the driver does not support
2020-01-03 7:41 [PATCH net] selftests: loopback.sh: skip this test if the driver does not support Hangbin Liu
@ 2020-01-03 8:29 ` Simon Horman
2020-01-03 20:23 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2020-01-03 8:29 UTC (permalink / raw)
To: Hangbin Liu; +Cc: netdev, Jiri Pirko, Ido Schimmel, David S . Miller
On Fri, Jan 03, 2020 at 03:41:24PM +0800, Hangbin Liu wrote:
> The loopback feature is only supported on a few drivers like broadcom,
> mellanox, etc. The default veth driver has not supported it yet. To avoid
> returning failed and making the runner feel confused, let's just skip
> the test on drivers that not support loopback.
>
> Fixes: ad11340994d5 ("selftests: Add loopback test")
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] selftests: loopback.sh: skip this test if the driver does not support
2020-01-03 7:41 [PATCH net] selftests: loopback.sh: skip this test if the driver does not support Hangbin Liu
2020-01-03 8:29 ` Simon Horman
@ 2020-01-03 20:23 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-01-03 20:23 UTC (permalink / raw)
To: liuhangbin; +Cc: netdev, jiri, idosch
From: Hangbin Liu <liuhangbin@gmail.com>
Date: Fri, 3 Jan 2020 15:41:24 +0800
> The loopback feature is only supported on a few drivers like broadcom,
> mellanox, etc. The default veth driver has not supported it yet. To avoid
> returning failed and making the runner feel confused, let's just skip
> the test on drivers that not support loopback.
>
> Fixes: ad11340994d5 ("selftests: Add loopback test")
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-03 20:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-03 7:41 [PATCH net] selftests: loopback.sh: skip this test if the driver does not support Hangbin Liu
2020-01-03 8:29 ` Simon Horman
2020-01-03 20:23 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).