class VCLTestCase(VppTestCase):
""" VCL Test Class """
+ extra_vpp_punt_config = ["session", "{", "poll-main", "}"]
@classmethod
def setUpClass(cls):
super(VCLTestCase, self).setUp()
def cut_thru_setup(self):
- self.vapi.session_enable_disable(is_enabled=1)
+ self.vapi.session_enable_disable(is_enable=1)
def cut_thru_tear_down(self):
- self.vapi.session_enable_disable(is_enabled=0)
+ self.vapi.session_enable_disable(is_enable=0)
def cut_thru_test(self, server_app, server_args, client_app, client_args):
- self.env = {'VCL_API_PREFIX': self.shm_prefix,
+ self.env = {'VCL_VPP_API_SOCKET': self.api_sock,
'VCL_APP_SCOPE_LOCAL': "true"}
worker_server = VCLAppWorker(self.build_dir, server_app, server_args,
self.logger, self.env)
self.sleep(self.post_test_sleep)
def thru_host_stack_setup(self):
- self.vapi.session_enable_disable(is_enabled=1)
+ self.vapi.session_enable_disable(is_enable=1)
self.create_loopback_interfaces(2)
table_id = 1
i.admin_down()
def thru_host_stack_ipv6_setup(self):
- self.vapi.session_enable_disable(is_enabled=1)
+ self.vapi.session_enable_disable(is_enable=1)
self.create_loopback_interfaces(2)
table_id = 1
i.set_table_ip6(0)
i.admin_down()
- self.vapi.session_enable_disable(is_enabled=0)
+ self.vapi.session_enable_disable(is_enable=0)
@unittest.skipUnless(_have_iperf3, "'%s' not found, Skipping.")
def thru_host_stack_test(self, server_app, server_args,
client_app, client_args):
- self.env = {'VCL_API_PREFIX': self.shm_prefix,
+ self.env = {'VCL_VPP_API_SOCKET': self.api_sock,
'VCL_APP_SCOPE_GLOBAL': "true",
'VCL_APP_NAMESPACE_ID': "1",
'VCL_APP_NAMESPACE_SECRET': "1234"}
super(LDPThruHostStackBidirNsock, self).setUp()
self.thru_host_stack_setup()
- if self.vppDebug:
- self.client_bi_dir_nsock_timeout = 20
- self.client_bi_dir_nsock_test_args = ["-N", "1000", "-B", "-X",
- # OUCH! Host Stack Bug?
- # "-I", "2",
- self.loop0.local_ip4,
- self.server_port]
- else:
- self.client_bi_dir_nsock_timeout = 20
- self.client_bi_dir_nsock_test_args = ["-N", "1000", "-B", "-X",
- # OUCH! Host Stack Bug?
- # "-I", "2",
- self.loop0.local_ip4,
- self.server_port]
+ self.client_bi_dir_nsock_timeout = 20
+ self.client_bi_dir_nsock_test_args = ["-N", "1000", "-B", "-X",
+ # OUCH! Host Stack Bug?
+ # Only fails when running
+ # 'make test TEST_JOBS=auto'
+ # or TEST_JOBS > 1
+ # "-I", "2",
+ self.loop0.local_ip4,
+ self.server_port]
def tearDown(self):
self.thru_host_stack_tear_down()
iperf3, self.client_iperf3_args)
+class LDPThruHostStackIperfUdp(VCLTestCase):
+ """ LDP Thru Host Stack Iperf UDP """
+
+ @classmethod
+ def setUpClass(cls):
+ super(LDPThruHostStackIperfUdp, cls).setUpClass()
+
+ @classmethod
+ def tearDownClass(cls):
+ super(LDPThruHostStackIperfUdp, cls).tearDownClass()
+
+ def setUp(self):
+ super(LDPThruHostStackIperfUdp, self).setUp()
+
+ self.thru_host_stack_setup()
+ self.client_iperf3_timeout = 20
+ self.client_iperf3_args = ["-V4d", "-t 2", "-u", "-l 1400",
+ "-c", self.loop0.local_ip4]
+ self.server_iperf3_args = ["-V4d", "-s"]
+
+ def tearDown(self):
+ self.thru_host_stack_tear_down()
+ super(LDPThruHostStackIperfUdp, self).tearDown()
+
+ def show_commands_at_teardown(self):
+ self.logger.debug(self.vapi.cli("show session verbose 2"))
+
+ @unittest.skipUnless(_have_iperf3, "'%s' not found, Skipping.")
+ def test_ldp_thru_host_stack_iperf3_udp(self):
+ """ run LDP thru host stack iperf3 UDP test """
+
+ self.timeout = self.client_iperf3_timeout
+ self.thru_host_stack_test(iperf3, self.server_iperf3_args,
+ iperf3, self.client_iperf3_args)
+
+
class LDPIpv6CutThruTestCase(VCLTestCase):
""" LDP IPv6 Cut Thru Tests """