blob: cfa97775a3d99b9a64da8d03697b91659a57b873 [file] [log] [blame]
Renato Botelho do Coutoead1e532019-10-31 13:31:07 -05001#!/usr/bin/env python3
Dave Wallacecfcf2f42018-02-16 18:31:56 -05002""" Vpp VCL tests """
3
4import unittest
5import os
Dave Wallace816833f2018-03-14 20:01:28 -04006import subprocess
Dave Wallacecfcf2f42018-02-16 18:31:56 -05007import signal
Damjan Marion5546e432021-09-30 20:04:14 +02008import glob
Klement Sekerab23ffd72021-05-31 16:08:53 +02009from config import config
Pratikshya Prasai657bdf72022-08-18 11:09:38 -040010from asfframework import VppTestCase, VppTestRunner, Worker
Neale Ranns097fa662018-05-01 05:17:55 -070011from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath, FibPathProto
Dave Wallacecfcf2f42018-02-16 18:31:56 -050012
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020013iperf3 = "/usr/bin/iperf3"
Paul Vinciguerra063366e2019-06-30 15:38:55 -040014
15
16def have_app(app):
17 try:
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020018 subprocess.check_output([app, "-v"])
Paul Vinciguerra063366e2019-06-30 15:38:55 -040019 except (subprocess.CalledProcessError, OSError):
20 return False
21 return True
22
23
24_have_iperf3 = have_app(iperf3)
Paul Vinciguerra063366e2019-06-30 15:38:55 -040025
Dave Wallacecfcf2f42018-02-16 18:31:56 -050026
Dave Wallace816833f2018-03-14 20:01:28 -040027class VCLAppWorker(Worker):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020028 """VCL Test Application Worker"""
Dave Wallace42996c02018-02-26 14:40:13 -050029
Damjan Marion5546e432021-09-30 20:04:14 +020030 libname = "libvcl_ldpreload.so"
31
32 class LibraryNotFound(Exception):
33 pass
34
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020035 def __init__(
36 self, appname, executable_args, logger, env=None, role=None, *args, **kwargs
37 ):
Dave Wallace4ee17d82021-05-20 14:01:51 -040038 self.role = role
Klement Sekerab23ffd72021-05-31 16:08:53 +020039 vcl_ldpreload_glob = f"{config.vpp_install_dir}/**/{self.libname}"
Damjan Marion5546e432021-09-30 20:04:14 +020040 vcl_ldpreload_so = glob.glob(vcl_ldpreload_glob, recursive=True)
41
42 if len(vcl_ldpreload_so) < 1:
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020043 raise LibraryNotFound("cannot locate library: {}".format(self.libname))
Damjan Marion5546e432021-09-30 20:04:14 +020044
45 vcl_ldpreload_so = vcl_ldpreload_so[0]
46
Paul Vinciguerra48bdbcd2019-12-04 19:43:53 -050047 if env is None:
48 env = {}
Dave Wallace816833f2018-03-14 20:01:28 -040049 if "iperf" in appname:
50 app = appname
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020051 env.update({"LD_PRELOAD": vcl_ldpreload_so})
Florin Corasab2f6db2018-08-31 14:31:41 -070052 elif "sock" in appname:
Klement Sekerab23ffd72021-05-31 16:08:53 +020053 app = f"{config.vpp_build_dir}/vpp/bin/{appname}"
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020054 env.update({"LD_PRELOAD": vcl_ldpreload_so})
Dave Wallace816833f2018-03-14 20:01:28 -040055 else:
Klement Sekerab23ffd72021-05-31 16:08:53 +020056 app = f"{config.vpp_build_dir}/vpp/bin/{appname}"
Paul Vinciguerra48bdbcd2019-12-04 19:43:53 -050057 self.args = [app] + executable_args
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020058 super(VCLAppWorker, self).__init__(self.args, logger, env, *args, **kwargs)
Dave Wallace42996c02018-02-26 14:40:13 -050059
60
Dave Wallace816833f2018-03-14 20:01:28 -040061class VCLTestCase(VppTestCase):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020062 """VCL Test Class"""
63
Florin Coras4c45d6f2021-08-12 08:38:02 -070064 session_startup = ["poll-main"]
Dave Wallace42996c02018-02-26 14:40:13 -050065
Paul Vinciguerra8d991d92019-01-25 14:05:48 -080066 @classmethod
67 def setUpClass(cls):
Florin Coras4c45d6f2021-08-12 08:38:02 -070068 if cls.session_startup:
69 conf = "session {" + " ".join(cls.session_startup) + "}"
70 cls.extra_vpp_punt_config = [conf]
Paul Vinciguerra8d991d92019-01-25 14:05:48 -080071 super(VCLTestCase, cls).setUpClass()
72
73 @classmethod
74 def tearDownClass(cls):
75 super(VCLTestCase, cls).tearDownClass()
76
77 def setUp(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020078 self.vppDebug = "vpp_debug" in config.vpp_install_dir
Dave Wallace9f11c012018-02-28 17:55:23 -050079 self.server_addr = "127.0.0.1"
80 self.server_port = "22000"
Dave Wallace816833f2018-03-14 20:01:28 -040081 self.server_args = [self.server_port]
Dave Wallacede910062018-03-20 09:22:13 -040082 self.server_ipv6_addr = "::1"
83 self.server_ipv6_args = ["-6", self.server_port]
Florin Corasdc2e2512018-12-03 17:47:26 -080084 self.timeout = 20
Dave Wallace9f11c012018-02-28 17:55:23 -050085 self.echo_phrase = "Hello, world! Jenny is a friend of mine."
Florin Corasdc2e2512018-12-03 17:47:26 -080086 self.pre_test_sleep = 0.3
87 self.post_test_sleep = 0.2
Florin Coras4c45d6f2021-08-12 08:38:02 -070088 self.sapi_client_sock = ""
89 self.sapi_server_sock = ""
Florin Corasdc2e2512018-12-03 17:47:26 -080090
91 if os.path.isfile("/tmp/ldp_server_af_unix_socket"):
92 os.remove("/tmp/ldp_server_af_unix_socket")
Dave Wallace42996c02018-02-26 14:40:13 -050093
Paul Vinciguerra8d991d92019-01-25 14:05:48 -080094 super(VCLTestCase, self).setUp()
Dave Wallace42996c02018-02-26 14:40:13 -050095
Florin Coras4c45d6f2021-08-12 08:38:02 -070096 def update_vcl_app_env(self, ns_id, ns_secret, attach_sock):
97 if not ns_id:
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020098 if "VCL_APP_NAMESPACE_ID" in self.vcl_app_env:
99 del self.vcl_app_env["VCL_APP_NAMESPACE_ID"]
Florin Coras4c45d6f2021-08-12 08:38:02 -0700100 else:
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200101 self.vcl_app_env["VCL_APP_NAMESPACE_ID"] = ns_id
Florin Coras4c45d6f2021-08-12 08:38:02 -0700102
103 if not ns_secret:
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200104 if "VCL_APP_NAMESPACE_SECRET" in self.vcl_app_env:
105 del self.vcl_app_env["VCL_APP_NAMESPACE_SECRET"]
Florin Coras4c45d6f2021-08-12 08:38:02 -0700106 else:
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200107 self.vcl_app_env["VCL_APP_NAMESPACE_SECRET"] = ns_secret
Florin Coras4c45d6f2021-08-12 08:38:02 -0700108
109 if not attach_sock:
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200110 self.vcl_app_env["VCL_VPP_API_SOCKET"] = self.get_api_sock_path()
111 if "VCL_VPP_SAPI_SOCKET" in self.vcl_app_env:
112 del self.vcl_app_env["VCL_VPP_SAPI_SOCKET"]
Florin Coras4c45d6f2021-08-12 08:38:02 -0700113 else:
114 sapi_sock = "%s/app_ns_sockets/%s" % (self.tempdir, attach_sock)
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200115 self.vcl_app_env["VCL_VPP_SAPI_SOCKET"] = sapi_sock
116 if "VCL_VPP_API_SOCKET" in self.vcl_app_env:
117 del self.vcl_app_env["VCL_VPP_API_SOCKET"]
Florin Coras4c45d6f2021-08-12 08:38:02 -0700118
Dave Wallace9f11c012018-02-28 17:55:23 -0500119 def cut_thru_setup(self):
Jakub Grajciar6a2794e2020-11-24 11:22:01 +0100120 self.vapi.session_enable_disable(is_enable=1)
Dave Wallacea67a03e2018-02-20 12:39:37 -0500121
Dave Wallace9f11c012018-02-28 17:55:23 -0500122 def cut_thru_tear_down(self):
Jakub Grajciar6a2794e2020-11-24 11:22:01 +0100123 self.vapi.session_enable_disable(is_enable=0)
Dave Wallacea67a03e2018-02-20 12:39:37 -0500124
Dave Wallace816833f2018-03-14 20:01:28 -0400125 def cut_thru_test(self, server_app, server_args, client_app, client_args):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200126 self.vcl_app_env = {"VCL_APP_SCOPE_LOCAL": "true"}
Florin Coras4c45d6f2021-08-12 08:38:02 -0700127
128 self.update_vcl_app_env("", "", self.sapi_server_sock)
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200129 worker_server = VCLAppWorker(
130 server_app, server_args, self.logger, self.vcl_app_env, "server"
131 )
Dave Wallacecfcf2f42018-02-16 18:31:56 -0500132 worker_server.start()
Florin Corasdc2e2512018-12-03 17:47:26 -0800133 self.sleep(self.pre_test_sleep)
Florin Coras4c45d6f2021-08-12 08:38:02 -0700134
135 self.update_vcl_app_env("", "", self.sapi_client_sock)
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200136 worker_client = VCLAppWorker(
137 client_app, client_args, self.logger, self.vcl_app_env, "client"
138 )
Dave Wallacecfcf2f42018-02-16 18:31:56 -0500139 worker_client.start()
Dave Wallace42996c02018-02-26 14:40:13 -0500140 worker_client.join(self.timeout)
Dave Wallacefef3f7b2018-03-09 12:04:10 -0500141 try:
142 self.validateResults(worker_client, worker_server, self.timeout)
Klement Sekerab9ef2732018-06-24 22:49:33 +0200143 except Exception as error:
Dave Wallacefef3f7b2018-03-09 12:04:10 -0500144 self.fail("Failed with %s" % error)
Florin Corasdc2e2512018-12-03 17:47:26 -0800145 self.sleep(self.post_test_sleep)
Dave Wallacecfcf2f42018-02-16 18:31:56 -0500146
Dave Wallace9f11c012018-02-28 17:55:23 -0500147 def thru_host_stack_setup(self):
Jakub Grajciar6a2794e2020-11-24 11:22:01 +0100148 self.vapi.session_enable_disable(is_enable=1)
Klement Sekerab9ef2732018-06-24 22:49:33 +0200149 self.create_loopback_interfaces(2)
Dave Wallacea67a03e2018-02-20 12:39:37 -0500150
Florin Coras56b39f62018-03-27 17:29:32 -0700151 table_id = 1
Dave Wallacea67a03e2018-02-20 12:39:37 -0500152
153 for i in self.lo_interfaces:
154 i.admin_up()
155
156 if table_id != 0:
157 tbl = VppIpTable(self, table_id)
158 tbl.add_vpp_config()
159
160 i.set_table_ip4(table_id)
161 i.config_ip4()
162 table_id += 1
163
164 # Configure namespaces
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200165 self.vapi.app_namespace_add_del(
166 namespace_id="1", secret=1234, sw_if_index=self.loop0.sw_if_index
167 )
168 self.vapi.app_namespace_add_del(
169 namespace_id="2", secret=5678, sw_if_index=self.loop1.sw_if_index
170 )
Dave Wallacea67a03e2018-02-20 12:39:37 -0500171
Dave Wallacea67a03e2018-02-20 12:39:37 -0500172 # Add inter-table routes
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200173 ip_t01 = VppIpRoute(
174 self,
175 self.loop1.local_ip4,
176 32,
177 [VppRoutePath("0.0.0.0", 0xFFFFFFFF, nh_table_id=2)],
178 table_id=1,
179 )
180 ip_t10 = VppIpRoute(
181 self,
182 self.loop0.local_ip4,
183 32,
184 [VppRoutePath("0.0.0.0", 0xFFFFFFFF, nh_table_id=1)],
185 table_id=2,
186 )
Dave Wallacea67a03e2018-02-20 12:39:37 -0500187 ip_t01.add_vpp_config()
188 ip_t10.add_vpp_config()
Florin Coras56b39f62018-03-27 17:29:32 -0700189 self.logger.debug(self.vapi.cli("show ip fib"))
Dave Wallacea67a03e2018-02-20 12:39:37 -0500190
Dave Wallace9f11c012018-02-28 17:55:23 -0500191 def thru_host_stack_tear_down(self):
192 for i in self.lo_interfaces:
193 i.unconfig_ip4()
194 i.set_table_ip4(0)
195 i.admin_down()
Liangxing Wang22112772022-05-13 04:24:19 +0000196 i.remove_vpp_config()
Dave Wallace9f11c012018-02-28 17:55:23 -0500197
Dave Wallacede910062018-03-20 09:22:13 -0400198 def thru_host_stack_ipv6_setup(self):
Jakub Grajciar6a2794e2020-11-24 11:22:01 +0100199 self.vapi.session_enable_disable(is_enable=1)
Klement Sekerab9ef2732018-06-24 22:49:33 +0200200 self.create_loopback_interfaces(2)
Dave Wallacede910062018-03-20 09:22:13 -0400201
202 table_id = 1
203
204 for i in self.lo_interfaces:
205 i.admin_up()
206
207 tbl = VppIpTable(self, table_id, is_ip6=1)
208 tbl.add_vpp_config()
209
210 i.set_table_ip6(table_id)
211 i.config_ip6()
212 table_id += 1
213
214 # Configure namespaces
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200215 self.vapi.app_namespace_add_del(
216 namespace_id="1", secret=1234, sw_if_index=self.loop0.sw_if_index
217 )
218 self.vapi.app_namespace_add_del(
219 namespace_id="2", secret=5678, sw_if_index=self.loop1.sw_if_index
220 )
Dave Wallacede910062018-03-20 09:22:13 -0400221
222 # Add inter-table routes
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200223 ip_t01 = VppIpRoute(
224 self,
225 self.loop1.local_ip6,
226 128,
227 [VppRoutePath("::0", 0xFFFFFFFF, nh_table_id=2)],
228 table_id=1,
229 )
230 ip_t10 = VppIpRoute(
231 self,
232 self.loop0.local_ip6,
233 128,
234 [VppRoutePath("::0", 0xFFFFFFFF, nh_table_id=1)],
235 table_id=2,
236 )
Dave Wallacede910062018-03-20 09:22:13 -0400237 ip_t01.add_vpp_config()
238 ip_t10.add_vpp_config()
239 self.logger.debug(self.vapi.cli("show interface addr"))
240 self.logger.debug(self.vapi.cli("show ip6 fib"))
241
242 def thru_host_stack_ipv6_tear_down(self):
243 for i in self.lo_interfaces:
244 i.unconfig_ip6()
245 i.set_table_ip6(0)
246 i.admin_down()
247
Jakub Grajciar6a2794e2020-11-24 11:22:01 +0100248 self.vapi.session_enable_disable(is_enable=0)
Dave Wallacede910062018-03-20 09:22:13 -0400249
Paul Vinciguerra063366e2019-06-30 15:38:55 -0400250 @unittest.skipUnless(_have_iperf3, "'%s' not found, Skipping.")
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200251 def thru_host_stack_test(self, server_app, server_args, client_app, client_args):
252 self.vcl_app_env = {"VCL_APP_SCOPE_GLOBAL": "true"}
Dave Wallace9f11c012018-02-28 17:55:23 -0500253
Florin Coras4c45d6f2021-08-12 08:38:02 -0700254 self.update_vcl_app_env("1", "1234", self.sapi_server_sock)
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200255 worker_server = VCLAppWorker(
256 server_app, server_args, self.logger, self.vcl_app_env, "server"
257 )
Dave Wallacea67a03e2018-02-20 12:39:37 -0500258 worker_server.start()
Florin Corasdc2e2512018-12-03 17:47:26 -0800259 self.sleep(self.pre_test_sleep)
Dave Wallace42996c02018-02-26 14:40:13 -0500260
Florin Coras4c45d6f2021-08-12 08:38:02 -0700261 self.update_vcl_app_env("2", "5678", self.sapi_client_sock)
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200262 worker_client = VCLAppWorker(
263 client_app, client_args, self.logger, self.vcl_app_env, "client"
264 )
Dave Wallacea67a03e2018-02-20 12:39:37 -0500265 worker_client.start()
Dave Wallace42996c02018-02-26 14:40:13 -0500266 worker_client.join(self.timeout)
267
Dave Wallacefef3f7b2018-03-09 12:04:10 -0500268 try:
269 self.validateResults(worker_client, worker_server, self.timeout)
Klement Sekerab9ef2732018-06-24 22:49:33 +0200270 except Exception as error:
Dave Wallacefef3f7b2018-03-09 12:04:10 -0500271 self.fail("Failed with %s" % error)
Florin Corasdc2e2512018-12-03 17:47:26 -0800272 self.sleep(self.post_test_sleep)
Dave Wallacea67a03e2018-02-20 12:39:37 -0500273
Dave Wallace9f11c012018-02-28 17:55:23 -0500274 def validateResults(self, worker_client, worker_server, timeout):
Paul Vinciguerra063366e2019-06-30 15:38:55 -0400275 if worker_server.process is None:
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200276 raise RuntimeError("worker_server is not running.")
277 if os.path.isdir("/proc/{}".format(worker_server.process.pid)):
278 self.logger.info(
279 "Killing server worker process (pid %d)" % worker_server.process.pid
280 )
Dave Barachad646872019-05-06 10:49:41 -0400281 os.killpg(os.getpgid(worker_server.process.pid), signal.SIGTERM)
Dave Wallaced85075e2018-03-02 13:19:30 -0500282 worker_server.join()
Dave Wallace9f11c012018-02-28 17:55:23 -0500283 self.logger.info("Client worker result is `%s'" % worker_client.result)
284 error = False
285 if worker_client.result is None:
286 try:
287 error = True
288 self.logger.error(
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200289 "Timeout: %ss! Killing client worker process (pid %d)"
290 % (timeout, worker_client.process.pid)
291 )
292 os.killpg(os.getpgid(worker_client.process.pid), signal.SIGKILL)
Dave Wallace9f11c012018-02-28 17:55:23 -0500293 worker_client.join()
Dave Wallace07c0a9d2019-05-13 19:21:24 -0400294 except OSError:
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200295 self.logger.debug("Couldn't kill client worker process")
Dave Wallace9f11c012018-02-28 17:55:23 -0500296 raise
297 if error:
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200298 raise RuntimeError("Timeout! Client worker did not finish in %ss" % timeout)
Dave Wallace9f11c012018-02-28 17:55:23 -0500299 self.assert_equal(worker_client.result, 0, "Binary test return code")
300
301
Florin Coras0ae445e2018-11-29 18:22:10 -0800302class LDPCutThruTestCase(VCLTestCase):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200303 """LDP Cut Thru Tests"""
Dave Wallace9f11c012018-02-28 17:55:23 -0500304
Paul Vinciguerra8d991d92019-01-25 14:05:48 -0800305 @classmethod
306 def setUpClass(cls):
Florin Coras4c45d6f2021-08-12 08:38:02 -0700307 cls.session_startup = ["poll-main", "use-app-socket-api"]
Paul Vinciguerra8d991d92019-01-25 14:05:48 -0800308 super(LDPCutThruTestCase, cls).setUpClass()
309
310 @classmethod
311 def tearDownClass(cls):
312 super(LDPCutThruTestCase, cls).tearDownClass()
313
Dave Wallace9f11c012018-02-28 17:55:23 -0500314 def setUp(self):
Florin Coras0ae445e2018-11-29 18:22:10 -0800315 super(LDPCutThruTestCase, self).setUp()
Dave Wallace9f11c012018-02-28 17:55:23 -0500316
317 self.cut_thru_setup()
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200318 self.client_echo_test_args = [
319 "-E",
320 self.echo_phrase,
321 "-X",
322 self.server_addr,
323 self.server_port,
324 ]
Dave Wallace816833f2018-03-14 20:01:28 -0400325 self.client_iperf3_timeout = 20
Florin Coras1d879142021-05-06 00:08:18 -0700326 self.client_iperf3_args = ["-4", "-t 2", "-c", self.server_addr]
327 self.server_iperf3_args = ["-4", "-s"]
Florin Coras2eb42e72018-11-29 00:39:53 -0800328 self.client_uni_dir_nsock_timeout = 20
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200329 self.client_uni_dir_nsock_test_args = [
330 "-N",
331 "1000",
332 "-U",
333 "-X",
334 "-I",
335 "2",
336 self.server_addr,
337 self.server_port,
338 ]
Florin Coras2eb42e72018-11-29 00:39:53 -0800339 self.client_bi_dir_nsock_timeout = 20
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200340 self.client_bi_dir_nsock_test_args = [
341 "-N",
342 "1000",
343 "-B",
344 "-X",
345 "-I",
346 "2",
347 self.server_addr,
348 self.server_port,
349 ]
Florin Coras4c45d6f2021-08-12 08:38:02 -0700350 self.sapi_client_sock = "default"
351 self.sapi_server_sock = "default"
Dave Wallace9f11c012018-02-28 17:55:23 -0500352
353 def tearDown(self):
Florin Coras0ae445e2018-11-29 18:22:10 -0800354 super(LDPCutThruTestCase, self).tearDown()
Paul Vinciguerra9673e3e2019-05-10 20:41:08 -0400355 self.cut_thru_tear_down()
Dave Wallace9f11c012018-02-28 17:55:23 -0500356
Paul Vinciguerra90cf21b2019-03-13 09:23:05 -0700357 def show_commands_at_teardown(self):
358 self.logger.debug(self.vapi.cli("show session verbose 2"))
Florin Coras41d5f542021-01-15 13:49:33 -0800359 self.logger.debug(self.vapi.cli("show app mq"))
Paul Vinciguerra90cf21b2019-03-13 09:23:05 -0700360
Klement Sekerab23ffd72021-05-31 16:08:53 +0200361 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace9f11c012018-02-28 17:55:23 -0500362 def test_ldp_cut_thru_echo(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200363 """run LDP cut thru echo test"""
Dave Wallace9f11c012018-02-28 17:55:23 -0500364
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200365 self.cut_thru_test(
366 "sock_test_server",
367 self.server_args,
368 "sock_test_client",
369 self.client_echo_test_args,
370 )
Dave Wallace816833f2018-03-14 20:01:28 -0400371
372 def test_ldp_cut_thru_iperf3(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200373 """run LDP cut thru iperf3 test"""
Dave Wallace816833f2018-03-14 20:01:28 -0400374
Dave Wallace816833f2018-03-14 20:01:28 -0400375 self.timeout = self.client_iperf3_timeout
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200376 self.cut_thru_test(
377 iperf3, self.server_iperf3_args, iperf3, self.client_iperf3_args
378 )
Dave Wallace9f11c012018-02-28 17:55:23 -0500379
Klement Sekerab23ffd72021-05-31 16:08:53 +0200380 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallaced85075e2018-03-02 13:19:30 -0500381 def test_ldp_cut_thru_uni_dir_nsock(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200382 """run LDP cut thru uni-directional (multiple sockets) test"""
Dave Wallaced85075e2018-03-02 13:19:30 -0500383
384 self.timeout = self.client_uni_dir_nsock_timeout
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200385 self.cut_thru_test(
386 "sock_test_server",
387 self.server_args,
388 "sock_test_client",
389 self.client_uni_dir_nsock_test_args,
390 )
Dave Wallaced85075e2018-03-02 13:19:30 -0500391
Klement Sekerab23ffd72021-05-31 16:08:53 +0200392 @unittest.skipUnless(config.extended, "part of extended tests")
Florin Coras0f46e162019-07-02 19:33:15 -0700393 @unittest.skip("sock test apps need to be improved")
Dave Wallaced85075e2018-03-02 13:19:30 -0500394 def test_ldp_cut_thru_bi_dir_nsock(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200395 """run LDP cut thru bi-directional (multiple sockets) test"""
Dave Wallaced85075e2018-03-02 13:19:30 -0500396
397 self.timeout = self.client_bi_dir_nsock_timeout
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200398 self.cut_thru_test(
399 "sock_test_server",
400 self.server_args,
401 "sock_test_client",
402 self.client_bi_dir_nsock_test_args,
403 )
Dave Wallaced85075e2018-03-02 13:19:30 -0500404
Florin Coras0ae445e2018-11-29 18:22:10 -0800405
406class VCLCutThruTestCase(VCLTestCase):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200407 """VCL Cut Thru Tests"""
Florin Coras0ae445e2018-11-29 18:22:10 -0800408
Paul Vinciguerra8d991d92019-01-25 14:05:48 -0800409 @classmethod
410 def setUpClass(cls):
411 super(VCLCutThruTestCase, cls).setUpClass()
412
413 @classmethod
414 def tearDownClass(cls):
415 super(VCLCutThruTestCase, cls).tearDownClass()
416
Florin Coras0ae445e2018-11-29 18:22:10 -0800417 def setUp(self):
418 super(VCLCutThruTestCase, self).setUp()
419
420 self.cut_thru_setup()
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200421 self.client_echo_test_args = [
422 "-E",
423 self.echo_phrase,
424 "-X",
425 self.server_addr,
426 self.server_port,
427 ]
Florin Coras0ae445e2018-11-29 18:22:10 -0800428
429 self.client_uni_dir_nsock_timeout = 20
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200430 self.client_uni_dir_nsock_test_args = [
431 "-N",
432 "1000",
433 "-U",
434 "-X",
435 "-I",
436 "2",
437 self.server_addr,
438 self.server_port,
439 ]
Florin Coras0ae445e2018-11-29 18:22:10 -0800440 self.client_bi_dir_nsock_timeout = 20
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200441 self.client_bi_dir_nsock_test_args = [
442 "-N",
443 "1000",
444 "-B",
445 "-X",
446 "-I",
447 "2",
448 self.server_addr,
449 self.server_port,
450 ]
Florin Coras0ae445e2018-11-29 18:22:10 -0800451
452 def tearDown(self):
Florin Coras0ae445e2018-11-29 18:22:10 -0800453 super(VCLCutThruTestCase, self).tearDown()
454
Florin Coras317b8e02019-04-17 09:57:46 -0700455 def show_commands_at_teardown(self):
456 self.logger.debug(self.vapi.cli("show session verbose 2"))
Florin Coras41d5f542021-01-15 13:49:33 -0800457 self.logger.debug(self.vapi.cli("show app mq"))
Florin Coras317b8e02019-04-17 09:57:46 -0700458
Dave Wallace9f11c012018-02-28 17:55:23 -0500459 def test_vcl_cut_thru_echo(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200460 """run VCL cut thru echo test"""
Dave Wallace9f11c012018-02-28 17:55:23 -0500461
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200462 self.cut_thru_test(
463 "vcl_test_server",
464 self.server_args,
465 "vcl_test_client",
466 self.client_echo_test_args,
467 )
Dave Wallace9f11c012018-02-28 17:55:23 -0500468
Dave Wallaced85075e2018-03-02 13:19:30 -0500469 def test_vcl_cut_thru_uni_dir_nsock(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200470 """run VCL cut thru uni-directional (multiple sockets) test"""
Dave Wallaced85075e2018-03-02 13:19:30 -0500471
472 self.timeout = self.client_uni_dir_nsock_timeout
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200473 self.cut_thru_test(
474 "vcl_test_server",
475 self.server_args,
476 "vcl_test_client",
477 self.client_uni_dir_nsock_test_args,
478 )
Dave Wallaced85075e2018-03-02 13:19:30 -0500479
Dave Wallaced85075e2018-03-02 13:19:30 -0500480 def test_vcl_cut_thru_bi_dir_nsock(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200481 """run VCL cut thru bi-directional (multiple sockets) test"""
Dave Wallaced85075e2018-03-02 13:19:30 -0500482
483 self.timeout = self.client_bi_dir_nsock_timeout
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200484 self.cut_thru_test(
485 "vcl_test_server",
486 self.server_args,
487 "vcl_test_client",
488 self.client_bi_dir_nsock_test_args,
489 )
Dave Wallaced85075e2018-03-02 13:19:30 -0500490
Dave Wallace9f11c012018-02-28 17:55:23 -0500491
Florin Corasdc2e2512018-12-03 17:47:26 -0800492class VCLThruHostStackEcho(VCLTestCase):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200493 """VCL Thru Host Stack Echo"""
Dave Wallaced85075e2018-03-02 13:19:30 -0500494
Paul Vinciguerra8d991d92019-01-25 14:05:48 -0800495 @classmethod
496 def setUpClass(cls):
497 super(VCLThruHostStackEcho, cls).setUpClass()
498
499 @classmethod
500 def tearDownClass(cls):
501 super(VCLThruHostStackEcho, cls).tearDownClass()
502
Dave Wallaced85075e2018-03-02 13:19:30 -0500503 def setUp(self):
Florin Corasdc2e2512018-12-03 17:47:26 -0800504 super(VCLThruHostStackEcho, self).setUp()
Dave Wallaced85075e2018-03-02 13:19:30 -0500505
506 self.thru_host_stack_setup()
Florin Corasdc2e2512018-12-03 17:47:26 -0800507 self.client_bi_dir_nsock_timeout = 20
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200508 self.client_bi_dir_nsock_test_args = [
509 "-N",
510 "1000",
511 "-B",
512 "-X",
513 "-I",
514 "2",
515 self.loop0.local_ip4,
516 self.server_port,
517 ]
518 self.client_echo_test_args = [
519 "-E",
520 self.echo_phrase,
521 "-X",
522 self.loop0.local_ip4,
523 self.server_port,
524 ]
Florin Corasdc2e2512018-12-03 17:47:26 -0800525
526 def tearDown(self):
Florin Corasdc2e2512018-12-03 17:47:26 -0800527 self.thru_host_stack_tear_down()
528 super(VCLThruHostStackEcho, self).tearDown()
529
Filip Tehlar48bdf242022-02-08 09:40:00 +0000530 def test_vcl_thru_host_stack_echo(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200531 """run VCL IPv4 thru host stack echo test"""
Filip Tehlar48bdf242022-02-08 09:40:00 +0000532
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200533 self.thru_host_stack_test(
534 "vcl_test_server",
535 self.server_args,
536 "vcl_test_client",
537 self.client_echo_test_args,
538 )
Filip Tehlar48bdf242022-02-08 09:40:00 +0000539
Paul Vinciguerra90cf21b2019-03-13 09:23:05 -0700540 def show_commands_at_teardown(self):
541 self.logger.debug(self.vapi.cli("show app server"))
542 self.logger.debug(self.vapi.cli("show session verbose"))
Florin Coras41d5f542021-01-15 13:49:33 -0800543 self.logger.debug(self.vapi.cli("show app mq"))
Paul Vinciguerra90cf21b2019-03-13 09:23:05 -0700544
Florin Corasdc2e2512018-12-03 17:47:26 -0800545
Florin Coras8a140612019-02-18 22:39:39 -0800546class VCLThruHostStackTLS(VCLTestCase):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200547 """VCL Thru Host Stack TLS"""
Florin Coras8a140612019-02-18 22:39:39 -0800548
549 @classmethod
550 def setUpClass(cls):
Florin Coras4c45d6f2021-08-12 08:38:02 -0700551 cls.session_startup = ["poll-main", "use-app-socket-api"]
Florin Coras8a140612019-02-18 22:39:39 -0800552 super(VCLThruHostStackTLS, cls).setUpClass()
553
554 @classmethod
555 def tearDownClass(cls):
556 super(VCLThruHostStackTLS, cls).tearDownClass()
557
558 def setUp(self):
559 super(VCLThruHostStackTLS, self).setUp()
560
561 self.thru_host_stack_setup()
562 self.client_uni_dir_tls_timeout = 20
Dave Wallace03dd90a2019-03-25 19:34:50 -0400563 self.server_tls_args = ["-L", self.server_port]
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200564 self.client_uni_dir_tls_test_args = [
565 "-N",
566 "1000",
567 "-U",
568 "-X",
569 "-L",
570 self.loop0.local_ip4,
571 self.server_port,
572 ]
Florin Coras4c45d6f2021-08-12 08:38:02 -0700573 self.sapi_server_sock = "1"
574 self.sapi_client_sock = "2"
Florin Coras8a140612019-02-18 22:39:39 -0800575
576 def test_vcl_thru_host_stack_tls_uni_dir(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200577 """run VCL thru host stack uni-directional TLS test"""
Florin Coras8a140612019-02-18 22:39:39 -0800578
579 self.timeout = self.client_uni_dir_tls_timeout
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200580 self.thru_host_stack_test(
581 "vcl_test_server",
582 self.server_tls_args,
583 "vcl_test_client",
584 self.client_uni_dir_tls_test_args,
585 )
Florin Coras8a140612019-02-18 22:39:39 -0800586
587 def tearDown(self):
Florin Coras8a140612019-02-18 22:39:39 -0800588 self.thru_host_stack_tear_down()
589 super(VCLThruHostStackTLS, self).tearDown()
590
Paul Vinciguerra90cf21b2019-03-13 09:23:05 -0700591 def show_commands_at_teardown(self):
592 self.logger.debug(self.vapi.cli("show app server"))
593 self.logger.debug(self.vapi.cli("show session verbose 2"))
Florin Coras41d5f542021-01-15 13:49:33 -0800594 self.logger.debug(self.vapi.cli("show app mq"))
Paul Vinciguerra90cf21b2019-03-13 09:23:05 -0700595
Florin Coras8a140612019-02-18 22:39:39 -0800596
Filip Tehlar99a66f42022-11-11 11:56:54 +0100597class VCLThruHostStackEchoInterruptMode(VCLThruHostStackEcho):
598 """VCL Thru Host Stack Echo interrupt mode"""
599
600 @classmethod
601 def setUpClass(cls):
602 cls.session_startup = ["use-private-rx-mqs", "use-app-socket-api"]
603 super(VCLThruHostStackEcho, cls).setUpClass()
604
605 def test_vcl_thru_host_stack_echo(self):
606 """run VCL IPv4 thru host stack echo test interrupt mode"""
607
608 self.sapi_server_sock = "1"
609 self.sapi_client_sock = "2"
610
611 self.thru_host_stack_test(
612 "vcl_test_server",
613 self.server_args,
614 "vcl_test_client",
615 self.client_echo_test_args,
616 )
617
618
Filip Tehlard82c39e2022-02-14 15:39:26 +0000619class VCLThruHostStackTLSInterruptMode(VCLThruHostStackTLS):
620 """VCL Thru Host Stack TLS interrupt mode"""
621
622 @classmethod
623 def setUpClass(cls):
624 cls.session_startup = ["poll-main", "use-app-socket-api", "use-private-rx-mqs"]
625 super(VCLThruHostStackTLS, cls).setUpClass()
626
627
Florin Corascec1b272021-05-06 12:46:04 -0700628class VCLThruHostStackDTLS(VCLTestCase):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200629 """VCL Thru Host Stack DTLS"""
Florin Corascec1b272021-05-06 12:46:04 -0700630
631 @classmethod
632 def setUpClass(cls):
633 super(VCLThruHostStackDTLS, cls).setUpClass()
634
635 @classmethod
636 def tearDownClass(cls):
637 super(VCLThruHostStackDTLS, cls).tearDownClass()
638
639 def setUp(self):
640 super(VCLThruHostStackDTLS, self).setUp()
641
642 self.thru_host_stack_setup()
643 self.client_uni_dir_dtls_timeout = 20
Florin Corasfb50bc32021-05-18 00:28:59 -0700644 self.server_dtls_args = ["-p", "dtls", self.server_port]
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200645 self.client_uni_dir_dtls_test_args = [
646 "-N",
647 "1000",
648 "-U",
649 "-X",
650 "-p",
651 "dtls",
652 "-T 1400",
653 self.loop0.local_ip4,
654 self.server_port,
655 ]
Florin Corascec1b272021-05-06 12:46:04 -0700656
657 def test_vcl_thru_host_stack_dtls_uni_dir(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200658 """run VCL thru host stack uni-directional DTLS test"""
Florin Corascec1b272021-05-06 12:46:04 -0700659
660 self.timeout = self.client_uni_dir_dtls_timeout
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200661 self.thru_host_stack_test(
662 "vcl_test_server",
663 self.server_dtls_args,
664 "vcl_test_client",
665 self.client_uni_dir_dtls_test_args,
666 )
Florin Corascec1b272021-05-06 12:46:04 -0700667
668 def tearDown(self):
669 self.thru_host_stack_tear_down()
670 super(VCLThruHostStackDTLS, self).tearDown()
671
672 def show_commands_at_teardown(self):
673 self.logger.debug(self.vapi.cli("show app server"))
674 self.logger.debug(self.vapi.cli("show session verbose 2"))
675 self.logger.debug(self.vapi.cli("show app mq"))
676
677
Florin Corasdebb3522021-05-18 00:35:50 -0700678class VCLThruHostStackQUIC(VCLTestCase):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200679 """VCL Thru Host Stack QUIC"""
Florin Corasdebb3522021-05-18 00:35:50 -0700680
681 @classmethod
682 def setUpClass(cls):
683 cls.extra_vpp_plugin_config.append("plugin quic_plugin.so { enable }")
684 super(VCLThruHostStackQUIC, cls).setUpClass()
685
686 @classmethod
687 def tearDownClass(cls):
688 super(VCLThruHostStackQUIC, cls).tearDownClass()
689
690 def setUp(self):
691 super(VCLThruHostStackQUIC, self).setUp()
692
693 self.thru_host_stack_setup()
694 self.client_uni_dir_quic_timeout = 20
695 self.server_quic_args = ["-p", "quic", self.server_port]
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200696 self.client_uni_dir_quic_test_args = [
697 "-N",
698 "1000",
699 "-U",
700 "-X",
701 "-p",
702 "quic",
703 self.loop0.local_ip4,
704 self.server_port,
705 ]
Florin Corasdebb3522021-05-18 00:35:50 -0700706
Klement Sekerab23ffd72021-05-31 16:08:53 +0200707 @unittest.skipUnless(config.extended, "part of extended tests")
Florin Corasdebb3522021-05-18 00:35:50 -0700708 def test_vcl_thru_host_stack_quic_uni_dir(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200709 """run VCL thru host stack uni-directional QUIC test"""
Florin Corasdebb3522021-05-18 00:35:50 -0700710
711 self.timeout = self.client_uni_dir_quic_timeout
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200712 self.thru_host_stack_test(
713 "vcl_test_server",
714 self.server_quic_args,
715 "vcl_test_client",
716 self.client_uni_dir_quic_test_args,
717 )
Florin Corasdebb3522021-05-18 00:35:50 -0700718
719 def tearDown(self):
720 self.thru_host_stack_tear_down()
721 super(VCLThruHostStackQUIC, self).tearDown()
722
723 def show_commands_at_teardown(self):
724 self.logger.debug(self.vapi.cli("show app server"))
725 self.logger.debug(self.vapi.cli("show session verbose 2"))
726 self.logger.debug(self.vapi.cli("show app mq"))
727
728
Florin Corasdc2e2512018-12-03 17:47:26 -0800729class VCLThruHostStackBidirNsock(VCLTestCase):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200730 """VCL Thru Host Stack Bidir Nsock"""
Florin Corasdc2e2512018-12-03 17:47:26 -0800731
Paul Vinciguerra8d991d92019-01-25 14:05:48 -0800732 @classmethod
733 def setUpClass(cls):
734 super(VCLThruHostStackBidirNsock, cls).setUpClass()
735
736 @classmethod
737 def tearDownClass(cls):
738 super(VCLThruHostStackBidirNsock, cls).tearDownClass()
739
Florin Corasdc2e2512018-12-03 17:47:26 -0800740 def setUp(self):
741 super(VCLThruHostStackBidirNsock, self).setUp()
742
743 self.thru_host_stack_setup()
744 self.client_bi_dir_nsock_timeout = 20
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200745 self.client_bi_dir_nsock_test_args = [
746 "-N",
747 "1000",
748 "-B",
749 "-X",
750 "-I",
751 "2",
752 self.loop0.local_ip4,
753 self.server_port,
754 ]
755 self.client_echo_test_args = [
756 "-E",
757 self.echo_phrase,
758 "-X",
759 self.loop0.local_ip4,
760 self.server_port,
761 ]
Dave Wallaced85075e2018-03-02 13:19:30 -0500762
763 def tearDown(self):
764 self.thru_host_stack_tear_down()
Florin Corasdc2e2512018-12-03 17:47:26 -0800765 super(VCLThruHostStackBidirNsock, self).tearDown()
Dave Wallaced85075e2018-03-02 13:19:30 -0500766
Paul Vinciguerra90cf21b2019-03-13 09:23:05 -0700767 def show_commands_at_teardown(self):
768 self.logger.debug(self.vapi.cli("show session verbose 2"))
Florin Coras41d5f542021-01-15 13:49:33 -0800769 self.logger.debug(self.vapi.cli("show app mq"))
Paul Vinciguerra90cf21b2019-03-13 09:23:05 -0700770
Dave Wallaced85075e2018-03-02 13:19:30 -0500771 def test_vcl_thru_host_stack_bi_dir_nsock(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200772 """run VCL thru host stack bi-directional (multiple sockets) test"""
Dave Wallaced85075e2018-03-02 13:19:30 -0500773
774 self.timeout = self.client_bi_dir_nsock_timeout
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200775 self.thru_host_stack_test(
776 "vcl_test_server",
777 self.server_args,
778 "vcl_test_client",
779 self.client_bi_dir_nsock_test_args,
780 )
Dave Wallaced85075e2018-03-02 13:19:30 -0500781
782
Florin Corasdc2e2512018-12-03 17:47:26 -0800783class LDPThruHostStackBidirNsock(VCLTestCase):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200784 """LDP Thru Host Stack Bidir Nsock"""
Dave Wallaced85075e2018-03-02 13:19:30 -0500785
Paul Vinciguerra8d991d92019-01-25 14:05:48 -0800786 @classmethod
787 def setUpClass(cls):
788 super(LDPThruHostStackBidirNsock, cls).setUpClass()
789
790 @classmethod
791 def tearDownClass(cls):
792 super(LDPThruHostStackBidirNsock, cls).tearDownClass()
793
Dave Wallaced85075e2018-03-02 13:19:30 -0500794 def setUp(self):
Florin Corasdc2e2512018-12-03 17:47:26 -0800795 super(LDPThruHostStackBidirNsock, self).setUp()
Dave Wallaced85075e2018-03-02 13:19:30 -0500796
797 self.thru_host_stack_setup()
Dave Wallace3102c382020-04-03 19:48:48 -0400798 self.client_bi_dir_nsock_timeout = 20
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200799 self.client_bi_dir_nsock_test_args = [
800 "-N",
801 "1000",
802 "-B",
803 "-X",
804 # OUCH! Host Stack Bug?
805 # Only fails when running
806 # 'make test TEST_JOBS=auto'
807 # or TEST_JOBS > 1
808 # "-I", "2",
809 self.loop0.local_ip4,
810 self.server_port,
811 ]
Dave Wallaced85075e2018-03-02 13:19:30 -0500812
813 def tearDown(self):
814 self.thru_host_stack_tear_down()
Florin Corasdc2e2512018-12-03 17:47:26 -0800815 super(LDPThruHostStackBidirNsock, self).tearDown()
Dave Wallaced85075e2018-03-02 13:19:30 -0500816
Paul Vinciguerra90cf21b2019-03-13 09:23:05 -0700817 def show_commands_at_teardown(self):
818 self.logger.debug(self.vapi.cli("show session verbose 2"))
Florin Coras41d5f542021-01-15 13:49:33 -0800819 self.logger.debug(self.vapi.cli("show app mq"))
Paul Vinciguerra90cf21b2019-03-13 09:23:05 -0700820
Dave Wallaced85075e2018-03-02 13:19:30 -0500821 def test_ldp_thru_host_stack_bi_dir_nsock(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200822 """run LDP thru host stack bi-directional (multiple sockets) test"""
Dave Wallaced85075e2018-03-02 13:19:30 -0500823
824 self.timeout = self.client_bi_dir_nsock_timeout
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200825 self.thru_host_stack_test(
826 "sock_test_server",
827 self.server_args,
828 "sock_test_client",
829 self.client_bi_dir_nsock_test_args,
830 )
Dave Wallaced85075e2018-03-02 13:19:30 -0500831
832
Florin Corasdc2e2512018-12-03 17:47:26 -0800833class LDPThruHostStackNsock(VCLTestCase):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200834 """LDP Thru Host Stack Nsock"""
Dave Wallaced85075e2018-03-02 13:19:30 -0500835
Paul Vinciguerra8d991d92019-01-25 14:05:48 -0800836 @classmethod
837 def setUpClass(cls):
838 super(LDPThruHostStackNsock, cls).setUpClass()
839
840 @classmethod
841 def tearDownClass(cls):
842 super(LDPThruHostStackNsock, cls).tearDownClass()
843
Dave Wallaced85075e2018-03-02 13:19:30 -0500844 def setUp(self):
Florin Corasdc2e2512018-12-03 17:47:26 -0800845 super(LDPThruHostStackNsock, self).setUp()
Dave Wallaced85075e2018-03-02 13:19:30 -0500846
847 self.thru_host_stack_setup()
848 if self.vppDebug:
Florin Coras2eb42e72018-11-29 00:39:53 -0800849 self.client_uni_dir_nsock_timeout = 20
Dave Wallaced85075e2018-03-02 13:19:30 -0500850 self.numSockets = "2"
851 else:
Florin Coras2eb42e72018-11-29 00:39:53 -0800852 self.client_uni_dir_nsock_timeout = 20
Dave Wallaced85075e2018-03-02 13:19:30 -0500853 self.numSockets = "5"
854
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200855 self.client_uni_dir_nsock_test_args = [
856 "-N",
857 "1000",
858 "-U",
859 "-X",
860 "-I",
861 self.numSockets,
862 self.loop0.local_ip4,
863 self.server_port,
864 ]
Dave Wallaced85075e2018-03-02 13:19:30 -0500865
866 def tearDown(self):
867 self.thru_host_stack_tear_down()
Florin Corasdc2e2512018-12-03 17:47:26 -0800868 super(LDPThruHostStackNsock, self).tearDown()
Dave Wallaced85075e2018-03-02 13:19:30 -0500869
Dave Wallaced85075e2018-03-02 13:19:30 -0500870 def test_ldp_thru_host_stack_uni_dir_nsock(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200871 """run LDP thru host stack uni-directional (multiple sockets) test"""
Dave Wallaced85075e2018-03-02 13:19:30 -0500872
873 self.timeout = self.client_uni_dir_nsock_timeout
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200874 self.thru_host_stack_test(
875 "sock_test_server",
876 self.server_args,
877 "sock_test_client",
878 self.client_uni_dir_nsock_test_args,
879 )
Dave Wallaced85075e2018-03-02 13:19:30 -0500880
881
Florin Corasdc2e2512018-12-03 17:47:26 -0800882class VCLThruHostStackNsock(VCLTestCase):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200883 """VCL Thru Host Stack Nsock"""
Dave Wallaced85075e2018-03-02 13:19:30 -0500884
Paul Vinciguerra8d991d92019-01-25 14:05:48 -0800885 @classmethod
886 def setUpClass(cls):
887 super(VCLThruHostStackNsock, cls).setUpClass()
888
889 @classmethod
890 def tearDownClass(cls):
891 super(VCLThruHostStackNsock, cls).tearDownClass()
892
Dave Wallaced85075e2018-03-02 13:19:30 -0500893 def setUp(self):
Florin Corasdc2e2512018-12-03 17:47:26 -0800894 super(VCLThruHostStackNsock, self).setUp()
Dave Wallaced85075e2018-03-02 13:19:30 -0500895
896 self.thru_host_stack_setup()
897 if self.vppDebug:
Florin Coras2eb42e72018-11-29 00:39:53 -0800898 self.client_uni_dir_nsock_timeout = 20
Dave Wallaced85075e2018-03-02 13:19:30 -0500899 self.numSockets = "2"
900 else:
Florin Coras2eb42e72018-11-29 00:39:53 -0800901 self.client_uni_dir_nsock_timeout = 20
Dave Wallaced85075e2018-03-02 13:19:30 -0500902 self.numSockets = "5"
903
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200904 self.client_uni_dir_nsock_test_args = [
905 "-N",
906 "1000",
907 "-U",
908 "-X",
909 "-I",
910 self.numSockets,
911 self.loop0.local_ip4,
912 self.server_port,
913 ]
Dave Wallaced85075e2018-03-02 13:19:30 -0500914
915 def tearDown(self):
916 self.thru_host_stack_tear_down()
Florin Corasdc2e2512018-12-03 17:47:26 -0800917 super(VCLThruHostStackNsock, self).tearDown()
Dave Wallaced85075e2018-03-02 13:19:30 -0500918
Dave Wallaced85075e2018-03-02 13:19:30 -0500919 def test_vcl_thru_host_stack_uni_dir_nsock(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200920 """run VCL thru host stack uni-directional (multiple sockets) test"""
Dave Wallaced85075e2018-03-02 13:19:30 -0500921
922 self.timeout = self.client_uni_dir_nsock_timeout
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200923 self.thru_host_stack_test(
924 "vcl_test_server",
925 self.server_args,
926 "vcl_test_client",
927 self.client_uni_dir_nsock_test_args,
928 )
Dave Wallaced85075e2018-03-02 13:19:30 -0500929
930
Florin Corasdc2e2512018-12-03 17:47:26 -0800931class LDPThruHostStackIperf(VCLTestCase):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200932 """LDP Thru Host Stack Iperf"""
Dave Wallace816833f2018-03-14 20:01:28 -0400933
Paul Vinciguerra8d991d92019-01-25 14:05:48 -0800934 @classmethod
935 def setUpClass(cls):
936 super(LDPThruHostStackIperf, cls).setUpClass()
937
938 @classmethod
939 def tearDownClass(cls):
940 super(LDPThruHostStackIperf, cls).tearDownClass()
941
Dave Wallace816833f2018-03-14 20:01:28 -0400942 def setUp(self):
Florin Corasdc2e2512018-12-03 17:47:26 -0800943 super(LDPThruHostStackIperf, self).setUp()
Dave Wallace816833f2018-03-14 20:01:28 -0400944
945 self.thru_host_stack_setup()
946 self.client_iperf3_timeout = 20
Florin Coras1d879142021-05-06 00:08:18 -0700947 self.client_iperf3_args = ["-4", "-t 2", "-c", self.loop0.local_ip4]
948 self.server_iperf3_args = ["-4", "-s"]
Dave Wallace816833f2018-03-14 20:01:28 -0400949
950 def tearDown(self):
951 self.thru_host_stack_tear_down()
Florin Corasdc2e2512018-12-03 17:47:26 -0800952 super(LDPThruHostStackIperf, self).tearDown()
Dave Wallace816833f2018-03-14 20:01:28 -0400953
Paul Vinciguerra90cf21b2019-03-13 09:23:05 -0700954 def show_commands_at_teardown(self):
955 self.logger.debug(self.vapi.cli("show session verbose 2"))
Florin Coras41d5f542021-01-15 13:49:33 -0800956 self.logger.debug(self.vapi.cli("show app mq"))
Paul Vinciguerra90cf21b2019-03-13 09:23:05 -0700957
Paul Vinciguerra063366e2019-06-30 15:38:55 -0400958 @unittest.skipUnless(_have_iperf3, "'%s' not found, Skipping.")
Dave Wallace816833f2018-03-14 20:01:28 -0400959 def test_ldp_thru_host_stack_iperf3(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200960 """run LDP thru host stack iperf3 test"""
Dave Wallace816833f2018-03-14 20:01:28 -0400961
Dave Wallace816833f2018-03-14 20:01:28 -0400962 self.timeout = self.client_iperf3_timeout
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200963 self.thru_host_stack_test(
964 iperf3, self.server_iperf3_args, iperf3, self.client_iperf3_args
965 )
Dave Wallace816833f2018-03-14 20:01:28 -0400966
Liangxing Wang22112772022-05-13 04:24:19 +0000967 @unittest.skipUnless(_have_iperf3, "'%s' not found, Skipping.")
968 def test_ldp_thru_host_stack_iperf3_mss(self):
969 """run LDP thru host stack iperf3 test with mss option"""
970
971 self.timeout = self.client_iperf3_timeout
972 self.client_iperf3_args.append("-M 1000")
973 self.thru_host_stack_test(
974 iperf3, self.server_iperf3_args, iperf3, self.client_iperf3_args
975 )
976
Dave Wallace816833f2018-03-14 20:01:28 -0400977
Florin Coras57a5a2d2020-04-01 23:16:11 +0000978class LDPThruHostStackIperfUdp(VCLTestCase):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200979 """LDP Thru Host Stack Iperf UDP"""
Florin Coras57a5a2d2020-04-01 23:16:11 +0000980
981 @classmethod
982 def setUpClass(cls):
983 super(LDPThruHostStackIperfUdp, cls).setUpClass()
984
985 @classmethod
986 def tearDownClass(cls):
987 super(LDPThruHostStackIperfUdp, cls).tearDownClass()
988
989 def setUp(self):
990 super(LDPThruHostStackIperfUdp, self).setUp()
991
992 self.thru_host_stack_setup()
993 self.client_iperf3_timeout = 20
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200994 self.client_iperf3_args = [
995 "-4",
996 "-t 2",
997 "-u",
998 "-l 1400",
999 "-c",
1000 self.loop0.local_ip4,
1001 ]
Florin Coras1d879142021-05-06 00:08:18 -07001002 self.server_iperf3_args = ["-4", "-s"]
Florin Coras57a5a2d2020-04-01 23:16:11 +00001003
1004 def tearDown(self):
1005 self.thru_host_stack_tear_down()
1006 super(LDPThruHostStackIperfUdp, self).tearDown()
1007
1008 def show_commands_at_teardown(self):
1009 self.logger.debug(self.vapi.cli("show session verbose 2"))
Florin Coras41d5f542021-01-15 13:49:33 -08001010 self.logger.debug(self.vapi.cli("show app mq"))
Florin Coras57a5a2d2020-04-01 23:16:11 +00001011
1012 @unittest.skipUnless(_have_iperf3, "'%s' not found, Skipping.")
1013 def test_ldp_thru_host_stack_iperf3_udp(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001014 """run LDP thru host stack iperf3 UDP test"""
Florin Coras57a5a2d2020-04-01 23:16:11 +00001015
1016 self.timeout = self.client_iperf3_timeout
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001017 self.thru_host_stack_test(
1018 iperf3, self.server_iperf3_args, iperf3, self.client_iperf3_args
1019 )
Florin Coras57a5a2d2020-04-01 23:16:11 +00001020
1021
Florin Coras0ae445e2018-11-29 18:22:10 -08001022class LDPIpv6CutThruTestCase(VCLTestCase):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001023 """LDP IPv6 Cut Thru Tests"""
Dave Wallacede910062018-03-20 09:22:13 -04001024
Paul Vinciguerra8d991d92019-01-25 14:05:48 -08001025 @classmethod
1026 def setUpClass(cls):
1027 super(LDPIpv6CutThruTestCase, cls).setUpClass()
1028
1029 @classmethod
1030 def tearDownClass(cls):
1031 super(LDPIpv6CutThruTestCase, cls).tearDownClass()
1032
Florin Coras41d5f542021-01-15 13:49:33 -08001033 def show_commands_at_teardown(self):
1034 self.logger.debug(self.vapi.cli("show session verbose 2"))
1035 self.logger.debug(self.vapi.cli("show app mq"))
1036
Dave Wallacede910062018-03-20 09:22:13 -04001037 def setUp(self):
Florin Coras0ae445e2018-11-29 18:22:10 -08001038 super(LDPIpv6CutThruTestCase, self).setUp()
Dave Wallacede910062018-03-20 09:22:13 -04001039
1040 self.cut_thru_setup()
1041 self.client_iperf3_timeout = 20
Florin Coras2eb42e72018-11-29 00:39:53 -08001042 self.client_uni_dir_nsock_timeout = 20
1043 self.client_bi_dir_nsock_timeout = 20
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001044 self.client_ipv6_echo_test_args = [
1045 "-6",
1046 "-E",
1047 self.echo_phrase,
1048 "-X",
1049 self.server_ipv6_addr,
1050 self.server_port,
1051 ]
1052 self.client_ipv6_iperf3_args = ["-6", "-t 2", "-c", self.server_ipv6_addr]
Florin Coras1d879142021-05-06 00:08:18 -07001053 self.server_ipv6_iperf3_args = ["-6", "-s"]
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001054 self.client_ipv6_uni_dir_nsock_test_args = [
1055 "-N",
1056 "1000",
1057 "-U",
1058 "-X",
1059 "-6",
1060 "-I",
1061 "2",
1062 self.server_ipv6_addr,
1063 self.server_port,
1064 ]
1065 self.client_ipv6_bi_dir_nsock_test_args = [
1066 "-N",
1067 "1000",
1068 "-B",
1069 "-X",
1070 "-6",
1071 "-I",
1072 "2",
1073 self.server_ipv6_addr,
1074 self.server_port,
1075 ]
Dave Wallacede910062018-03-20 09:22:13 -04001076
1077 def tearDown(self):
Florin Coras0ae445e2018-11-29 18:22:10 -08001078 super(LDPIpv6CutThruTestCase, self).tearDown()
Paul Vinciguerra9673e3e2019-05-10 20:41:08 -04001079 self.cut_thru_tear_down()
Dave Wallacede910062018-03-20 09:22:13 -04001080
Klement Sekerab23ffd72021-05-31 16:08:53 +02001081 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallacede910062018-03-20 09:22:13 -04001082 def test_ldp_ipv6_cut_thru_echo(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001083 """run LDP IPv6 cut thru echo test"""
Dave Wallacede910062018-03-20 09:22:13 -04001084
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001085 self.cut_thru_test(
1086 "sock_test_server",
1087 self.server_ipv6_args,
1088 "sock_test_client",
1089 self.client_ipv6_echo_test_args,
1090 )
Dave Wallacede910062018-03-20 09:22:13 -04001091
Paul Vinciguerra063366e2019-06-30 15:38:55 -04001092 @unittest.skipUnless(_have_iperf3, "'%s' not found, Skipping.")
Dave Wallacede910062018-03-20 09:22:13 -04001093 def test_ldp_ipv6_cut_thru_iperf3(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001094 """run LDP IPv6 cut thru iperf3 test"""
Dave Wallacede910062018-03-20 09:22:13 -04001095
Dave Wallacede910062018-03-20 09:22:13 -04001096 self.timeout = self.client_iperf3_timeout
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001097 self.cut_thru_test(
1098 iperf3, self.server_ipv6_iperf3_args, iperf3, self.client_ipv6_iperf3_args
1099 )
Dave Wallacede910062018-03-20 09:22:13 -04001100
Klement Sekerab23ffd72021-05-31 16:08:53 +02001101 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallacede910062018-03-20 09:22:13 -04001102 def test_ldp_ipv6_cut_thru_uni_dir_nsock(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001103 """run LDP IPv6 cut thru uni-directional (multiple sockets) test"""
Dave Wallacede910062018-03-20 09:22:13 -04001104
1105 self.timeout = self.client_uni_dir_nsock_timeout
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001106 self.cut_thru_test(
1107 "sock_test_server",
1108 self.server_ipv6_args,
1109 "sock_test_client",
1110 self.client_ipv6_uni_dir_nsock_test_args,
1111 )
Dave Wallacede910062018-03-20 09:22:13 -04001112
Klement Sekerab23ffd72021-05-31 16:08:53 +02001113 @unittest.skipUnless(config.extended, "part of extended tests")
Florin Coras0f46e162019-07-02 19:33:15 -07001114 @unittest.skip("sock test apps need to be improved")
Dave Wallacede910062018-03-20 09:22:13 -04001115 def test_ldp_ipv6_cut_thru_bi_dir_nsock(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001116 """run LDP IPv6 cut thru bi-directional (multiple sockets) test"""
Dave Wallacede910062018-03-20 09:22:13 -04001117
1118 self.timeout = self.client_bi_dir_nsock_timeout
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001119 self.cut_thru_test(
1120 "sock_test_server",
1121 self.server_ipv6_args,
1122 "sock_test_client",
1123 self.client_ipv6_bi_dir_nsock_test_args,
1124 )
Dave Wallacede910062018-03-20 09:22:13 -04001125
Florin Coras0ae445e2018-11-29 18:22:10 -08001126
1127class VCLIpv6CutThruTestCase(VCLTestCase):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001128 """VCL IPv6 Cut Thru Tests"""
Florin Coras0ae445e2018-11-29 18:22:10 -08001129
Paul Vinciguerra8d991d92019-01-25 14:05:48 -08001130 @classmethod
1131 def setUpClass(cls):
1132 super(VCLIpv6CutThruTestCase, cls).setUpClass()
1133
1134 @classmethod
1135 def tearDownClass(cls):
1136 super(VCLIpv6CutThruTestCase, cls).tearDownClass()
1137
Florin Coras41d5f542021-01-15 13:49:33 -08001138 def show_commands_at_teardown(self):
1139 self.logger.debug(self.vapi.cli("show session verbose 2"))
1140 self.logger.debug(self.vapi.cli("show app mq"))
1141
Florin Coras0ae445e2018-11-29 18:22:10 -08001142 def setUp(self):
1143 super(VCLIpv6CutThruTestCase, self).setUp()
1144
1145 self.cut_thru_setup()
1146 self.client_uni_dir_nsock_timeout = 20
1147 self.client_bi_dir_nsock_timeout = 20
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001148 self.client_ipv6_echo_test_args = [
1149 "-6",
1150 "-E",
1151 self.echo_phrase,
1152 "-X",
1153 self.server_ipv6_addr,
1154 self.server_port,
1155 ]
1156 self.client_ipv6_uni_dir_nsock_test_args = [
1157 "-N",
1158 "1000",
1159 "-U",
1160 "-X",
1161 "-6",
1162 "-I",
1163 "2",
1164 self.server_ipv6_addr,
1165 self.server_port,
1166 ]
1167 self.client_ipv6_bi_dir_nsock_test_args = [
1168 "-N",
1169 "1000",
1170 "-B",
1171 "-X",
1172 "-6",
1173 "-I",
1174 "2",
1175 self.server_ipv6_addr,
1176 self.server_port,
1177 ]
Florin Coras0ae445e2018-11-29 18:22:10 -08001178
1179 def tearDown(self):
Florin Coras0ae445e2018-11-29 18:22:10 -08001180 super(VCLIpv6CutThruTestCase, self).tearDown()
Paul Vinciguerra9673e3e2019-05-10 20:41:08 -04001181 self.cut_thru_tear_down()
Florin Coras0ae445e2018-11-29 18:22:10 -08001182
Florin Coras41d5f542021-01-15 13:49:33 -08001183 def show_commands_at_teardown(self):
1184 self.logger.debug(self.vapi.cli("show session verbose 2"))
1185 self.logger.debug(self.vapi.cli("show app mq"))
1186
Dave Wallacede910062018-03-20 09:22:13 -04001187 def test_vcl_ipv6_cut_thru_echo(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001188 """run VCL IPv6 cut thru echo test"""
Dave Wallacede910062018-03-20 09:22:13 -04001189
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001190 self.cut_thru_test(
1191 "vcl_test_server",
1192 self.server_ipv6_args,
1193 "vcl_test_client",
1194 self.client_ipv6_echo_test_args,
1195 )
Dave Wallacede910062018-03-20 09:22:13 -04001196
Klement Sekerab23ffd72021-05-31 16:08:53 +02001197 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallacede910062018-03-20 09:22:13 -04001198 def test_vcl_ipv6_cut_thru_uni_dir_nsock(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001199 """run VCL IPv6 cut thru uni-directional (multiple sockets) test"""
Dave Wallacede910062018-03-20 09:22:13 -04001200
1201 self.timeout = self.client_uni_dir_nsock_timeout
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001202 self.cut_thru_test(
1203 "vcl_test_server",
1204 self.server_ipv6_args,
1205 "vcl_test_client",
1206 self.client_ipv6_uni_dir_nsock_test_args,
1207 )
Dave Wallacede910062018-03-20 09:22:13 -04001208
Klement Sekerab23ffd72021-05-31 16:08:53 +02001209 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallacede910062018-03-20 09:22:13 -04001210 def test_vcl_ipv6_cut_thru_bi_dir_nsock(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001211 """run VCL IPv6 cut thru bi-directional (multiple sockets) test"""
Dave Wallacede910062018-03-20 09:22:13 -04001212
1213 self.timeout = self.client_bi_dir_nsock_timeout
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001214 self.cut_thru_test(
1215 "vcl_test_server",
1216 self.server_ipv6_args,
1217 "vcl_test_client",
1218 self.client_ipv6_bi_dir_nsock_test_args,
1219 )
Dave Wallacede910062018-03-20 09:22:13 -04001220
1221
Florin Corasdc2e2512018-12-03 17:47:26 -08001222class VCLIpv6ThruHostStackEcho(VCLTestCase):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001223 """VCL IPv6 Thru Host Stack Echo"""
Dave Wallacede910062018-03-20 09:22:13 -04001224
Paul Vinciguerra8d991d92019-01-25 14:05:48 -08001225 @classmethod
1226 def setUpClass(cls):
1227 super(VCLIpv6ThruHostStackEcho, cls).setUpClass()
1228
1229 @classmethod
1230 def tearDownClass(cls):
1231 super(VCLIpv6ThruHostStackEcho, cls).tearDownClass()
1232
Dave Wallacede910062018-03-20 09:22:13 -04001233 def setUp(self):
Florin Corasdc2e2512018-12-03 17:47:26 -08001234 super(VCLIpv6ThruHostStackEcho, self).setUp()
Dave Wallacede910062018-03-20 09:22:13 -04001235
1236 self.thru_host_stack_ipv6_setup()
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001237 self.client_ipv6_echo_test_args = [
1238 "-6",
1239 "-E",
1240 self.echo_phrase,
1241 "-X",
1242 self.loop0.local_ip6,
1243 self.server_port,
1244 ]
Dave Wallacede910062018-03-20 09:22:13 -04001245
1246 def tearDown(self):
1247 self.thru_host_stack_ipv6_tear_down()
Florin Corasdc2e2512018-12-03 17:47:26 -08001248 super(VCLIpv6ThruHostStackEcho, self).tearDown()
Dave Wallacede910062018-03-20 09:22:13 -04001249
1250 def test_vcl_ipv6_thru_host_stack_echo(self):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001251 """run VCL IPv6 thru host stack echo test"""
Dave Wallacede910062018-03-20 09:22:13 -04001252
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001253 self.thru_host_stack_test(
1254 "vcl_test_server",
1255 self.server_ipv6_args,
1256 "vcl_test_client",
1257 self.client_ipv6_echo_test_args,
1258 )
Dave Wallacede910062018-03-20 09:22:13 -04001259
1260
Klement Sekerad9b0c6f2022-04-26 19:02:15 +02001261if __name__ == "__main__":
Dave Wallacecfcf2f42018-02-16 18:31:56 -05001262 unittest.main(testRunner=VppTestRunner)