All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2] selftests: net: vxlan: Fix selftest regression after changes in iproute2.
@ 2023-06-08  6:44 Vladimir Nikishkin
  2023-06-08  7:56 ` Ido Schimmel
  2023-06-11 20:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Vladimir Nikishkin @ 2023-06-08  6:44 UTC (permalink / raw)
  To: netdev
  Cc: davem, edumazet, kuba, pabeni, eng.alaamohamedsoliman.am, gnault,
	razor, idosch, liuhangbin, eyal.birger, jtoppins, shuah,
	linux-kselftest, stephen, Vladimir Nikishkin

The iproute2 output that eventually landed upstream is different than
the one used in this test, resulting in failures. Fix by adjusting the
test to use iproute2's JSON output, which is more stable than regular
output.

Fixes: 305c04189997 ("selftests: net: vxlan: Add tests for vxlan nolocalbypass option.")
Signed-off-by: Vladimir Nikishkin <vladimir@nikishkin.pw>
---
v1=>v2: Fix indentation by tabs.

 tools/testing/selftests/net/test_vxlan_nolocalbypass.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/net/test_vxlan_nolocalbypass.sh b/tools/testing/selftests/net/test_vxlan_nolocalbypass.sh
index 46067db53068..f75212bf142c 100755
--- a/tools/testing/selftests/net/test_vxlan_nolocalbypass.sh
+++ b/tools/testing/selftests/net/test_vxlan_nolocalbypass.sh
@@ -130,7 +130,7 @@ nolocalbypass()
 	run_cmd "tc -n ns1 qdisc add dev lo clsact"
 	run_cmd "tc -n ns1 filter add dev lo ingress pref 1 handle 101 proto ip flower ip_proto udp dst_port 4790 action drop"
 
-	run_cmd "ip -n ns1 -d link show dev vx0 | grep ' localbypass'"
+	run_cmd "ip -n ns1 -d -j link show dev vx0 | jq -e '.[][\"linkinfo\"][\"info_data\"][\"localbypass\"] == true'"
 	log_test $? 0 "localbypass enabled"
 
 	run_cmd "ip netns exec ns1 mausezahn vx0 -a $smac -b $dmac -c 1 -p 100 -q"
@@ -140,7 +140,7 @@ nolocalbypass()
 
 	run_cmd "ip -n ns1 link set dev vx0 type vxlan nolocalbypass"
 
-	run_cmd "ip -n ns1 -d link show dev vx0 | grep 'nolocalbypass'"
+	run_cmd "ip -n ns1 -d -j link show dev vx0 | jq -e '.[][\"linkinfo\"][\"info_data\"][\"localbypass\"] == false'"
 	log_test $? 0 "localbypass disabled"
 
 	run_cmd "ip netns exec ns1 mausezahn vx0 -a $smac -b $dmac -c 1 -p 100 -q"
@@ -150,7 +150,7 @@ nolocalbypass()
 
 	run_cmd "ip -n ns1 link set dev vx0 type vxlan localbypass"
 
-	run_cmd "ip -n ns1 -d link show dev vx0 | grep ' localbypass'"
+	run_cmd "ip -n ns1 -d -j link show dev vx0 | jq -e '.[][\"linkinfo\"][\"info_data\"][\"localbypass\"] == true'"
 	log_test $? 0 "localbypass enabled"
 
 	run_cmd "ip netns exec ns1 mausezahn vx0 -a $smac -b $dmac -c 1 -p 100 -q"
-- 
2.35.8

--
Fastmail.


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next v2] selftests: net: vxlan: Fix selftest regression after changes in iproute2.
  2023-06-08  6:44 [PATCH net-next v2] selftests: net: vxlan: Fix selftest regression after changes in iproute2 Vladimir Nikishkin
@ 2023-06-08  7:56 ` Ido Schimmel
  2023-06-11 20:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Ido Schimmel @ 2023-06-08  7:56 UTC (permalink / raw)
  To: Vladimir Nikishkin
  Cc: netdev, davem, edumazet, kuba, pabeni, eng.alaamohamedsoliman.am,
	gnault, razor, idosch, liuhangbin, eyal.birger, jtoppins, shuah,
	linux-kselftest, stephen

On Thu, Jun 08, 2023 at 02:44:48PM +0800, Vladimir Nikishkin wrote:
> The iproute2 output that eventually landed upstream is different than
> the one used in this test, resulting in failures. Fix by adjusting the
> test to use iproute2's JSON output, which is more stable than regular
> output.
> 
> Fixes: 305c04189997 ("selftests: net: vxlan: Add tests for vxlan nolocalbypass option.")
> Signed-off-by: Vladimir Nikishkin <vladimir@nikishkin.pw>

Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next v2] selftests: net: vxlan: Fix selftest regression after changes in iproute2.
  2023-06-08  6:44 [PATCH net-next v2] selftests: net: vxlan: Fix selftest regression after changes in iproute2 Vladimir Nikishkin
  2023-06-08  7:56 ` Ido Schimmel
@ 2023-06-11 20:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-06-11 20:10 UTC (permalink / raw)
  To: Vladimir Nikishkin
  Cc: netdev, davem, edumazet, kuba, pabeni, eng.alaamohamedsoliman.am,
	gnault, razor, idosch, liuhangbin, eyal.birger, jtoppins, shuah,
	linux-kselftest, stephen

Hello:

This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Thu,  8 Jun 2023 14:44:48 +0800 you wrote:
> The iproute2 output that eventually landed upstream is different than
> the one used in this test, resulting in failures. Fix by adjusting the
> test to use iproute2's JSON output, which is more stable than regular
> output.
> 
> Fixes: 305c04189997 ("selftests: net: vxlan: Add tests for vxlan nolocalbypass option.")
> Signed-off-by: Vladimir Nikishkin <vladimir@nikishkin.pw>
> 
> [...]

Here is the summary with links:
  - [net-next,v2] selftests: net: vxlan: Fix selftest regression after changes in iproute2.
    https://git.kernel.org/netdev/net-next/c/26a4dd839eeb

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-11 20:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-08  6:44 [PATCH net-next v2] selftests: net: vxlan: Fix selftest regression after changes in iproute2 Vladimir Nikishkin
2023-06-08  7:56 ` Ido Schimmel
2023-06-11 20:10 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.