diff options
author | Dave Wallace <dwallacelf@gmail.com> | 2018-03-20 09:22:13 -0400 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2018-03-26 21:56:16 +0000 |
commit | de91006803f823a149b04738dd2bbfe18bfe9791 (patch) | |
tree | 9e7d3090dc6c0926a5fc72d5f908fd1da4a88c3c /test | |
parent | 0a15e8c3b6a7e19131f7abc6fd4d1422616cda5c (diff) |
VCL: add IPv6 to socket_test.sh and make test
Change-Id: If3827828062a46f1cce43642535333f677f06e62
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'test')
-rwxr-xr-x | test/scripts/socket_test.sh | 58 | ||||
-rw-r--r-- | test/test_vcl.py | 412 |
2 files changed, 432 insertions, 38 deletions
diff --git a/test/scripts/socket_test.sh b/test/scripts/socket_test.sh index ca33eeefe03..0200f298293 100755 --- a/test/scripts/socket_test.sh +++ b/test/scripts/socket_test.sh @@ -69,7 +69,6 @@ OPTIONS: -c Set VCL_CONFIG to use the vcl_test.conf file. -i Run iperf3 for client/server app in native tests. -n Name of ethernet for VPP to use in multi-host cfg. - -6 Use ipv6 addressing. -f Full thru host stack vpp configuration. -m c[lient] Run client in multi-host cfg (server on remote host) s[erver] Run server in multi-host cfg (client on remote host) @@ -84,6 +83,8 @@ OPTIONS: -t Use tabs in one xterm if available (e.g. xfce4-terminal). OPTIONS passed to client/server: + -6 Use IPv6. + -D Use UDP as the transport. -S <ip address> Server IP address. -P <server port> Server Port number. -E <data> Run Echo test. @@ -118,8 +119,9 @@ 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:UBVX" opt; do +while getopts ":hitlbcd6fn:m:e:g:p:E:I:N:P:R:S:T:UBVXD" opt; do case $opt in h) usage ;; l) leave_tmp_files=1 @@ -129,6 +131,9 @@ while getopts ":hitlbcd6fn:m:e:g:p:E:I:N:P:R:S:T:UBVX" opt; do i) iperf3=1 ;; 6) use_ipv6=1 + sock_srvr_addr="::1" + sock_clnt_options="$sock_clnt_options -$opt" + sock_srvr_options="$sock_srvr_options -$opt" ;; f) full_thru_host_stack_vpp_cfg=1 ;; @@ -205,6 +210,9 @@ while getopts ":hitlbcd6fn:m:e:g:p:E:I:N:P:R:S:T:UBVX" opt; do ;; P) sock_srvr_port="$OPTARG" ;; + D) 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\"" ;; U|B|V|X) sock_clnt_options="$sock_clnt_options -$opt" @@ -371,7 +379,7 @@ if [ $iperf3 -eq 1 ] ; then fi else app_dir="$vpp_dir" - srvr_app="$sock_srvr_app $sock_srvr_port" + srvr_app="$sock_srvr_app${sock_srvr_options} $sock_srvr_port" clnt_app="$sock_clnt_app${sock_clnt_options} \$srvr_addr $sock_srvr_port" fi @@ -404,8 +412,11 @@ verify_no_vpp() { sudo mkdir $vpp_run_dir sudo chown root:$USER $vpp_run_dir fi - if [ -n "$full_thru_host_stack_vpp_cfg" ] ; then + if [ $use_ipv6 -eq 0 ] && [ -n "$full_thru_host_stack_vpp_cfg" ] ; then + sock_srvr_table=0 sock_srvr_addr=172.16.1.1 + sock_client_table=1 + sock_client_addr=172.16.2.1 client_namespace_id="1" client_namespace_secret="5678" server_namespace_id="0" @@ -415,17 +426,40 @@ session enable create loop inter create loop inter set inter state loop0 up -set inter ip table loop0 0 -set inter ip address loop0 172.16.1.1/24 +set inter ip table loop0 $sock_srvr_table +set inter ip address loop0 $sock_srvr_addr/24 set inter state loop1 up -set inter ip table loop1 1 -set inter ip address loop1 172.16.2.1/24 +set inter ip table loop1 $sock_client_table +set inter ip address loop1 $sock_client_addr/24 app ns add id 0 secret 1234 sw_if_index 1 app ns add id 1 secret 5678 sw_if_index 2 -ip route add 172.16.1.1/32 table 1 via lookup in table 0 -ip route add 172.16.2.1/32 table 0 via lookup in table 1 +ip route add $sock_srvr_addr/32 table $sock_client_table via lookup in table $sock_srvr_table +ip route add $sock_client_addr/32 table $sock_srvr_table via lookup in table $sock_client_table +EOF + elif [ $use_ipv6 -eq 1 ] && [ -n "$full_thru_host_stack_vpp_cfg" ] ; then + sock_srvr_table=1 + sock_srvr_addr=fd01:1::1 + sock_client_table=2 + sock_client_addr=fd01:2::1 + client_namespace_id="1" + client_namespace_secret="5678" + server_namespace_id="0" + server_namespace_secret="1234" + cat <<EOF >> $tmp_vpp_exec_file +session enable +create loop inter +create loop inter +set inter state loop0 up +set inter ip6 table loop0 $sock_srvr_table +set inter ip address loop0 $sock_srvr_addr/64 +set inter state loop1 up +set inter ip6 table loop1 $sock_client_table +set inter ip address loop1 $sock_client_addr/64 +app ns add id 0 secret 1234 sw_if_index 1 +app ns add id 1 secret 5678 sw_if_index 2 +ip route add $sock_srvr_addr/128 table $sock_client_table via lookup in table $sock_srvr_table +ip route add $sock_client_addr/128 table $sock_srvr_table via lookup in table $sock_client_table EOF - elif [ -n "$multi_host" ] ; then vpp_eth_pci_id="$(ls -ld /sys/class/net/$vpp_eth_name/device | awk '{print $11}' | cut -d/ -f4)" if [ -z "$vpp_eth_pci_id" ] ; then @@ -689,7 +723,7 @@ native_preload() { namespace_id="$server_namespace_id" namespace_secret="$server_namespace_secret" fi - write_script_header $cmd2_file $tmp_gdb_cmdfile "$title2" "sleep 2" + write_script_header $cmd2_file $tmp_gdb_cmdfile "$title2" "sleep 3" echo "export LD_LIBRARY_PATH=\"$lib64_dir:$VCL_LDPRELOAD_LIB_DIR:$LD_LIBRARY_PATH\"" >> $cmd2_file echo "${pre_cmd}${app_dir}${srvr_app}" >> $cmd2_file write_script_footer $cmd2_file $perf_server diff --git a/test/test_vcl.py b/test/test_vcl.py index 73537f6dfc3..b427c945383 100644 --- a/test/test_vcl.py +++ b/test/test_vcl.py @@ -41,6 +41,8 @@ class VCLTestCase(VppTestCase): self.server_addr = "127.0.0.1" self.server_port = "22000" self.server_args = [self.server_port] + self.server_ipv6_addr = "::1" + self.server_ipv6_args = ["-6", self.server_port] self.timeout = 3 self.echo_phrase = "Hello, world! Jenny is a friend of mine." @@ -112,6 +114,50 @@ class VCLTestCase(VppTestCase): self.vapi.session_enable_disable(is_enabled=0) + def thru_host_stack_ipv6_setup(self): + self.vapi.session_enable_disable(is_enabled=1) + self.create_loopback_interfaces(range(2)) + + table_id = 1 + + for i in self.lo_interfaces: + i.admin_up() + + tbl = VppIpTable(self, table_id, is_ip6=1) + tbl.add_vpp_config() + + i.set_table_ip6(table_id) + i.config_ip6() + table_id += 1 + + # Configure namespaces + self.vapi.app_namespace_add(namespace_id="0", secret=1234, + sw_if_index=self.loop0.sw_if_index) + self.vapi.app_namespace_add(namespace_id="1", secret=5678, + sw_if_index=self.loop1.sw_if_index) + + # Add inter-table routes + ip_t01 = VppIpRoute(self, self.loop1.local_ip6, 128, + [VppRoutePath("0.0.0.0", 0xffffffff, + nh_table_id=2)], + table_id=1, is_ip6=1) + ip_t10 = VppIpRoute(self, self.loop0.local_ip6, 128, + [VppRoutePath("0.0.0.0", 0xffffffff, + nh_table_id=1)], + table_id=2, is_ip6=1) + ip_t01.add_vpp_config() + ip_t10.add_vpp_config() + self.logger.debug(self.vapi.cli("show interface addr")) + self.logger.debug(self.vapi.cli("show ip6 fib")) + + def thru_host_stack_ipv6_tear_down(self): + for i in self.lo_interfaces: + i.unconfig_ip6() + i.set_table_ip6(0) + i.admin_down() + + self.vapi.session_enable_disable(is_enabled=0) + def thru_host_stack_test(self, server_app, server_args, client_app, client_args): self.env = {'VCL_API_PREFIX': self.shm_prefix, @@ -170,19 +216,19 @@ class VCLCutThruTestCase(VCLTestCase): super(VCLCutThruTestCase, self).setUp() self.cut_thru_setup() - self.client_echo_test_args = [self.server_addr, self.server_port, - "-E", self.echo_phrase, "-X"] + self.client_echo_test_args = ["-E", self.echo_phrase, "-X", + self.server_addr, self.server_port] self.client_iperf3_timeout = 20 self.client_iperf3_args = ["-V4d", "-c", self.server_addr] self.server_iperf3_args = ["-V4d", "-s"] self.client_uni_dir_nsock_timeout = 60 - self.client_uni_dir_nsock_test_args = [self.server_addr, - self.server_port, - "-I", "5", "-U", "-X"] + self.client_uni_dir_nsock_test_args = ["-I", "5", "-U", "-X", + self.server_addr, + self.server_port] self.client_bi_dir_nsock_timeout = 120 - self.client_bi_dir_nsock_test_args = [self.server_addr, - self.server_port, - "-I", "2", "-B", "-X"] + self.client_bi_dir_nsock_test_args = ["-I", "2", "-B", "-X", + self.server_addr, + self.server_port] def tearDown(self): self.cut_thru_tear_down() @@ -259,9 +305,9 @@ class VCLThruHostStackTestCase(VCLTestCase): super(VCLThruHostStackTestCase, self).setUp() self.thru_host_stack_setup() - self.client_echo_test_args = [self.loop0.local_ip4, - self.server_port, - "-E", self.echo_phrase, "-X"] + self.client_echo_test_args = ["-E", self.echo_phrase, "-X", + self.loop0.local_ip4, + self.server_port] def tearDown(self): self.thru_host_stack_tear_down() @@ -301,11 +347,14 @@ class VCLThruHostStackExtendedATestCase(VCLTestCase): self.thru_host_stack_setup() if self.vppDebug: self.client_bi_dir_nsock_timeout = 120 + self.client_bi_dir_nsock_test_args = ["-B", "-X", + self.loop0.local_ip4, + self.server_port] else: - self.client_bi_dir_nsock_timeout = 60 - self.client_bi_dir_nsock_test_args = [self.loop0.local_ip4, - self.server_port, - "-I", "2", "-B", "-X"] + self.client_bi_dir_nsock_timeout = 90 + self.client_bi_dir_nsock_test_args = ["-I", "2", "-B", "-X", + self.loop0.local_ip4, + self.server_port] def tearDown(self): self.thru_host_stack_tear_down() @@ -331,11 +380,14 @@ class VCLThruHostStackExtendedBTestCase(VCLTestCase): self.thru_host_stack_setup() if self.vppDebug: self.client_bi_dir_nsock_timeout = 120 + self.client_bi_dir_nsock_test_args = ["-B", "-X", + self.loop0.local_ip4, + self.server_port] else: self.client_bi_dir_nsock_timeout = 60 - self.client_bi_dir_nsock_test_args = [self.loop0.local_ip4, - self.server_port, - "-I", "2", "-B", "-X"] + self.client_bi_dir_nsock_test_args = ["-I", "2", "-B", "-X", + self.loop0.local_ip4, + self.server_port] def tearDown(self): self.thru_host_stack_tear_down() @@ -366,10 +418,10 @@ class VCLThruHostStackExtendedCTestCase(VCLTestCase): self.client_uni_dir_nsock_timeout = 120 self.numSockets = "5" - self.client_uni_dir_nsock_test_args = [self.loop0.local_ip4, - self.server_port, - "-I", self.numSockets, - "-U", "-X"] + self.client_uni_dir_nsock_test_args = ["-I", self.numSockets, + "-U", "-X", + self.loop0.local_ip4, + self.server_port] def tearDown(self): self.thru_host_stack_tear_down() @@ -400,10 +452,10 @@ class VCLThruHostStackExtendedDTestCase(VCLTestCase): self.client_uni_dir_nsock_timeout = 120 self.numSockets = "5" - self.client_uni_dir_nsock_test_args = [self.loop0.local_ip4, - self.server_port, - "-I", self.numSockets, - "-U", "-X"] + self.client_uni_dir_nsock_test_args = ["-I", self.numSockets, + "-U", "-X", + self.loop0.local_ip4, + self.server_port] def tearDown(self): self.thru_host_stack_tear_down() @@ -452,5 +504,313 @@ class VCLThruHostStackIperfTestCase(VCLTestCase): "iperf3", self.client_iperf3_args) +class VCLIpv6CutThruTestCase(VCLTestCase): + """ VCL IPv6 Cut Thru Tests """ + + def setUp(self): + super(VCLIpv6CutThruTestCase, self).setUp() + + self.cut_thru_setup() + self.client_iperf3_timeout = 20 + self.client_uni_dir_nsock_timeout = 60 + self.client_bi_dir_nsock_timeout = 120 + self.client_ipv6_echo_test_args = ["-6", "-E", self.echo_phrase, "-X", + self.server_ipv6_addr, + self.server_port] + self.client_ipv6_iperf3_args = ["-V6d", "-c", self.server_ipv6_addr] + self.server_ipv6_iperf3_args = ["-V6d", "-s"] + self.client_ipv6_uni_dir_nsock_test_args = ["-6", "-I", "5", + "-U", "-X", + self.server_ipv6_addr, + self.server_port] + self.client_ipv6_bi_dir_nsock_test_args = ["-6", "-I", "2", + "-B", "-X", + self.server_ipv6_addr, + self.server_port] + + def tearDown(self): + self.cut_thru_tear_down() + + super(VCLIpv6CutThruTestCase, self).tearDown() + + def test_ldp_ipv6_cut_thru_echo(self): + """ run LDP IPv6 cut thru echo test """ + + self.cut_thru_test("sock_test_server", + self.server_ipv6_args, + "sock_test_client", + self.client_ipv6_echo_test_args) + + def test_ldp_ipv6_cut_thru_iperf3(self): + """ run LDP IPv6 cut thru iperf3 test """ + + try: + subprocess.check_output(['iperf3', '-v']) + except: + self.logger.error("WARNING: 'iperf3' is not installed,") + self.logger.error( + " 'test_ldp_ipv6_cut_thru_iperf3' not run!") + return + + self.timeout = self.client_iperf3_timeout + self.cut_thru_test("iperf3", self.server_ipv6_iperf3_args, + "iperf3", self.client_ipv6_iperf3_args) + + @unittest.skipUnless(running_extended_tests(), "part of extended tests") + def test_ldp_ipv6_cut_thru_uni_dir_nsock(self): + """ run LDP IPv6 cut thru uni-directional (multiple sockets) test """ + + self.timeout = self.client_uni_dir_nsock_timeout + self.cut_thru_test("sock_test_server", self.server_ipv6_args, + "sock_test_client", + self.client_ipv6_uni_dir_nsock_test_args) + + @unittest.skipUnless(running_extended_tests(), "part of extended tests") + def test_ldp_ipv6_cut_thru_bi_dir_nsock(self): + """ run LDP IPv6 cut thru bi-directional (multiple sockets) test """ + + self.timeout = self.client_bi_dir_nsock_timeout + self.cut_thru_test("sock_test_server", self.server_ipv6_args, + "sock_test_client", + self.client_ipv6_bi_dir_nsock_test_args) + + def test_vcl_ipv6_cut_thru_echo(self): + """ run VCL IPv6 cut thru echo test """ + + self.cut_thru_test("vcl_test_server", + self.server_ipv6_args, + "vcl_test_client", + self.client_ipv6_echo_test_args) + + @unittest.skipUnless(running_extended_tests(), "part of extended tests") + def test_vcl_ipv6_cut_thru_uni_dir_nsock(self): + """ run VCL IPv6 cut thru uni-directional (multiple sockets) test """ + + self.timeout = self.client_uni_dir_nsock_timeout + self.cut_thru_test("vcl_test_server", self.server_ipv6_args, + "vcl_test_client", + self.client_ipv6_uni_dir_nsock_test_args) + + @unittest.skipUnless(running_extended_tests(), "part of extended tests") + def test_vcl_ipv6_cut_thru_bi_dir_nsock(self): + """ run VCL IPv6 cut thru bi-directional (multiple sockets) test """ + + self.timeout = self.client_bi_dir_nsock_timeout + self.cut_thru_test("vcl_test_server", self.server_ipv6_args, + "vcl_test_client", + self.client_ipv6_bi_dir_nsock_test_args) + + +class VCLIpv6ThruHostStackTestCase(VCLTestCase): + """ VCL IPv6 Thru Host Stack Tests """ + + def setUp(self): + super(VCLIpv6ThruHostStackTestCase, self).setUp() + + self.thru_host_stack_ipv6_setup() + self.client_ipv6_echo_test_args = ["-6", "-E", self.echo_phrase, "-X", + self.loop0.local_ip6, + self.server_port] + + def tearDown(self): + self.thru_host_stack_ipv6_tear_down() + + super(VCLIpv6ThruHostStackTestCase, self).tearDown() + + def test_ldp_ipv6_thru_host_stack_echo(self): + """ run LDP IPv6 thru host stack echo test """ + + self.thru_host_stack_test("sock_test_server", self.server_ipv6_args, + "sock_test_client", + self.client_ipv6_echo_test_args) + # TBD: Remove these when VPP thru host teardown config bug is fixed. + self.thru_host_stack_test("vcl_test_server", self.server_ipv6_args, + "vcl_test_client", + self.client_ipv6_echo_test_args) + + def test_vcl_ipv6_thru_host_stack_echo(self): + """ run VCL IPv6 thru host stack echo test """ + + # TBD: Enable this when VPP IPv6 thru host teardown + # config bug is fixed. + # self.thru_host_stack_test("vcl_test_server", self.server_ipv6_args, + # "vcl_test_client", + # self.client_ipv6_echo_test_args) + + # TBD: Remove VCLIpv6ThruHostStackExtended*TestCase classes and move + # tests here when VPP thru host teardown/setup config bug + # is fixed. + + +class VCLIpv6ThruHostStackExtendedATestCase(VCLTestCase): + """ VCL IPv6 Thru Host Stack Extended Tests """ + + def setUp(self): + super(VCLIpv6ThruHostStackExtendedATestCase, self).setUp() + + self.thru_host_stack_ipv6_setup() + if self.vppDebug: + self.client_bi_dir_nsock_timeout = 120 + self.client_ipv6_bi_dir_nsock_test_args = ["-6", "-B", "-X", + self.loop0.local_ip6, + self.server_port] + else: + self.client_bi_dir_nsock_timeout = 90 + self.client_ipv6_bi_dir_nsock_test_args = ["-6", "-I", + "2", "-B", "-X", + self.loop0.local_ip6, + self.server_port] + + def tearDown(self): + self.thru_host_stack_ipv6_tear_down() + + super(VCLIpv6ThruHostStackExtendedATestCase, self).tearDown() + + @unittest.skipUnless(running_extended_tests(), "part of extended tests") + def test_vcl_thru_host_stack_bi_dir_nsock(self): + """ run VCL thru host stack bi-directional (multiple sockets) test """ + + self.timeout = self.client_bi_dir_nsock_timeout + self.thru_host_stack_test("vcl_test_server", self.server_ipv6_args, + "vcl_test_client", + self.client_ipv6_bi_dir_nsock_test_args) + + +class VCLIpv6ThruHostStackExtendedBTestCase(VCLTestCase): + """ VCL IPv6 Thru Host Stack Extended Tests """ + + def setUp(self): + super(VCLIpv6ThruHostStackExtendedBTestCase, self).setUp() + + self.thru_host_stack_ipv6_setup() + if self.vppDebug: + self.client_bi_dir_nsock_timeout = 120 + self.client_ipv6_bi_dir_nsock_test_args = ["-6", "-B", "-X", + self.loop0.local_ip6, + self.server_port] + else: + self.client_bi_dir_nsock_timeout = 60 + self.client_ipv6_bi_dir_nsock_test_args = ["-6", "-I", "2", + "-B", "-X", + self.loop0.local_ip6, + self.server_port] + + def tearDown(self): + self.thru_host_stack_ipv6_tear_down() + + super(VCLIpv6ThruHostStackExtendedBTestCase, self).tearDown() + + @unittest.skipUnless(running_extended_tests(), "part of extended tests") + def test_ldp_thru_host_stack_bi_dir_nsock(self): + """ run LDP thru host stack bi-directional (multiple sockets) test """ + + self.timeout = self.client_bi_dir_nsock_timeout + self.thru_host_stack_test("sock_test_server", self.server_ipv6_args, + "sock_test_client", + self.client_ipv6_bi_dir_nsock_test_args) + + +class VCLIpv6ThruHostStackExtendedCTestCase(VCLTestCase): + """ VCL IPv6 Thru Host Stack Extended Tests """ + + def setUp(self): + super(VCLIpv6ThruHostStackExtendedCTestCase, self).setUp() + + self.thru_host_stack_ipv6_setup() + if self.vppDebug: + self.client_uni_dir_nsock_timeout = 120 + self.numSockets = "2" + else: + self.client_uni_dir_nsock_timeout = 120 + self.numSockets = "5" + + self.client_ipv6_uni_dir_nsock_test_args = ["-6", + "-I", self.numSockets, + "-U", "-X", + self.loop0.local_ip6, + self.server_port] + + def tearDown(self): + self.thru_host_stack_ipv6_tear_down() + + super(VCLIpv6ThruHostStackExtendedCTestCase, self).tearDown() + + @unittest.skipUnless(running_extended_tests(), "part of extended tests") + def test_ldp_thru_host_stack_uni_dir_nsock(self): + """ run LDP thru host stack uni-directional (multiple sockets) test """ + + self.timeout = self.client_uni_dir_nsock_timeout + self.thru_host_stack_test("sock_test_server", self.server_ipv6_args, + "sock_test_client", + self.client_ipv6_uni_dir_nsock_test_args) + + +class VCLIpv6ThruHostStackExtendedDTestCase(VCLTestCase): + """ VCL IPv6 Thru Host Stack Extended Tests """ + + def setUp(self): + super(VCLIpv6ThruHostStackExtendedDTestCase, self).setUp() + + self.thru_host_stack_ipv6_setup() + if self.vppDebug: + self.client_uni_dir_nsock_timeout = 120 + self.numSockets = "2" + else: + self.client_uni_dir_nsock_timeout = 120 + self.numSockets = "5" + + self.client_ipv6_uni_dir_nsock_test_args = ["-6", + "-I", self.numSockets, + "-U", "-X", + self.loop0.local_ip6, + self.server_port] + + def tearDown(self): + self.thru_host_stack_ipv6_tear_down() + + super(VCLIpv6ThruHostStackExtendedDTestCase, self).tearDown() + + @unittest.skipUnless(running_extended_tests(), "part of extended tests") + def test_vcl_thru_host_stack_uni_dir_nsock(self): + """ run VCL thru host stack uni-directional (multiple sockets) test """ + + self.timeout = self.client_uni_dir_nsock_timeout + self.thru_host_stack_test("vcl_test_server", self.server_ipv6_args, + "vcl_test_client", + self.client_ipv6_uni_dir_nsock_test_args) + + +class VCLIpv6ThruHostStackIperfTestCase(VCLTestCase): + """ VCL IPv6 Thru Host Stack Iperf Tests """ + + def setUp(self): + super(VCLIpv6ThruHostStackIperfTestCase, self).setUp() + + self.thru_host_stack_ipv6_setup() + self.client_iperf3_timeout = 20 + self.client_ipv6_iperf3_args = ["-V6d", "-c", self.loop0.local_ip6] + self.server_ipv6_iperf3_args = ["-V6d", "-s"] + + def tearDown(self): + self.thru_host_stack_ipv6_tear_down() + + super(VCLIpv6ThruHostStackIperfTestCase, self).tearDown() + + def test_ldp_thru_host_stack_iperf3(self): + """ run LDP thru host stack iperf3 test """ + + try: + subprocess.check_output(['iperf3', '-v']) + except: + self.logger.error("WARNING: 'iperf3' is not installed,") + self.logger.error( + " 'test_ldp_thru_host_stack_iperf3' not run!") + return + + self.timeout = self.client_iperf3_timeout + self.thru_host_stack_test("iperf3", self.server_ipv6_iperf3_args, + "iperf3", self.client_ipv6_iperf3_args) + + if __name__ == '__main__': unittest.main(testRunner=VppTestRunner) |