blob: 1257f4e2b0adc871d5774bd667df07f7495693df [file] [log] [blame]
Renato Botelho do Coutoead1e532019-10-31 13:31:07 -05001#!/usr/bin/env python3
Dave Wallace3bffd4b2019-05-13 15:51:52 -04002""" Vpp QUIC tests """
Dave Wallaceb063ad02019-04-09 21:01:09 -04003
4import unittest
Dave Wallace211b28a2019-05-08 20:46:33 -04005import os
Dave Wallace3bffd4b2019-05-13 15:51:52 -04006import subprocess
7import signal
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +00008from framework import tag_fixme_vpp_workers
Dave Wallace3bffd4b2019-05-13 15:51:52 -04009from framework import VppTestCase, VppTestRunner, running_extended_tests, \
10 Worker
Dave Wallaceb063ad02019-04-09 21:01:09 -040011from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
12
13
Dave Wallace3bffd4b2019-05-13 15:51:52 -040014class QUICAppWorker(Worker):
15 """ QUIC Test Application Worker """
Dave Wallace47e77302019-06-05 10:40:07 -040016 process = None
Dave Wallace3bffd4b2019-05-13 15:51:52 -040017
Paul Vinciguerra48bdbcd2019-12-04 19:43:53 -050018 def __init__(self, build_dir, appname, executable_args, logger, role,
19 testcase, env=None, *args, **kwargs):
20 if env is None:
21 env = {}
Dave Wallace3bffd4b2019-05-13 15:51:52 -040022 app = "%s/vpp/bin/%s" % (build_dir, appname)
Paul Vinciguerra48bdbcd2019-12-04 19:43:53 -050023 self.args = [app] + executable_args
Dave Wallace91af1852019-10-21 03:28:17 +000024 self.role = role
25 self.wait_for_gdb = 'wait-for-gdb'
26 self.testcase = testcase
Paul Vinciguerra48bdbcd2019-12-04 19:43:53 -050027 super(QUICAppWorker, self).__init__(self.args, logger, env,
28 *args, **kwargs)
Dave Wallace3bffd4b2019-05-13 15:51:52 -040029
Dave Wallace47e77302019-06-05 10:40:07 -040030 def run(self):
31 super(QUICAppWorker, self).run()
Dave Wallace47e77302019-06-05 10:40:07 -040032
33 def teardown(self, logger, timeout):
34 if self.process is None:
Chore464e1dc2019-06-25 14:21:26 +043035 return False
Dave Wallace47e77302019-06-05 10:40:07 -040036 try:
37 logger.debug("Killing worker process (pid %d)" % self.process.pid)
38 os.killpg(os.getpgid(self.process.pid), signal.SIGKILL)
39 self.join(timeout)
40 except OSError as e:
41 logger.debug("Couldn't kill worker process")
42 return True
43 return False
44
Dave Wallace3bffd4b2019-05-13 15:51:52 -040045
Dave Wallace211b28a2019-05-08 20:46:33 -040046class QUICTestCase(VppTestCase):
Dave Wallaceb063ad02019-04-09 21:01:09 -040047 """ QUIC Test Case """
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -050048
49 timeout = 20
50 pre_test_sleep = 0.3
Dave Wallace3ce03522020-01-27 18:21:15 -050051 post_test_sleep = 0.3
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -050052
Aloys Augustinbaf1c7c2019-09-02 16:29:19 +020053 @classmethod
54 def setUpClass(cls):
55 cls.extra_vpp_plugin_config.append("plugin quic_plugin.so { enable }")
56 super(QUICTestCase, cls).setUpClass()
Dave Wallaceb063ad02019-04-09 21:01:09 -040057
Dave Wallaceb063ad02019-04-09 21:01:09 -040058 def setUp(self):
Dave Wallace47e77302019-06-05 10:40:07 -040059 super(QUICTestCase, self).setUp()
Dave Wallace211b28a2019-05-08 20:46:33 -040060 var = "VPP_BUILD_DIR"
61 self.build_dir = os.getenv(var, None)
62 if self.build_dir is None:
63 raise Exception("Environment variable `%s' not set" % var)
64 self.vppDebug = 'vpp_debug' in self.build_dir
Dave Wallace211b28a2019-05-08 20:46:33 -040065
Dave Wallaceb063ad02019-04-09 21:01:09 -040066 self.create_loopback_interfaces(2)
Dave Wallace211b28a2019-05-08 20:46:33 -040067 self.uri = "quic://%s/1234" % self.loop0.local_ip4
Dave Wallaceb063ad02019-04-09 21:01:09 -040068 table_id = 1
Dave Wallaceb063ad02019-04-09 21:01:09 -040069 for i in self.lo_interfaces:
70 i.admin_up()
71
72 if table_id != 0:
73 tbl = VppIpTable(self, table_id)
74 tbl.add_vpp_config()
75
76 i.set_table_ip4(table_id)
77 i.config_ip4()
78 table_id += 1
79
80 # Configure namespaces
Jakub Grajciarb4e5e502020-01-31 09:35:29 +010081 self.vapi.app_namespace_add_del(namespace_id="server",
Dave Wallaceb063ad02019-04-09 21:01:09 -040082 sw_if_index=self.loop0.sw_if_index)
Jakub Grajciarb4e5e502020-01-31 09:35:29 +010083 self.vapi.app_namespace_add_del(namespace_id="client",
Dave Wallaceb063ad02019-04-09 21:01:09 -040084 sw_if_index=self.loop1.sw_if_index)
85
Dave Wallace211b28a2019-05-08 20:46:33 -040086 # Add inter-table routes
87 self.ip_t01 = VppIpRoute(self, self.loop1.local_ip4, 32,
88 [VppRoutePath("0.0.0.0",
89 0xffffffff,
90 nh_table_id=2)], table_id=1)
91 self.ip_t10 = VppIpRoute(self, self.loop0.local_ip4, 32,
92 [VppRoutePath("0.0.0.0",
93 0xffffffff,
94 nh_table_id=1)], table_id=2)
95 self.ip_t01.add_vpp_config()
96 self.ip_t10.add_vpp_config()
97 self.logger.debug(self.vapi.cli("show ip fib"))
98
Dave Wallace47e77302019-06-05 10:40:07 -040099 def tearDown(self):
Dave Wallace211b28a2019-05-08 20:46:33 -0400100 # Delete inter-table routes
101 self.ip_t01.remove_vpp_config()
102 self.ip_t10.remove_vpp_config()
103
Dave Wallaceb063ad02019-04-09 21:01:09 -0400104 for i in self.lo_interfaces:
105 i.unconfig_ip4()
106 i.set_table_ip4(0)
107 i.admin_down()
Dave Wallace47e77302019-06-05 10:40:07 -0400108 super(QUICTestCase, self).tearDown()
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400109
Dave Wallace211b28a2019-05-08 20:46:33 -0400110
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000111class QUICEchoIntTestCase(QUICTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400112 """QUIC Echo Internal Test Case"""
Dave Wallace3ad078d2019-10-21 22:45:23 +0000113 test_bytes = ' test-bytes'
Florin Corase92c9462020-11-25 08:44:16 -0800114 extra_vpp_punt_config = ["session", "{", "enable", "poll-main", "}"]
Chore464e1dc2019-06-25 14:21:26 +0430115
Dave Wallace211b28a2019-05-08 20:46:33 -0400116 def setUp(self):
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000117 super(QUICEchoIntTestCase, self).setUp()
Dave Wallace3ad078d2019-10-21 22:45:23 +0000118 self.client_args = 'uri {uri} fifo-size 64{testbytes} appns client' \
119 .format(uri=self.uri, testbytes=self.test_bytes)
Dave Wallace47e77302019-06-05 10:40:07 -0400120 self.server_args = "uri %s fifo-size 64 appns server" % self.uri
Dave Wallace211b28a2019-05-08 20:46:33 -0400121
Dave Wallace3ce03522020-01-27 18:21:15 -0500122 def tearDown(self):
123 super(QUICEchoIntTestCase, self).tearDown()
124
Dave Wallace47e77302019-06-05 10:40:07 -0400125 def server(self, *args):
Chore464e1dc2019-06-25 14:21:26 +0430126 error = self.vapi.cli(
127 "test echo server %s %s" %
128 (self.server_args, ' '.join(args)))
Dave Wallace47e77302019-06-05 10:40:07 -0400129 if error:
130 self.logger.critical(error)
131 self.assertNotIn("failed", error)
Dave Wallace211b28a2019-05-08 20:46:33 -0400132
Dave Wallace47e77302019-06-05 10:40:07 -0400133 def client(self, *args):
Chore464e1dc2019-06-25 14:21:26 +0430134 error = self.vapi.cli(
135 "test echo client %s %s" %
136 (self.client_args, ' '.join(args)))
Dave Wallace47e77302019-06-05 10:40:07 -0400137 if error:
138 self.logger.critical(error)
139 self.assertNotIn("failed", error)
Dave Wallaceb063ad02019-04-09 21:01:09 -0400140
Chore464e1dc2019-06-25 14:21:26 +0430141
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +0000142@tag_fixme_vpp_workers
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000143class QUICEchoIntTransferTestCase(QUICEchoIntTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400144 """QUIC Echo Internal Transfer Test Case"""
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000145 def test_quic_int_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000146 """QUIC internal transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400147 self.server()
Aloys Augustin706079c2019-06-27 16:10:23 +0200148 self.client("no-output", "mbytes", "2")
Dave Wallaceb063ad02019-04-09 21:01:09 -0400149
Chore464e1dc2019-06-25 14:21:26 +0430150
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +0000151@tag_fixme_vpp_workers
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000152class QUICEchoIntSerialTestCase(QUICEchoIntTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400153 """QUIC Echo Internal Serial Transfer Test Case"""
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000154 def test_quic_serial_int_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000155 """QUIC serial internal transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400156 self.server()
Aloys Augustin706079c2019-06-27 16:10:23 +0200157 self.client("no-output", "mbytes", "2")
158 self.client("no-output", "mbytes", "2")
159 self.client("no-output", "mbytes", "2")
160 self.client("no-output", "mbytes", "2")
161 self.client("no-output", "mbytes", "2")
Dave Wallace0d144c72019-05-15 21:41:23 -0400162
Chore464e1dc2019-06-25 14:21:26 +0430163
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +0000164@tag_fixme_vpp_workers
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000165class QUICEchoIntMStreamTestCase(QUICEchoIntTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400166 """QUIC Echo Internal MultiStream Test Case"""
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000167 def test_quic_int_multistream_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000168 """QUIC internal multi-stream transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400169 self.server()
170 self.client("nclients", "10", "mbytes", "1", "no-output")
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400171
172
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000173class QUICEchoExtTestCase(QUICTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400174 quic_setup = "default"
Dave Wallace3ad078d2019-10-21 22:45:23 +0000175 test_bytes = "test-bytes:assert"
Dave Wallace3ce03522020-01-27 18:21:15 -0500176 pre_test_sleep = 1
177 post_test_sleep = 1
Dave Wallace91af1852019-10-21 03:28:17 +0000178 app = "vpp_echo"
Dave Wallace3ce03522020-01-27 18:21:15 -0500179 evt_q_len = 16384
Klement Sekera8d815022021-03-15 16:58:10 +0100180 vpp_worker_count = 1
Dave Wallace3ce03522020-01-27 18:21:15 -0500181 server_fifo_size = "1M"
182 client_fifo_size = "4M"
183 extra_vpp_punt_config = ["session", "{",
Florin Corase92c9462020-11-25 08:44:16 -0800184 "enable", "poll-main", "evt_qs_memfd_seg",
Dave Wallace3ce03522020-01-27 18:21:15 -0500185 "evt_qs_seg_size", "64M",
186 "event-queue-length", f"{evt_q_len}",
187 "preallocated-sessions", "1024",
188 "v4-session-table-buckets", "20000",
189 "v4-session-table-memory", "64M",
190 "v4-halfopen-table-buckets", "20000",
191 "v4-halfopen-table-memory", "64M",
192 "local-endpoints-table-buckets", "250000",
193 "local-endpoints-table-memory", "512M",
194 "}"]
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400195
196 def setUp(self):
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000197 super(QUICEchoExtTestCase, self).setUp()
Chore464e1dc2019-06-25 14:21:26 +0430198 common_args = [
Dave Wallace3ce03522020-01-27 18:21:15 -0500199 "uri", self.uri,
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000200 "json",
Dave Wallace3ad078d2019-10-21 22:45:23 +0000201 self.test_bytes,
Klement Sekerae2636852021-03-16 12:52:12 +0100202 "socket-name", self.get_api_sock_path(),
Dave Wallace3ce03522020-01-27 18:21:15 -0500203 "quic-setup", self.quic_setup,
204 "nthreads", "1",
205 "mq-size", f"{self.evt_q_len}"
206 ]
Chore464e1dc2019-06-25 14:21:26 +0430207 self.server_echo_test_args = common_args + \
Dave Wallace3ce03522020-01-27 18:21:15 -0500208 ["server", "appns", "server", "fifo-size",
209 f"{self.server_fifo_size}"]
Chore464e1dc2019-06-25 14:21:26 +0430210 self.client_echo_test_args = common_args + \
Dave Wallace3ce03522020-01-27 18:21:15 -0500211 ["client", "appns", "client", "fifo-size",
212 f"{self.client_fifo_size}"]
Dave Wallacef9d784b2019-10-30 16:58:30 +0000213 error = self.vapi.cli("quic set fifo-size 2M")
Dave Wallace91af1852019-10-21 03:28:17 +0000214 if error:
215 self.logger.critical(error)
216 self.assertNotIn("failed", error)
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400217
Dave Wallace47e77302019-06-05 10:40:07 -0400218 def server(self, *args):
219 _args = self.server_echo_test_args + list(args)
Chore464e1dc2019-06-25 14:21:26 +0430220 self.worker_server = QUICAppWorker(
221 self.build_dir,
Dave Wallace91af1852019-10-21 03:28:17 +0000222 self.app,
Chore464e1dc2019-06-25 14:21:26 +0430223 _args,
Dave Wallace91af1852019-10-21 03:28:17 +0000224 self.logger,
225 'server',
226 self)
Dave Wallace47e77302019-06-05 10:40:07 -0400227 self.worker_server.start()
228 self.sleep(self.pre_test_sleep)
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400229
Dave Wallace47e77302019-06-05 10:40:07 -0400230 def client(self, *args):
231 _args = self.client_echo_test_args + list(args)
Chore464e1dc2019-06-25 14:21:26 +0430232 self.worker_client = QUICAppWorker(
233 self.build_dir,
Dave Wallace91af1852019-10-21 03:28:17 +0000234 self.app,
Chore464e1dc2019-06-25 14:21:26 +0430235 _args,
Dave Wallace91af1852019-10-21 03:28:17 +0000236 self.logger,
237 'client',
238 self)
Dave Wallace47e77302019-06-05 10:40:07 -0400239 self.worker_client.start()
Dave Wallace91af1852019-10-21 03:28:17 +0000240 timeout = None if self.debug_all else self.timeout
241 self.worker_client.join(timeout)
Dave Wallace3ce03522020-01-27 18:21:15 -0500242 if self.worker_client.is_alive():
243 error = f"Client failed to complete in {timeout} seconds!"
244 self.logger.critical(error)
245 return
Dave Wallace91af1852019-10-21 03:28:17 +0000246 self.worker_server.join(timeout)
Dave Wallace3ce03522020-01-27 18:21:15 -0500247 if self.worker_server.is_alive():
248 error = f"Server failed to complete in {timeout} seconds!"
249 self.logger.critical(error)
Dave Wallace47e77302019-06-05 10:40:07 -0400250 self.sleep(self.post_test_sleep)
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400251
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000252 def validate_ext_test_results(self):
Dave Wallace47e77302019-06-05 10:40:07 -0400253 server_result = self.worker_server.result
254 client_result = self.worker_client.result
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000255 self.logger.info("Server worker result is `%s'" %
256 server_result)
257 self.logger.info("Client worker result is `%s'" %
258 client_result)
Dave Wallace47e77302019-06-05 10:40:07 -0400259 server_kill_error = False
260 if self.worker_server.result is None:
Chore464e1dc2019-06-25 14:21:26 +0430261 server_kill_error = self.worker_server.teardown(
262 self.logger, self.timeout)
Dave Wallace47e77302019-06-05 10:40:07 -0400263 if self.worker_client.result is None:
264 self.worker_client.teardown(self.logger, self.timeout)
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000265 err_msg = "Wrong server worker return code (%s)" % server_result
266 self.assertEqual(server_result, 0, err_msg)
Chore464e1dc2019-06-25 14:21:26 +0430267 self.assertIsNotNone(
268 client_result,
269 "Timeout! Client worker did not finish in %ss" %
270 self.timeout)
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000271 err_msg = "Wrong client worker return code (%s)" % client_result
272 self.assertEqual(client_result, 0, err_msg)
Dave Wallace47e77302019-06-05 10:40:07 -0400273 self.assertFalse(server_kill_error, "Server kill errored")
274
275
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000276class QUICEchoExtTransferTestCase(QUICEchoExtTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400277 """QUIC Echo External Transfer Test Case"""
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -0500278 timeout = 60
279
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000280 def test_quic_ext_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000281 """QUIC external transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400282 self.server()
283 self.client()
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000284 self.validate_ext_test_results()
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400285
Chore464e1dc2019-06-25 14:21:26 +0430286
Dave Wallace3ad078d2019-10-21 22:45:23 +0000287class QUICEchoExtTransferBigTestCase(QUICEchoExtTestCase):
288 """QUIC Echo External Transfer Big Test Case"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500289 server_fifo_size = '4M'
290 client_fifo_size = '4M'
Dave Wallace3ad078d2019-10-21 22:45:23 +0000291 test_bytes = ''
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -0500292 timeout = 60
Dave Wallace3ad078d2019-10-21 22:45:23 +0000293
294 @unittest.skipUnless(running_extended_tests, "part of extended tests")
295 def test_quic_ext_transfer_big(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000296 """QUIC external transfer, big stream"""
Dave Wallace2edff142020-02-07 17:55:53 -0500297 self.server("TX=0", "RX=2G")
298 self.client("TX=2G", "RX=0")
Dave Wallace3ad078d2019-10-21 22:45:23 +0000299 self.validate_ext_test_results()
300
301
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000302class QUICEchoExtQcloseRxTestCase(QUICEchoExtTestCase):
303 """QUIC Echo External Transfer Qclose Rx Test Case"""
304
305 @unittest.skipUnless(running_extended_tests, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500306 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000307 def test_quic_ext_qclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000308 """QUIC external transfer, rx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500309 self.server("TX=0", "RX=10M", "qclose=Y", "sclose=N")
310 self.client("TX=10M", "RX=0", "qclose=W", "sclose=W")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000311 self.validate_ext_test_results()
312
313
314class QUICEchoExtQcloseTxTestCase(QUICEchoExtTestCase):
315 """QUIC Echo External Transfer Qclose Tx Test Case"""
316
317 @unittest.skipUnless(running_extended_tests, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500318 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000319 def test_quic_ext_qclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000320 """QUIC external transfer, tx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500321 self.server("TX=0", "RX=10M", "qclose=W", "sclose=W",
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400322 "rx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500323 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000324 self.validate_ext_test_results()
325
326
327class QUICEchoExtEarlyQcloseRxTestCase(QUICEchoExtTestCase):
328 """QUIC Echo External Transfer Early Qclose Rx Test Case"""
329
330 @unittest.skipUnless(running_extended_tests, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500331 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000332 def test_quic_ext_early_qclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000333 """QUIC external transfer, early rx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500334 self.server("TX=0", "RX=10M", "qclose=Y", "sclose=N")
335 self.client("TX=20M", "RX=0", "qclose=W", "sclose=W",
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400336 "tx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000337 self.validate_ext_test_results()
338
339
340class QUICEchoExtEarlyQcloseTxTestCase(QUICEchoExtTestCase):
341 """QUIC Echo External Transfer Early Qclose Tx Test Case"""
342
343 @unittest.skipUnless(running_extended_tests, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500344 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000345 def test_quic_ext_early_qclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000346 """QUIC external transfer, early tx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500347 self.server("TX=0", "RX=20M", "qclose=W", "sclose=W",
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400348 "rx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500349 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000350 self.validate_ext_test_results()
351
352
353class QUICEchoExtScloseRxTestCase(QUICEchoExtTestCase):
354 """QUIC Echo External Transfer Sclose Rx Test Case"""
355
356 @unittest.skipUnless(running_extended_tests, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500357 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000358 def test_quic_ext_sclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000359 """QUIC external transfer, rx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500360 self.server("TX=0", "RX=10M", "qclose=N", "sclose=Y")
361 self.client("TX=10M", "RX=0", "qclose=W", "sclose=W")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000362 self.validate_ext_test_results()
363
364
365class QUICEchoExtScloseTxTestCase(QUICEchoExtTestCase):
366 """QUIC Echo External Transfer Sclose Tx Test Case"""
367
368 @unittest.skipUnless(running_extended_tests, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500369 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000370 def test_quic_ext_sclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000371 """QUIC external transfer, tx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500372 self.server("TX=0", "RX=10M", "qclose=W", "sclose=W")
373 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000374 self.validate_ext_test_results()
375
376
377class QUICEchoExtEarlyScloseRxTestCase(QUICEchoExtTestCase):
378 """QUIC Echo External Transfer Early Sclose Rx Test Case"""
379
380 @unittest.skipUnless(running_extended_tests, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500381 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000382 def test_quic_ext_early_sclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000383 """QUIC external transfer, early rx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500384 self.server("TX=0", "RX=10M", "qclose=N", "sclose=Y")
385 self.client("TX=20M", "RX=0", "qclose=W", "sclose=W",
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400386 "tx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000387 self.validate_ext_test_results()
388
389
390class QUICEchoExtEarlyScloseTxTestCase(QUICEchoExtTestCase):
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400391 """QUIC Echo External Transfer Early Sclose Tx Test Case"""
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000392
393 @unittest.skipUnless(running_extended_tests, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500394 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000395 def test_quic_ext_early_sclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000396 """QUIC external transfer, early tx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500397 self.server("TX=0", "RX=20M", "qclose=W", "sclose=W",
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400398 "rx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500399 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000400 self.validate_ext_test_results()
401
402
403class QUICEchoExtServerStreamTestCase(QUICEchoExtTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400404 """QUIC Echo External Transfer Server Stream Test Case"""
405 quic_setup = "serverstream"
Dave Wallace3ce03522020-01-27 18:21:15 -0500406 timeout = 60
Dave Wallace47e77302019-06-05 10:40:07 -0400407
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000408 def test_quic_ext_transfer_server_stream(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000409 """QUIC external server transfer"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500410 self.server("TX=10M", "RX=0")
411 self.client("TX=0", "RX=10M")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000412 self.validate_ext_test_results()
Dave Wallace47e77302019-06-05 10:40:07 -0400413
Chore464e1dc2019-06-25 14:21:26 +0430414
Dave Wallace3ce03522020-01-27 18:21:15 -0500415class QUICEchoExtServerStreamBigTestCase(QUICEchoExtTestCase):
416 """QUIC Echo External Transfer Server Stream Big Test Case"""
Dave Wallace3ad078d2019-10-21 22:45:23 +0000417 quic_setup = "serverstream"
Dave Wallace3ce03522020-01-27 18:21:15 -0500418 server_fifo_size = '4M'
419 client_fifo_size = '4M'
Dave Wallace3ad078d2019-10-21 22:45:23 +0000420 test_bytes = ''
Dave Wallace3ce03522020-01-27 18:21:15 -0500421 timeout = 60
Dave Wallace3ad078d2019-10-21 22:45:23 +0000422
423 @unittest.skipUnless(running_extended_tests, "part of extended tests")
Dave Wallace3ce03522020-01-27 18:21:15 -0500424 def test_quic_ext_transfer_server_stream_big(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000425 """QUIC external server transfer, big stream"""
Dave Wallace2edff142020-02-07 17:55:53 -0500426 self.server("TX=2G", "RX=0")
427 self.client("TX=0", "RX=2G")
Dave Wallace3ad078d2019-10-21 22:45:23 +0000428 self.validate_ext_test_results()
429
430
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000431class QUICEchoExtServerStreamQcloseRxTestCase(QUICEchoExtTestCase):
432 """QUIC Echo External Transfer Server Stream Qclose Rx Test Case"""
433 quic_setup = "serverstream"
434
435 @unittest.skipUnless(running_extended_tests, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500436 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000437 def test_quic_ext_server_stream_qclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000438 """QUIC external server transfer, rx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500439 self.server("TX=10M", "RX=0", "qclose=W", "sclose=W")
440 self.client("TX=0", "RX=10M", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000441 self.validate_ext_test_results()
442
443
444class QUICEchoExtServerStreamQcloseTxTestCase(QUICEchoExtTestCase):
445 """QUIC Echo External Transfer Server Stream Qclose Tx Test Case"""
446 quic_setup = "serverstream"
447
448 @unittest.skipUnless(running_extended_tests, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500449 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000450 def test_quic_ext_server_stream_qclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000451 """QUIC external server transfer, tx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500452 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=N")
453 self.client("TX=0", "RX=10M", "qclose=W", "sclose=W",
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400454 "rx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000455 self.validate_ext_test_results()
456
457
458class QUICEchoExtServerStreamEarlyQcloseRxTestCase(QUICEchoExtTestCase):
459 """QUIC Echo External Transfer Server Stream Early Qclose Rx Test Case"""
460 quic_setup = "serverstream"
461
462 @unittest.skipUnless(running_extended_tests, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500463 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000464 def test_quic_ext_server_stream_early_qclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000465 """QUIC external server transfer, early rx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500466 self.server("TX=20M", "RX=0", "qclose=W", "sclose=W",
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400467 "tx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500468 self.client("TX=0", "RX=10M", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000469 self.validate_ext_test_results()
470
471
472class QUICEchoExtServerStreamEarlyQcloseTxTestCase(QUICEchoExtTestCase):
473 """QUIC Echo External Transfer Server Stream Early Qclose Tx Test Case"""
474 quic_setup = "serverstream"
475
476 @unittest.skipUnless(running_extended_tests, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500477 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000478 def test_quic_ext_server_stream_early_qclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000479 """QUIC external server transfer, early tx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500480 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=N")
481 self.client("TX=0", "RX=20M", "qclose=W", "sclose=W",
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400482 "rx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000483 self.validate_ext_test_results()
484
485
486class QUICEchoExtServerStreamScloseRxTestCase(QUICEchoExtTestCase):
487 """QUIC Echo External Transfer Server Stream Sclose Rx Test Case"""
488 quic_setup = "serverstream"
489
490 @unittest.skipUnless(running_extended_tests, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500491 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000492 def test_quic_ext_server_stream_sclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000493 """QUIC external server transfer, rx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500494 self.server("TX=10M", "RX=0", "qclose=W", "sclose=W")
495 self.client("TX=0", "RX=10M", "qclose=N", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000496 self.validate_ext_test_results()
497
498
499class QUICEchoExtServerStreamScloseTxTestCase(QUICEchoExtTestCase):
500 """QUIC Echo External Transfer Server Stream Sclose Tx Test Case"""
501 quic_setup = "serverstream"
502
503 @unittest.skipUnless(running_extended_tests, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500504 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000505 def test_quic_ext_server_stream_sclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000506 """QUIC external server transfer, tx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500507 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
508 self.client("TX=0", "RX=10M", "qclose=W", "sclose=W")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000509 self.validate_ext_test_results()
510
511
512class QUICEchoExtServerStreamEarlyScloseRxTestCase(QUICEchoExtTestCase):
513 """QUIC Echo External Transfer Server Stream Early Sclose Rx Test Case"""
514 quic_setup = "serverstream"
515
516 @unittest.skipUnless(running_extended_tests, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500517 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000518 def test_quic_ext_server_stream_early_sclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000519 """QUIC external server transfer, early rx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500520 self.server("TX=20M", "RX=0", "qclose=W", "sclose=W",
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400521 "tx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500522 self.client("TX=0", "RX=10M", "qclose=N", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000523 self.validate_ext_test_results()
524
525
526class QUICEchoExtServerStreamEarlyScloseTxTestCase(QUICEchoExtTestCase):
527 """QUIC Echo Ext Transfer Server Stream Early Sclose Tx Test Case"""
528 quic_setup = "serverstream"
529
530 @unittest.skipUnless(running_extended_tests, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500531 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000532 def test_quic_ext_server_stream_early_sclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000533 """QUIC external server transfer, early tx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500534 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
535 self.client("TX=0", "RX=20M", "qclose=W", "sclose=W",
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400536 "rx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000537 self.validate_ext_test_results()
538
539
540class QUICEchoExtServerStreamWorkersTestCase(QUICEchoExtTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400541 """QUIC Echo External Transfer Server Stream MultiWorker Test Case"""
542 quic_setup = "serverstream"
543
544 @unittest.skipUnless(running_extended_tests, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500545 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000546 def test_quic_ext_transfer_server_stream_multi_workers(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000547 """QUIC external server transfer, multi-worker"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500548 self.server("nclients", "4", "quic-streams", "4", "TX=10M", "RX=0")
549 self.client("nclients", "4", "quic-streams", "4", "TX=0", "RX=10M")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000550 self.validate_ext_test_results()
Dave Wallace211b28a2019-05-08 20:46:33 -0400551
Dave Wallaceb063ad02019-04-09 21:01:09 -0400552
553if __name__ == '__main__':
554 unittest.main(testRunner=VppTestRunner)