Renato Botelho do Couto | ead1e53 | 2019-10-31 13:31:07 -0500 | [diff] [blame] | 1 | #!/usr/bin/env python3 |
Dave Wallace | cfcf2f4 | 2018-02-16 18:31:56 -0500 | [diff] [blame] | 2 | """ Vpp VCL tests """ |
| 3 | |
| 4 | import unittest |
| 5 | import os |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 6 | import subprocess |
Dave Wallace | cfcf2f4 | 2018-02-16 18:31:56 -0500 | [diff] [blame] | 7 | import signal |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 8 | from framework import VppTestCase, VppTestRunner, running_extended_tests, \ |
| 9 | Worker |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 10 | from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath, FibPathProto |
Dave Wallace | cfcf2f4 | 2018-02-16 18:31:56 -0500 | [diff] [blame] | 11 | |
Paul Vinciguerra | 063366e | 2019-06-30 15:38:55 -0400 | [diff] [blame] | 12 | iperf3 = '/usr/bin/iperf3' |
| 13 | |
| 14 | |
| 15 | def have_app(app): |
| 16 | try: |
| 17 | subprocess.check_output([app, '-v']) |
| 18 | except (subprocess.CalledProcessError, OSError): |
| 19 | return False |
| 20 | return True |
| 21 | |
| 22 | |
| 23 | _have_iperf3 = have_app(iperf3) |
Paul Vinciguerra | 063366e | 2019-06-30 15:38:55 -0400 | [diff] [blame] | 24 | |
Dave Wallace | cfcf2f4 | 2018-02-16 18:31:56 -0500 | [diff] [blame] | 25 | |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 26 | class VCLAppWorker(Worker): |
Dave Wallace | 42996c0 | 2018-02-26 14:40:13 -0500 | [diff] [blame] | 27 | """ VCL Test Application Worker """ |
| 28 | |
Paul Vinciguerra | 48bdbcd | 2019-12-04 19:43:53 -0500 | [diff] [blame] | 29 | def __init__(self, build_dir, appname, executable_args, logger, env=None, |
| 30 | *args, **kwargs): |
| 31 | |
| 32 | if env is None: |
| 33 | env = {} |
Damjan Marion | 855e268 | 2018-08-24 13:37:45 +0200 | [diff] [blame] | 34 | vcl_lib_dir = "%s/vpp/lib" % build_dir |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 35 | if "iperf" in appname: |
| 36 | app = appname |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 37 | env.update({'LD_PRELOAD': |
Damjan Marion | 855e268 | 2018-08-24 13:37:45 +0200 | [diff] [blame] | 38 | "%s/libvcl_ldpreload.so" % vcl_lib_dir}) |
Florin Coras | ab2f6db | 2018-08-31 14:31:41 -0700 | [diff] [blame] | 39 | elif "sock" in appname: |
| 40 | app = "%s/vpp/bin/%s" % (build_dir, appname) |
| 41 | env.update({'LD_PRELOAD': |
| 42 | "%s/libvcl_ldpreload.so" % vcl_lib_dir}) |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 43 | else: |
Florin Coras | ab2f6db | 2018-08-31 14:31:41 -0700 | [diff] [blame] | 44 | app = "%s/vpp/bin/%s" % (build_dir, appname) |
Paul Vinciguerra | 48bdbcd | 2019-12-04 19:43:53 -0500 | [diff] [blame] | 45 | self.args = [app] + executable_args |
| 46 | super(VCLAppWorker, self).__init__(self.args, logger, env, |
| 47 | *args, **kwargs) |
Dave Wallace | 42996c0 | 2018-02-26 14:40:13 -0500 | [diff] [blame] | 48 | |
| 49 | |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 50 | class VCLTestCase(VppTestCase): |
Dave Wallace | 42996c0 | 2018-02-26 14:40:13 -0500 | [diff] [blame] | 51 | """ VCL Test Class """ |
| 52 | |
Paul Vinciguerra | 8d991d9 | 2019-01-25 14:05:48 -0800 | [diff] [blame] | 53 | @classmethod |
| 54 | def setUpClass(cls): |
| 55 | super(VCLTestCase, cls).setUpClass() |
| 56 | |
| 57 | @classmethod |
| 58 | def tearDownClass(cls): |
| 59 | super(VCLTestCase, cls).tearDownClass() |
| 60 | |
| 61 | def setUp(self): |
Klement Sekera | b8c72a4 | 2018-11-08 11:21:39 +0100 | [diff] [blame] | 62 | var = "VPP_BUILD_DIR" |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 63 | self.build_dir = os.getenv(var, None) |
| 64 | if self.build_dir is None: |
Paul Vinciguerra | 063366e | 2019-06-30 15:38:55 -0400 | [diff] [blame] | 65 | raise EnvironmentError("Environment variable `%s' not set" % var) |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 66 | self.vppDebug = 'vpp_debug' in self.build_dir |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 67 | self.server_addr = "127.0.0.1" |
| 68 | self.server_port = "22000" |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 69 | self.server_args = [self.server_port] |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 70 | self.server_ipv6_addr = "::1" |
| 71 | self.server_ipv6_args = ["-6", self.server_port] |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 72 | self.timeout = 20 |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 73 | self.echo_phrase = "Hello, world! Jenny is a friend of mine." |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 74 | self.pre_test_sleep = 0.3 |
| 75 | self.post_test_sleep = 0.2 |
| 76 | |
| 77 | if os.path.isfile("/tmp/ldp_server_af_unix_socket"): |
| 78 | os.remove("/tmp/ldp_server_af_unix_socket") |
Dave Wallace | 42996c0 | 2018-02-26 14:40:13 -0500 | [diff] [blame] | 79 | |
Paul Vinciguerra | 8d991d9 | 2019-01-25 14:05:48 -0800 | [diff] [blame] | 80 | super(VCLTestCase, self).setUp() |
Dave Wallace | 42996c0 | 2018-02-26 14:40:13 -0500 | [diff] [blame] | 81 | |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 82 | def cut_thru_setup(self): |
Dave Wallace | a67a03e | 2018-02-20 12:39:37 -0500 | [diff] [blame] | 83 | self.vapi.session_enable_disable(is_enabled=1) |
| 84 | |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 85 | def cut_thru_tear_down(self): |
Dave Wallace | a67a03e | 2018-02-20 12:39:37 -0500 | [diff] [blame] | 86 | self.vapi.session_enable_disable(is_enabled=0) |
| 87 | |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 88 | def cut_thru_test(self, server_app, server_args, client_app, client_args): |
Dave Wallace | 42996c0 | 2018-02-26 14:40:13 -0500 | [diff] [blame] | 89 | self.env = {'VCL_API_PREFIX': self.shm_prefix, |
| 90 | 'VCL_APP_SCOPE_LOCAL': "true"} |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 91 | worker_server = VCLAppWorker(self.build_dir, server_app, server_args, |
Dave Wallace | 42996c0 | 2018-02-26 14:40:13 -0500 | [diff] [blame] | 92 | self.logger, self.env) |
Dave Wallace | cfcf2f4 | 2018-02-16 18:31:56 -0500 | [diff] [blame] | 93 | worker_server.start() |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 94 | self.sleep(self.pre_test_sleep) |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 95 | worker_client = VCLAppWorker(self.build_dir, client_app, client_args, |
Dave Wallace | 42996c0 | 2018-02-26 14:40:13 -0500 | [diff] [blame] | 96 | self.logger, self.env) |
Dave Wallace | cfcf2f4 | 2018-02-16 18:31:56 -0500 | [diff] [blame] | 97 | worker_client.start() |
Dave Wallace | 42996c0 | 2018-02-26 14:40:13 -0500 | [diff] [blame] | 98 | worker_client.join(self.timeout) |
Dave Wallace | fef3f7b | 2018-03-09 12:04:10 -0500 | [diff] [blame] | 99 | try: |
| 100 | self.validateResults(worker_client, worker_server, self.timeout) |
Klement Sekera | b9ef273 | 2018-06-24 22:49:33 +0200 | [diff] [blame] | 101 | except Exception as error: |
Dave Wallace | fef3f7b | 2018-03-09 12:04:10 -0500 | [diff] [blame] | 102 | self.fail("Failed with %s" % error) |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 103 | self.sleep(self.post_test_sleep) |
Dave Wallace | cfcf2f4 | 2018-02-16 18:31:56 -0500 | [diff] [blame] | 104 | |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 105 | def thru_host_stack_setup(self): |
Dave Wallace | a67a03e | 2018-02-20 12:39:37 -0500 | [diff] [blame] | 106 | self.vapi.session_enable_disable(is_enabled=1) |
Klement Sekera | b9ef273 | 2018-06-24 22:49:33 +0200 | [diff] [blame] | 107 | self.create_loopback_interfaces(2) |
Dave Wallace | a67a03e | 2018-02-20 12:39:37 -0500 | [diff] [blame] | 108 | |
Florin Coras | 56b39f6 | 2018-03-27 17:29:32 -0700 | [diff] [blame] | 109 | table_id = 1 |
Dave Wallace | a67a03e | 2018-02-20 12:39:37 -0500 | [diff] [blame] | 110 | |
| 111 | for i in self.lo_interfaces: |
| 112 | i.admin_up() |
| 113 | |
| 114 | if table_id != 0: |
| 115 | tbl = VppIpTable(self, table_id) |
| 116 | tbl.add_vpp_config() |
| 117 | |
| 118 | i.set_table_ip4(table_id) |
| 119 | i.config_ip4() |
| 120 | table_id += 1 |
| 121 | |
| 122 | # Configure namespaces |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 123 | self.vapi.app_namespace_add_del(namespace_id="1", secret=1234, |
Ole Troan | e1ade68 | 2019-03-04 23:55:43 +0100 | [diff] [blame] | 124 | sw_if_index=self.loop0.sw_if_index) |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 125 | self.vapi.app_namespace_add_del(namespace_id="2", secret=5678, |
Ole Troan | e1ade68 | 2019-03-04 23:55:43 +0100 | [diff] [blame] | 126 | sw_if_index=self.loop1.sw_if_index) |
Dave Wallace | a67a03e | 2018-02-20 12:39:37 -0500 | [diff] [blame] | 127 | |
Dave Wallace | a67a03e | 2018-02-20 12:39:37 -0500 | [diff] [blame] | 128 | # Add inter-table routes |
| 129 | ip_t01 = VppIpRoute(self, self.loop1.local_ip4, 32, |
| 130 | [VppRoutePath("0.0.0.0", |
| 131 | 0xffffffff, |
Florin Coras | 56b39f6 | 2018-03-27 17:29:32 -0700 | [diff] [blame] | 132 | nh_table_id=2)], table_id=1) |
Dave Wallace | a67a03e | 2018-02-20 12:39:37 -0500 | [diff] [blame] | 133 | ip_t10 = VppIpRoute(self, self.loop0.local_ip4, 32, |
| 134 | [VppRoutePath("0.0.0.0", |
| 135 | 0xffffffff, |
Florin Coras | 56b39f6 | 2018-03-27 17:29:32 -0700 | [diff] [blame] | 136 | nh_table_id=1)], table_id=2) |
Dave Wallace | a67a03e | 2018-02-20 12:39:37 -0500 | [diff] [blame] | 137 | ip_t01.add_vpp_config() |
| 138 | ip_t10.add_vpp_config() |
Florin Coras | 56b39f6 | 2018-03-27 17:29:32 -0700 | [diff] [blame] | 139 | self.logger.debug(self.vapi.cli("show ip fib")) |
Dave Wallace | a67a03e | 2018-02-20 12:39:37 -0500 | [diff] [blame] | 140 | |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 141 | def thru_host_stack_tear_down(self): |
| 142 | for i in self.lo_interfaces: |
| 143 | i.unconfig_ip4() |
| 144 | i.set_table_ip4(0) |
| 145 | i.admin_down() |
| 146 | |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 147 | def thru_host_stack_ipv6_setup(self): |
| 148 | self.vapi.session_enable_disable(is_enabled=1) |
Klement Sekera | b9ef273 | 2018-06-24 22:49:33 +0200 | [diff] [blame] | 149 | self.create_loopback_interfaces(2) |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 150 | |
| 151 | table_id = 1 |
| 152 | |
| 153 | for i in self.lo_interfaces: |
| 154 | i.admin_up() |
| 155 | |
| 156 | tbl = VppIpTable(self, table_id, is_ip6=1) |
| 157 | tbl.add_vpp_config() |
| 158 | |
| 159 | i.set_table_ip6(table_id) |
| 160 | i.config_ip6() |
| 161 | table_id += 1 |
| 162 | |
| 163 | # Configure namespaces |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 164 | self.vapi.app_namespace_add_del(namespace_id="1", secret=1234, |
Ole Troan | e1ade68 | 2019-03-04 23:55:43 +0100 | [diff] [blame] | 165 | sw_if_index=self.loop0.sw_if_index) |
Jakub Grajciar | b4e5e50 | 2020-01-31 09:35:29 +0100 | [diff] [blame] | 166 | self.vapi.app_namespace_add_del(namespace_id="2", secret=5678, |
Ole Troan | e1ade68 | 2019-03-04 23:55:43 +0100 | [diff] [blame] | 167 | sw_if_index=self.loop1.sw_if_index) |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 168 | |
| 169 | # Add inter-table routes |
| 170 | ip_t01 = VppIpRoute(self, self.loop1.local_ip6, 128, |
Florin Coras | 56b39f6 | 2018-03-27 17:29:32 -0700 | [diff] [blame] | 171 | [VppRoutePath("::0", 0xffffffff, |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 172 | nh_table_id=2)], |
| 173 | table_id=1) |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 174 | ip_t10 = VppIpRoute(self, self.loop0.local_ip6, 128, |
Florin Coras | 56b39f6 | 2018-03-27 17:29:32 -0700 | [diff] [blame] | 175 | [VppRoutePath("::0", 0xffffffff, |
Neale Ranns | 097fa66 | 2018-05-01 05:17:55 -0700 | [diff] [blame] | 176 | nh_table_id=1)], |
| 177 | table_id=2) |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 178 | ip_t01.add_vpp_config() |
| 179 | ip_t10.add_vpp_config() |
| 180 | self.logger.debug(self.vapi.cli("show interface addr")) |
| 181 | self.logger.debug(self.vapi.cli("show ip6 fib")) |
| 182 | |
| 183 | def thru_host_stack_ipv6_tear_down(self): |
| 184 | for i in self.lo_interfaces: |
| 185 | i.unconfig_ip6() |
| 186 | i.set_table_ip6(0) |
| 187 | i.admin_down() |
| 188 | |
| 189 | self.vapi.session_enable_disable(is_enabled=0) |
| 190 | |
Paul Vinciguerra | 063366e | 2019-06-30 15:38:55 -0400 | [diff] [blame] | 191 | @unittest.skipUnless(_have_iperf3, "'%s' not found, Skipping.") |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 192 | def thru_host_stack_test(self, server_app, server_args, |
| 193 | client_app, client_args): |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 194 | self.env = {'VCL_API_PREFIX': self.shm_prefix, |
| 195 | 'VCL_APP_SCOPE_GLOBAL': "true", |
Florin Coras | 56b39f6 | 2018-03-27 17:29:32 -0700 | [diff] [blame] | 196 | 'VCL_APP_NAMESPACE_ID': "1", |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 197 | 'VCL_APP_NAMESPACE_SECRET': "1234"} |
| 198 | |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 199 | worker_server = VCLAppWorker(self.build_dir, server_app, server_args, |
Dave Wallace | 42996c0 | 2018-02-26 14:40:13 -0500 | [diff] [blame] | 200 | self.logger, self.env) |
Dave Wallace | a67a03e | 2018-02-20 12:39:37 -0500 | [diff] [blame] | 201 | worker_server.start() |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 202 | self.sleep(self.pre_test_sleep) |
Dave Wallace | 42996c0 | 2018-02-26 14:40:13 -0500 | [diff] [blame] | 203 | |
Florin Coras | 56b39f6 | 2018-03-27 17:29:32 -0700 | [diff] [blame] | 204 | self.env.update({'VCL_APP_NAMESPACE_ID': "2", |
Dave Wallace | 42996c0 | 2018-02-26 14:40:13 -0500 | [diff] [blame] | 205 | 'VCL_APP_NAMESPACE_SECRET': "5678"}) |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 206 | worker_client = VCLAppWorker(self.build_dir, client_app, client_args, |
Dave Wallace | 42996c0 | 2018-02-26 14:40:13 -0500 | [diff] [blame] | 207 | self.logger, self.env) |
Dave Wallace | a67a03e | 2018-02-20 12:39:37 -0500 | [diff] [blame] | 208 | worker_client.start() |
Dave Wallace | 42996c0 | 2018-02-26 14:40:13 -0500 | [diff] [blame] | 209 | worker_client.join(self.timeout) |
| 210 | |
Dave Wallace | fef3f7b | 2018-03-09 12:04:10 -0500 | [diff] [blame] | 211 | try: |
| 212 | self.validateResults(worker_client, worker_server, self.timeout) |
Klement Sekera | b9ef273 | 2018-06-24 22:49:33 +0200 | [diff] [blame] | 213 | except Exception as error: |
Dave Wallace | fef3f7b | 2018-03-09 12:04:10 -0500 | [diff] [blame] | 214 | self.fail("Failed with %s" % error) |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 215 | self.sleep(self.post_test_sleep) |
Dave Wallace | a67a03e | 2018-02-20 12:39:37 -0500 | [diff] [blame] | 216 | |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 217 | def validateResults(self, worker_client, worker_server, timeout): |
Paul Vinciguerra | 063366e | 2019-06-30 15:38:55 -0400 | [diff] [blame] | 218 | if worker_server.process is None: |
| 219 | raise RuntimeError('worker_server is not running.') |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 220 | if os.path.isdir('/proc/{}'.format(worker_server.process.pid)): |
| 221 | self.logger.info("Killing server worker process (pid %d)" % |
| 222 | worker_server.process.pid) |
Dave Barach | ad64687 | 2019-05-06 10:49:41 -0400 | [diff] [blame] | 223 | os.killpg(os.getpgid(worker_server.process.pid), signal.SIGTERM) |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 224 | worker_server.join() |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 225 | self.logger.info("Client worker result is `%s'" % worker_client.result) |
| 226 | error = False |
| 227 | if worker_client.result is None: |
| 228 | try: |
| 229 | error = True |
| 230 | self.logger.error( |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 231 | "Timeout: %ss! Killing client worker process (pid %d)" % |
| 232 | (timeout, worker_client.process.pid)) |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 233 | os.killpg(os.getpgid(worker_client.process.pid), |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 234 | signal.SIGKILL) |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 235 | worker_client.join() |
Dave Wallace | 07c0a9d | 2019-05-13 19:21:24 -0400 | [diff] [blame] | 236 | except OSError: |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 237 | self.logger.debug( |
| 238 | "Couldn't kill client worker process") |
| 239 | raise |
| 240 | if error: |
Paul Vinciguerra | 063366e | 2019-06-30 15:38:55 -0400 | [diff] [blame] | 241 | raise RuntimeError( |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 242 | "Timeout! Client worker did not finish in %ss" % timeout) |
| 243 | self.assert_equal(worker_client.result, 0, "Binary test return code") |
| 244 | |
| 245 | |
Florin Coras | 0ae445e | 2018-11-29 18:22:10 -0800 | [diff] [blame] | 246 | class LDPCutThruTestCase(VCLTestCase): |
| 247 | """ LDP Cut Thru Tests """ |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 248 | |
Paul Vinciguerra | 8d991d9 | 2019-01-25 14:05:48 -0800 | [diff] [blame] | 249 | @classmethod |
| 250 | def setUpClass(cls): |
| 251 | super(LDPCutThruTestCase, cls).setUpClass() |
| 252 | |
| 253 | @classmethod |
| 254 | def tearDownClass(cls): |
| 255 | super(LDPCutThruTestCase, cls).tearDownClass() |
| 256 | |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 257 | def setUp(self): |
Florin Coras | 0ae445e | 2018-11-29 18:22:10 -0800 | [diff] [blame] | 258 | super(LDPCutThruTestCase, self).setUp() |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 259 | |
| 260 | self.cut_thru_setup() |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 261 | self.client_echo_test_args = ["-E", self.echo_phrase, "-X", |
| 262 | self.server_addr, self.server_port] |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 263 | self.client_iperf3_timeout = 20 |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 264 | self.client_iperf3_args = ["-V4d", "-t 2", "-c", self.server_addr] |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 265 | self.server_iperf3_args = ["-V4d", "-s"] |
Florin Coras | 2eb42e7 | 2018-11-29 00:39:53 -0800 | [diff] [blame] | 266 | self.client_uni_dir_nsock_timeout = 20 |
Dave Wallace | 45cd3a3 | 2018-06-26 01:14:04 -0400 | [diff] [blame] | 267 | self.client_uni_dir_nsock_test_args = ["-N", "1000", "-U", "-X", |
| 268 | "-I", "2", |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 269 | self.server_addr, |
| 270 | self.server_port] |
Florin Coras | 2eb42e7 | 2018-11-29 00:39:53 -0800 | [diff] [blame] | 271 | self.client_bi_dir_nsock_timeout = 20 |
Dave Wallace | 45cd3a3 | 2018-06-26 01:14:04 -0400 | [diff] [blame] | 272 | self.client_bi_dir_nsock_test_args = ["-N", "1000", "-B", "-X", |
| 273 | "-I", "2", |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 274 | self.server_addr, |
| 275 | self.server_port] |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 276 | |
| 277 | def tearDown(self): |
Florin Coras | 0ae445e | 2018-11-29 18:22:10 -0800 | [diff] [blame] | 278 | super(LDPCutThruTestCase, self).tearDown() |
Paul Vinciguerra | 9673e3e | 2019-05-10 20:41:08 -0400 | [diff] [blame] | 279 | self.cut_thru_tear_down() |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 280 | |
Paul Vinciguerra | 90cf21b | 2019-03-13 09:23:05 -0700 | [diff] [blame] | 281 | def show_commands_at_teardown(self): |
| 282 | self.logger.debug(self.vapi.cli("show session verbose 2")) |
| 283 | |
Paul Vinciguerra | defde0f | 2018-12-06 07:46:13 -0800 | [diff] [blame] | 284 | @unittest.skipUnless(running_extended_tests, "part of extended tests") |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 285 | def test_ldp_cut_thru_echo(self): |
| 286 | """ run LDP cut thru echo test """ |
| 287 | |
Florin Coras | ab2f6db | 2018-08-31 14:31:41 -0700 | [diff] [blame] | 288 | self.cut_thru_test("sock_test_server", self.server_args, |
| 289 | "sock_test_client", self.client_echo_test_args) |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 290 | |
Paul Vinciguerra | 063366e | 2019-06-30 15:38:55 -0400 | [diff] [blame] | 291 | @unittest.skipUnless(_have_iperf3, "'%s' not found, Skipping.") |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 292 | def test_ldp_cut_thru_iperf3(self): |
| 293 | """ run LDP cut thru iperf3 test """ |
| 294 | |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 295 | self.timeout = self.client_iperf3_timeout |
Paul Vinciguerra | 063366e | 2019-06-30 15:38:55 -0400 | [diff] [blame] | 296 | self.cut_thru_test(iperf3, self.server_iperf3_args, |
| 297 | iperf3, self.client_iperf3_args) |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 298 | |
Paul Vinciguerra | defde0f | 2018-12-06 07:46:13 -0800 | [diff] [blame] | 299 | @unittest.skipUnless(running_extended_tests, "part of extended tests") |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 300 | def test_ldp_cut_thru_uni_dir_nsock(self): |
| 301 | """ run LDP cut thru uni-directional (multiple sockets) test """ |
| 302 | |
| 303 | self.timeout = self.client_uni_dir_nsock_timeout |
Florin Coras | ab2f6db | 2018-08-31 14:31:41 -0700 | [diff] [blame] | 304 | self.cut_thru_test("sock_test_server", self.server_args, |
| 305 | "sock_test_client", |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 306 | self.client_uni_dir_nsock_test_args) |
| 307 | |
Paul Vinciguerra | defde0f | 2018-12-06 07:46:13 -0800 | [diff] [blame] | 308 | @unittest.skipUnless(running_extended_tests, "part of extended tests") |
Florin Coras | 0f46e16 | 2019-07-02 19:33:15 -0700 | [diff] [blame] | 309 | @unittest.skip("sock test apps need to be improved") |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 310 | def test_ldp_cut_thru_bi_dir_nsock(self): |
| 311 | """ run LDP cut thru bi-directional (multiple sockets) test """ |
| 312 | |
| 313 | self.timeout = self.client_bi_dir_nsock_timeout |
Florin Coras | ab2f6db | 2018-08-31 14:31:41 -0700 | [diff] [blame] | 314 | self.cut_thru_test("sock_test_server", self.server_args, |
| 315 | "sock_test_client", |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 316 | self.client_bi_dir_nsock_test_args) |
| 317 | |
Florin Coras | 0ae445e | 2018-11-29 18:22:10 -0800 | [diff] [blame] | 318 | |
| 319 | class VCLCutThruTestCase(VCLTestCase): |
| 320 | """ VCL Cut Thru Tests """ |
| 321 | |
Paul Vinciguerra | 8d991d9 | 2019-01-25 14:05:48 -0800 | [diff] [blame] | 322 | @classmethod |
| 323 | def setUpClass(cls): |
| 324 | super(VCLCutThruTestCase, cls).setUpClass() |
| 325 | |
| 326 | @classmethod |
| 327 | def tearDownClass(cls): |
| 328 | super(VCLCutThruTestCase, cls).tearDownClass() |
| 329 | |
Florin Coras | 0ae445e | 2018-11-29 18:22:10 -0800 | [diff] [blame] | 330 | def setUp(self): |
| 331 | super(VCLCutThruTestCase, self).setUp() |
| 332 | |
| 333 | self.cut_thru_setup() |
| 334 | self.client_echo_test_args = ["-E", self.echo_phrase, "-X", |
| 335 | self.server_addr, self.server_port] |
| 336 | |
| 337 | self.client_uni_dir_nsock_timeout = 20 |
| 338 | self.client_uni_dir_nsock_test_args = ["-N", "1000", "-U", "-X", |
| 339 | "-I", "2", |
| 340 | self.server_addr, |
| 341 | self.server_port] |
| 342 | self.client_bi_dir_nsock_timeout = 20 |
| 343 | self.client_bi_dir_nsock_test_args = ["-N", "1000", "-B", "-X", |
| 344 | "-I", "2", |
| 345 | self.server_addr, |
| 346 | self.server_port] |
| 347 | |
| 348 | def tearDown(self): |
Florin Coras | 0ae445e | 2018-11-29 18:22:10 -0800 | [diff] [blame] | 349 | super(VCLCutThruTestCase, self).tearDown() |
| 350 | |
Florin Coras | 317b8e0 | 2019-04-17 09:57:46 -0700 | [diff] [blame] | 351 | def show_commands_at_teardown(self): |
| 352 | self.logger.debug(self.vapi.cli("show session verbose 2")) |
| 353 | |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 354 | def test_vcl_cut_thru_echo(self): |
| 355 | """ run VCL cut thru echo test """ |
| 356 | |
Florin Coras | ab2f6db | 2018-08-31 14:31:41 -0700 | [diff] [blame] | 357 | self.cut_thru_test("vcl_test_server", self.server_args, |
| 358 | "vcl_test_client", self.client_echo_test_args) |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 359 | |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 360 | def test_vcl_cut_thru_uni_dir_nsock(self): |
| 361 | """ run VCL cut thru uni-directional (multiple sockets) test """ |
| 362 | |
| 363 | self.timeout = self.client_uni_dir_nsock_timeout |
Florin Coras | ab2f6db | 2018-08-31 14:31:41 -0700 | [diff] [blame] | 364 | self.cut_thru_test("vcl_test_server", self.server_args, |
| 365 | "vcl_test_client", |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 366 | self.client_uni_dir_nsock_test_args) |
| 367 | |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 368 | def test_vcl_cut_thru_bi_dir_nsock(self): |
| 369 | """ run VCL cut thru bi-directional (multiple sockets) test """ |
| 370 | |
| 371 | self.timeout = self.client_bi_dir_nsock_timeout |
Florin Coras | ab2f6db | 2018-08-31 14:31:41 -0700 | [diff] [blame] | 372 | self.cut_thru_test("vcl_test_server", self.server_args, |
| 373 | "vcl_test_client", |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 374 | self.client_bi_dir_nsock_test_args) |
| 375 | |
Dave Wallace | 9f11c01 | 2018-02-28 17:55:23 -0500 | [diff] [blame] | 376 | |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 377 | class VCLThruHostStackEcho(VCLTestCase): |
| 378 | """ VCL Thru Host Stack Echo """ |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 379 | |
Paul Vinciguerra | 8d991d9 | 2019-01-25 14:05:48 -0800 | [diff] [blame] | 380 | @classmethod |
| 381 | def setUpClass(cls): |
| 382 | super(VCLThruHostStackEcho, cls).setUpClass() |
| 383 | |
| 384 | @classmethod |
| 385 | def tearDownClass(cls): |
| 386 | super(VCLThruHostStackEcho, cls).tearDownClass() |
| 387 | |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 388 | def setUp(self): |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 389 | super(VCLThruHostStackEcho, self).setUp() |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 390 | |
| 391 | self.thru_host_stack_setup() |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 392 | self.client_bi_dir_nsock_timeout = 20 |
| 393 | self.client_bi_dir_nsock_test_args = ["-N", "1000", "-B", "-X", |
| 394 | "-I", "2", |
| 395 | self.loop0.local_ip4, |
| 396 | self.server_port] |
| 397 | self.client_echo_test_args = ["-E", self.echo_phrase, "-X", |
| 398 | self.loop0.local_ip4, |
| 399 | self.server_port] |
| 400 | |
| 401 | def tearDown(self): |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 402 | self.thru_host_stack_tear_down() |
| 403 | super(VCLThruHostStackEcho, self).tearDown() |
| 404 | |
Paul Vinciguerra | 90cf21b | 2019-03-13 09:23:05 -0700 | [diff] [blame] | 405 | def show_commands_at_teardown(self): |
| 406 | self.logger.debug(self.vapi.cli("show app server")) |
| 407 | self.logger.debug(self.vapi.cli("show session verbose")) |
| 408 | |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 409 | |
Florin Coras | 8a14061 | 2019-02-18 22:39:39 -0800 | [diff] [blame] | 410 | class VCLThruHostStackTLS(VCLTestCase): |
| 411 | """ VCL Thru Host Stack TLS """ |
| 412 | |
| 413 | @classmethod |
| 414 | def setUpClass(cls): |
| 415 | super(VCLThruHostStackTLS, cls).setUpClass() |
| 416 | |
| 417 | @classmethod |
| 418 | def tearDownClass(cls): |
| 419 | super(VCLThruHostStackTLS, cls).tearDownClass() |
| 420 | |
| 421 | def setUp(self): |
| 422 | super(VCLThruHostStackTLS, self).setUp() |
| 423 | |
| 424 | self.thru_host_stack_setup() |
| 425 | self.client_uni_dir_tls_timeout = 20 |
Dave Wallace | 03dd90a | 2019-03-25 19:34:50 -0400 | [diff] [blame] | 426 | self.server_tls_args = ["-L", self.server_port] |
| 427 | self.client_uni_dir_tls_test_args = ["-N", "1000", "-U", "-X", "-L", |
Florin Coras | 8a14061 | 2019-02-18 22:39:39 -0800 | [diff] [blame] | 428 | self.loop0.local_ip4, |
| 429 | self.server_port] |
| 430 | |
| 431 | def test_vcl_thru_host_stack_tls_uni_dir(self): |
| 432 | """ run VCL thru host stack uni-directional TLS test """ |
| 433 | |
| 434 | self.timeout = self.client_uni_dir_tls_timeout |
| 435 | self.thru_host_stack_test("vcl_test_server", self.server_tls_args, |
| 436 | "vcl_test_client", |
| 437 | self.client_uni_dir_tls_test_args) |
| 438 | |
| 439 | def tearDown(self): |
Florin Coras | 8a14061 | 2019-02-18 22:39:39 -0800 | [diff] [blame] | 440 | self.thru_host_stack_tear_down() |
| 441 | super(VCLThruHostStackTLS, self).tearDown() |
| 442 | |
Paul Vinciguerra | 90cf21b | 2019-03-13 09:23:05 -0700 | [diff] [blame] | 443 | def show_commands_at_teardown(self): |
| 444 | self.logger.debug(self.vapi.cli("show app server")) |
| 445 | self.logger.debug(self.vapi.cli("show session verbose 2")) |
| 446 | |
Florin Coras | 8a14061 | 2019-02-18 22:39:39 -0800 | [diff] [blame] | 447 | |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 448 | class VCLThruHostStackBidirNsock(VCLTestCase): |
| 449 | """ VCL Thru Host Stack Bidir Nsock """ |
| 450 | |
Paul Vinciguerra | 8d991d9 | 2019-01-25 14:05:48 -0800 | [diff] [blame] | 451 | @classmethod |
| 452 | def setUpClass(cls): |
| 453 | super(VCLThruHostStackBidirNsock, cls).setUpClass() |
| 454 | |
| 455 | @classmethod |
| 456 | def tearDownClass(cls): |
| 457 | super(VCLThruHostStackBidirNsock, cls).tearDownClass() |
| 458 | |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 459 | def setUp(self): |
| 460 | super(VCLThruHostStackBidirNsock, self).setUp() |
| 461 | |
| 462 | self.thru_host_stack_setup() |
| 463 | self.client_bi_dir_nsock_timeout = 20 |
| 464 | self.client_bi_dir_nsock_test_args = ["-N", "1000", "-B", "-X", |
| 465 | "-I", "2", |
| 466 | self.loop0.local_ip4, |
| 467 | self.server_port] |
| 468 | self.client_echo_test_args = ["-E", self.echo_phrase, "-X", |
| 469 | self.loop0.local_ip4, |
| 470 | self.server_port] |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 471 | |
| 472 | def tearDown(self): |
| 473 | self.thru_host_stack_tear_down() |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 474 | super(VCLThruHostStackBidirNsock, self).tearDown() |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 475 | |
Paul Vinciguerra | 90cf21b | 2019-03-13 09:23:05 -0700 | [diff] [blame] | 476 | def show_commands_at_teardown(self): |
| 477 | self.logger.debug(self.vapi.cli("show session verbose 2")) |
| 478 | |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 479 | def test_vcl_thru_host_stack_bi_dir_nsock(self): |
| 480 | """ run VCL thru host stack bi-directional (multiple sockets) test """ |
| 481 | |
| 482 | self.timeout = self.client_bi_dir_nsock_timeout |
Florin Coras | ab2f6db | 2018-08-31 14:31:41 -0700 | [diff] [blame] | 483 | self.thru_host_stack_test("vcl_test_server", self.server_args, |
| 484 | "vcl_test_client", |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 485 | self.client_bi_dir_nsock_test_args) |
| 486 | |
| 487 | |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 488 | class LDPThruHostStackBidirNsock(VCLTestCase): |
| 489 | """ LDP Thru Host Stack Bidir Nsock """ |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 490 | |
Paul Vinciguerra | 8d991d9 | 2019-01-25 14:05:48 -0800 | [diff] [blame] | 491 | @classmethod |
| 492 | def setUpClass(cls): |
| 493 | super(LDPThruHostStackBidirNsock, cls).setUpClass() |
| 494 | |
| 495 | @classmethod |
| 496 | def tearDownClass(cls): |
| 497 | super(LDPThruHostStackBidirNsock, cls).tearDownClass() |
| 498 | |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 499 | def setUp(self): |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 500 | super(LDPThruHostStackBidirNsock, self).setUp() |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 501 | |
| 502 | self.thru_host_stack_setup() |
Dave Wallace | 3102c38 | 2020-04-03 19:48:48 -0400 | [diff] [blame] | 503 | self.client_bi_dir_nsock_timeout = 20 |
| 504 | self.client_bi_dir_nsock_test_args = ["-N", "1000", "-B", "-X", |
| 505 | # OUCH! Host Stack Bug? |
| 506 | # Only fails when running |
| 507 | # 'make test TEST_JOBS=auto' |
| 508 | # or TEST_JOBS > 1 |
| 509 | # "-I", "2", |
| 510 | self.loop0.local_ip4, |
| 511 | self.server_port] |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 512 | |
| 513 | def tearDown(self): |
| 514 | self.thru_host_stack_tear_down() |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 515 | super(LDPThruHostStackBidirNsock, self).tearDown() |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 516 | |
Paul Vinciguerra | 90cf21b | 2019-03-13 09:23:05 -0700 | [diff] [blame] | 517 | def show_commands_at_teardown(self): |
| 518 | self.logger.debug(self.vapi.cli("show session verbose 2")) |
| 519 | |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 520 | def test_ldp_thru_host_stack_bi_dir_nsock(self): |
| 521 | """ run LDP thru host stack bi-directional (multiple sockets) test """ |
| 522 | |
| 523 | self.timeout = self.client_bi_dir_nsock_timeout |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 524 | self.thru_host_stack_test("sock_test_server", self.server_args, |
| 525 | "sock_test_client", |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 526 | self.client_bi_dir_nsock_test_args) |
| 527 | |
| 528 | |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 529 | class LDPThruHostStackNsock(VCLTestCase): |
| 530 | """ LDP Thru Host Stack Nsock """ |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 531 | |
Paul Vinciguerra | 8d991d9 | 2019-01-25 14:05:48 -0800 | [diff] [blame] | 532 | @classmethod |
| 533 | def setUpClass(cls): |
| 534 | super(LDPThruHostStackNsock, cls).setUpClass() |
| 535 | |
| 536 | @classmethod |
| 537 | def tearDownClass(cls): |
| 538 | super(LDPThruHostStackNsock, cls).tearDownClass() |
| 539 | |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 540 | def setUp(self): |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 541 | super(LDPThruHostStackNsock, self).setUp() |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 542 | |
| 543 | self.thru_host_stack_setup() |
| 544 | if self.vppDebug: |
Florin Coras | 2eb42e7 | 2018-11-29 00:39:53 -0800 | [diff] [blame] | 545 | self.client_uni_dir_nsock_timeout = 20 |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 546 | self.numSockets = "2" |
| 547 | else: |
Florin Coras | 2eb42e7 | 2018-11-29 00:39:53 -0800 | [diff] [blame] | 548 | self.client_uni_dir_nsock_timeout = 20 |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 549 | self.numSockets = "5" |
| 550 | |
Dave Wallace | 45cd3a3 | 2018-06-26 01:14:04 -0400 | [diff] [blame] | 551 | self.client_uni_dir_nsock_test_args = ["-N", "1000", "-U", "-X", |
| 552 | "-I", self.numSockets, |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 553 | self.loop0.local_ip4, |
| 554 | self.server_port] |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 555 | |
| 556 | def tearDown(self): |
| 557 | self.thru_host_stack_tear_down() |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 558 | super(LDPThruHostStackNsock, self).tearDown() |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 559 | |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 560 | def test_ldp_thru_host_stack_uni_dir_nsock(self): |
| 561 | """ run LDP thru host stack uni-directional (multiple sockets) test """ |
| 562 | |
| 563 | self.timeout = self.client_uni_dir_nsock_timeout |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 564 | self.thru_host_stack_test("sock_test_server", self.server_args, |
| 565 | "sock_test_client", |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 566 | self.client_uni_dir_nsock_test_args) |
| 567 | |
| 568 | |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 569 | class VCLThruHostStackNsock(VCLTestCase): |
| 570 | """ VCL Thru Host Stack Nsock """ |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 571 | |
Paul Vinciguerra | 8d991d9 | 2019-01-25 14:05:48 -0800 | [diff] [blame] | 572 | @classmethod |
| 573 | def setUpClass(cls): |
| 574 | super(VCLThruHostStackNsock, cls).setUpClass() |
| 575 | |
| 576 | @classmethod |
| 577 | def tearDownClass(cls): |
| 578 | super(VCLThruHostStackNsock, cls).tearDownClass() |
| 579 | |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 580 | def setUp(self): |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 581 | super(VCLThruHostStackNsock, self).setUp() |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 582 | |
| 583 | self.thru_host_stack_setup() |
| 584 | if self.vppDebug: |
Florin Coras | 2eb42e7 | 2018-11-29 00:39:53 -0800 | [diff] [blame] | 585 | self.client_uni_dir_nsock_timeout = 20 |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 586 | self.numSockets = "2" |
| 587 | else: |
Florin Coras | 2eb42e7 | 2018-11-29 00:39:53 -0800 | [diff] [blame] | 588 | self.client_uni_dir_nsock_timeout = 20 |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 589 | self.numSockets = "5" |
| 590 | |
Dave Wallace | 45cd3a3 | 2018-06-26 01:14:04 -0400 | [diff] [blame] | 591 | self.client_uni_dir_nsock_test_args = ["-N", "1000", "-U", "-X", |
| 592 | "-I", self.numSockets, |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 593 | self.loop0.local_ip4, |
| 594 | self.server_port] |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 595 | |
| 596 | def tearDown(self): |
| 597 | self.thru_host_stack_tear_down() |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 598 | super(VCLThruHostStackNsock, self).tearDown() |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 599 | |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 600 | def test_vcl_thru_host_stack_uni_dir_nsock(self): |
| 601 | """ run VCL thru host stack uni-directional (multiple sockets) test """ |
| 602 | |
| 603 | self.timeout = self.client_uni_dir_nsock_timeout |
Florin Coras | ab2f6db | 2018-08-31 14:31:41 -0700 | [diff] [blame] | 604 | self.thru_host_stack_test("vcl_test_server", self.server_args, |
| 605 | "vcl_test_client", |
Dave Wallace | d85075e | 2018-03-02 13:19:30 -0500 | [diff] [blame] | 606 | self.client_uni_dir_nsock_test_args) |
| 607 | |
| 608 | |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 609 | class LDPThruHostStackIperf(VCLTestCase): |
| 610 | """ LDP Thru Host Stack Iperf """ |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 611 | |
Paul Vinciguerra | 8d991d9 | 2019-01-25 14:05:48 -0800 | [diff] [blame] | 612 | @classmethod |
| 613 | def setUpClass(cls): |
| 614 | super(LDPThruHostStackIperf, cls).setUpClass() |
| 615 | |
| 616 | @classmethod |
| 617 | def tearDownClass(cls): |
| 618 | super(LDPThruHostStackIperf, cls).tearDownClass() |
| 619 | |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 620 | def setUp(self): |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 621 | super(LDPThruHostStackIperf, self).setUp() |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 622 | |
| 623 | self.thru_host_stack_setup() |
| 624 | self.client_iperf3_timeout = 20 |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 625 | self.client_iperf3_args = ["-V4d", "-t 2", "-c", self.loop0.local_ip4] |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 626 | self.server_iperf3_args = ["-V4d", "-s"] |
| 627 | |
| 628 | def tearDown(self): |
| 629 | self.thru_host_stack_tear_down() |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 630 | super(LDPThruHostStackIperf, self).tearDown() |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 631 | |
Paul Vinciguerra | 90cf21b | 2019-03-13 09:23:05 -0700 | [diff] [blame] | 632 | def show_commands_at_teardown(self): |
| 633 | self.logger.debug(self.vapi.cli("show session verbose 2")) |
| 634 | |
Paul Vinciguerra | 063366e | 2019-06-30 15:38:55 -0400 | [diff] [blame] | 635 | @unittest.skipUnless(_have_iperf3, "'%s' not found, Skipping.") |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 636 | def test_ldp_thru_host_stack_iperf3(self): |
| 637 | """ run LDP thru host stack iperf3 test """ |
| 638 | |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 639 | self.timeout = self.client_iperf3_timeout |
Paul Vinciguerra | 063366e | 2019-06-30 15:38:55 -0400 | [diff] [blame] | 640 | self.thru_host_stack_test(iperf3, self.server_iperf3_args, |
| 641 | iperf3, self.client_iperf3_args) |
Dave Wallace | 816833f | 2018-03-14 20:01:28 -0400 | [diff] [blame] | 642 | |
| 643 | |
Florin Coras | 57a5a2d | 2020-04-01 23:16:11 +0000 | [diff] [blame] | 644 | class LDPThruHostStackIperfUdp(VCLTestCase): |
| 645 | """ LDP Thru Host Stack Iperf UDP """ |
| 646 | |
| 647 | @classmethod |
| 648 | def setUpClass(cls): |
| 649 | super(LDPThruHostStackIperfUdp, cls).setUpClass() |
| 650 | |
| 651 | @classmethod |
| 652 | def tearDownClass(cls): |
| 653 | super(LDPThruHostStackIperfUdp, cls).tearDownClass() |
| 654 | |
| 655 | def setUp(self): |
| 656 | super(LDPThruHostStackIperfUdp, self).setUp() |
| 657 | |
| 658 | self.thru_host_stack_setup() |
| 659 | self.client_iperf3_timeout = 20 |
| 660 | self.client_iperf3_args = ["-V4d", "-t 2", "-u", "-l 1400", |
| 661 | "-c", self.loop0.local_ip4] |
| 662 | self.server_iperf3_args = ["-V4d", "-s"] |
| 663 | |
| 664 | def tearDown(self): |
| 665 | self.thru_host_stack_tear_down() |
| 666 | super(LDPThruHostStackIperfUdp, self).tearDown() |
| 667 | |
| 668 | def show_commands_at_teardown(self): |
| 669 | self.logger.debug(self.vapi.cli("show session verbose 2")) |
| 670 | |
| 671 | @unittest.skipUnless(_have_iperf3, "'%s' not found, Skipping.") |
| 672 | def test_ldp_thru_host_stack_iperf3_udp(self): |
| 673 | """ run LDP thru host stack iperf3 UDP test """ |
| 674 | |
| 675 | self.timeout = self.client_iperf3_timeout |
| 676 | self.thru_host_stack_test(iperf3, self.server_iperf3_args, |
| 677 | iperf3, self.client_iperf3_args) |
| 678 | |
| 679 | |
Florin Coras | 0ae445e | 2018-11-29 18:22:10 -0800 | [diff] [blame] | 680 | class LDPIpv6CutThruTestCase(VCLTestCase): |
| 681 | """ LDP IPv6 Cut Thru Tests """ |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 682 | |
Paul Vinciguerra | 8d991d9 | 2019-01-25 14:05:48 -0800 | [diff] [blame] | 683 | @classmethod |
| 684 | def setUpClass(cls): |
| 685 | super(LDPIpv6CutThruTestCase, cls).setUpClass() |
| 686 | |
| 687 | @classmethod |
| 688 | def tearDownClass(cls): |
| 689 | super(LDPIpv6CutThruTestCase, cls).tearDownClass() |
| 690 | |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 691 | def setUp(self): |
Florin Coras | 0ae445e | 2018-11-29 18:22:10 -0800 | [diff] [blame] | 692 | super(LDPIpv6CutThruTestCase, self).setUp() |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 693 | |
| 694 | self.cut_thru_setup() |
| 695 | self.client_iperf3_timeout = 20 |
Florin Coras | 2eb42e7 | 2018-11-29 00:39:53 -0800 | [diff] [blame] | 696 | self.client_uni_dir_nsock_timeout = 20 |
| 697 | self.client_bi_dir_nsock_timeout = 20 |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 698 | self.client_ipv6_echo_test_args = ["-6", "-E", self.echo_phrase, "-X", |
| 699 | self.server_ipv6_addr, |
| 700 | self.server_port] |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 701 | self.client_ipv6_iperf3_args = ["-V6d", "-t 2", "-c", |
Florin Coras | ab2f6db | 2018-08-31 14:31:41 -0700 | [diff] [blame] | 702 | self.server_ipv6_addr] |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 703 | self.server_ipv6_iperf3_args = ["-V6d", "-s"] |
Dave Wallace | 45cd3a3 | 2018-06-26 01:14:04 -0400 | [diff] [blame] | 704 | self.client_ipv6_uni_dir_nsock_test_args = ["-N", "1000", "-U", "-X", |
| 705 | "-6", |
| 706 | "-I", "2", |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 707 | self.server_ipv6_addr, |
| 708 | self.server_port] |
Dave Wallace | 45cd3a3 | 2018-06-26 01:14:04 -0400 | [diff] [blame] | 709 | self.client_ipv6_bi_dir_nsock_test_args = ["-N", "1000", "-B", "-X", |
| 710 | "-6", |
| 711 | "-I", "2", |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 712 | self.server_ipv6_addr, |
| 713 | self.server_port] |
| 714 | |
| 715 | def tearDown(self): |
Florin Coras | 0ae445e | 2018-11-29 18:22:10 -0800 | [diff] [blame] | 716 | super(LDPIpv6CutThruTestCase, self).tearDown() |
Paul Vinciguerra | 9673e3e | 2019-05-10 20:41:08 -0400 | [diff] [blame] | 717 | self.cut_thru_tear_down() |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 718 | |
| 719 | def test_ldp_ipv6_cut_thru_echo(self): |
| 720 | """ run LDP IPv6 cut thru echo test """ |
| 721 | |
Florin Coras | ab2f6db | 2018-08-31 14:31:41 -0700 | [diff] [blame] | 722 | self.cut_thru_test("sock_test_server", |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 723 | self.server_ipv6_args, |
Florin Coras | ab2f6db | 2018-08-31 14:31:41 -0700 | [diff] [blame] | 724 | "sock_test_client", |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 725 | self.client_ipv6_echo_test_args) |
| 726 | |
Paul Vinciguerra | 063366e | 2019-06-30 15:38:55 -0400 | [diff] [blame] | 727 | @unittest.skipUnless(_have_iperf3, "'%s' not found, Skipping.") |
Paul Vinciguerra | defde0f | 2018-12-06 07:46:13 -0800 | [diff] [blame] | 728 | @unittest.skipUnless(running_extended_tests, "part of extended tests") |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 729 | def test_ldp_ipv6_cut_thru_iperf3(self): |
| 730 | """ run LDP IPv6 cut thru iperf3 test """ |
| 731 | |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 732 | self.timeout = self.client_iperf3_timeout |
Paul Vinciguerra | 063366e | 2019-06-30 15:38:55 -0400 | [diff] [blame] | 733 | self.cut_thru_test(iperf3, self.server_ipv6_iperf3_args, |
| 734 | iperf3, self.client_ipv6_iperf3_args) |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 735 | |
Paul Vinciguerra | defde0f | 2018-12-06 07:46:13 -0800 | [diff] [blame] | 736 | @unittest.skipUnless(running_extended_tests, "part of extended tests") |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 737 | def test_ldp_ipv6_cut_thru_uni_dir_nsock(self): |
| 738 | """ run LDP IPv6 cut thru uni-directional (multiple sockets) test """ |
| 739 | |
| 740 | self.timeout = self.client_uni_dir_nsock_timeout |
Florin Coras | ab2f6db | 2018-08-31 14:31:41 -0700 | [diff] [blame] | 741 | self.cut_thru_test("sock_test_server", self.server_ipv6_args, |
| 742 | "sock_test_client", |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 743 | self.client_ipv6_uni_dir_nsock_test_args) |
| 744 | |
Paul Vinciguerra | defde0f | 2018-12-06 07:46:13 -0800 | [diff] [blame] | 745 | @unittest.skipUnless(running_extended_tests, "part of extended tests") |
Florin Coras | 0f46e16 | 2019-07-02 19:33:15 -0700 | [diff] [blame] | 746 | @unittest.skip("sock test apps need to be improved") |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 747 | def test_ldp_ipv6_cut_thru_bi_dir_nsock(self): |
| 748 | """ run LDP IPv6 cut thru bi-directional (multiple sockets) test """ |
| 749 | |
| 750 | self.timeout = self.client_bi_dir_nsock_timeout |
Florin Coras | ab2f6db | 2018-08-31 14:31:41 -0700 | [diff] [blame] | 751 | self.cut_thru_test("sock_test_server", self.server_ipv6_args, |
| 752 | "sock_test_client", |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 753 | self.client_ipv6_bi_dir_nsock_test_args) |
| 754 | |
Florin Coras | 0ae445e | 2018-11-29 18:22:10 -0800 | [diff] [blame] | 755 | |
| 756 | class VCLIpv6CutThruTestCase(VCLTestCase): |
| 757 | """ VCL IPv6 Cut Thru Tests """ |
| 758 | |
Paul Vinciguerra | 8d991d9 | 2019-01-25 14:05:48 -0800 | [diff] [blame] | 759 | @classmethod |
| 760 | def setUpClass(cls): |
| 761 | super(VCLIpv6CutThruTestCase, cls).setUpClass() |
| 762 | |
| 763 | @classmethod |
| 764 | def tearDownClass(cls): |
| 765 | super(VCLIpv6CutThruTestCase, cls).tearDownClass() |
| 766 | |
Florin Coras | 0ae445e | 2018-11-29 18:22:10 -0800 | [diff] [blame] | 767 | def setUp(self): |
| 768 | super(VCLIpv6CutThruTestCase, self).setUp() |
| 769 | |
| 770 | self.cut_thru_setup() |
| 771 | self.client_uni_dir_nsock_timeout = 20 |
| 772 | self.client_bi_dir_nsock_timeout = 20 |
| 773 | self.client_ipv6_echo_test_args = ["-6", "-E", self.echo_phrase, "-X", |
| 774 | self.server_ipv6_addr, |
| 775 | self.server_port] |
| 776 | self.client_ipv6_uni_dir_nsock_test_args = ["-N", "1000", "-U", "-X", |
| 777 | "-6", |
| 778 | "-I", "2", |
| 779 | self.server_ipv6_addr, |
| 780 | self.server_port] |
| 781 | self.client_ipv6_bi_dir_nsock_test_args = ["-N", "1000", "-B", "-X", |
| 782 | "-6", |
| 783 | "-I", "2", |
| 784 | self.server_ipv6_addr, |
| 785 | self.server_port] |
| 786 | |
| 787 | def tearDown(self): |
Florin Coras | 0ae445e | 2018-11-29 18:22:10 -0800 | [diff] [blame] | 788 | super(VCLIpv6CutThruTestCase, self).tearDown() |
Paul Vinciguerra | 9673e3e | 2019-05-10 20:41:08 -0400 | [diff] [blame] | 789 | self.cut_thru_tear_down() |
Florin Coras | 0ae445e | 2018-11-29 18:22:10 -0800 | [diff] [blame] | 790 | |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 791 | def test_vcl_ipv6_cut_thru_echo(self): |
| 792 | """ run VCL IPv6 cut thru echo test """ |
| 793 | |
Florin Coras | ab2f6db | 2018-08-31 14:31:41 -0700 | [diff] [blame] | 794 | self.cut_thru_test("vcl_test_server", |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 795 | self.server_ipv6_args, |
Florin Coras | ab2f6db | 2018-08-31 14:31:41 -0700 | [diff] [blame] | 796 | "vcl_test_client", |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 797 | self.client_ipv6_echo_test_args) |
| 798 | |
Paul Vinciguerra | defde0f | 2018-12-06 07:46:13 -0800 | [diff] [blame] | 799 | @unittest.skipUnless(running_extended_tests, "part of extended tests") |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 800 | def test_vcl_ipv6_cut_thru_uni_dir_nsock(self): |
| 801 | """ run VCL IPv6 cut thru uni-directional (multiple sockets) test """ |
| 802 | |
| 803 | self.timeout = self.client_uni_dir_nsock_timeout |
Florin Coras | ab2f6db | 2018-08-31 14:31:41 -0700 | [diff] [blame] | 804 | self.cut_thru_test("vcl_test_server", self.server_ipv6_args, |
| 805 | "vcl_test_client", |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 806 | self.client_ipv6_uni_dir_nsock_test_args) |
| 807 | |
Paul Vinciguerra | defde0f | 2018-12-06 07:46:13 -0800 | [diff] [blame] | 808 | @unittest.skipUnless(running_extended_tests, "part of extended tests") |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 809 | def test_vcl_ipv6_cut_thru_bi_dir_nsock(self): |
| 810 | """ run VCL IPv6 cut thru bi-directional (multiple sockets) test """ |
| 811 | |
| 812 | self.timeout = self.client_bi_dir_nsock_timeout |
Florin Coras | ab2f6db | 2018-08-31 14:31:41 -0700 | [diff] [blame] | 813 | self.cut_thru_test("vcl_test_server", self.server_ipv6_args, |
| 814 | "vcl_test_client", |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 815 | self.client_ipv6_bi_dir_nsock_test_args) |
| 816 | |
| 817 | |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 818 | class VCLIpv6ThruHostStackEcho(VCLTestCase): |
| 819 | """ VCL IPv6 Thru Host Stack Echo """ |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 820 | |
Paul Vinciguerra | 8d991d9 | 2019-01-25 14:05:48 -0800 | [diff] [blame] | 821 | @classmethod |
| 822 | def setUpClass(cls): |
| 823 | super(VCLIpv6ThruHostStackEcho, cls).setUpClass() |
| 824 | |
| 825 | @classmethod |
| 826 | def tearDownClass(cls): |
| 827 | super(VCLIpv6ThruHostStackEcho, cls).tearDownClass() |
| 828 | |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 829 | def setUp(self): |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 830 | super(VCLIpv6ThruHostStackEcho, self).setUp() |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 831 | |
| 832 | self.thru_host_stack_ipv6_setup() |
| 833 | self.client_ipv6_echo_test_args = ["-6", "-E", self.echo_phrase, "-X", |
| 834 | self.loop0.local_ip6, |
| 835 | self.server_port] |
| 836 | |
| 837 | def tearDown(self): |
| 838 | self.thru_host_stack_ipv6_tear_down() |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 839 | super(VCLIpv6ThruHostStackEcho, self).tearDown() |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 840 | |
| 841 | def test_vcl_ipv6_thru_host_stack_echo(self): |
| 842 | """ run VCL IPv6 thru host stack echo test """ |
| 843 | |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 844 | self.thru_host_stack_test("vcl_test_server", |
Damjan Marion | 855e268 | 2018-08-24 13:37:45 +0200 | [diff] [blame] | 845 | self.server_ipv6_args, |
Florin Coras | ab2f6db | 2018-08-31 14:31:41 -0700 | [diff] [blame] | 846 | "vcl_test_client", |
Florin Coras | dc2e251 | 2018-12-03 17:47:26 -0800 | [diff] [blame] | 847 | self.client_ipv6_echo_test_args) |
Dave Wallace | de91006 | 2018-03-20 09:22:13 -0400 | [diff] [blame] | 848 | |
| 849 | |
Dave Wallace | cfcf2f4 | 2018-02-16 18:31:56 -0500 | [diff] [blame] | 850 | if __name__ == '__main__': |
| 851 | unittest.main(testRunner=VppTestRunner) |