blob: 8179b2f2366bd7a766642a2ed4865e62252d9acb [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
Dave Wallace211b28a2019-05-08 20:46:33 -040055class QUICTestCase(VppTestCase):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020056 """QUIC Test Case"""
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -050057
58 timeout = 20
59 pre_test_sleep = 0.3
Dave Wallace3ce03522020-01-27 18:21:15 -050060 post_test_sleep = 0.3
Dave Wallace8430c402023-01-26 12:44:01 -050061 server_appns = "server"
62 server_appns_secret = None
63 client_appns = "client"
64 client_appns_secret = None
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -050065
Aloys Augustinbaf1c7c2019-09-02 16:29:19 +020066 @classmethod
67 def setUpClass(cls):
68 cls.extra_vpp_plugin_config.append("plugin quic_plugin.so { enable }")
69 super(QUICTestCase, cls).setUpClass()
Dave Wallaceb063ad02019-04-09 21:01:09 -040070
Dave Wallaceb063ad02019-04-09 21:01:09 -040071 def setUp(self):
Dave Wallace47e77302019-06-05 10:40:07 -040072 super(QUICTestCase, self).setUp()
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020073 self.vppDebug = "vpp_debug" in config.vpp_build_dir
Dave Wallace211b28a2019-05-08 20:46:33 -040074
Dave Wallaceb063ad02019-04-09 21:01:09 -040075 self.create_loopback_interfaces(2)
Dave Wallace8430c402023-01-26 12:44:01 -050076 self.uri = f"quic://{self.loop0.local_ip4}/1234"
Dave Wallaceb063ad02019-04-09 21:01:09 -040077 table_id = 1
Dave Wallaceb063ad02019-04-09 21:01:09 -040078 for i in self.lo_interfaces:
79 i.admin_up()
80
81 if table_id != 0:
82 tbl = VppIpTable(self, table_id)
83 tbl.add_vpp_config()
84
85 i.set_table_ip4(table_id)
86 i.config_ip4()
87 table_id += 1
88
89 # Configure namespaces
Nathan Skrzypczak51f1b262023-04-27 12:43:46 +020090 self.vapi.app_namespace_add_del_v4(
Dave Wallace8430c402023-01-26 12:44:01 -050091 namespace_id=self.server_appns,
92 secret=self.server_appns_secret,
93 sw_if_index=self.loop0.sw_if_index,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020094 )
Nathan Skrzypczak51f1b262023-04-27 12:43:46 +020095 self.vapi.app_namespace_add_del_v4(
Dave Wallace8430c402023-01-26 12:44:01 -050096 namespace_id=self.client_appns,
97 secret=self.client_appns_secret,
98 sw_if_index=self.loop1.sw_if_index,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020099 )
Dave Wallaceb063ad02019-04-09 21:01:09 -0400100
Dave Wallace211b28a2019-05-08 20:46:33 -0400101 # Add inter-table routes
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200102 self.ip_t01 = VppIpRoute(
103 self,
104 self.loop1.local_ip4,
105 32,
106 [VppRoutePath("0.0.0.0", 0xFFFFFFFF, nh_table_id=2)],
107 table_id=1,
108 )
109 self.ip_t10 = VppIpRoute(
110 self,
111 self.loop0.local_ip4,
112 32,
113 [VppRoutePath("0.0.0.0", 0xFFFFFFFF, nh_table_id=1)],
114 table_id=2,
115 )
Dave Wallace211b28a2019-05-08 20:46:33 -0400116 self.ip_t01.add_vpp_config()
117 self.ip_t10.add_vpp_config()
118 self.logger.debug(self.vapi.cli("show ip fib"))
119
Dave Wallace47e77302019-06-05 10:40:07 -0400120 def tearDown(self):
Dave Wallace211b28a2019-05-08 20:46:33 -0400121 # Delete inter-table routes
122 self.ip_t01.remove_vpp_config()
123 self.ip_t10.remove_vpp_config()
124
Dave Wallaceb063ad02019-04-09 21:01:09 -0400125 for i in self.lo_interfaces:
126 i.unconfig_ip4()
127 i.set_table_ip4(0)
128 i.admin_down()
Dave Wallace47e77302019-06-05 10:40:07 -0400129 super(QUICTestCase, self).tearDown()
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400130
Dave Wallace211b28a2019-05-08 20:46:33 -0400131
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000132class QUICEchoIntTestCase(QUICTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400133 """QUIC Echo Internal Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200134
135 test_bytes = " test-bytes"
Klement Sekerad3e0d102023-01-26 12:35:35 +0100136 extra_vpp_config = ["session", "{", "enable", "poll-main", "}"]
Chore464e1dc2019-06-25 14:21:26 +0430137
Dave Wallace211b28a2019-05-08 20:46:33 -0400138 def setUp(self):
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000139 super(QUICEchoIntTestCase, self).setUp()
Dave Wallace8430c402023-01-26 12:44:01 -0500140 self.client_args = (
141 f"uri {self.uri} fifo-size 64{self.test_bytes} appns {self.client_appns} "
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200142 )
Dave Wallace8430c402023-01-26 12:44:01 -0500143 self.server_args = f"uri {self.uri} fifo-size 64 appns {self.server_appns} "
Dave Wallace211b28a2019-05-08 20:46:33 -0400144
Dave Wallace3ce03522020-01-27 18:21:15 -0500145 def tearDown(self):
146 super(QUICEchoIntTestCase, self).tearDown()
147
Dave Wallace47e77302019-06-05 10:40:07 -0400148 def server(self, *args):
Dave Wallace8430c402023-01-26 12:44:01 -0500149 _args = self.server_args + " ".join(args)
150 error = self.vapi.cli(f"test echo server {_args}")
Dave Wallace47e77302019-06-05 10:40:07 -0400151 if error:
152 self.logger.critical(error)
153 self.assertNotIn("failed", error)
Dave Wallace211b28a2019-05-08 20:46:33 -0400154
Dave Wallace47e77302019-06-05 10:40:07 -0400155 def client(self, *args):
Dave Wallace8430c402023-01-26 12:44:01 -0500156 _args = self.client_args + " ".join(args)
157 error = self.vapi.cli(f"test echo client {_args}")
Dave Wallace47e77302019-06-05 10:40:07 -0400158 if error:
159 self.logger.critical(error)
160 self.assertNotIn("failed", error)
Dave Wallaceb063ad02019-04-09 21:01:09 -0400161
Chore464e1dc2019-06-25 14:21:26 +0430162
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +0000163@tag_fixme_vpp_workers
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000164class QUICEchoIntTransferTestCase(QUICEchoIntTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400165 """QUIC Echo Internal Transfer Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200166
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000167 def test_quic_int_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000168 """QUIC internal transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400169 self.server()
Aloys Augustin706079c2019-06-27 16:10:23 +0200170 self.client("no-output", "mbytes", "2")
Dave Wallaceb063ad02019-04-09 21:01:09 -0400171
Chore464e1dc2019-06-25 14:21:26 +0430172
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +0000173@tag_fixme_vpp_workers
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000174class QUICEchoIntSerialTestCase(QUICEchoIntTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400175 """QUIC Echo Internal Serial Transfer Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200176
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000177 def test_quic_serial_int_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000178 """QUIC serial internal transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400179 self.server()
Aloys Augustin706079c2019-06-27 16:10:23 +0200180 self.client("no-output", "mbytes", "2")
181 self.client("no-output", "mbytes", "2")
182 self.client("no-output", "mbytes", "2")
183 self.client("no-output", "mbytes", "2")
184 self.client("no-output", "mbytes", "2")
Dave Wallace0d144c72019-05-15 21:41:23 -0400185
Chore464e1dc2019-06-25 14:21:26 +0430186
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +0000187@tag_fixme_vpp_workers
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000188class QUICEchoIntMStreamTestCase(QUICEchoIntTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400189 """QUIC Echo Internal MultiStream Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200190
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000191 def test_quic_int_multistream_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000192 """QUIC internal multi-stream transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400193 self.server()
194 self.client("nclients", "10", "mbytes", "1", "no-output")
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400195
196
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000197class QUICEchoExtTestCase(QUICTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400198 quic_setup = "default"
Dave Wallace3ad078d2019-10-21 22:45:23 +0000199 test_bytes = "test-bytes:assert"
Dave Wallace3ce03522020-01-27 18:21:15 -0500200 pre_test_sleep = 1
201 post_test_sleep = 1
Dave Wallace91af1852019-10-21 03:28:17 +0000202 app = "vpp_echo"
Dave Wallace3ce03522020-01-27 18:21:15 -0500203 evt_q_len = 16384
Klement Sekera8d815022021-03-15 16:58:10 +0100204 vpp_worker_count = 1
Dave Wallace3ce03522020-01-27 18:21:15 -0500205 server_fifo_size = "1M"
206 client_fifo_size = "4M"
Klement Sekerad3e0d102023-01-26 12:35:35 +0100207 extra_vpp_config = [
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200208 "session",
209 "{",
210 "enable",
211 "poll-main",
Dave Wallace8430c402023-01-26 12:44:01 -0500212 "use-app-socket-api",
Florin Corascf5c7742022-06-28 14:34:45 -0700213 "wrk-mqs-segment-size",
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200214 "64M",
215 "event-queue-length",
216 f"{evt_q_len}",
217 "preallocated-sessions",
218 "1024",
219 "v4-session-table-buckets",
220 "20000",
221 "v4-session-table-memory",
222 "64M",
223 "v4-halfopen-table-buckets",
224 "20000",
225 "v4-halfopen-table-memory",
226 "64M",
227 "local-endpoints-table-buckets",
228 "250000",
229 "local-endpoints-table-memory",
230 "512M",
231 "}",
232 ]
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400233
234 def setUp(self):
Dave Wallace8430c402023-01-26 12:44:01 -0500235 self.server_appns_secret = 1234
236 self.client_appns_secret = 5678
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000237 super(QUICEchoExtTestCase, self).setUp()
Chore464e1dc2019-06-25 14:21:26 +0430238 common_args = [
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200239 "uri",
240 self.uri,
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000241 "json",
Dave Wallace3ad078d2019-10-21 22:45:23 +0000242 self.test_bytes,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200243 "quic-setup",
244 self.quic_setup,
245 "nthreads",
246 "1",
247 "mq-size",
248 f"{self.evt_q_len}",
Dave Wallace8430c402023-01-26 12:44:01 -0500249 "use-app-socket-api",
Dave Wallace3ce03522020-01-27 18:21:15 -0500250 ]
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200251 self.server_echo_test_args = common_args + [
252 "server",
253 "appns",
Dave Wallace8430c402023-01-26 12:44:01 -0500254 f"{self.server_appns}",
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200255 "fifo-size",
256 f"{self.server_fifo_size}",
Dave Wallace8430c402023-01-26 12:44:01 -0500257 "socket-name",
258 f"{self.tempdir}/app_ns_sockets/{self.server_appns}",
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200259 ]
260 self.client_echo_test_args = common_args + [
261 "client",
262 "appns",
Dave Wallace8430c402023-01-26 12:44:01 -0500263 f"{self.client_appns}",
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200264 "fifo-size",
265 f"{self.client_fifo_size}",
Dave Wallace8430c402023-01-26 12:44:01 -0500266 "socket-name",
267 f"{self.tempdir}/app_ns_sockets/{self.client_appns}",
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200268 ]
Dave Wallacef9d784b2019-10-30 16:58:30 +0000269 error = self.vapi.cli("quic set fifo-size 2M")
Dave Wallace91af1852019-10-21 03:28:17 +0000270 if error:
271 self.logger.critical(error)
272 self.assertNotIn("failed", error)
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400273
Dave Wallace47e77302019-06-05 10:40:07 -0400274 def server(self, *args):
275 _args = self.server_echo_test_args + list(args)
Dave Wallace8430c402023-01-26 12:44:01 -0500276 self.worker_server = QUICAppWorker(
277 self.app, _args, self.logger, self.server_appns, self
278 )
Dave Wallace47e77302019-06-05 10:40:07 -0400279 self.worker_server.start()
280 self.sleep(self.pre_test_sleep)
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400281
Dave Wallace47e77302019-06-05 10:40:07 -0400282 def client(self, *args):
283 _args = self.client_echo_test_args + list(args)
Dave Wallace8430c402023-01-26 12:44:01 -0500284 self.worker_client = QUICAppWorker(
285 self.app, _args, self.logger, self.client_appns, self
286 )
Dave Wallace47e77302019-06-05 10:40:07 -0400287 self.worker_client.start()
Dave Wallace91af1852019-10-21 03:28:17 +0000288 timeout = None if self.debug_all else self.timeout
289 self.worker_client.join(timeout)
Dave Wallace3ce03522020-01-27 18:21:15 -0500290 if self.worker_client.is_alive():
291 error = f"Client failed to complete in {timeout} seconds!"
292 self.logger.critical(error)
293 return
Dave Wallace91af1852019-10-21 03:28:17 +0000294 self.worker_server.join(timeout)
Dave Wallace3ce03522020-01-27 18:21:15 -0500295 if self.worker_server.is_alive():
296 error = f"Server failed to complete in {timeout} seconds!"
297 self.logger.critical(error)
Dave Wallace47e77302019-06-05 10:40:07 -0400298 self.sleep(self.post_test_sleep)
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400299
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000300 def validate_ext_test_results(self):
Dave Wallace47e77302019-06-05 10:40:07 -0400301 server_result = self.worker_server.result
302 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)