In RHEL7.1GA, 'ip link show' gives(iproute-3.10.0-21.el7.x86_64):
3: veth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT 
qlen 1000
    link/ether 36:24:b9:e2:99:44 brd ff:ff:ff:ff:ff:ff
4: veth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT 
qlen 1000
    link/ether 46:e7:39:82:80:b4 brd ff:ff:ff:ff:ff:ff
But in RHEL7.2Alpha, 'ip link show' gives(iproute-3.10.0-46.el7.x86_64):
3: veth0@veth1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN 
mode DEFAULT qlen 1000
    link/ether da:01:6a:91:78:06 brd ff:ff:ff:ff:ff:ff
4: veth1@veth0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN 
mode DEFAULT qlen 1000
    link/ether b2:6a:0a:32:35:e3 brd ff:ff:ff:ff:ff:ff

This difference will make create_veth() generate wrong device name, fix this.

Signed-off-by: Xiaoguang Wang <wangxg.f...@cn.fujitsu.com>
---
 testcases/kernel/containers/netns/netns_initialize.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/containers/netns/netns_initialize.sh 
b/testcases/kernel/containers/netns/netns_initialize.sh
index d44a02b..28f4015 100755
--- a/testcases/kernel/containers/netns/netns_initialize.sh
+++ b/testcases/kernel/containers/netns/netns_initialize.sh
@@ -112,7 +112,7 @@ create_veth()
     ip link add type veth
     sleep 1
     ip link show > /tmp/net2
-    eval `diff /tmp/net1 /tmp/net2 | awk -F": "  '/^> [0-9]*:/ { print "dev" 
i+0 "=" $2; i++  }'`
+    eval `diff /tmp/net1 /tmp/net2 | awk -F": " '/^> [0-9]*:/ {print "dev" i+0 
"=" $2; i++}' | awk -F'@' '{print $1}'`
 }
 
 # return 1 if disabled originally, 0 for enabled originally.
-- 
1.8.2.1


------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to