public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] lib/test_net.sh: restore TST_IPV6 after temporary assignments
@ 2015-02-02 17:46 Alexey Kodanev
  2015-02-02 17:46 ` [LTP] [PATCH 2/2] lib/test_net.sh: don't use 'tst_brkm TBROK' in tst_add_ipaddr() Alexey Kodanev
  2015-02-06 12:58 ` [LTP] [PATCH 1/2] lib/test_net.sh: restore TST_IPV6 after temporary assignments Alexey Kodanev
  0 siblings, 2 replies; 3+ messages in thread
From: Alexey Kodanev @ 2015-02-02 17:46 UTC (permalink / raw)
  To: ltp-list; +Cc: vasily.isaenko

Also move iface variable to the function which is using it

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
 testcases/lib/test_net.sh |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/testcases/lib/test_net.sh b/testcases/lib/test_net.sh
index d72e84e..acaed84 100644
--- a/testcases/lib/test_net.sh
+++ b/testcases/lib/test_net.sh
@@ -216,6 +216,8 @@ tst_add_ipaddr()
 	local mask=24
 	[ "$TST_IPV6" ] && mask=64
 
+	local iface=$(tst_iface $type $link_num)
+
 	if [ $type = "lhost" ]; then
 		tst_resm TINFO "set local addr $(tst_ipaddr)/$mask"
 		ip addr add $(tst_ipaddr)/$mask dev $iface || \
@@ -238,8 +240,10 @@ tst_restore_ipaddr()
 
 	tst_init_iface $type $link_num
 
-	local iface=$(tst_iface $type $link_num)
+	local backup_tst_ipv6=$TST_IPV6
 
 	TST_IPV6= tst_add_ipaddr $type $link_num
 	TST_IPV6=6 tst_add_ipaddr $type $link_num
+
+	TST_IPV6=$backup_tst_ipv6
 }
-- 
1.7.1


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
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

end of thread, other threads:[~2015-02-06 12:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-02 17:46 [LTP] [PATCH 1/2] lib/test_net.sh: restore TST_IPV6 after temporary assignments Alexey Kodanev
2015-02-02 17:46 ` [LTP] [PATCH 2/2] lib/test_net.sh: don't use 'tst_brkm TBROK' in tst_add_ipaddr() Alexey Kodanev
2015-02-06 12:58 ` [LTP] [PATCH 1/2] lib/test_net.sh: restore TST_IPV6 after temporary assignments Alexey Kodanev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox