public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/4] tst_net.sh: Simplify ipver settings code
@ 2018-05-26 11:15 Petr Vorel
  2018-05-26 11:15 ` [LTP] [PATCH 2/4] net: Allow to overwrite libraries getopts handlers Petr Vorel
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Petr Vorel @ 2018-05-26 11:15 UTC (permalink / raw)
  To: ltp

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

diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
index dc612a794..fd2eacf2f 100644
--- a/testcases/lib/tst_net.sh
+++ b/testcases/lib/tst_net.sh
@@ -29,11 +29,12 @@ TST_SETUP="tst_net_setup"
 
 # Blank for an IPV4 test; 6 for an IPV6 test.
 TST_IPV6=${TST_IPV6:-}
+ipver=${TST_IPV6:-4}
 
 tst_net_parse_args()
 {
 	case $1 in
-	6) TST_IPV6=6;;
+	6) TST_IPV6=6 ipver=6;;
 	*) $TST_PARSE_ARGS_CALLER "$1" "$2";;
 	esac
 }
@@ -68,7 +69,6 @@ tst_net_remote_tmpdir()
 
 tst_net_setup()
 {
-	ipver=${TST_IPV6:-4}
 	tst_net_remote_tmpdir
 	[ -n "$TST_SETUP_CALLER" ] && $TST_SETUP_CALLER
 }
@@ -79,7 +79,6 @@ fi
 
 if [ -n "$TST_USE_LEGACY_API" ]; then
 	tst_net_read_opts "$@"
-	ipver=${TST_IPV6:-4}
 fi
 
 # old vs. new API compatibility layer
-- 
2.16.3


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

end of thread, other threads:[~2018-05-29  8:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-26 11:15 [LTP] [PATCH 1/4] tst_net.sh: Simplify ipver settings code Petr Vorel
2018-05-26 11:15 ` [LTP] [PATCH 2/4] net: Allow to overwrite libraries getopts handlers Petr Vorel
2018-05-28 13:48   ` Alexey Kodanev
2018-05-29  8:07     ` Petr Vorel
2018-05-26 11:15 ` [LTP] [PATCH 3/4] net: Allow to skip additional getopts Petr Vorel
2018-05-26 11:15 ` [LTP] [PATCH 4/4] net/macsec0{1, 2}.sh: Use TST_NET_SKIP_PARSE_ARGS=1 Petr Vorel
2018-05-28 14:03   ` Alexey Kodanev
2018-05-29  8:08     ` Petr Vorel
2018-05-28 13:31 ` [LTP] [PATCH 1/4] tst_net.sh: Simplify ipver settings code Alexey Kodanev
2018-05-29  7:59   ` Petr Vorel

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