blob: e453bd5b3e5556ca8d40b5652bdfb7cf50b5bf9b [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 signal
Klement Sekerab23ffd72021-05-31 16:08:53 +02007from config import config
Dave Wallace8800f732023-08-31 00:47:44 -04008from asfframework import VppAsfTestCase, VppTestRunner, Worker, tag_fixme_vpp_workers
Dave Wallaceb063ad02019-04-09 21:01:09 -04009from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
10
11
Dave Wallace3bffd4b2019-05-13 15:51:52 -040012class QUICAppWorker(Worker):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020013 """QUIC Test Application Worker"""
14
Dave Wallace47e77302019-06-05 10:40:07 -040015 process = None
Dave Wallace3bffd4b2019-05-13 15:51:52 -040016
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020017 def __init__(
18 self,
19 appname,
20 executable_args,
21 logger,
22 role,
23 testcase,
24 env=None,
25 *args,
26 **kwargs,
27 ):
Paul Vinciguerra48bdbcd2019-12-04 19:43:53 -050028 if env is None:
29 env = {}
Klement Sekerab23ffd72021-05-31 16:08:53 +020030 app = f"{config.vpp_build_dir}/vpp/bin/{appname}"
Paul Vinciguerra48bdbcd2019-12-04 19:43:53 -050031 self.args = [app] + executable_args
Dave Wallace91af1852019-10-21 03:28:17 +000032 self.role = role
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020033 self.wait_for_gdb = "wait-for-gdb"
Dave Wallace91af1852019-10-21 03:28:17 +000034 self.testcase = testcase
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020035 super(QUICAppWorker, self).__init__(self.args, logger, env, *args, **kwargs)
Dave Wallace3bffd4b2019-05-13 15:51:52 -040036
Dave Wallace47e77302019-06-05 10:40:07 -040037 def run(self):
38 super(QUICAppWorker, self).run()
Dave Wallace47e77302019-06-05 10:40:07 -040039
40 def teardown(self, logger, timeout):
41 if self.process is None:
Chore464e1dc2019-06-25 14:21:26 +043042 return False
Dave Wallace47e77302019-06-05 10:40:07 -040043 try:
Dave Wallace8430c402023-01-26 12:44:01 -050044 logger.debug(f"Killing worker process (pid {self.process.pid})")
Dave Wallace47e77302019-06-05 10:40:07 -040045 os.killpg(os.getpgid(self.process.pid), signal.SIGKILL)
46 self.join(timeout)
47 except OSError as e:
48 logger.debug("Couldn't kill worker process")
49 return True
50 return False
51
Dave Wallace3bffd4b2019-05-13 15:51:52 -040052
Andrew Yourtchenkobc378782023-09-26 16:01:21 +020053@unittest.skipIf("quic" in config.excluded_plugins, "Exclude QUIC plugin tests")
Dave Wallace8800f732023-08-31 00:47:44 -040054class QUICTestCase(VppAsfTestCase):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020055 """QUIC Test Case"""
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -050056
57 timeout = 20
58 pre_test_sleep = 0.3
Dave Wallace3ce03522020-01-27 18:21:15 -050059 post_test_sleep = 0.3
Dave Wallace8430c402023-01-26 12:44:01 -050060 server_appns = "server"
61 server_appns_secret = None
62 client_appns = "client"
63 client_appns_secret = None
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -050064
Aloys Augustinbaf1c7c2019-09-02 16:29:19 +020065 @classmethod
66 def setUpClass(cls):
67 cls.extra_vpp_plugin_config.append("plugin quic_plugin.so { enable }")
68 super(QUICTestCase, cls).setUpClass()
Dave Wallaceb063ad02019-04-09 21:01:09 -040069
Dave Wallaceb063ad02019-04-09 21:01:09 -040070 def setUp(self):
Dave Wallace47e77302019-06-05 10:40:07 -040071 super(QUICTestCase, self).setUp()
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020072 self.vppDebug = "vpp_debug" in config.vpp_build_dir
Dave Wallace211b28a2019-05-08 20:46:33 -040073
Dave Wallaceb063ad02019-04-09 21:01:09 -040074 self.create_loopback_interfaces(2)
Dave Wallace8430c402023-01-26 12:44:01 -050075 self.uri = f"quic://{self.loop0.local_ip4}/1234"
Dave Wallaceb063ad02019-04-09 21:01:09 -040076 table_id = 1
Dave Wallaceb063ad02019-04-09 21:01:09 -040077 for i in self.lo_interfaces:
78 i.admin_up()
79
80 if table_id != 0:
81 tbl = VppIpTable(self, table_id)
82 tbl.add_vpp_config()
83
84 i.set_table_ip4(table_id)
85 i.config_ip4()
86 table_id += 1
87
88 # Configure namespaces
Nathan Skrzypczak51f1b262023-04-27 12:43:46 +020089 self.vapi.app_namespace_add_del_v4(
Dave Wallace8430c402023-01-26 12:44:01 -050090 namespace_id=self.server_appns,
91 secret=self.server_appns_secret,
92 sw_if_index=self.loop0.sw_if_index,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020093 )
Nathan Skrzypczak51f1b262023-04-27 12:43:46 +020094 self.vapi.app_namespace_add_del_v4(
Dave Wallace8430c402023-01-26 12:44:01 -050095 namespace_id=self.client_appns,
96 secret=self.client_appns_secret,
97 sw_if_index=self.loop1.sw_if_index,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020098 )
Dave Wallaceb063ad02019-04-09 21:01:09 -040099
Dave Wallace211b28a2019-05-08 20:46:33 -0400100 # Add inter-table routes
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200101 self.ip_t01 = VppIpRoute(
102 self,
103 self.loop1.local_ip4,
104 32,
105 [VppRoutePath("0.0.0.0", 0xFFFFFFFF, nh_table_id=2)],
106 table_id=1,
107 )
108 self.ip_t10 = VppIpRoute(
109 self,
110 self.loop0.local_ip4,
111 32,
112 [VppRoutePath("0.0.0.0", 0xFFFFFFFF, nh_table_id=1)],
113 table_id=2,
114 )
Dave Wallace211b28a2019-05-08 20:46:33 -0400115 self.ip_t01.add_vpp_config()
116 self.ip_t10.add_vpp_config()
117 self.logger.debug(self.vapi.cli("show ip fib"))
118
Dave Wallace47e77302019-06-05 10:40:07 -0400119 def tearDown(self):
Dave Wallace211b28a2019-05-08 20:46:33 -0400120 # Delete inter-table routes
121 self.ip_t01.remove_vpp_config()
122 self.ip_t10.remove_vpp_config()
123
Dave Wallaceb063ad02019-04-09 21:01:09 -0400124 for i in self.lo_interfaces:
125 i.unconfig_ip4()
126 i.set_table_ip4(0)
127 i.admin_down()
Dave Wallace47e77302019-06-05 10:40:07 -0400128 super(QUICTestCase, self).tearDown()
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400129
Dave Wallace211b28a2019-05-08 20:46:33 -0400130
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000131class QUICEchoIntTestCase(QUICTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400132 """QUIC Echo Internal Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200133
134 test_bytes = " test-bytes"
Klement Sekerad3e0d102023-01-26 12:35:35 +0100135 extra_vpp_config = ["session", "{", "enable", "poll-main", "}"]
Chore464e1dc2019-06-25 14:21:26 +0430136
Dave Wallace211b28a2019-05-08 20:46:33 -0400137 def setUp(self):
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000138 super(QUICEchoIntTestCase, self).setUp()
Dave Wallace8430c402023-01-26 12:44:01 -0500139 self.client_args = (
Filip Tehlarefe875e2023-09-04 14:17:52 +0200140 f"uri {self.uri} fifo-size 64k{self.test_bytes} appns {self.client_appns} "
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200141 )
Filip Tehlarefe875e2023-09-04 14:17:52 +0200142 self.server_args = f"uri {self.uri} fifo-size 64k appns {self.server_appns} "
Dave Wallace211b28a2019-05-08 20:46:33 -0400143
Dave Wallace3ce03522020-01-27 18:21:15 -0500144 def tearDown(self):
145 super(QUICEchoIntTestCase, self).tearDown()
146
Dave Wallace47e77302019-06-05 10:40:07 -0400147 def server(self, *args):
Dave Wallace8430c402023-01-26 12:44:01 -0500148 _args = self.server_args + " ".join(args)
149 error = self.vapi.cli(f"test echo server {_args}")
Dave Wallace47e77302019-06-05 10:40:07 -0400150 if error:
151 self.logger.critical(error)
152 self.assertNotIn("failed", error)
Dave Wallace211b28a2019-05-08 20:46:33 -0400153
Dave Wallace47e77302019-06-05 10:40:07 -0400154 def client(self, *args):
Dave Wallace8430c402023-01-26 12:44:01 -0500155 _args = self.client_args + " ".join(args)
156 error = self.vapi.cli(f"test echo client {_args}")
Dave Wallace47e77302019-06-05 10:40:07 -0400157 if error:
158 self.logger.critical(error)
159 self.assertNotIn("failed", error)
Dave Wallaceb063ad02019-04-09 21:01:09 -0400160
Chore464e1dc2019-06-25 14:21:26 +0430161
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +0000162@tag_fixme_vpp_workers
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000163class QUICEchoIntTransferTestCase(QUICEchoIntTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400164 """QUIC Echo Internal Transfer Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200165
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000166 def test_quic_int_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000167 """QUIC internal transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400168 self.server()
Filip Tehlarefe875e2023-09-04 14:17:52 +0200169 self.client("mbytes", "2")
Dave Wallaceb063ad02019-04-09 21:01:09 -0400170
Chore464e1dc2019-06-25 14:21:26 +0430171
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +0000172@tag_fixme_vpp_workers
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000173class QUICEchoIntSerialTestCase(QUICEchoIntTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400174 """QUIC Echo Internal Serial Transfer Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200175
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000176 def test_quic_serial_int_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000177 """QUIC serial internal transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400178 self.server()
Filip Tehlarefe875e2023-09-04 14:17:52 +0200179 self.client("mbytes", "2")
180 self.client("mbytes", "2")
181 self.client("mbytes", "2")
182 self.client("mbytes", "2")
183 self.client("mbytes", "2")
Dave Wallace0d144c72019-05-15 21:41:23 -0400184
Chore464e1dc2019-06-25 14:21:26 +0430185
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +0000186@tag_fixme_vpp_workers
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000187class QUICEchoIntMStreamTestCase(QUICEchoIntTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400188 """QUIC Echo Internal MultiStream Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200189
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000190 def test_quic_int_multistream_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000191 """QUIC internal multi-stream transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400192 self.server()
Filip Tehlarefe875e2023-09-04 14:17:52 +0200193 self.client("nclients", "10", "mbytes", "1")
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400194
195
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000196class QUICEchoExtTestCase(QUICTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400197 quic_setup = "default"
Dave Wallace3ad078d2019-10-21 22:45:23 +0000198 test_bytes = "test-bytes:assert"
Dave Wallace3ce03522020-01-27 18:21:15 -0500199 pre_test_sleep = 1
200 post_test_sleep = 1
Dave Wallace91af1852019-10-21 03:28:17 +0000201 app = "vpp_echo"
Dave Wallace3ce03522020-01-27 18:21:15 -0500202 evt_q_len = 16384
Klement Sekera8d815022021-03-15 16:58:10 +0100203 vpp_worker_count = 1
Dave Wallace3ce03522020-01-27 18:21:15 -0500204 server_fifo_size = "1M"
205 client_fifo_size = "4M"
Klement Sekerad3e0d102023-01-26 12:35:35 +0100206 extra_vpp_config = [
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200207 "session",
208 "{",
209 "enable",
210 "poll-main",
Dave Wallace8430c402023-01-26 12:44:01 -0500211 "use-app-socket-api",
Florin Corascf5c7742022-06-28 14:34:45 -0700212 "wrk-mqs-segment-size",
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200213 "64M",
214 "event-queue-length",
215 f"{evt_q_len}",
216 "preallocated-sessions",
217 "1024",
218 "v4-session-table-buckets",
219 "20000",
220 "v4-session-table-memory",
221 "64M",
222 "v4-halfopen-table-buckets",
223 "20000",
224 "v4-halfopen-table-memory",
225 "64M",
226 "local-endpoints-table-buckets",
227 "250000",
228 "local-endpoints-table-memory",
229 "512M",
230 "}",
231 ]
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400232
233 def setUp(self):
Dave Wallace8430c402023-01-26 12:44:01 -0500234 self.server_appns_secret = 1234
235 self.client_appns_secret = 5678
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000236 super(QUICEchoExtTestCase, self).setUp()
Chore464e1dc2019-06-25 14:21:26 +0430237 common_args = [
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200238 "uri",
239 self.uri,
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000240 "json",
Dave Wallace3ad078d2019-10-21 22:45:23 +0000241 self.test_bytes,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200242 "quic-setup",
243 self.quic_setup,
244 "nthreads",
245 "1",
246 "mq-size",
247 f"{self.evt_q_len}",
Dave Wallace8430c402023-01-26 12:44:01 -0500248 "use-app-socket-api",
Dave Wallace3ce03522020-01-27 18:21:15 -0500249 ]
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200250 self.server_echo_test_args = common_args + [
251 "server",
252 "appns",
Dave Wallace8430c402023-01-26 12:44:01 -0500253 f"{self.server_appns}",
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200254 "fifo-size",
255 f"{self.server_fifo_size}",
Dave Wallace8430c402023-01-26 12:44:01 -0500256 "socket-name",
257 f"{self.tempdir}/app_ns_sockets/{self.server_appns}",
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200258 ]
259 self.client_echo_test_args = common_args + [
260 "client",
261 "appns",
Dave Wallace8430c402023-01-26 12:44:01 -0500262 f"{self.client_appns}",
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200263 "fifo-size",
264 f"{self.client_fifo_size}",
Dave Wallace8430c402023-01-26 12:44:01 -0500265 "socket-name",
266 f"{self.tempdir}/app_ns_sockets/{self.client_appns}",
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200267 ]
Dave Wallacef9d784b2019-10-30 16:58:30 +0000268 error = self.vapi.cli("quic set fifo-size 2M")
Dave Wallace91af1852019-10-21 03:28:17 +0000269 if error:
270 self.logger.critical(error)
271 self.assertNotIn("failed", error)
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400272
Dave Wallace47e77302019-06-05 10:40:07 -0400273 def server(self, *args):
274 _args = self.server_echo_test_args + list(args)
Dave Wallace8430c402023-01-26 12:44:01 -0500275 self.worker_server = QUICAppWorker(
276 self.app, _args, self.logger, self.server_appns, self
277 )
Dave Wallace47e77302019-06-05 10:40:07 -0400278 self.worker_server.start()
279 self.sleep(self.pre_test_sleep)
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400280
Dave Wallace47e77302019-06-05 10:40:07 -0400281 def client(self, *args):
282 _args = self.client_echo_test_args + list(args)
Dave Wallace8430c402023-01-26 12:44:01 -0500283 self.worker_client = QUICAppWorker(
284 self.app, _args, self.logger, self.client_appns, self
285 )
Dave Wallace47e77302019-06-05 10:40:07 -0400286 self.worker_client.start()
Dave Wallace91af1852019-10-21 03:28:17 +0000287 timeout = None if self.debug_all else self.timeout
288 self.worker_client.join(timeout)
Dave Wallace3ce03522020-01-27 18:21:15 -0500289 if self.worker_client.is_alive():
290 error = f"Client failed to complete in {timeout} seconds!"
291 self.logger.critical(error)
292 return
Dave Wallace91af1852019-10-21 03:28:17 +0000293 self.worker_server.join(timeout)
Dave Wallace3ce03522020-01-27 18:21:15 -0500294 if self.worker_server.is_alive():
295 error = f"Server failed to complete in {timeout} seconds!"
296 self.logger.critical(error)
Dave Wallace47e77302019-06-05 10:40:07 -0400297 self.sleep(self.post_test_sleep)
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400298
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000299 def validate_ext_test_results(self):
Dave Wallace47e77302019-06-05 10:40:07 -0400300 server_result = self.worker_server.result
Florin Corase8a1dbf2023-09-06 19:09:30 -0700301 self.logger.debug(self.vapi.cli(f"show session verbose 2"))
Dave Wallace47e77302019-06-05 10:40:07 -0400302 client_result = self.worker_client.result
Dave Wallace8430c402023-01-26 12:44:01 -0500303 self.logger.info(f"Server worker result is `{server_result}'")
304 self.logger.info(f"Client worker result is `{client_result}'")
Dave Wallace47e77302019-06-05 10:40:07 -0400305 server_kill_error = False
306 if self.worker_server.result is None:
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200307 server_kill_error = self.worker_server.teardown(self.logger, self.timeout)
Dave Wallace47e77302019-06-05 10:40:07 -0400308 if self.worker_client.result is None:
309 self.worker_client.teardown(self.logger, self.timeout)
Dave Wallace8430c402023-01-26 12:44:01 -0500310 err_msg = f"Wrong server worker return code ({server_result})"
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000311 self.assertEqual(server_result, 0, err_msg)
Chore464e1dc2019-06-25 14:21:26 +0430312 self.assertIsNotNone(
Dave Wallace8430c402023-01-26 12:44:01 -0500313 client_result, f"Timeout! Client worker did not finish in {self.timeout}s"
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200314 )
Dave Wallace8430c402023-01-26 12:44:01 -0500315 err_msg = f"Wrong client worker return code ({client_result})"
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000316 self.assertEqual(client_result, 0, err_msg)
Dave Wallace47e77302019-06-05 10:40:07 -0400317 self.assertFalse(server_kill_error, "Server kill errored")
318
319
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000320class QUICEchoExtTransferTestCase(QUICEchoExtTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400321 """QUIC Echo External Transfer Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200322
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -0500323 timeout = 60
324
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000325 def test_quic_ext_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000326 """QUIC external transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400327 self.server()
328 self.client()
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000329 self.validate_ext_test_results()
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400330
Chore464e1dc2019-06-25 14:21:26 +0430331
Dave Wallace3ad078d2019-10-21 22:45:23 +0000332class QUICEchoExtTransferBigTestCase(QUICEchoExtTestCase):
333 """QUIC Echo External Transfer Big Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200334
335 server_fifo_size = "4M"
336 client_fifo_size = "4M"
337 test_bytes = ""
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -0500338 timeout = 60
Dave Wallace3ad078d2019-10-21 22:45:23 +0000339
Klement Sekerab23ffd72021-05-31 16:08:53 +0200340 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace3ad078d2019-10-21 22:45:23 +0000341 def test_quic_ext_transfer_big(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000342 """QUIC external transfer, big stream"""
Dave Wallace2edff142020-02-07 17:55:53 -0500343 self.server("TX=0", "RX=2G")
344 self.client("TX=2G", "RX=0")
Dave Wallace3ad078d2019-10-21 22:45:23 +0000345 self.validate_ext_test_results()
346
347
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000348class QUICEchoExtQcloseRxTestCase(QUICEchoExtTestCase):
349 """QUIC Echo External Transfer Qclose Rx Test Case"""
350
Klement Sekerab23ffd72021-05-31 16:08:53 +0200351 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500352 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000353 def test_quic_ext_qclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000354 """QUIC external transfer, rx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500355 self.server("TX=0", "RX=10M", "qclose=Y", "sclose=N")
356 self.client("TX=10M", "RX=0", "qclose=W", "sclose=W")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000357 self.validate_ext_test_results()
358
359
360class QUICEchoExtQcloseTxTestCase(QUICEchoExtTestCase):
361 """QUIC Echo External Transfer Qclose Tx Test Case"""
362
Klement Sekerab23ffd72021-05-31 16:08:53 +0200363 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500364 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000365 def test_quic_ext_qclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000366 """QUIC external transfer, tx close"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200367 self.server("TX=0", "RX=10M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500368 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000369 self.validate_ext_test_results()
370
371
372class QUICEchoExtEarlyQcloseRxTestCase(QUICEchoExtTestCase):
373 """QUIC Echo External Transfer Early Qclose Rx Test Case"""
374
Klement Sekerab23ffd72021-05-31 16:08:53 +0200375 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500376 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000377 def test_quic_ext_early_qclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000378 """QUIC external transfer, early rx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500379 self.server("TX=0", "RX=10M", "qclose=Y", "sclose=N")
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200380 self.client("TX=20M", "RX=0", "qclose=W", "sclose=W", "tx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000381 self.validate_ext_test_results()
382
383
384class QUICEchoExtEarlyQcloseTxTestCase(QUICEchoExtTestCase):
385 """QUIC Echo External Transfer Early Qclose Tx Test Case"""
386
Klement Sekerab23ffd72021-05-31 16:08:53 +0200387 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500388 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000389 def test_quic_ext_early_qclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000390 """QUIC external transfer, early tx close"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200391 self.server("TX=0", "RX=20M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500392 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000393 self.validate_ext_test_results()
394
395
396class QUICEchoExtScloseRxTestCase(QUICEchoExtTestCase):
397 """QUIC Echo External Transfer Sclose Rx Test Case"""
398
Klement Sekerab23ffd72021-05-31 16:08:53 +0200399 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500400 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000401 def test_quic_ext_sclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000402 """QUIC external transfer, rx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500403 self.server("TX=0", "RX=10M", "qclose=N", "sclose=Y")
404 self.client("TX=10M", "RX=0", "qclose=W", "sclose=W")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000405 self.validate_ext_test_results()
406
407
408class QUICEchoExtScloseTxTestCase(QUICEchoExtTestCase):
409 """QUIC Echo External Transfer Sclose Tx Test Case"""
410
Klement Sekerab23ffd72021-05-31 16:08:53 +0200411 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500412 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000413 def test_quic_ext_sclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000414 """QUIC external transfer, tx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500415 self.server("TX=0", "RX=10M", "qclose=W", "sclose=W")
416 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000417 self.validate_ext_test_results()
418
419
420class QUICEchoExtEarlyScloseRxTestCase(QUICEchoExtTestCase):
421 """QUIC Echo External Transfer Early Sclose Rx Test Case"""
422
Klement Sekerab23ffd72021-05-31 16:08:53 +0200423 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500424 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000425 def test_quic_ext_early_sclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000426 """QUIC external transfer, early rx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500427 self.server("TX=0", "RX=10M", "qclose=N", "sclose=Y")
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200428 self.client("TX=20M", "RX=0", "qclose=W", "sclose=W", "tx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000429 self.validate_ext_test_results()
430
431
432class QUICEchoExtEarlyScloseTxTestCase(QUICEchoExtTestCase):
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400433 """QUIC Echo External Transfer Early Sclose Tx Test Case"""
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000434
Klement Sekerab23ffd72021-05-31 16:08:53 +0200435 @unittest.skipUnless(config.extended, "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_early_sclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000438 """QUIC external transfer, early tx stream close"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200439 self.server("TX=0", "RX=20M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500440 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000441 self.validate_ext_test_results()
442
443
444class QUICEchoExtServerStreamTestCase(QUICEchoExtTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400445 """QUIC Echo External Transfer Server Stream Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200446
Dave Wallace47e77302019-06-05 10:40:07 -0400447 quic_setup = "serverstream"
Dave Wallace3ce03522020-01-27 18:21:15 -0500448 timeout = 60
Dave Wallace47e77302019-06-05 10:40:07 -0400449
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000450 def test_quic_ext_transfer_server_stream(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000451 """QUIC external server transfer"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500452 self.server("TX=10M", "RX=0")
453 self.client("TX=0", "RX=10M")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000454 self.validate_ext_test_results()
Dave Wallace47e77302019-06-05 10:40:07 -0400455
Chore464e1dc2019-06-25 14:21:26 +0430456
Dave Wallace3ce03522020-01-27 18:21:15 -0500457class QUICEchoExtServerStreamBigTestCase(QUICEchoExtTestCase):
458 """QUIC Echo External Transfer Server Stream Big Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200459
Dave Wallace3ad078d2019-10-21 22:45:23 +0000460 quic_setup = "serverstream"
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200461 server_fifo_size = "4M"
462 client_fifo_size = "4M"
463 test_bytes = ""
Dave Wallace3ce03522020-01-27 18:21:15 -0500464 timeout = 60
Dave Wallace3ad078d2019-10-21 22:45:23 +0000465
Klement Sekerab23ffd72021-05-31 16:08:53 +0200466 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace3ce03522020-01-27 18:21:15 -0500467 def test_quic_ext_transfer_server_stream_big(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000468 """QUIC external server transfer, big stream"""
Dave Wallace2edff142020-02-07 17:55:53 -0500469 self.server("TX=2G", "RX=0")
470 self.client("TX=0", "RX=2G")
Dave Wallace3ad078d2019-10-21 22:45:23 +0000471 self.validate_ext_test_results()
472
473
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000474class QUICEchoExtServerStreamQcloseRxTestCase(QUICEchoExtTestCase):
475 """QUIC Echo External Transfer Server Stream Qclose Rx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200476
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000477 quic_setup = "serverstream"
478
Klement Sekerab23ffd72021-05-31 16:08:53 +0200479 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500480 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000481 def test_quic_ext_server_stream_qclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000482 """QUIC external server transfer, rx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500483 self.server("TX=10M", "RX=0", "qclose=W", "sclose=W")
484 self.client("TX=0", "RX=10M", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000485 self.validate_ext_test_results()
486
487
488class QUICEchoExtServerStreamQcloseTxTestCase(QUICEchoExtTestCase):
489 """QUIC Echo External Transfer Server Stream Qclose Tx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200490
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000491 quic_setup = "serverstream"
492
Klement Sekerab23ffd72021-05-31 16:08:53 +0200493 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500494 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000495 def test_quic_ext_server_stream_qclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000496 """QUIC external server transfer, tx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500497 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=N")
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200498 self.client("TX=0", "RX=10M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000499 self.validate_ext_test_results()
500
501
502class QUICEchoExtServerStreamEarlyQcloseRxTestCase(QUICEchoExtTestCase):
503 """QUIC Echo External Transfer Server Stream Early Qclose Rx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200504
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000505 quic_setup = "serverstream"
506
Klement Sekerab23ffd72021-05-31 16:08:53 +0200507 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500508 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000509 def test_quic_ext_server_stream_early_qclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000510 """QUIC external server transfer, early rx close"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200511 self.server("TX=20M", "RX=0", "qclose=W", "sclose=W", "tx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500512 self.client("TX=0", "RX=10M", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000513 self.validate_ext_test_results()
514
515
516class QUICEchoExtServerStreamEarlyQcloseTxTestCase(QUICEchoExtTestCase):
517 """QUIC Echo External Transfer Server Stream Early Qclose Tx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200518
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000519 quic_setup = "serverstream"
520
Klement Sekerab23ffd72021-05-31 16:08:53 +0200521 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500522 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000523 def test_quic_ext_server_stream_early_qclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000524 """QUIC external server transfer, early tx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500525 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=N")
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200526 self.client("TX=0", "RX=20M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000527 self.validate_ext_test_results()
528
529
530class QUICEchoExtServerStreamScloseRxTestCase(QUICEchoExtTestCase):
531 """QUIC Echo External Transfer Server Stream Sclose Rx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200532
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000533 quic_setup = "serverstream"
534
Klement Sekerab23ffd72021-05-31 16:08:53 +0200535 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500536 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000537 def test_quic_ext_server_stream_sclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000538 """QUIC external server transfer, rx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500539 self.server("TX=10M", "RX=0", "qclose=W", "sclose=W")
540 self.client("TX=0", "RX=10M", "qclose=N", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000541 self.validate_ext_test_results()
542
543
544class QUICEchoExtServerStreamScloseTxTestCase(QUICEchoExtTestCase):
545 """QUIC Echo External Transfer Server Stream Sclose Tx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200546
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000547 quic_setup = "serverstream"
548
Klement Sekerab23ffd72021-05-31 16:08:53 +0200549 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500550 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000551 def test_quic_ext_server_stream_sclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000552 """QUIC external server transfer, tx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500553 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
554 self.client("TX=0", "RX=10M", "qclose=W", "sclose=W")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000555 self.validate_ext_test_results()
556
557
558class QUICEchoExtServerStreamEarlyScloseRxTestCase(QUICEchoExtTestCase):
559 """QUIC Echo External Transfer Server Stream Early Sclose Rx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200560
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000561 quic_setup = "serverstream"
562
Klement Sekerab23ffd72021-05-31 16:08:53 +0200563 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500564 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000565 def test_quic_ext_server_stream_early_sclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000566 """QUIC external server transfer, early rx stream close"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200567 self.server("TX=20M", "RX=0", "qclose=W", "sclose=W", "tx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500568 self.client("TX=0", "RX=10M", "qclose=N", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000569 self.validate_ext_test_results()
570
571
572class QUICEchoExtServerStreamEarlyScloseTxTestCase(QUICEchoExtTestCase):
573 """QUIC Echo Ext Transfer Server Stream Early Sclose Tx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200574
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000575 quic_setup = "serverstream"
576
Klement Sekerab23ffd72021-05-31 16:08:53 +0200577 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500578 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000579 def test_quic_ext_server_stream_early_sclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000580 """QUIC external server transfer, early tx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500581 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200582 self.client("TX=0", "RX=20M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000583 self.validate_ext_test_results()
584
585
586class QUICEchoExtServerStreamWorkersTestCase(QUICEchoExtTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400587 """QUIC Echo External Transfer Server Stream MultiWorker Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200588
Dave Wallace47e77302019-06-05 10:40:07 -0400589 quic_setup = "serverstream"
590
Klement Sekerab23ffd72021-05-31 16:08:53 +0200591 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500592 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000593 def test_quic_ext_transfer_server_stream_multi_workers(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000594 """QUIC external server transfer, multi-worker"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500595 self.server("nclients", "4", "quic-streams", "4", "TX=10M", "RX=0")
596 self.client("nclients", "4", "quic-streams", "4", "TX=0", "RX=10M")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000597 self.validate_ext_test_results()
Dave Wallace211b28a2019-05-08 20:46:33 -0400598
Dave Wallaceb063ad02019-04-09 21:01:09 -0400599
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200600if __name__ == "__main__":
Dave Wallaceb063ad02019-04-09 21:01:09 -0400601 unittest.main(testRunner=VppTestRunner)