Commit 26a4dd83 authored by Vladimir Nikishkin's avatar Vladimir Nikishkin Committed by David S. Miller

selftests: net: vxlan: Fix selftest regression after changes in iproute2.

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: 305c0418 ("selftests: net: vxlan: Add tests for vxlan nolocalbypass option.")
Signed-off-by: default avatarVladimir Nikishkin <vladimir@nikishkin.pw>
Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
Tested-by: default avatarIdo Schimmel <idosch@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 33341292
......@@ -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"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment