8 from framework import VppTestCase, VppTestRunner, running_extended_tests, \
10 from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath, FibPathProto
12 iperf3 = '/usr/bin/iperf3'
17 subprocess.check_output([app, '-v'])
18 except (subprocess.CalledProcessError, OSError):
23 _have_iperf3 = have_app(iperf3)
26 class VCLAppWorker(Worker):
27 """ VCL Test Application Worker """
29 def __init__(self, build_dir, appname, args, logger, env={}):
30 vcl_lib_dir = "%s/vpp/lib" % build_dir
31 if "iperf" in appname:
33 env.update({'LD_PRELOAD':
34 "%s/libvcl_ldpreload.so" % vcl_lib_dir})
35 elif "sock" in appname:
36 app = "%s/vpp/bin/%s" % (build_dir, appname)
37 env.update({'LD_PRELOAD':
38 "%s/libvcl_ldpreload.so" % vcl_lib_dir})
40 app = "%s/vpp/bin/%s" % (build_dir, appname)
41 self.args = [app] + args
42 super(VCLAppWorker, self).__init__(self.args, logger, env)
45 class VCLTestCase(VppTestCase):
46 """ VCL Test Class """
50 super(VCLTestCase, cls).setUpClass()
53 def tearDownClass(cls):
54 super(VCLTestCase, cls).tearDownClass()
58 self.build_dir = os.getenv(var, None)
59 if self.build_dir is None:
60 raise EnvironmentError("Environment variable `%s' not set" % var)
61 self.vppDebug = 'vpp_debug' in self.build_dir
62 self.server_addr = "127.0.0.1"
63 self.server_port = "22000"
64 self.server_args = [self.server_port]
65 self.server_ipv6_addr = "::1"
66 self.server_ipv6_args = ["-6", self.server_port]
68 self.echo_phrase = "Hello, world! Jenny is a friend of mine."
69 self.pre_test_sleep = 0.3
70 self.post_test_sleep = 0.2
72 if os.path.isfile("/tmp/ldp_server_af_unix_socket"):
73 os.remove("/tmp/ldp_server_af_unix_socket")
75 super(VCLTestCase, self).setUp()
77 def cut_thru_setup(self):
78 self.vapi.session_enable_disable(is_enabled=1)
80 def cut_thru_tear_down(self):
81 self.vapi.session_enable_disable(is_enabled=0)
83 def cut_thru_test(self, server_app, server_args, client_app, client_args):
84 self.env = {'VCL_API_PREFIX': self.shm_prefix,
85 'VCL_APP_SCOPE_LOCAL': "true"}
86 worker_server = VCLAppWorker(self.build_dir, server_app, server_args,
87 self.logger, self.env)
89 self.sleep(self.pre_test_sleep)
90 worker_client = VCLAppWorker(self.build_dir, client_app, client_args,
91 self.logger, self.env)
93 worker_client.join(self.timeout)
95 self.validateResults(worker_client, worker_server, self.timeout)
96 except Exception as error:
97 self.fail("Failed with %s" % error)
98 self.sleep(self.post_test_sleep)
100 def thru_host_stack_setup(self):
101 self.vapi.session_enable_disable(is_enabled=1)
102 self.create_loopback_interfaces(2)
106 for i in self.lo_interfaces:
110 tbl = VppIpTable(self, table_id)
113 i.set_table_ip4(table_id)
117 # Configure namespaces
118 self.vapi.app_namespace_add_del(namespace_id=b"1", secret=1234,
119 sw_if_index=self.loop0.sw_if_index)
120 self.vapi.app_namespace_add_del(namespace_id=b"2", secret=5678,
121 sw_if_index=self.loop1.sw_if_index)
123 # Add inter-table routes
124 ip_t01 = VppIpRoute(self, self.loop1.local_ip4, 32,
125 [VppRoutePath("0.0.0.0",
127 nh_table_id=2)], table_id=1)
128 ip_t10 = VppIpRoute(self, self.loop0.local_ip4, 32,
129 [VppRoutePath("0.0.0.0",
131 nh_table_id=1)], table_id=2)
132 ip_t01.add_vpp_config()
133 ip_t10.add_vpp_config()
134 self.logger.debug(self.vapi.cli("show ip fib"))
136 def thru_host_stack_tear_down(self):
137 for i in self.lo_interfaces:
142 def thru_host_stack_ipv6_setup(self):
143 self.vapi.session_enable_disable(is_enabled=1)
144 self.create_loopback_interfaces(2)
148 for i in self.lo_interfaces:
151 tbl = VppIpTable(self, table_id, is_ip6=1)
154 i.set_table_ip6(table_id)
158 # Configure namespaces
159 self.vapi.app_namespace_add_del(namespace_id=b"1", secret=1234,
160 sw_if_index=self.loop0.sw_if_index)
161 self.vapi.app_namespace_add_del(namespace_id=b"2", secret=5678,
162 sw_if_index=self.loop1.sw_if_index)
164 # Add inter-table routes
165 ip_t01 = VppIpRoute(self, self.loop1.local_ip6, 128,
166 [VppRoutePath("::0", 0xffffffff,
169 ip_t10 = VppIpRoute(self, self.loop0.local_ip6, 128,
170 [VppRoutePath("::0", 0xffffffff,
173 ip_t01.add_vpp_config()
174 ip_t10.add_vpp_config()
175 self.logger.debug(self.vapi.cli("show interface addr"))
176 self.logger.debug(self.vapi.cli("show ip6 fib"))
178 def thru_host_stack_ipv6_tear_down(self):
179 for i in self.lo_interfaces:
184 self.vapi.session_enable_disable(is_enabled=0)
186 @unittest.skipUnless(_have_iperf3, "'%s' not found, Skipping.")
187 def thru_host_stack_test(self, server_app, server_args,
188 client_app, client_args):
189 self.env = {'VCL_API_PREFIX': self.shm_prefix,
190 'VCL_APP_SCOPE_GLOBAL': "true",
191 'VCL_APP_NAMESPACE_ID': "1",
192 'VCL_APP_NAMESPACE_SECRET': "1234"}
194 worker_server = VCLAppWorker(self.build_dir, server_app, server_args,
195 self.logger, self.env)
196 worker_server.start()
197 self.sleep(self.pre_test_sleep)
199 self.env.update({'VCL_APP_NAMESPACE_ID': "2",
200 'VCL_APP_NAMESPACE_SECRET': "5678"})
201 worker_client = VCLAppWorker(self.build_dir, client_app, client_args,
202 self.logger, self.env)
203 worker_client.start()
204 worker_client.join(self.timeout)
207 self.validateResults(worker_client, worker_server, self.timeout)
208 except Exception as error:
209 self.fail("Failed with %s" % error)
210 self.sleep(self.post_test_sleep)
212 def validateResults(self, worker_client, worker_server, timeout):
213 if worker_server.process is None:
214 raise RuntimeError('worker_server is not running.')
215 if os.path.isdir('/proc/{}'.format(worker_server.process.pid)):
216 self.logger.info("Killing server worker process (pid %d)" %
217 worker_server.process.pid)
218 os.killpg(os.getpgid(worker_server.process.pid), signal.SIGTERM)
220 self.logger.info("Client worker result is `%s'" % worker_client.result)
222 if worker_client.result is None:
226 "Timeout: %ss! Killing client worker process (pid %d)" %
227 (timeout, worker_client.process.pid))
228 os.killpg(os.getpgid(worker_client.process.pid),
233 "Couldn't kill client worker process")
237 "Timeout! Client worker did not finish in %ss" % timeout)
238 self.assert_equal(worker_client.result, 0, "Binary test return code")
241 class LDPCutThruTestCase(VCLTestCase):
242 """ LDP Cut Thru Tests """
246 super(LDPCutThruTestCase, cls).setUpClass()
249 def tearDownClass(cls):
250 super(LDPCutThruTestCase, cls).tearDownClass()
253 super(LDPCutThruTestCase, self).setUp()
255 self.cut_thru_setup()
256 self.client_echo_test_args = ["-E", self.echo_phrase, "-X",
257 self.server_addr, self.server_port]
258 self.client_iperf3_timeout = 20
259 self.client_iperf3_args = ["-V4d", "-t 2", "-c", self.server_addr]
260 self.server_iperf3_args = ["-V4d", "-s"]
261 self.client_uni_dir_nsock_timeout = 20
262 self.client_uni_dir_nsock_test_args = ["-N", "1000", "-U", "-X",
266 self.client_bi_dir_nsock_timeout = 20
267 self.client_bi_dir_nsock_test_args = ["-N", "1000", "-B", "-X",
273 super(LDPCutThruTestCase, self).tearDown()
274 self.cut_thru_tear_down()
276 def show_commands_at_teardown(self):
277 self.logger.debug(self.vapi.cli("show session verbose 2"))
279 @unittest.skipUnless(running_extended_tests, "part of extended tests")
280 def test_ldp_cut_thru_echo(self):
281 """ run LDP cut thru echo test """
283 self.cut_thru_test("sock_test_server", self.server_args,
284 "sock_test_client", self.client_echo_test_args)
286 @unittest.skipUnless(_have_iperf3, "'%s' not found, Skipping.")
287 def test_ldp_cut_thru_iperf3(self):
288 """ run LDP cut thru iperf3 test """
290 self.timeout = self.client_iperf3_timeout
291 self.cut_thru_test(iperf3, self.server_iperf3_args,
292 iperf3, self.client_iperf3_args)
294 @unittest.skipUnless(running_extended_tests, "part of extended tests")
295 def test_ldp_cut_thru_uni_dir_nsock(self):
296 """ run LDP cut thru uni-directional (multiple sockets) test """
298 self.timeout = self.client_uni_dir_nsock_timeout
299 self.cut_thru_test("sock_test_server", self.server_args,
301 self.client_uni_dir_nsock_test_args)
303 @unittest.skipUnless(running_extended_tests, "part of extended tests")
304 @unittest.skip("sock test apps need to be improved")
305 def test_ldp_cut_thru_bi_dir_nsock(self):
306 """ run LDP cut thru bi-directional (multiple sockets) test """
308 self.timeout = self.client_bi_dir_nsock_timeout
309 self.cut_thru_test("sock_test_server", self.server_args,
311 self.client_bi_dir_nsock_test_args)
314 class VCLCutThruTestCase(VCLTestCase):
315 """ VCL Cut Thru Tests """
319 super(VCLCutThruTestCase, cls).setUpClass()
322 def tearDownClass(cls):
323 super(VCLCutThruTestCase, cls).tearDownClass()
326 super(VCLCutThruTestCase, self).setUp()
328 self.cut_thru_setup()
329 self.client_echo_test_args = ["-E", self.echo_phrase, "-X",
330 self.server_addr, self.server_port]
332 self.client_uni_dir_nsock_timeout = 20
333 self.client_uni_dir_nsock_test_args = ["-N", "1000", "-U", "-X",
337 self.client_bi_dir_nsock_timeout = 20
338 self.client_bi_dir_nsock_test_args = ["-N", "1000", "-B", "-X",
344 super(VCLCutThruTestCase, self).tearDown()
346 def show_commands_at_teardown(self):
347 self.logger.debug(self.vapi.cli("show session verbose 2"))
349 def test_vcl_cut_thru_echo(self):
350 """ run VCL cut thru echo test """
352 self.cut_thru_test("vcl_test_server", self.server_args,
353 "vcl_test_client", self.client_echo_test_args)
355 def test_vcl_cut_thru_uni_dir_nsock(self):
356 """ run VCL cut thru uni-directional (multiple sockets) test """
358 self.timeout = self.client_uni_dir_nsock_timeout
359 self.cut_thru_test("vcl_test_server", self.server_args,
361 self.client_uni_dir_nsock_test_args)
363 def test_vcl_cut_thru_bi_dir_nsock(self):
364 """ run VCL cut thru bi-directional (multiple sockets) test """
366 self.timeout = self.client_bi_dir_nsock_timeout
367 self.cut_thru_test("vcl_test_server", self.server_args,
369 self.client_bi_dir_nsock_test_args)
372 class VCLThruHostStackEcho(VCLTestCase):
373 """ VCL Thru Host Stack Echo """
377 super(VCLThruHostStackEcho, cls).setUpClass()
380 def tearDownClass(cls):
381 super(VCLThruHostStackEcho, cls).tearDownClass()
384 super(VCLThruHostStackEcho, self).setUp()
386 self.thru_host_stack_setup()
387 self.client_bi_dir_nsock_timeout = 20
388 self.client_bi_dir_nsock_test_args = ["-N", "1000", "-B", "-X",
390 self.loop0.local_ip4,
392 self.client_echo_test_args = ["-E", self.echo_phrase, "-X",
393 self.loop0.local_ip4,
397 self.thru_host_stack_tear_down()
398 super(VCLThruHostStackEcho, self).tearDown()
400 def show_commands_at_teardown(self):
401 self.logger.debug(self.vapi.cli("show app server"))
402 self.logger.debug(self.vapi.cli("show session verbose"))
405 class VCLThruHostStackTLS(VCLTestCase):
406 """ VCL Thru Host Stack TLS """
410 super(VCLThruHostStackTLS, cls).setUpClass()
413 def tearDownClass(cls):
414 super(VCLThruHostStackTLS, cls).tearDownClass()
417 super(VCLThruHostStackTLS, self).setUp()
419 self.thru_host_stack_setup()
420 self.client_uni_dir_tls_timeout = 20
421 self.server_tls_args = ["-L", self.server_port]
422 self.client_uni_dir_tls_test_args = ["-N", "1000", "-U", "-X", "-L",
423 self.loop0.local_ip4,
426 def test_vcl_thru_host_stack_tls_uni_dir(self):
427 """ run VCL thru host stack uni-directional TLS test """
429 self.timeout = self.client_uni_dir_tls_timeout
430 self.thru_host_stack_test("vcl_test_server", self.server_tls_args,
432 self.client_uni_dir_tls_test_args)
435 self.thru_host_stack_tear_down()
436 super(VCLThruHostStackTLS, self).tearDown()
438 def show_commands_at_teardown(self):
439 self.logger.debug(self.vapi.cli("show app server"))
440 self.logger.debug(self.vapi.cli("show session verbose 2"))
443 class VCLThruHostStackBidirNsock(VCLTestCase):
444 """ VCL Thru Host Stack Bidir Nsock """
448 super(VCLThruHostStackBidirNsock, cls).setUpClass()
451 def tearDownClass(cls):
452 super(VCLThruHostStackBidirNsock, cls).tearDownClass()
455 super(VCLThruHostStackBidirNsock, self).setUp()
457 self.thru_host_stack_setup()
458 self.client_bi_dir_nsock_timeout = 20
459 self.client_bi_dir_nsock_test_args = ["-N", "1000", "-B", "-X",
461 self.loop0.local_ip4,
463 self.client_echo_test_args = ["-E", self.echo_phrase, "-X",
464 self.loop0.local_ip4,
468 self.thru_host_stack_tear_down()
469 super(VCLThruHostStackBidirNsock, self).tearDown()
471 def show_commands_at_teardown(self):
472 self.logger.debug(self.vapi.cli("show session verbose 2"))
474 def test_vcl_thru_host_stack_bi_dir_nsock(self):
475 """ run VCL thru host stack bi-directional (multiple sockets) test """
477 self.timeout = self.client_bi_dir_nsock_timeout
478 self.thru_host_stack_test("vcl_test_server", self.server_args,
480 self.client_bi_dir_nsock_test_args)
483 class LDPThruHostStackBidirNsock(VCLTestCase):
484 """ LDP Thru Host Stack Bidir Nsock """
488 super(LDPThruHostStackBidirNsock, cls).setUpClass()
491 def tearDownClass(cls):
492 super(LDPThruHostStackBidirNsock, cls).tearDownClass()
495 super(LDPThruHostStackBidirNsock, self).setUp()
497 self.thru_host_stack_setup()
499 self.client_bi_dir_nsock_timeout = 20
500 self.client_bi_dir_nsock_test_args = ["-N", "1000", "-B", "-X",
501 # OUCH! Host Stack Bug?
503 self.loop0.local_ip4,
506 self.client_bi_dir_nsock_timeout = 20
507 self.client_bi_dir_nsock_test_args = ["-N", "1000", "-B", "-X",
508 # OUCH! Host Stack Bug?
510 self.loop0.local_ip4,
514 self.thru_host_stack_tear_down()
515 super(LDPThruHostStackBidirNsock, self).tearDown()
517 def show_commands_at_teardown(self):
518 self.logger.debug(self.vapi.cli("show session verbose 2"))
520 def test_ldp_thru_host_stack_bi_dir_nsock(self):
521 """ run LDP thru host stack bi-directional (multiple sockets) test """
523 self.timeout = self.client_bi_dir_nsock_timeout
524 self.thru_host_stack_test("sock_test_server", self.server_args,
526 self.client_bi_dir_nsock_test_args)
529 class LDPThruHostStackNsock(VCLTestCase):
530 """ LDP Thru Host Stack Nsock """
534 super(LDPThruHostStackNsock, cls).setUpClass()
537 def tearDownClass(cls):
538 super(LDPThruHostStackNsock, cls).tearDownClass()
541 super(LDPThruHostStackNsock, self).setUp()
543 self.thru_host_stack_setup()
545 self.client_uni_dir_nsock_timeout = 20
546 self.numSockets = "2"
548 self.client_uni_dir_nsock_timeout = 20
549 self.numSockets = "5"
551 self.client_uni_dir_nsock_test_args = ["-N", "1000", "-U", "-X",
552 "-I", self.numSockets,
553 self.loop0.local_ip4,
557 self.thru_host_stack_tear_down()
558 super(LDPThruHostStackNsock, self).tearDown()
560 def test_ldp_thru_host_stack_uni_dir_nsock(self):
561 """ run LDP thru host stack uni-directional (multiple sockets) test """
563 self.timeout = self.client_uni_dir_nsock_timeout
564 self.thru_host_stack_test("sock_test_server", self.server_args,
566 self.client_uni_dir_nsock_test_args)
569 class VCLThruHostStackNsock(VCLTestCase):
570 """ VCL Thru Host Stack Nsock """
574 super(VCLThruHostStackNsock, cls).setUpClass()
577 def tearDownClass(cls):
578 super(VCLThruHostStackNsock, cls).tearDownClass()
581 super(VCLThruHostStackNsock, self).setUp()
583 self.thru_host_stack_setup()
585 self.client_uni_dir_nsock_timeout = 20
586 self.numSockets = "2"
588 self.client_uni_dir_nsock_timeout = 20
589 self.numSockets = "5"
591 self.client_uni_dir_nsock_test_args = ["-N", "1000", "-U", "-X",
592 "-I", self.numSockets,
593 self.loop0.local_ip4,
597 self.thru_host_stack_tear_down()
598 super(VCLThruHostStackNsock, self).tearDown()
600 def test_vcl_thru_host_stack_uni_dir_nsock(self):
601 """ run VCL thru host stack uni-directional (multiple sockets) test """
603 self.timeout = self.client_uni_dir_nsock_timeout
604 self.thru_host_stack_test("vcl_test_server", self.server_args,
606 self.client_uni_dir_nsock_test_args)
609 class LDPThruHostStackIperf(VCLTestCase):
610 """ LDP Thru Host Stack Iperf """
614 super(LDPThruHostStackIperf, cls).setUpClass()
617 def tearDownClass(cls):
618 super(LDPThruHostStackIperf, cls).tearDownClass()
621 super(LDPThruHostStackIperf, self).setUp()
623 self.thru_host_stack_setup()
624 self.client_iperf3_timeout = 20
625 self.client_iperf3_args = ["-V4d", "-t 2", "-c", self.loop0.local_ip4]
626 self.server_iperf3_args = ["-V4d", "-s"]
629 self.thru_host_stack_tear_down()
630 super(LDPThruHostStackIperf, self).tearDown()
632 def show_commands_at_teardown(self):
633 self.logger.debug(self.vapi.cli("show session verbose 2"))
635 @unittest.skipUnless(_have_iperf3, "'%s' not found, Skipping.")
636 def test_ldp_thru_host_stack_iperf3(self):
637 """ run LDP thru host stack iperf3 test """
639 self.timeout = self.client_iperf3_timeout
640 self.thru_host_stack_test(iperf3, self.server_iperf3_args,
641 iperf3, self.client_iperf3_args)
644 class LDPIpv6CutThruTestCase(VCLTestCase):
645 """ LDP IPv6 Cut Thru Tests """
649 super(LDPIpv6CutThruTestCase, cls).setUpClass()
652 def tearDownClass(cls):
653 super(LDPIpv6CutThruTestCase, cls).tearDownClass()
656 super(LDPIpv6CutThruTestCase, self).setUp()
658 self.cut_thru_setup()
659 self.client_iperf3_timeout = 20
660 self.client_uni_dir_nsock_timeout = 20
661 self.client_bi_dir_nsock_timeout = 20
662 self.client_ipv6_echo_test_args = ["-6", "-E", self.echo_phrase, "-X",
663 self.server_ipv6_addr,
665 self.client_ipv6_iperf3_args = ["-V6d", "-t 2", "-c",
666 self.server_ipv6_addr]
667 self.server_ipv6_iperf3_args = ["-V6d", "-s"]
668 self.client_ipv6_uni_dir_nsock_test_args = ["-N", "1000", "-U", "-X",
671 self.server_ipv6_addr,
673 self.client_ipv6_bi_dir_nsock_test_args = ["-N", "1000", "-B", "-X",
676 self.server_ipv6_addr,
680 super(LDPIpv6CutThruTestCase, self).tearDown()
681 self.cut_thru_tear_down()
683 def test_ldp_ipv6_cut_thru_echo(self):
684 """ run LDP IPv6 cut thru echo test """
686 self.cut_thru_test("sock_test_server",
687 self.server_ipv6_args,
689 self.client_ipv6_echo_test_args)
691 @unittest.skipUnless(_have_iperf3, "'%s' not found, Skipping.")
692 @unittest.skipUnless(running_extended_tests, "part of extended tests")
693 def test_ldp_ipv6_cut_thru_iperf3(self):
694 """ run LDP IPv6 cut thru iperf3 test """
696 self.timeout = self.client_iperf3_timeout
697 self.cut_thru_test(iperf3, self.server_ipv6_iperf3_args,
698 iperf3, self.client_ipv6_iperf3_args)
700 @unittest.skipUnless(running_extended_tests, "part of extended tests")
701 def test_ldp_ipv6_cut_thru_uni_dir_nsock(self):
702 """ run LDP IPv6 cut thru uni-directional (multiple sockets) test """
704 self.timeout = self.client_uni_dir_nsock_timeout
705 self.cut_thru_test("sock_test_server", self.server_ipv6_args,
707 self.client_ipv6_uni_dir_nsock_test_args)
709 @unittest.skipUnless(running_extended_tests, "part of extended tests")
710 @unittest.skip("sock test apps need to be improved")
711 def test_ldp_ipv6_cut_thru_bi_dir_nsock(self):
712 """ run LDP IPv6 cut thru bi-directional (multiple sockets) test """
714 self.timeout = self.client_bi_dir_nsock_timeout
715 self.cut_thru_test("sock_test_server", self.server_ipv6_args,
717 self.client_ipv6_bi_dir_nsock_test_args)
720 class VCLIpv6CutThruTestCase(VCLTestCase):
721 """ VCL IPv6 Cut Thru Tests """
725 super(VCLIpv6CutThruTestCase, cls).setUpClass()
728 def tearDownClass(cls):
729 super(VCLIpv6CutThruTestCase, cls).tearDownClass()
732 super(VCLIpv6CutThruTestCase, self).setUp()
734 self.cut_thru_setup()
735 self.client_uni_dir_nsock_timeout = 20
736 self.client_bi_dir_nsock_timeout = 20
737 self.client_ipv6_echo_test_args = ["-6", "-E", self.echo_phrase, "-X",
738 self.server_ipv6_addr,
740 self.client_ipv6_uni_dir_nsock_test_args = ["-N", "1000", "-U", "-X",
743 self.server_ipv6_addr,
745 self.client_ipv6_bi_dir_nsock_test_args = ["-N", "1000", "-B", "-X",
748 self.server_ipv6_addr,
752 super(VCLIpv6CutThruTestCase, self).tearDown()
753 self.cut_thru_tear_down()
755 def test_vcl_ipv6_cut_thru_echo(self):
756 """ run VCL IPv6 cut thru echo test """
758 self.cut_thru_test("vcl_test_server",
759 self.server_ipv6_args,
761 self.client_ipv6_echo_test_args)
763 @unittest.skipUnless(running_extended_tests, "part of extended tests")
764 def test_vcl_ipv6_cut_thru_uni_dir_nsock(self):
765 """ run VCL IPv6 cut thru uni-directional (multiple sockets) test """
767 self.timeout = self.client_uni_dir_nsock_timeout
768 self.cut_thru_test("vcl_test_server", self.server_ipv6_args,
770 self.client_ipv6_uni_dir_nsock_test_args)
772 @unittest.skipUnless(running_extended_tests, "part of extended tests")
773 def test_vcl_ipv6_cut_thru_bi_dir_nsock(self):
774 """ run VCL IPv6 cut thru bi-directional (multiple sockets) test """
776 self.timeout = self.client_bi_dir_nsock_timeout
777 self.cut_thru_test("vcl_test_server", self.server_ipv6_args,
779 self.client_ipv6_bi_dir_nsock_test_args)
782 class VCLIpv6ThruHostStackEcho(VCLTestCase):
783 """ VCL IPv6 Thru Host Stack Echo """
787 super(VCLIpv6ThruHostStackEcho, cls).setUpClass()
790 def tearDownClass(cls):
791 super(VCLIpv6ThruHostStackEcho, cls).tearDownClass()
794 super(VCLIpv6ThruHostStackEcho, self).setUp()
796 self.thru_host_stack_ipv6_setup()
797 self.client_ipv6_echo_test_args = ["-6", "-E", self.echo_phrase, "-X",
798 self.loop0.local_ip6,
802 self.thru_host_stack_ipv6_tear_down()
803 super(VCLIpv6ThruHostStackEcho, self).tearDown()
805 def test_vcl_ipv6_thru_host_stack_echo(self):
806 """ run VCL IPv6 thru host stack echo test """
808 self.thru_host_stack_test("vcl_test_server",
809 self.server_ipv6_args,
811 self.client_ipv6_echo_test_args)
814 if __name__ == '__main__':
815 unittest.main(testRunner=VppTestRunner)