Skip to contentSkip to conversation

selftests: Drop 'pref medium' in route checks

PATCH Applied David Ahern 2 participants 2 messages May 17, 2020

Subsystems (4)
lore
Share & tools
lore

David Ahern

author maintainer
#0 lore raw

PATCH 1/1 selftests: Drop 'pref medium' in route checks

From: David Ahern <[email protected]>

The 'pref medium' attribute was moved in iproute2 to be near the prefix which is where it applies versus after the last nexthop. The nexthop tests were updated to drop the string from route checking, but it crept in again with the compat tests.

Fixes 4dddb5be136a ("selftests: net: add new testcases for nexthop API compat mode sysctl")
Cc Roopa Prabhu <[email protected]>
---
 tools/testing/selftests/net/fib_nexthops.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/net/fib_nexthops.sh +2 -2
index dd0e5fec6367..50d822face36 100755
@@ -965,7 +965,7 @@ ipv6_compat_mode()
 	log_test $? 0 "IPv6 compat mode on - route add notification"
 
 	# route dump should contain expanded nexthops
-	check_route6 "2001:db8:101::1" "2001:db8:101::1 nhid 122 metric 1024 pref medium nexthop via 2001:db8:91::2 dev veth1 weight 1 nexthop via 2001:db8:91::3 dev veth1 weight 1"
+	check_route6 "2001:db8:101::1" "2001:db8:101::1 nhid 122 metric 1024 nexthop via 2001:db8:91::2 dev veth1 weight 1 nexthop via 2001:db8:91::3 dev veth1 weight 1"
 	log_test $? 0 "IPv6 compat mode on - route dump"
 
 	# change in nexthop group should generate route notification
@@ -992,7 +992,7 @@ ipv6_compat_mode()
 	log_test $? 0 "IPv6 compat mode off - route add notification"
 
 	# route dump should not contain expanded nexthops
-	check_route6 "2001:db8:101::1" "2001:db8:101::1 nhid 122 metric 1024 pref medium"
+	check_route6 "2001:db8:101::1" "2001:db8:101::1 nhid 122 metric 1024"
 	log_test $? 0 "IPv6 compat mode off - route dump"
 
 	# change in nexthop group should not generate route notification
Signature · 1 line
2.21.1 (Apple Git-122.3)
maintainer Applied
#1 lore raw

From: David Ahern <[email protected]>
Date: Sun, 17 May 2020 12:00:33 -0600

Quoted 10 lines

From: David Ahern <[email protected]>

The 'pref medium' attribute was moved in iproute2 to be near the prefix which is where it applies versus after the last nexthop. The nexthop tests were updated to drop the string from route checking, but it crept in again with the compat tests.

Fixes 4dddb5be136a ("selftests: net: add new testcases for nexthop API compat mode sysctl")
Cc Roopa Prabhu <[email protected]>

Applied, thank you.