Skip to contentSkip to conversation

change ip command of route6-change-gw

PATCH New yangj 2 participants 2 messages Jan 15, 2019

lore
Share & tools
lore

yangj

author
#0 lore raw

PATCH 1/1 change ip command of route6-change-gw

when useing old ip commond to test,it will get the following
error:

RTNETLINK answers: File exists

So I changed this case like the ip command of route4-change-gw

---
 testcases/network/stress/route/route6-change-gw | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
testcases/network/stress/route/route6-change-gw +1 -2
index 96fd7ee66..05e45b907 100644
@@ -245,8 +245,7 @@ test_body()
 	    route -A inet6 del ${dst_network}/64 gw ${IPV6_NETWORK}:${pre_rhost_part_hex} dev $lhost_ifname
 	    ;;
 	    2)
-	    ip -f inet6 route add ${dst_network}/64 via ${IPV6_NETWORK}:${rhost_part_hex} dev $lhost_ifname
-	    ip -f inet6 route del ${dst_network}/64 via ${IPV6_NETWORK}:${pre_rhost_part_hex} dev $lhost_ifname
+	    ip -f inet6 route change ${dst_network}/64 via ${IPV6_NETWORK}:${rhost_part_hex} dev $lhost_ifname
 	    ;;
 	esac
 	if [ $? -ne 0 ]; then
Signature · 1 line
2.17.0
#1 lore raw

PATCH 1/1 change ip command of route6-change-gw

Hi Jian,

Quoted 16 lines

when useing old ip commond to test,it will get the following
error:

RTNETLINK answers: File exists

So I changed this case like the ip command of route4-change-gw

---
 testcases/network/stress/route/route6-change-gw | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
testcases/network/stress/route/route6-change-gw +0 -0
index 96fd7ee66..05e45b907 100644

testcases/network/stress/route/route6-change-gw test_body() · line 251

Quoted 9 lines
testcases/network/stress/route/route6-change-gw +1 -2
@@ -245,8 +245,7 @@ test_body()
 	    route -A inet6 del ${dst_network}/64 gw ${IPV6_NETWORK}:${pre_rhost_part_hex} dev $lhost_ifname
 	    ;;
 	    2)
-	    ip -f inet6 route add ${dst_network}/64 via ${IPV6_NETWORK}:${rhost_part_hex} dev $lhost_ifname
-	    ip -f inet6 route del ${dst_network}/64 via ${IPV6_NETWORK}:${pre_rhost_part_hex} dev $lhost_ifname
+	    ip -f inet6 route change ${dst_network}/64 via ${IPV6_NETWORK}:${rhost_part_hex} dev $lhost_ifname
 	    ;;
 	esac
 	if [ $? -ne 0 ]; then

Thanks for your patch, merged.

FYI these tests are in terrible state, needs complete rewrite, see [1]. I've already had several attempts in the past, last one [2] still wasn't good enough. Currently I'm rewritting route*-change-* tests into C using rtnetlink.

Kind regards,
Petr

[1] https://github.com/linux-test-project/ltp/issues/440
[2] https://patchwork.ozlabs.org/project/ltp/list/?series=44924&state=*