* [LTP] [PATCH] containers: fix dev name in create_veth()
@ 2015-08-12 2:43 Hangbin Liu
2015-08-13 1:11 ` Yuan Sun
2015-08-20 15:00 ` Cyril Hrubis
0 siblings, 2 replies; 3+ messages in thread
From: Hangbin Liu @ 2015-08-12 2:43 UTC (permalink / raw)
To: LTP List
The new version of iproute2 will show veth device like veth0@veth1, but we
won't get a dev proc entry like this. Fix the dev name to avoid error like
/proc/sys/net/ipv4/conf/veth0@veth1/proxy_arp: No such file or directory
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
testcases/kernel/containers/netns/netns_initialize.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/testcases/kernel/containers/netns/netns_initialize.sh b/testcases/kernel/containers/netns/netns_initialize.sh
index d44a02b..71d935a 100755
--- a/testcases/kernel/containers/netns/netns_initialize.sh
+++ b/testcases/kernel/containers/netns/netns_initialize.sh
@@ -113,6 +113,8 @@ create_veth()
sleep 1
ip link show > /tmp/net2
eval `diff /tmp/net1 /tmp/net2 | awk -F": " '/^> [0-9]*:/ { print "dev" i+0 "=" $2; i++ }'`
+ dev0=$(echo $dev0 | cut -f1 -d'@')
+ dev1=$(echo $dev1 | cut -f1 -d'@')
}
# return 1 if disabled originally, 0 for enabled originally.
--
1.9.3
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [LTP] [PATCH] containers: fix dev name in create_veth()
2015-08-12 2:43 [LTP] [PATCH] containers: fix dev name in create_veth() Hangbin Liu
@ 2015-08-13 1:11 ` Yuan Sun
2015-08-20 15:00 ` Cyril Hrubis
1 sibling, 0 replies; 3+ messages in thread
From: Yuan Sun @ 2015-08-13 1:11 UTC (permalink / raw)
To: Hangbin Liu, LTP List
It looks fine to me.
On 2015/8/12 10:43, Hangbin Liu wrote:
> The new version of iproute2 will show veth device like veth0@veth1, but we
> won't get a dev proc entry like this. Fix the dev name to avoid error like
> /proc/sys/net/ipv4/conf/veth0@veth1/proxy_arp: No such file or directory
>
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
> ---
> testcases/kernel/containers/netns/netns_initialize.sh | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/testcases/kernel/containers/netns/netns_initialize.sh b/testcases/kernel/containers/netns/netns_initialize.sh
> index d44a02b..71d935a 100755
> --- a/testcases/kernel/containers/netns/netns_initialize.sh
> +++ b/testcases/kernel/containers/netns/netns_initialize.sh
> @@ -113,6 +113,8 @@ create_veth()
> sleep 1
> ip link show > /tmp/net2
> eval `diff /tmp/net1 /tmp/net2 | awk -F": " '/^> [0-9]*:/ { print "dev" i+0 "=" $2; i++ }'`
> + dev0=$(echo $dev0 | cut -f1 -d'@')
> + dev1=$(echo $dev1 | cut -f1 -d'@')
> }
>
> # return 1 if disabled originally, 0 for enabled originally.
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [LTP] [PATCH] containers: fix dev name in create_veth()
2015-08-12 2:43 [LTP] [PATCH] containers: fix dev name in create_veth() Hangbin Liu
2015-08-13 1:11 ` Yuan Sun
@ 2015-08-20 15:00 ` Cyril Hrubis
1 sibling, 0 replies; 3+ messages in thread
From: Cyril Hrubis @ 2015-08-20 15:00 UTC (permalink / raw)
To: Hangbin Liu; +Cc: LTP List
Hi!
I've just pushed complete rewrite of the testcases, please make sure
that netns testcases from latest git works for you.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-08-20 15:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-12 2:43 [LTP] [PATCH] containers: fix dev name in create_veth() Hangbin Liu
2015-08-13 1:11 ` Yuan Sun
2015-08-20 15:00 ` Cyril Hrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox