All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/3] test_net.sh: fix netns when defined LHOST_IFACES or RHOST_IFACES
@ 2016-12-21 23:04 Petr Vorel
  2016-12-21 23:04 ` [LTP] [PATCH 2/3] test_net.sh: delete netns before testing Petr Vorel
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Petr Vorel @ 2016-12-21 23:04 UTC (permalink / raw)
  To: ltp

Tested with:
TST_USE_NETNS=1 LHOST_IFACES=localpeer RHOST_IFACES=remotepeer \
  ./testscripts/network.sh -6

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/lib/test_net.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/testcases/lib/test_net.sh b/testcases/lib/test_net.sh
index f5321d73a..7d82e8962 100644
--- a/testcases/lib/test_net.sh
+++ b/testcases/lib/test_net.sh
@@ -22,15 +22,15 @@
 
 init_ltp_netspace()
 {
+	LHOST_IFACES=${LHOST_IFACES:-"ltp_ns_veth2"}
+	RHOST_IFACES=${RHOST_IFACES:-"ltp_ns_veth1"}
+
 	if [ ! -f /var/run/netns/ltp_ns ]; then
 		ROD ip net add ltp_ns
-		ROD ip li add name ltp_ns_veth1 type veth peer name ltp_ns_veth2
-		ROD ip li set dev ltp_ns_veth1 netns ltp_ns
+		ROD ip li add name $RHOST_IFACES type veth peer name $LHOST_IFACES
+		ROD ip li set dev $RHOST_IFACES netns ltp_ns
 	fi
 
-	LHOST_IFACES=${LHOST_IFACES:-"ltp_ns_veth2"}
-	RHOST_IFACES=${RHOST_IFACES:-"ltp_ns_veth1"}
-
 	export TST_INIT_NETNS="no"
 	export LTP_NETNS=${LTP_NETNS:-"ip netns exec ltp_ns"}
 
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-01-23  9:57 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-21 23:04 [LTP] [PATCH 1/3] test_net.sh: fix netns when defined LHOST_IFACES or RHOST_IFACES Petr Vorel
2016-12-21 23:04 ` [LTP] [PATCH 2/3] test_net.sh: delete netns before testing Petr Vorel
2016-12-22 11:08   ` Alexey Kodanev
2016-12-23 11:04     ` Petr Vorel
2017-01-09 12:09       ` Alexey Kodanev
2016-12-21 23:04 ` [LTP] [PATCH 3/3] test_net.sh: netns as default in tst_rhost_run Petr Vorel
2017-01-19 17:50   ` Petr Vorel
2017-01-20 16:14     ` Alexey Kodanev
2017-01-23  9:57       ` Petr Vorel
2016-12-22 10:47 ` [LTP] [PATCH 1/3] test_net.sh: fix netns when defined LHOST_IFACES or RHOST_IFACES Alexey Kodanev
2016-12-22 13:01   ` Petr Vorel
2016-12-22 14:15     ` Alexey Kodanev
2016-12-22 15:17       ` Petr Vorel
2016-12-22 17:55         ` Alexey Kodanev
2016-12-23 10:54           ` Petr Vorel

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.