summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2019-03-25 19:34:50 -0400
committerDave Wallace <dwallacelf@gmail.com>2019-03-25 19:34:50 -0400
commit03dd90adfe652894e4a70c6360e0618caae11145 (patch)
tree341bce7b8ee9b3611237c11ce5dbffcdc79aa317
parentddd98f348305d0e0aadb4169567d163d32b94ef9 (diff)
VCL: add TLS opt to socket_test.sh
- add TLS transport opt to socket_test.sh - resolve clash in vcl_test* args with socket_test.sh opts Change-Id: I952d5b64942664bc3af1098f67445e0f4b93ab32 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
-rw-r--r--src/vcl/vcl_test_client.c6
-rw-r--r--src/vcl/vcl_test_server.c6
-rwxr-xr-xtest/scripts/socket_test.sh6
-rw-r--r--test/test_vcl.py4
4 files changed, 11 insertions, 11 deletions
diff --git a/src/vcl/vcl_test_client.c b/src/vcl/vcl_test_client.c
index ca009b45561..af953e547c5 100644
--- a/src/vcl/vcl_test_client.c
+++ b/src/vcl/vcl_test_client.c
@@ -715,7 +715,7 @@ print_usage_and_exit (void)
" -w <dir> Write test results to <dir>.\n"
" -X Exit after running test.\n"
" -D Use UDP transport layer\n"
- " -S Use TLS transport layer\n"
+ " -L Use TLS transport layer\n"
" -E Run Echo test.\n"
" -N <num-writes> Test Cfg: number of writes.\n"
" -R <rxbuf-size> Test Cfg: rx buffer size.\n"
@@ -733,7 +733,7 @@ vtc_process_opts (vcl_test_client_main_t * vcm, int argc, char **argv)
int c, v;
opterr = 0;
- while ((c = getopt (argc, argv, "chn:w:XE:I:N:R:T:UBV6DS")) != -1)
+ while ((c = getopt (argc, argv, "chn:w:XE:I:N:R:T:UBV6DL")) != -1)
switch (c)
{
case 'c':
@@ -874,7 +874,7 @@ vtc_process_opts (vcl_test_client_main_t * vcm, int argc, char **argv)
ctrl->cfg.transport_udp = 1;
break;
- case 'S':
+ case 'L':
ctrl->cfg.transport_tls = 1;
break;
diff --git a/src/vcl/vcl_test_server.c b/src/vcl/vcl_test_server.c
index 50d509c355b..173bada2315 100644
--- a/src/vcl/vcl_test_server.c
+++ b/src/vcl/vcl_test_server.c
@@ -321,7 +321,7 @@ print_usage_and_exit (void)
" -6 Use IPv6\n"
" -w <num> Number of workers\n"
" -D Use UDP transport layer\n"
- " -S Use TLS transport layer\n");
+ " -L Use TLS transport layer\n");
exit (1);
}
@@ -371,7 +371,7 @@ vcl_test_server_process_opts (vcl_test_server_main_t * vsm, int argc,
vsm->cfg.proto = VPPCOM_PROTO_TCP;
opterr = 0;
- while ((c = getopt (argc, argv, "6DSsw:")) != -1)
+ while ((c = getopt (argc, argv, "6DLsw:")) != -1)
switch (c)
{
case '6':
@@ -382,7 +382,7 @@ vcl_test_server_process_opts (vcl_test_server_main_t * vsm, int argc,
vsm->cfg.proto = VPPCOM_PROTO_UDP;
break;
- case 'S':
+ case 'L':
vsm->cfg.proto = VPPCOM_PROTO_TLS;
break;
diff --git a/test/scripts/socket_test.sh b/test/scripts/socket_test.sh
index 5ebca4df88b..b94a2f344b7 100755
--- a/test/scripts/socket_test.sh
+++ b/test/scripts/socket_test.sh
@@ -85,6 +85,7 @@ OPTIONS:
OPTIONS passed to client/server:
-6 Use IPv6.
-D Use UDP as the transport.
+ -L Use TLS as the transport.
-S <ip address> Server IP address.
-P <server port> Server Port number.
-E <data> Run Echo test.
@@ -119,9 +120,8 @@ declare -i leave_tmp_files=0
declare -i bash_after_exit=0
declare -i iperf3=0
declare -i use_ipv6=0
-declare -i transport_udp=0
-while getopts ":hitlbcd6fn:m:e:g:p:E:I:N:P:R:S:T:UBVXD" opt; do
+while getopts ":hitlbcd6fn:m:e:g:p:E:I:N:P:R:S:T:UBVXDL" opt; do
case $opt in
h) usage ;;
l) leave_tmp_files=1
@@ -210,7 +210,7 @@ while getopts ":hitlbcd6fn:m:e:g:p:E:I:N:P:R:S:T:UBVXD" opt; do
;;
P) sock_srvr_port="$OPTARG"
;;
- D) sock_clnt_options="$sock_clnt_options -$opt"
+ D|L) sock_clnt_options="$sock_clnt_options -$opt"
sock_srvr_options="$sock_srvr_options -$opt"
;;
E|I|N|R|T) sock_clnt_options="$sock_clnt_options -$opt \"$OPTARG\""
diff --git a/test/test_vcl.py b/test/test_vcl.py
index f5a1c9c0855..0ef4b5c079e 100644
--- a/test/test_vcl.py
+++ b/test/test_vcl.py
@@ -418,8 +418,8 @@ class VCLThruHostStackTLS(VCLTestCase):
self.thru_host_stack_setup()
self.client_uni_dir_tls_timeout = 20
- self.server_tls_args = ["-S", self.server_port]
- self.client_uni_dir_tls_test_args = ["-N", "1000", "-U", "-X", "-S",
+ self.server_tls_args = ["-L", self.server_port]
+ self.client_uni_dir_tls_test_args = ["-N", "1000", "-U", "-X", "-L",
self.loop0.local_ip4,
self.server_port]