blob: 2414186ab13b02044ac093228ccfc71b51cbcbe2 [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
Klement Sekerab23ffd72021-05-31 16:08:53 +02008from config import config
Dave Wallace24adeba2022-12-20 17:41:43 -05009from framework import tag_fixme_vpp_workers
Klement Sekerab23ffd72021-05-31 16:08:53 +020010from framework import VppTestCase, VppTestRunner, 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):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020015 """QUIC Test Application Worker"""
16
Dave Wallace47e77302019-06-05 10:40:07 -040017 process = None
Dave Wallace3bffd4b2019-05-13 15:51:52 -040018
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020019 def __init__(
20 self,
21 appname,
22 executable_args,
23 logger,
24 role,
25 testcase,
26 env=None,
27 *args,
28 **kwargs,
29 ):
Paul Vinciguerra48bdbcd2019-12-04 19:43:53 -050030 if env is None:
31 env = {}
Klement Sekerab23ffd72021-05-31 16:08:53 +020032 app = f"{config.vpp_build_dir}/vpp/bin/{appname}"
Paul Vinciguerra48bdbcd2019-12-04 19:43:53 -050033 self.args = [app] + executable_args
Dave Wallace91af1852019-10-21 03:28:17 +000034 self.role = role
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020035 self.wait_for_gdb = "wait-for-gdb"
Dave Wallace91af1852019-10-21 03:28:17 +000036 self.testcase = testcase
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020037 super(QUICAppWorker, self).__init__(self.args, logger, env, *args, **kwargs)
Dave Wallace3bffd4b2019-05-13 15:51:52 -040038
Dave Wallace47e77302019-06-05 10:40:07 -040039 def run(self):
40 super(QUICAppWorker, self).run()
Dave Wallace47e77302019-06-05 10:40:07 -040041
42 def teardown(self, logger, timeout):
43 if self.process is None:
Chore464e1dc2019-06-25 14:21:26 +043044 return False
Dave Wallace47e77302019-06-05 10:40:07 -040045 try:
Dave Wallace8430c402023-01-26 12:44:01 -050046 logger.debug(f"Killing worker process (pid {self.process.pid})")
Dave Wallace47e77302019-06-05 10:40:07 -040047 os.killpg(os.getpgid(self.process.pid), signal.SIGKILL)
48 self.join(timeout)
49 except OSError as e:
50 logger.debug("Couldn't kill worker process")
51 return True
52 return False
53
Dave Wallace3bffd4b2019-05-13 15:51:52 -040054
Andrew Yourtchenkobc378782023-09-26 16:01:21 +020055@unittest.skipIf("quic" in config.excluded_plugins, "Exclude QUIC plugin tests")
Dave Wallace211b28a2019-05-08 20:46:33 -040056class QUICTestCase(VppTestCase):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020057 """QUIC Test Case"""
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -050058
59 timeout = 20
60 pre_test_sleep = 0.3
Dave Wallace3ce03522020-01-27 18:21:15 -050061 post_test_sleep = 0.3
Dave Wallace8430c402023-01-26 12:44:01 -050062 server_appns = "server"
63 server_appns_secret = None
64 client_appns = "client"
65 client_appns_secret = None
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -050066
Aloys Augustinbaf1c7c2019-09-02 16:29:19 +020067 @classmethod
68 def setUpClass(cls):
69 cls.extra_vpp_plugin_config.append("plugin quic_plugin.so { enable }")
70 super(QUICTestCase, cls).setUpClass()
Dave Wallaceb063ad02019-04-09 21:01:09 -040071
Dave Wallaceb063ad02019-04-09 21:01:09 -040072 def setUp(self):
Dave Wallace47e77302019-06-05 10:40:07 -040073 super(QUICTestCase, self).setUp()
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020074 self.vppDebug = "vpp_debug" in config.vpp_build_dir
Dave Wallace211b28a2019-05-08 20:46:33 -040075
Dave Wallaceb063ad02019-04-09 21:01:09 -040076 self.create_loopback_interfaces(2)
Dave Wallace8430c402023-01-26 12:44:01 -050077 self.uri = f"quic://{self.loop0.local_ip4}/1234"
Dave Wallaceb063ad02019-04-09 21:01:09 -040078 table_id = 1
Dave Wallaceb063ad02019-04-09 21:01:09 -040079 for i in self.lo_interfaces:
80 i.admin_up()
81
82 if table_id != 0:
83 tbl = VppIpTable(self, table_id)
84 tbl.add_vpp_config()
85
86 i.set_table_ip4(table_id)
87 i.config_ip4()
88 table_id += 1
89
90 # Configure namespaces
Nathan Skrzypczak51f1b262023-04-27 12:43:46 +020091 self.vapi.app_namespace_add_del_v4(
Dave Wallace8430c402023-01-26 12:44:01 -050092 namespace_id=self.server_appns,
93 secret=self.server_appns_secret,
94 sw_if_index=self.loop0.sw_if_index,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020095 )
Nathan Skrzypczak51f1b262023-04-27 12:43:46 +020096 self.vapi.app_namespace_add_del_v4(
Dave Wallace8430c402023-01-26 12:44:01 -050097 namespace_id=self.client_appns,
98 secret=self.client_appns_secret,
99 sw_if_index=self.loop1.sw_if_index,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200100 )
Dave Wallaceb063ad02019-04-09 21:01:09 -0400101
Dave Wallace211b28a2019-05-08 20:46:33 -0400102 # Add inter-table routes
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200103 self.ip_t01 = VppIpRoute(
104 self,
105 self.loop1.local_ip4,
106 32,
107 [VppRoutePath("0.0.0.0", 0xFFFFFFFF, nh_table_id=2)],
108 table_id=1,
109 )
110 self.ip_t10 = VppIpRoute(
111 self,
112 self.loop0.local_ip4,
113 32,
114 [VppRoutePath("0.0.0.0", 0xFFFFFFFF, nh_table_id=1)],
115 table_id=2,
116 )
Dave Wallace211b28a2019-05-08 20:46:33 -0400117 self.ip_t01.add_vpp_config()
118 self.ip_t10.add_vpp_config()
119 self.logger.debug(self.vapi.cli("show ip fib"))
120
Dave Wallace47e77302019-06-05 10:40:07 -0400121 def tearDown(self):
Dave Wallace211b28a2019-05-08 20:46:33 -0400122 # Delete inter-table routes
123 self.ip_t01.remove_vpp_config()
124 self.ip_t10.remove_vpp_config()
125
Dave Wallaceb063ad02019-04-09 21:01:09 -0400126 for i in self.lo_interfaces:
127 i.unconfig_ip4()
128 i.set_table_ip4(0)
129 i.admin_down()
Dave Wallace47e77302019-06-05 10:40:07 -0400130 super(QUICTestCase, self).tearDown()
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400131
Dave Wallace211b28a2019-05-08 20:46:33 -0400132
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000133class QUICEchoIntTestCase(QUICTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400134 """QUIC Echo Internal Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200135
136 test_bytes = " test-bytes"
Klement Sekerad3e0d102023-01-26 12:35:35 +0100137 extra_vpp_config = ["session", "{", "enable", "poll-main", "}"]
Chore464e1dc2019-06-25 14:21:26 +0430138
Dave Wallace211b28a2019-05-08 20:46:33 -0400139 def setUp(self):
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000140 super(QUICEchoIntTestCase, self).setUp()
Dave Wallace8430c402023-01-26 12:44:01 -0500141 self.client_args = (
Filip Tehlarefe875e2023-09-04 14:17:52 +0200142 f"uri {self.uri} fifo-size 64k{self.test_bytes} appns {self.client_appns} "
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200143 )
Filip Tehlarefe875e2023-09-04 14:17:52 +0200144 self.server_args = f"uri {self.uri} fifo-size 64k appns {self.server_appns} "
Dave Wallace211b28a2019-05-08 20:46:33 -0400145
Dave Wallace3ce03522020-01-27 18:21:15 -0500146 def tearDown(self):
147 super(QUICEchoIntTestCase, self).tearDown()
148
Dave Wallace47e77302019-06-05 10:40:07 -0400149 def server(self, *args):
Dave Wallace8430c402023-01-26 12:44:01 -0500150 _args = self.server_args + " ".join(args)
151 error = self.vapi.cli(f"test echo server {_args}")
Dave Wallace47e77302019-06-05 10:40:07 -0400152 if error:
153 self.logger.critical(error)
154 self.assertNotIn("failed", error)
Dave Wallace211b28a2019-05-08 20:46:33 -0400155
Dave Wallace47e77302019-06-05 10:40:07 -0400156 def client(self, *args):
Dave Wallace8430c402023-01-26 12:44:01 -0500157 _args = self.client_args + " ".join(args)
158 error = self.vapi.cli(f"test echo client {_args}")
Dave Wallace47e77302019-06-05 10:40:07 -0400159 if error:
160 self.logger.critical(error)
161 self.assertNotIn("failed", error)
Dave Wallaceb063ad02019-04-09 21:01:09 -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 QUICEchoIntTransferTestCase(QUICEchoIntTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400166 """QUIC Echo Internal Transfer Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200167
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000168 def test_quic_int_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000169 """QUIC internal transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400170 self.server()
Filip Tehlarefe875e2023-09-04 14:17:52 +0200171 self.client("mbytes", "2")
Dave Wallaceb063ad02019-04-09 21:01:09 -0400172
Chore464e1dc2019-06-25 14:21:26 +0430173
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +0000174@tag_fixme_vpp_workers
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000175class QUICEchoIntSerialTestCase(QUICEchoIntTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400176 """QUIC Echo Internal Serial Transfer Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200177
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000178 def test_quic_serial_int_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000179 """QUIC serial internal transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400180 self.server()
Filip Tehlarefe875e2023-09-04 14:17:52 +0200181 self.client("mbytes", "2")
182 self.client("mbytes", "2")
183 self.client("mbytes", "2")
184 self.client("mbytes", "2")
185 self.client("mbytes", "2")
Dave Wallace0d144c72019-05-15 21:41:23 -0400186
Chore464e1dc2019-06-25 14:21:26 +0430187
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +0000188@tag_fixme_vpp_workers
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000189class QUICEchoIntMStreamTestCase(QUICEchoIntTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400190 """QUIC Echo Internal MultiStream Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200191
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000192 def test_quic_int_multistream_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000193 """QUIC internal multi-stream transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400194 self.server()
Filip Tehlarefe875e2023-09-04 14:17:52 +0200195 self.client("nclients", "10", "mbytes", "1")
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400196
197
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000198class QUICEchoExtTestCase(QUICTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400199 quic_setup = "default"
Dave Wallace3ad078d2019-10-21 22:45:23 +0000200 test_bytes = "test-bytes:assert"
Dave Wallace3ce03522020-01-27 18:21:15 -0500201 pre_test_sleep = 1
202 post_test_sleep = 1
Dave Wallace91af1852019-10-21 03:28:17 +0000203 app = "vpp_echo"
Dave Wallace3ce03522020-01-27 18:21:15 -0500204 evt_q_len = 16384
Klement Sekera8d815022021-03-15 16:58:10 +0100205 vpp_worker_count = 1
Dave Wallace3ce03522020-01-27 18:21:15 -0500206 server_fifo_size = "1M"
207 client_fifo_size = "4M"
Klement Sekerad3e0d102023-01-26 12:35:35 +0100208 extra_vpp_config = [
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200209 "session",
210 "{",
211 "enable",
212 "poll-main",
Dave Wallace8430c402023-01-26 12:44:01 -0500213 "use-app-socket-api",
Florin Corascf5c7742022-06-28 14:34:45 -0700214 "wrk-mqs-segment-size",
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200215 "64M",
216 "event-queue-length",
217 f"{evt_q_len}",
218 "preallocated-sessions",
219 "1024",
220 "v4-session-table-buckets",
221 "20000",
222 "v4-session-table-memory",
223 "64M",
224 "v4-halfopen-table-buckets",
225 "20000",
226 "v4-halfopen-table-memory",
227 "64M",
228 "local-endpoints-table-buckets",
229 "250000",
230 "local-endpoints-table-memory",
231 "512M",
232 "}",
233 ]
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400234
235 def setUp(self):
Dave Wallace8430c402023-01-26 12:44:01 -0500236 self.server_appns_secret = 1234
237 self.client_appns_secret = 5678
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000238 super(QUICEchoExtTestCase, self).setUp()
Chore464e1dc2019-06-25 14:21:26 +0430239 common_args = [
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200240 "uri",
241 self.uri,
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000242 "json",
Dave Wallace3ad078d2019-10-21 22:45:23 +0000243 self.test_bytes,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200244 "quic-setup",
245 self.quic_setup,
246 "nthreads",
247 "1",
248 "mq-size",
249 f"{self.evt_q_len}",
Dave Wallace8430c402023-01-26 12:44:01 -0500250 "use-app-socket-api",
Dave Wallace3ce03522020-01-27 18:21:15 -0500251 ]
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200252 self.server_echo_test_args = common_args + [
253 "server",
254 "appns",
Dave Wallace8430c402023-01-26 12:44:01 -0500255 f"{self.server_appns}",
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200256 "fifo-size",
257 f"{self.server_fifo_size}",
Dave Wallace8430c402023-01-26 12:44:01 -0500258 "socket-name",
259 f"{self.tempdir}/app_ns_sockets/{self.server_appns}",
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200260 ]
261 self.client_echo_test_args = common_args + [
262 "client",
263 "appns",
Dave Wallace8430c402023-01-26 12:44:01 -0500264 f"{self.client_appns}",
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200265 "fifo-size",
266 f"{self.client_fifo_size}",
Dave Wallace8430c402023-01-26 12:44:01 -0500267 "socket-name",
268 f"{self.tempdir}/app_ns_sockets/{self.client_appns}",
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200269 ]
Dave Wallacef9d784b2019-10-30 16:58:30 +0000270 error = self.vapi.cli("quic set fifo-size 2M")
Dave Wallace91af1852019-10-21 03:28:17 +0000271 if error:
272 self.logger.critical(error)
273 self.assertNotIn("failed", error)
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400274
Dave Wallace47e77302019-06-05 10:40:07 -0400275 def server(self, *args):
276 _args = self.server_echo_test_args + list(args)
Dave Wallace8430c402023-01-26 12:44:01 -0500277 self.worker_server = QUICAppWorker(
278 self.app, _args, self.logger, self.server_appns, self
279 )
Dave Wallace47e77302019-06-05 10:40:07 -0400280 self.worker_server.start()
281 self.sleep(self.pre_test_sleep)
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400282
Dave Wallace47e77302019-06-05 10:40:07 -0400283 def client(self, *args):
284 _args = self.client_echo_test_args + list(args)
Dave Wallace8430c402023-01-26 12:44:01 -0500285 self.worker_client = QUICAppWorker(
286 self.app, _args, self.logger, self.client_appns, self
287 )
Dave Wallace47e77302019-06-05 10:40:07 -0400288 self.worker_client.start()
Dave Wallace91af1852019-10-21 03:28:17 +0000289 timeout = None if self.debug_all else self.timeout
290 self.worker_client.join(timeout)
Dave Wallace3ce03522020-01-27 18:21:15 -0500291 if self.worker_client.is_alive():
292 error = f"Client failed to complete in {timeout} seconds!"
293 self.logger.critical(error)
294 return
Dave Wallace91af1852019-10-21 03:28:17 +0000295 self.worker_server.join(timeout)
Dave Wallace3ce03522020-01-27 18:21:15 -0500296 if self.worker_server.is_alive():
297 error = f"Server failed to complete in {timeout} seconds!"
298 self.logger.critical(error)
Dave Wallace47e77302019-06-05 10:40:07 -0400299 self.sleep(self.post_test_sleep)
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400300
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000301 def validate_ext_test_results(self):
Dave Wallace47e77302019-06-05 10:40:07 -0400302 server_result = self.worker_server.result
Florin Corase8a1dbf2023-09-06 19:09:30 -0700303 self.logger.debug(self.vapi.cli(f"show session verbose 2"))
Dave Wallace47e77302019-06-05 10:40:07 -0400304 client_result = self.worker_client.result
Dave Wallace8430c402023-01-26 12:44:01 -0500305 self.logger.info(f"Server worker result is `{server_result}'")
306 self.logger.info(f"Client worker result is `{client_result}'")
Dave Wallace47e77302019-06-05 10:40:07 -0400307 server_kill_error = False
308 if self.worker_server.result is None:
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200309 server_kill_error = self.worker_server.teardown(self.logger, self.timeout)
Dave Wallace47e77302019-06-05 10:40:07 -0400310 if self.worker_client.result is None:
311 self.worker_client.teardown(self.logger, self.timeout)
Dave Wallace8430c402023-01-26 12:44:01 -0500312 err_msg = f"Wrong server worker return code ({server_result})"
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000313 self.assertEqual(server_result, 0, err_msg)
Chore464e1dc2019-06-25 14:21:26 +0430314 self.assertIsNotNone(
Dave Wallace8430c402023-01-26 12:44:01 -0500315 client_result, f"Timeout! Client worker did not finish in {self.timeout}s"
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200316 )
Dave Wallace8430c402023-01-26 12:44:01 -0500317 err_msg = f"Wrong client worker return code ({client_result})"
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000318 self.assertEqual(client_result, 0, err_msg)
Dave Wallace47e77302019-06-05 10:40:07 -0400319 self.assertFalse(server_kill_error, "Server kill errored")
320
321
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000322class QUICEchoExtTransferTestCase(QUICEchoExtTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400323 """QUIC Echo External Transfer Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200324
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -0500325 timeout = 60
326
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000327 def test_quic_ext_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000328 """QUIC external transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400329 self.server()
330 self.client()
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000331 self.validate_ext_test_results()
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400332
Chore464e1dc2019-06-25 14:21:26 +0430333
Dave Wallace3ad078d2019-10-21 22:45:23 +0000334class QUICEchoExtTransferBigTestCase(QUICEchoExtTestCase):
335 """QUIC Echo External Transfer Big Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200336
337 server_fifo_size = "4M"
338 client_fifo_size = "4M"
339 test_bytes = ""
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -0500340 timeout = 60
Dave Wallace3ad078d2019-10-21 22:45:23 +0000341
Klement Sekerab23ffd72021-05-31 16:08:53 +0200342 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace3ad078d2019-10-21 22:45:23 +0000343 def test_quic_ext_transfer_big(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000344 """QUIC external transfer, big stream"""
Dave Wallace2edff142020-02-07 17:55:53 -0500345 self.server("TX=0", "RX=2G")
346 self.client("TX=2G", "RX=0")
Dave Wallace3ad078d2019-10-21 22:45:23 +0000347 self.validate_ext_test_results()
348
349
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000350class QUICEchoExtQcloseRxTestCase(QUICEchoExtTestCase):
351 """QUIC Echo External Transfer Qclose Rx Test Case"""
352
Klement Sekerab23ffd72021-05-31 16:08:53 +0200353 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500354 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000355 def test_quic_ext_qclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000356 """QUIC external transfer, rx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500357 self.server("TX=0", "RX=10M", "qclose=Y", "sclose=N")
358 self.client("TX=10M", "RX=0", "qclose=W", "sclose=W")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000359 self.validate_ext_test_results()
360
361
362class QUICEchoExtQcloseTxTestCase(QUICEchoExtTestCase):
363 """QUIC Echo External Transfer Qclose Tx Test Case"""
364
Klement Sekerab23ffd72021-05-31 16:08:53 +0200365 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500366 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000367 def test_quic_ext_qclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000368 """QUIC external transfer, tx close"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200369 self.server("TX=0", "RX=10M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500370 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000371 self.validate_ext_test_results()
372
373
374class QUICEchoExtEarlyQcloseRxTestCase(QUICEchoExtTestCase):
375 """QUIC Echo External Transfer Early Qclose Rx Test Case"""
376
Klement Sekerab23ffd72021-05-31 16:08:53 +0200377 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500378 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000379 def test_quic_ext_early_qclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000380 """QUIC external transfer, early rx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500381 self.server("TX=0", "RX=10M", "qclose=Y", "sclose=N")
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200382 self.client("TX=20M", "RX=0", "qclose=W", "sclose=W", "tx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000383 self.validate_ext_test_results()
384
385
386class QUICEchoExtEarlyQcloseTxTestCase(QUICEchoExtTestCase):
387 """QUIC Echo External Transfer Early Qclose Tx Test Case"""
388
Klement Sekerab23ffd72021-05-31 16:08:53 +0200389 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500390 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000391 def test_quic_ext_early_qclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000392 """QUIC external transfer, early tx close"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200393 self.server("TX=0", "RX=20M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500394 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000395 self.validate_ext_test_results()
396
397
398class QUICEchoExtScloseRxTestCase(QUICEchoExtTestCase):
399 """QUIC Echo External Transfer Sclose Rx Test Case"""
400
Klement Sekerab23ffd72021-05-31 16:08:53 +0200401 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500402 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000403 def test_quic_ext_sclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000404 """QUIC external transfer, rx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500405 self.server("TX=0", "RX=10M", "qclose=N", "sclose=Y")
406 self.client("TX=10M", "RX=0", "qclose=W", "sclose=W")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000407 self.validate_ext_test_results()
408
409
410class QUICEchoExtScloseTxTestCase(QUICEchoExtTestCase):
411 """QUIC Echo External Transfer Sclose Tx Test Case"""
412
Klement Sekerab23ffd72021-05-31 16:08:53 +0200413 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500414 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000415 def test_quic_ext_sclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000416 """QUIC external transfer, tx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500417 self.server("TX=0", "RX=10M", "qclose=W", "sclose=W")
418 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000419 self.validate_ext_test_results()
420
421
422class QUICEchoExtEarlyScloseRxTestCase(QUICEchoExtTestCase):
423 """QUIC Echo External Transfer Early Sclose Rx Test Case"""
424
Klement Sekerab23ffd72021-05-31 16:08:53 +0200425 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500426 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000427 def test_quic_ext_early_sclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000428 """QUIC external transfer, early rx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500429 self.server("TX=0", "RX=10M", "qclose=N", "sclose=Y")
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200430 self.client("TX=20M", "RX=0", "qclose=W", "sclose=W", "tx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000431 self.validate_ext_test_results()
432
433
434class QUICEchoExtEarlyScloseTxTestCase(QUICEchoExtTestCase):
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400435 """QUIC Echo External Transfer Early Sclose Tx Test Case"""
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000436
Klement Sekerab23ffd72021-05-31 16:08:53 +0200437 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500438 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000439 def test_quic_ext_early_sclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000440 """QUIC external transfer, early tx stream close"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200441 self.server("TX=0", "RX=20M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500442 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000443 self.validate_ext_test_results()
444
445
446class QUICEchoExtServerStreamTestCase(QUICEchoExtTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400447 """QUIC Echo External Transfer Server Stream Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200448
Dave Wallace47e77302019-06-05 10:40:07 -0400449 quic_setup = "serverstream"
Dave Wallace3ce03522020-01-27 18:21:15 -0500450 timeout = 60
Dave Wallace47e77302019-06-05 10:40:07 -0400451
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000452 def test_quic_ext_transfer_server_stream(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000453 """QUIC external server transfer"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500454 self.server("TX=10M", "RX=0")
455 self.client("TX=0", "RX=10M")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000456 self.validate_ext_test_results()
Dave Wallace47e77302019-06-05 10:40:07 -0400457
Chore464e1dc2019-06-25 14:21:26 +0430458
Dave Wallace3ce03522020-01-27 18:21:15 -0500459class QUICEchoExtServerStreamBigTestCase(QUICEchoExtTestCase):
460 """QUIC Echo External Transfer Server Stream Big Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200461
Dave Wallace3ad078d2019-10-21 22:45:23 +0000462 quic_setup = "serverstream"
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200463 server_fifo_size = "4M"
464 client_fifo_size = "4M"
465 test_bytes = ""
Dave Wallace3ce03522020-01-27 18:21:15 -0500466 timeout = 60
Dave Wallace3ad078d2019-10-21 22:45:23 +0000467
Klement Sekerab23ffd72021-05-31 16:08:53 +0200468 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace3ce03522020-01-27 18:21:15 -0500469 def test_quic_ext_transfer_server_stream_big(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000470 """QUIC external server transfer, big stream"""
Dave Wallace2edff142020-02-07 17:55:53 -0500471 self.server("TX=2G", "RX=0")
472 self.client("TX=0", "RX=2G")
Dave Wallace3ad078d2019-10-21 22:45:23 +0000473 self.validate_ext_test_results()
474
475
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000476class QUICEchoExtServerStreamQcloseRxTestCase(QUICEchoExtTestCase):
477 """QUIC Echo External Transfer Server Stream Qclose Rx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200478
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000479 quic_setup = "serverstream"
480
Klement Sekerab23ffd72021-05-31 16:08:53 +0200481 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500482 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000483 def test_quic_ext_server_stream_qclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000484 """QUIC external server transfer, rx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500485 self.server("TX=10M", "RX=0", "qclose=W", "sclose=W")
486 self.client("TX=0", "RX=10M", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000487 self.validate_ext_test_results()
488
489
490class QUICEchoExtServerStreamQcloseTxTestCase(QUICEchoExtTestCase):
491 """QUIC Echo External Transfer Server Stream Qclose Tx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200492
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000493 quic_setup = "serverstream"
494
Klement Sekerab23ffd72021-05-31 16:08:53 +0200495 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500496 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000497 def test_quic_ext_server_stream_qclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000498 """QUIC external server transfer, tx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500499 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=N")
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200500 self.client("TX=0", "RX=10M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000501 self.validate_ext_test_results()
502
503
504class QUICEchoExtServerStreamEarlyQcloseRxTestCase(QUICEchoExtTestCase):
505 """QUIC Echo External Transfer Server Stream Early Qclose Rx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200506
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000507 quic_setup = "serverstream"
508
Klement Sekerab23ffd72021-05-31 16:08:53 +0200509 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500510 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000511 def test_quic_ext_server_stream_early_qclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000512 """QUIC external server transfer, early rx close"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200513 self.server("TX=20M", "RX=0", "qclose=W", "sclose=W", "tx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500514 self.client("TX=0", "RX=10M", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000515 self.validate_ext_test_results()
516
517
518class QUICEchoExtServerStreamEarlyQcloseTxTestCase(QUICEchoExtTestCase):
519 """QUIC Echo External Transfer Server Stream Early Qclose Tx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200520
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000521 quic_setup = "serverstream"
522
Klement Sekerab23ffd72021-05-31 16:08:53 +0200523 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500524 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000525 def test_quic_ext_server_stream_early_qclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000526 """QUIC external server transfer, early tx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500527 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=N")
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200528 self.client("TX=0", "RX=20M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000529 self.validate_ext_test_results()
530
531
532class QUICEchoExtServerStreamScloseRxTestCase(QUICEchoExtTestCase):
533 """QUIC Echo External Transfer Server Stream Sclose Rx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200534
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000535 quic_setup = "serverstream"
536
Klement Sekerab23ffd72021-05-31 16:08:53 +0200537 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500538 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000539 def test_quic_ext_server_stream_sclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000540 """QUIC external server transfer, rx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500541 self.server("TX=10M", "RX=0", "qclose=W", "sclose=W")
542 self.client("TX=0", "RX=10M", "qclose=N", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000543 self.validate_ext_test_results()
544
545
546class QUICEchoExtServerStreamScloseTxTestCase(QUICEchoExtTestCase):
547 """QUIC Echo External Transfer Server Stream Sclose Tx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200548
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000549 quic_setup = "serverstream"
550
Klement Sekerab23ffd72021-05-31 16:08:53 +0200551 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500552 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000553 def test_quic_ext_server_stream_sclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000554 """QUIC external server transfer, tx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500555 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
556 self.client("TX=0", "RX=10M", "qclose=W", "sclose=W")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000557 self.validate_ext_test_results()
558
559
560class QUICEchoExtServerStreamEarlyScloseRxTestCase(QUICEchoExtTestCase):
561 """QUIC Echo External Transfer Server Stream Early Sclose Rx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200562
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000563 quic_setup = "serverstream"
564
Klement Sekerab23ffd72021-05-31 16:08:53 +0200565 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500566 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000567 def test_quic_ext_server_stream_early_sclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000568 """QUIC external server transfer, early rx stream close"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200569 self.server("TX=20M", "RX=0", "qclose=W", "sclose=W", "tx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500570 self.client("TX=0", "RX=10M", "qclose=N", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000571 self.validate_ext_test_results()
572
573
574class QUICEchoExtServerStreamEarlyScloseTxTestCase(QUICEchoExtTestCase):
575 """QUIC Echo Ext Transfer Server Stream Early Sclose Tx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200576
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000577 quic_setup = "serverstream"
578
Klement Sekerab23ffd72021-05-31 16:08:53 +0200579 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500580 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000581 def test_quic_ext_server_stream_early_sclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000582 """QUIC external server transfer, early tx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500583 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200584 self.client("TX=0", "RX=20M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000585 self.validate_ext_test_results()
586
587
588class QUICEchoExtServerStreamWorkersTestCase(QUICEchoExtTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400589 """QUIC Echo External Transfer Server Stream MultiWorker Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200590
Dave Wallace47e77302019-06-05 10:40:07 -0400591 quic_setup = "serverstream"
592
Klement Sekerab23ffd72021-05-31 16:08:53 +0200593 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500594 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000595 def test_quic_ext_transfer_server_stream_multi_workers(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000596 """QUIC external server transfer, multi-worker"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500597 self.server("nclients", "4", "quic-streams", "4", "TX=10M", "RX=0")
598 self.client("nclients", "4", "quic-streams", "4", "TX=0", "RX=10M")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000599 self.validate_ext_test_results()
Dave Wallace211b28a2019-05-08 20:46:33 -0400600
Dave Wallaceb063ad02019-04-09 21:01:09 -0400601
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200602if __name__ == "__main__":
Dave Wallaceb063ad02019-04-09 21:01:09 -0400603 unittest.main(testRunner=VppTestRunner)