All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hangbin Liu <liuhangbin@gmail.com>
To: LTP List <ltp-list@lists.sourceforge.net>
Subject: [LTP]  [PATCH] containers: fix dev name in create_veth()
Date: Wed, 12 Aug 2015 10:43:53 +0800	[thread overview]
Message-ID: <1439347433-5102-1-git-send-email-liuhangbin@gmail.com> (raw)

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

             reply	other threads:[~2015-08-12  2:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-12  2:43 Hangbin Liu [this message]
2015-08-13  1:11 ` [LTP] [PATCH] containers: fix dev name in create_veth() Yuan Sun
2015-08-20 15:00 ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1439347433-5102-1-git-send-email-liuhangbin@gmail.com \
    --to=liuhangbin@gmail.com \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.