public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v2 1/3] network/test_net: add support for -6 option (IPv6 tests)
@ 2014-10-22 11:41 Alexey Kodanev
  2014-10-22 11:41 ` [LTP] [PATCH v3 2/3] network/test_net: add tst_ipaddr Alexey Kodanev
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Alexey Kodanev @ 2014-10-22 11:41 UTC (permalink / raw)
  To: ltp-list; +Cc: vasily.isaenko

* copy read_opts() from net_cmdlib.sh library;
* replace TST_EXEC_SUFFIX with more informative name TST_IPV6;
* skip other options;

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

diff --git a/testcases/lib/test_net.sh b/testcases/lib/test_net.sh
index 8cbcb70..24460f3 100644
--- a/testcases/lib/test_net.sh
+++ b/testcases/lib/test_net.sh
@@ -137,3 +137,18 @@ tst_iface()
 	link_num=$(( $link_num + 1 ))
 	echo "$(tst_get_ifaces $type)" | awk '{ print $'"$link_num"' }'
 }
+
+# Blank for an IPV4 test; 6 for an IPV6 test.
+TST_IPV6=
+
+tst_read_opts()
+{
+	OPTIND=0
+	while getopts ":6" opt; do
+		case "$opt" in
+		6)
+			TST_IPV6=6;;
+		esac
+	done
+	OPTIND=0
+}
-- 
1.7.1


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* [LTP] [PATCH v3 2/3] network/test_net: add tst_ipaddr
  2014-10-22 11:41 [LTP] [PATCH v2 1/3] network/test_net: add support for -6 option (IPv6 tests) Alexey Kodanev
@ 2014-10-22 11:41 ` Alexey Kodanev
  2014-10-22 11:41 ` [LTP] [PATCH v2 3/3] network/test_net: add tst_init_iface() and tst_set_ipaddr() Alexey Kodanev
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Alexey Kodanev @ 2014-10-22 11:41 UTC (permalink / raw)
  To: ltp-list; +Cc: vasily.isaenko

Some tests require IP addresses, either IPv4 or IPv6.

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
v3: replace TST_EXEC_SUFFIX with TST_IPV6

 testcases/lib/test_net.sh |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/testcases/lib/test_net.sh b/testcases/lib/test_net.sh
index 24460f3..b6d4e7d 100644
--- a/testcases/lib/test_net.sh
+++ b/testcases/lib/test_net.sh
@@ -152,3 +152,25 @@ tst_read_opts()
 	done
 	OPTIND=0
 }
+
+# Get IP address
+# tst_ipaddr [TYPE]
+# TYPE: { lhost | rhost }; Default value is 'lhost'.
+tst_ipaddr()
+{
+	local type=${1:-"lhost"}
+	local ipv=${TST_IPV6:-"4"}
+	local tst_host=
+
+	if [ "$type" = "lhost" ]; then
+		eval "tst_host=\$LHOST_IPV${ipv}_HOST"
+	else
+		eval "tst_host=\$RHOST_IPV${ipv}_HOST"
+	fi
+
+	if [ "$TST_IPV6" ]; then
+		echo "${IPV6_NETWORK}:${tst_host}"
+	else
+		echo "${IPV4_NETWORK}.${tst_host}"
+	fi
+}
-- 
1.7.1


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* [LTP] [PATCH v2 3/3] network/test_net: add tst_init_iface() and tst_set_ipaddr()
  2014-10-22 11:41 [LTP] [PATCH v2 1/3] network/test_net: add support for -6 option (IPv6 tests) Alexey Kodanev
  2014-10-22 11:41 ` [LTP] [PATCH v3 2/3] network/test_net: add tst_ipaddr Alexey Kodanev
@ 2014-10-22 11:41 ` Alexey Kodanev
  2014-10-22 11:41 ` [LTP] [PATCH] network/tcp_fastopen: add support for IPv6 Alexey Kodanev
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Alexey Kodanev @ 2014-10-22 11:41 UTC (permalink / raw)
  To: ltp-list; +Cc: vasily.isaenko

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
v2: replace TST_EXEC_SUFFIX with TST_IPV6

 testcases/lib/test_net.sh |   47 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/testcases/lib/test_net.sh b/testcases/lib/test_net.sh
index b6d4e7d..f8f3f61 100644
--- a/testcases/lib/test_net.sh
+++ b/testcases/lib/test_net.sh
@@ -174,3 +174,50 @@ tst_ipaddr()
 		echo "${IPV4_NETWORK}.${tst_host}"
 	fi
 }
+
+# tst_init_iface [TYPE] [LINK]
+# TYPE: { lhost | rhost }; Default value is 'lhost'.
+# LINK: link number starting from 0. Default value is '0'.
+tst_init_iface()
+{
+	local type=${1:-"lhost"}
+	local link_num=${2:-"0"}
+
+	local iface=$(tst_iface $type $link_num)
+	tst_resm TINFO "initialize '$type' '$iface' interface"
+
+	if [ "$type" = "lhost" ]; then
+		ip link set $iface down || tst_brkm TBROK "interface down failed"
+		ip route flush dev $iface || tst_brkm TBROK "route flush failed"
+		ip addr flush dev $iface || tst_brkm TBROK "addr flush failed"
+		ip link set $iface up || tst_brkm TBROK "interface up failed"
+	else
+		tst_rhost_run -s -c "ip link set $iface down"
+		tst_rhost_run -s -c "ip route flush dev $iface"
+		tst_rhost_run -s -c "ip addr flush dev $iface"
+		tst_rhost_run -s -c "ip link set $iface up"
+	fi
+}
+
+# tst_set_ipaddr [LINK]
+# LINK: link number starting from 0. Default value is '0'.
+tst_set_ipaddr()
+{
+	local link_num=${1:-"0"}
+	local ipv=${TST_IPV6:-"4"}
+
+	tst_init_iface lhost $link_num
+	tst_init_iface rhost $link_num
+
+	local iface=$(tst_iface $type $link_num)
+
+	local mask=24
+	[ "$TST_IPV6" ] && mask=64
+
+	tst_resm TINFO "set local ipv${ipv} addr $(tst_ipaddr)/$mask"
+	ip addr add $(tst_ipaddr)/$mask dev $iface || \
+		tst_brkm TBROK "failed to add IP address"
+
+	tst_resm TINFO "set remote ipv${ipv} addr $(tst_ipaddr rhost)/$mask"
+	tst_rhost_run -s -c "ip addr add $(tst_ipaddr rhost)/$mask dev $iface"
+}
-- 
1.7.1


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* [LTP] [PATCH] network/tcp_fastopen: add support for IPv6
  2014-10-22 11:41 [LTP] [PATCH v2 1/3] network/test_net: add support for -6 option (IPv6 tests) Alexey Kodanev
  2014-10-22 11:41 ` [LTP] [PATCH v3 2/3] network/test_net: add tst_ipaddr Alexey Kodanev
  2014-10-22 11:41 ` [LTP] [PATCH v2 3/3] network/test_net: add tst_init_iface() and tst_set_ipaddr() Alexey Kodanev
@ 2014-10-22 11:41 ` Alexey Kodanev
  2014-10-23 10:20 ` [LTP] [PATCH v2 1/3] network/test_net: add support for -6 option (IPv6 tests) Alexey Kodanev
  2014-12-02 16:54 ` Cyril Hrubis
  4 siblings, 0 replies; 7+ messages in thread
From: Alexey Kodanev @ 2014-10-22 11:41 UTC (permalink / raw)
  To: ltp-list; +Cc: vasily.isaenko

Support for TCP Fast Open over IPv6 has been added to Linux 3.16

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
 runtest/network_stress.features                    |    1 +
 testcases/network/tcp_fastopen/tcp_fastopen.c      |   51 +++++++++++++------
 testcases/network/tcp_fastopen/tcp_fastopen_run.sh |   24 ++++++----
 3 files changed, 51 insertions(+), 25 deletions(-)

diff --git a/runtest/network_stress.features b/runtest/network_stress.features
index 14fa2d9..4cce78d 100644
--- a/runtest/network_stress.features
+++ b/runtest/network_stress.features
@@ -3,6 +3,7 @@
 #
 
 tcp_fastopen tcp_fastopen_run.sh
+tcp_fastopen tcp_fastopen_run.sh -6
 
 vxlan01 vxlan01.sh
 vxlan02 vxlan02.sh
diff --git a/testcases/network/tcp_fastopen/tcp_fastopen.c b/testcases/network/tcp_fastopen/tcp_fastopen.c
index 77d7437..acf9c61 100644
--- a/testcases/network/tcp_fastopen/tcp_fastopen.c
+++ b/testcases/network/tcp_fastopen/tcp_fastopen.c
@@ -101,6 +101,8 @@ static char *rpath		= "./tfo_result";
 
 static int force_run;
 static int verbose;
+static int ipv6;
+static int af_inet;
 
 static char *narg, *Narg, *qarg, *rarg, *Rarg, *aarg, *Targ;
 
@@ -119,6 +121,7 @@ static const option_t options[] = {
 	{"d:", NULL, &rpath},
 
 	/* common */
+	{"6", &ipv6, NULL},
 	{"g:", NULL, &tcp_port},
 	{"F", &force_run, NULL},
 	{"l", &tcp_mode, NULL},
@@ -136,6 +139,7 @@ static void help(void)
 	printf("  -O      TFO support is off, default is on\n");
 	printf("  -l      Become TCP Client, default is TCP server\n");
 	printf("  -g x    x - server port, default is %s\n", tcp_port);
+	printf("  -6      Run over IPv6");
 
 	printf("\n          Client:\n");
 	printf("  -H x    x - server name or ip address, default is '%s'\n",
@@ -269,7 +273,7 @@ static int client_recv(int *fd, char *buf)
 
 static int client_connect_send(const char *msg, int size)
 {
-	int cfd = socket(AF_INET, SOCK_STREAM, 0);
+	int cfd = socket(af_inet, SOCK_STREAM, 0);
 	const int flag = 1;
 	setsockopt(cfd, SOL_SOCKET, SO_REUSEADDR, &flag, sizeof(flag));
 
@@ -422,10 +426,13 @@ static void client_init(void)
 
 	struct addrinfo hints;
 	memset(&hints, 0, sizeof(struct addrinfo));
-	hints.ai_family = AF_INET;
+	hints.ai_family = af_inet;
 	hints.ai_socktype = SOCK_STREAM;
-	if (getaddrinfo(server_addr, tcp_port, &hints, &remote_addrinfo) != 0)
-		tst_brkm(TBROK | TERRNO, cleanup, "getaddrinfo failed");
+	int err = getaddrinfo(server_addr, tcp_port, &hints, &remote_addrinfo);
+	if (err) {
+		tst_brkm(TBROK, cleanup, "getaddrinfo of '%s' failed, %s",
+			server_addr, gai_strerror(err));
+	}
 
 	clock_gettime(CLOCK_MONOTONIC_RAW, &tv_client_start);
 	int i;
@@ -586,13 +593,13 @@ static void server_init(void)
 {
 	struct addrinfo hints;
 	memset(&hints, 0, sizeof(struct addrinfo));
-	hints.ai_family = AF_INET;
+	hints.ai_family = af_inet;
 	hints.ai_socktype = SOCK_STREAM;
 	hints.ai_flags = AI_PASSIVE;
 	if (getaddrinfo(NULL, tcp_port, &hints, &local_addrinfo) != 0)
 		tst_brkm(TBROK | TERRNO, cleanup, "getaddrinfo failed");
 
-	sfd = socket(AF_INET, SOCK_STREAM, 0);
+	sfd = socket(af_inet, SOCK_STREAM, 0);
 	if (sfd == -1)
 		tst_brkm(TBROK, cleanup, "Failed to create a socket");
 
@@ -628,8 +635,11 @@ static void server_cleanup(void)
 
 static void server_run(void)
 {
-	struct sockaddr_in client_addr;
-	socklen_t addr_size = sizeof(client_addr);
+	struct sockaddr_in addr;
+	struct sockaddr_in6 addr6;
+	struct sockaddr *sock_addr = (ipv6) ? (void *)&addr6 : (void *)&addr;
+	socklen_t addr_size = (ipv6) ? sizeof(addr6) : sizeof(addr);
+
 	pthread_attr_init(&attr);
 
 	/*
@@ -640,17 +650,18 @@ static void server_run(void)
 		tst_brkm(TBROK | TERRNO, cleanup, "setdetachstate failed");
 
 	while (1) {
-		int client_fd = accept(sfd, (struct sockaddr *) &client_addr,
-			&addr_size);
+		int client_fd = accept(sfd, sock_addr, &addr_size);
+
 		if (client_fd == -1)
 			tst_brkm(TBROK, cleanup, "Can't create client socket");
 
-		if (client_addr.sin_family == AF_INET) {
-			if (verbose) {
-				tst_resm(TINFO, "conn: port '%d', addr '%s'",
-					client_addr.sin_port,
-					inet_ntoa(client_addr.sin_addr));
-			}
+		if (verbose) {
+			char addr_buf[INET6_ADDRSTRLEN];
+			tst_resm(TINFO, "conn: port '%d', addr '%s'",
+				(ipv6) ? addr6.sin6_port : addr.sin_port,
+				inet_ntop(af_inet, (ipv6) ?
+				(void *)&addr6.sin6_addr : (void *)&addr.sin_addr,
+				addr_buf, INET6_ADDRSTRLEN));
 		}
 		server_thread_add(client_fd);
 	}
@@ -706,6 +717,14 @@ static void setup(int argc, char *argv[])
 			"Test must be run with kernel 3.7 or newer");
 	}
 
+	if (ipv6 && tst_kvercmp(3, 16, 0) < 0) {
+		tst_brkm(TCONF, NULL,
+			"Test must be run with kernel 3.16 or newer");
+	}
+
+	af_inet = (ipv6) ? AF_INET6 : AF_INET;
+	tst_resm(TINFO, "TCP Fast Open over IPv%s", (ipv6) ? "6" : "4");
+
 	/* check tcp fast open knob */
 	if (!force_run && access(tfo_cfg, F_OK) == -1)
 		tst_brkm(TCONF, NULL, "Failed to find '%s'", tfo_cfg);
diff --git a/testcases/network/tcp_fastopen/tcp_fastopen_run.sh b/testcases/network/tcp_fastopen/tcp_fastopen_run.sh
index eab8cfd..8e57f71 100755
--- a/testcases/network/tcp_fastopen/tcp_fastopen_run.sh
+++ b/testcases/network/tcp_fastopen/tcp_fastopen_run.sh
@@ -21,7 +21,6 @@
 
 # default command-line options
 user_name="root"
-remote_addr=$RHOST
 use_ssh=0
 clients_num=2
 client_requests=2000000
@@ -31,29 +30,31 @@ TST_TOTAL=1
 TCID="tcp_fastopen"
 
 . test_net.sh
+tst_read_opts $*
 
 bind_timeout=5
 tfo_result="${TMPDIR}/tfo_result"
+tfo_ipv=${TST_IPV6:-4}
 
-while getopts :hu:H:sr:p:n:R: opt; do
+while getopts :hu:sr:p:n:R:6 opt; do
 	case "$opt" in
 	h)
 		echo "Usage:"
 		echo "h        help"
 		echo "u x      server user name"
-		echo "H x      server hostname or IP address"
 		echo "s        use ssh to run remote cmds"
 		echo "n x      num of clients running in parallel"
 		echo "r x      the number of client requests"
 		echo "R x      num of requests, after which conn. closed"
+		echo "6        run over IPv6"
 		exit 0
 	;;
 	u) user_name=$OPTARG ;;
-	H) remote_addr=$OPTARG ;;
 	s) export TST_USE_SSH=1 ;;
 	n) clients_num=$OPTARG ;;
 	r) client_requests=$OPTARG ;;
 	R) max_requests=$OPTARG ;;
+	6) ;;
 	*)
 		tst_brkm TBROK "unknown option: $opt"
 	;;
@@ -87,17 +88,20 @@ run_client_server()
 {
 	# kill tcp server on remote machine
 	tst_rhost_run -c "pkill -9 tcp_fastopen\$"
+	local tfo_ipv_opt=
+	[ "$TST_IPV6" ] && tfo_ipv_opt="-6"
 
-	port=$(tst_rhost_run -c "tst_get_unused_port ipv4 stream")
+	port=$(tst_rhost_run -c "tst_get_unused_port ipv${tfo_ipv} stream")
 	[ $? -ne 0 ] && tst_brkm TBROK "failed to get unused port"
 
 	# run tcp server on remote machine
-	tst_rhost_run -s -b -c "tcp_fastopen -R $max_requests $1 -g $port"
+	tst_rhost_run -s -b -c "tcp_fastopen $tfo_ipv_opt \
+		-R $max_requests $1 -g $port"
 	sleep $bind_timeout
 
 	# run local tcp client
-	tcp_fastopen -a $clients_num -r $client_requests -l \
--H $remote_addr $1 -g $port -d $tfo_result
+	tcp_fastopen $tfo_ipv_opt -a $clients_num -r $client_requests -l \
+		-H $(tst_ipaddr rhost) $1 -g $port -d $tfo_result
 	[ "$?" -ne 0 ] && tst_brkm TBROK "Last test has failed"
 
 	run_time=$(read_result_file)
@@ -111,7 +115,9 @@ tst_require_root
 tst_kvercmp 3 7 0
 [ $? -eq 0 ] && tst_brkm TCONF "test must be run with kernel 3.7 or newer"
 
-[ -z $remote_addr ] && tst_brkm TBROK "you must specify server address"
+tst_kvercmp 3 16 0
+[ $? -eq 0 -a "$TST_IPV6" ] && \
+	tst_brkm TCONF "test must be run with kernel 3.16 or newer"
 
 run_client_server "-o -O"
 time_tfo_off=$run_time
-- 
1.7.1


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH v2 1/3] network/test_net: add support for -6 option (IPv6 tests)
  2014-10-22 11:41 [LTP] [PATCH v2 1/3] network/test_net: add support for -6 option (IPv6 tests) Alexey Kodanev
                   ` (2 preceding siblings ...)
  2014-10-22 11:41 ` [LTP] [PATCH] network/tcp_fastopen: add support for IPv6 Alexey Kodanev
@ 2014-10-23 10:20 ` Alexey Kodanev
  2014-12-02 16:56   ` Cyril Hrubis
  2014-12-02 16:54 ` Cyril Hrubis
  4 siblings, 1 reply; 7+ messages in thread
From: Alexey Kodanev @ 2014-10-23 10:20 UTC (permalink / raw)
  To: ltp-list; +Cc: vasily.isaenko

Hi!

On 10/22/2014 03:41 PM, Alexey Kodanev wrote:
> * copy read_opts() from net_cmdlib.sh library;
> * replace TST_EXEC_SUFFIX with more informative name TST_IPV6;
> * skip other options;
>
> Signed-off-by: Alexey Kodanev<alexey.kodanev@oracle.com>
> ---
>   testcases/lib/test_net.sh |   15 +++++++++++++++
>   1 files changed, 15 insertions(+), 0 deletions(-)
>
> diff --git a/testcases/lib/test_net.sh b/testcases/lib/test_net.sh
> index 8cbcb70..24460f3 100644
> --- a/testcases/lib/test_net.sh
> +++ b/testcases/lib/test_net.sh
> @@ -137,3 +137,18 @@ tst_iface()
>   	link_num=$(( $link_num + 1 ))
>   	echo "$(tst_get_ifaces $type)" | awk '{ print $'"$link_num"' }'
>   }
> +
> +# Blank for an IPV4 test; 6 for an IPV6 test.
> +TST_IPV6=
> +
> +tst_read_opts()
> +{
> +	OPTIND=0
> +	while getopts ":6" opt; do
> +		case "$opt" in
> +		6)
> +			TST_IPV6=6;;
> +		esac
> +	done
> +	OPTIND=0
> +}

Maybe we can run the function inside test_net.sh as well. Any suggestions?

Thanks,
Alexey


------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH v2 1/3] network/test_net: add support for -6 option (IPv6 tests)
  2014-10-22 11:41 [LTP] [PATCH v2 1/3] network/test_net: add support for -6 option (IPv6 tests) Alexey Kodanev
                   ` (3 preceding siblings ...)
  2014-10-23 10:20 ` [LTP] [PATCH v2 1/3] network/test_net: add support for -6 option (IPv6 tests) Alexey Kodanev
@ 2014-12-02 16:54 ` Cyril Hrubis
  4 siblings, 0 replies; 7+ messages in thread
From: Cyril Hrubis @ 2014-12-02 16:54 UTC (permalink / raw)
  To: Alexey Kodanev; +Cc: vasily.isaenko, ltp-list

Hi!
> * copy read_opts() from net_cmdlib.sh library;
> * replace TST_EXEC_SUFFIX with more informative name TST_IPV6;
> * skip other options;

I've looked at the changes in this patchset and all looks good to me.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH v2 1/3] network/test_net: add support for -6 option (IPv6 tests)
  2014-10-23 10:20 ` [LTP] [PATCH v2 1/3] network/test_net: add support for -6 option (IPv6 tests) Alexey Kodanev
@ 2014-12-02 16:56   ` Cyril Hrubis
  0 siblings, 0 replies; 7+ messages in thread
From: Cyril Hrubis @ 2014-12-02 16:56 UTC (permalink / raw)
  To: Alexey Kodanev; +Cc: vasily.isaenko, ltp-list

Hi!
> > +# Blank for an IPV4 test; 6 for an IPV6 test.
> > +TST_IPV6=
> > +
> > +tst_read_opts()
> > +{
> > +	OPTIND=0
> > +	while getopts ":6" opt; do
> > +		case "$opt" in
> > +		6)
> > +			TST_IPV6=6;;
> > +		esac
> > +	done
> > +	OPTIND=0
> > +}
> 
> Maybe we can run the function inside test_net.sh as well. Any suggestions?

It makes sense in case that all the testcases that include the file will
run it anyway.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

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

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-22 11:41 [LTP] [PATCH v2 1/3] network/test_net: add support for -6 option (IPv6 tests) Alexey Kodanev
2014-10-22 11:41 ` [LTP] [PATCH v3 2/3] network/test_net: add tst_ipaddr Alexey Kodanev
2014-10-22 11:41 ` [LTP] [PATCH v2 3/3] network/test_net: add tst_init_iface() and tst_set_ipaddr() Alexey Kodanev
2014-10-22 11:41 ` [LTP] [PATCH] network/tcp_fastopen: add support for IPv6 Alexey Kodanev
2014-10-23 10:20 ` [LTP] [PATCH v2 1/3] network/test_net: add support for -6 option (IPv6 tests) Alexey Kodanev
2014-12-02 16:56   ` Cyril Hrubis
2014-12-02 16:54 ` Cyril Hrubis

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