blob: e7224bcbf612655a7bdedb551d5c681997b4b138 [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 Wallacee95b2462022-09-18 22:28:44 -04009from framework import tag_fixme_vpp_workers, tag_fixme_ubuntu2204
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:
46 logger.debug("Killing worker process (pid %d)" % self.process.pid)
47 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 Wallacee95b2462022-09-18 22:28:44 -040055@tag_fixme_ubuntu2204
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
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -050062
Aloys Augustinbaf1c7c2019-09-02 16:29:19 +020063 @classmethod
64 def setUpClass(cls):
65 cls.extra_vpp_plugin_config.append("plugin quic_plugin.so { enable }")
66 super(QUICTestCase, cls).setUpClass()
Dave Wallaceb063ad02019-04-09 21:01:09 -040067
Dave Wallaceb063ad02019-04-09 21:01:09 -040068 def setUp(self):
Dave Wallace47e77302019-06-05 10:40:07 -040069 super(QUICTestCase, self).setUp()
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020070 self.vppDebug = "vpp_debug" in config.vpp_build_dir
Dave Wallace211b28a2019-05-08 20:46:33 -040071
Dave Wallaceb063ad02019-04-09 21:01:09 -040072 self.create_loopback_interfaces(2)
Dave Wallace211b28a2019-05-08 20:46:33 -040073 self.uri = "quic://%s/1234" % self.loop0.local_ip4
Dave Wallaceb063ad02019-04-09 21:01:09 -040074 table_id = 1
Dave Wallaceb063ad02019-04-09 21:01:09 -040075 for i in self.lo_interfaces:
76 i.admin_up()
77
78 if table_id != 0:
79 tbl = VppIpTable(self, table_id)
80 tbl.add_vpp_config()
81
82 i.set_table_ip4(table_id)
83 i.config_ip4()
84 table_id += 1
85
86 # Configure namespaces
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020087 self.vapi.app_namespace_add_del(
88 namespace_id="server", sw_if_index=self.loop0.sw_if_index
89 )
90 self.vapi.app_namespace_add_del(
91 namespace_id="client", sw_if_index=self.loop1.sw_if_index
92 )
Dave Wallaceb063ad02019-04-09 21:01:09 -040093
Dave Wallace211b28a2019-05-08 20:46:33 -040094 # Add inter-table routes
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020095 self.ip_t01 = VppIpRoute(
96 self,
97 self.loop1.local_ip4,
98 32,
99 [VppRoutePath("0.0.0.0", 0xFFFFFFFF, nh_table_id=2)],
100 table_id=1,
101 )
102 self.ip_t10 = VppIpRoute(
103 self,
104 self.loop0.local_ip4,
105 32,
106 [VppRoutePath("0.0.0.0", 0xFFFFFFFF, nh_table_id=1)],
107 table_id=2,
108 )
Dave Wallace211b28a2019-05-08 20:46:33 -0400109 self.ip_t01.add_vpp_config()
110 self.ip_t10.add_vpp_config()
111 self.logger.debug(self.vapi.cli("show ip fib"))
112
Dave Wallace47e77302019-06-05 10:40:07 -0400113 def tearDown(self):
Dave Wallace211b28a2019-05-08 20:46:33 -0400114 # Delete inter-table routes
115 self.ip_t01.remove_vpp_config()
116 self.ip_t10.remove_vpp_config()
117
Dave Wallaceb063ad02019-04-09 21:01:09 -0400118 for i in self.lo_interfaces:
119 i.unconfig_ip4()
120 i.set_table_ip4(0)
121 i.admin_down()
Dave Wallace47e77302019-06-05 10:40:07 -0400122 super(QUICTestCase, self).tearDown()
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400123
Dave Wallace211b28a2019-05-08 20:46:33 -0400124
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000125class QUICEchoIntTestCase(QUICTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400126 """QUIC Echo Internal Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200127
128 test_bytes = " test-bytes"
Florin Corase92c9462020-11-25 08:44:16 -0800129 extra_vpp_punt_config = ["session", "{", "enable", "poll-main", "}"]
Chore464e1dc2019-06-25 14:21:26 +0430130
Dave Wallace211b28a2019-05-08 20:46:33 -0400131 def setUp(self):
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000132 super(QUICEchoIntTestCase, self).setUp()
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200133 self.client_args = "uri {uri} fifo-size 64{testbytes} appns client".format(
134 uri=self.uri, testbytes=self.test_bytes
135 )
Dave Wallace47e77302019-06-05 10:40:07 -0400136 self.server_args = "uri %s fifo-size 64 appns server" % self.uri
Dave Wallace211b28a2019-05-08 20:46:33 -0400137
Dave Wallace3ce03522020-01-27 18:21:15 -0500138 def tearDown(self):
139 super(QUICEchoIntTestCase, self).tearDown()
140
Dave Wallace47e77302019-06-05 10:40:07 -0400141 def server(self, *args):
Chore464e1dc2019-06-25 14:21:26 +0430142 error = self.vapi.cli(
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200143 "test echo server %s %s" % (self.server_args, " ".join(args))
144 )
Dave Wallace47e77302019-06-05 10:40:07 -0400145 if error:
146 self.logger.critical(error)
147 self.assertNotIn("failed", error)
Dave Wallace211b28a2019-05-08 20:46:33 -0400148
Dave Wallace47e77302019-06-05 10:40:07 -0400149 def client(self, *args):
Chore464e1dc2019-06-25 14:21:26 +0430150 error = self.vapi.cli(
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200151 "test echo client %s %s" % (self.client_args, " ".join(args))
152 )
Dave Wallace47e77302019-06-05 10:40:07 -0400153 if error:
154 self.logger.critical(error)
155 self.assertNotIn("failed", error)
Dave Wallaceb063ad02019-04-09 21:01:09 -0400156
Chore464e1dc2019-06-25 14:21:26 +0430157
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +0000158@tag_fixme_vpp_workers
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000159class QUICEchoIntTransferTestCase(QUICEchoIntTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400160 """QUIC Echo Internal Transfer Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200161
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000162 def test_quic_int_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000163 """QUIC internal transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400164 self.server()
Aloys Augustin706079c2019-06-27 16:10:23 +0200165 self.client("no-output", "mbytes", "2")
Dave Wallaceb063ad02019-04-09 21:01:09 -0400166
Chore464e1dc2019-06-25 14:21:26 +0430167
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +0000168@tag_fixme_vpp_workers
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000169class QUICEchoIntSerialTestCase(QUICEchoIntTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400170 """QUIC Echo Internal Serial Transfer Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200171
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000172 def test_quic_serial_int_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000173 """QUIC serial internal transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400174 self.server()
Aloys Augustin706079c2019-06-27 16:10:23 +0200175 self.client("no-output", "mbytes", "2")
176 self.client("no-output", "mbytes", "2")
177 self.client("no-output", "mbytes", "2")
178 self.client("no-output", "mbytes", "2")
179 self.client("no-output", "mbytes", "2")
Dave Wallace0d144c72019-05-15 21:41:23 -0400180
Chore464e1dc2019-06-25 14:21:26 +0430181
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +0000182@tag_fixme_vpp_workers
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000183class QUICEchoIntMStreamTestCase(QUICEchoIntTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400184 """QUIC Echo Internal MultiStream Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200185
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000186 def test_quic_int_multistream_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000187 """QUIC internal multi-stream transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400188 self.server()
189 self.client("nclients", "10", "mbytes", "1", "no-output")
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400190
191
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000192class QUICEchoExtTestCase(QUICTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400193 quic_setup = "default"
Dave Wallace3ad078d2019-10-21 22:45:23 +0000194 test_bytes = "test-bytes:assert"
Dave Wallace3ce03522020-01-27 18:21:15 -0500195 pre_test_sleep = 1
196 post_test_sleep = 1
Dave Wallace91af1852019-10-21 03:28:17 +0000197 app = "vpp_echo"
Dave Wallace3ce03522020-01-27 18:21:15 -0500198 evt_q_len = 16384
Klement Sekera8d815022021-03-15 16:58:10 +0100199 vpp_worker_count = 1
Dave Wallace3ce03522020-01-27 18:21:15 -0500200 server_fifo_size = "1M"
201 client_fifo_size = "4M"
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200202 extra_vpp_punt_config = [
203 "session",
204 "{",
205 "enable",
206 "poll-main",
207 "evt_qs_memfd_seg",
Florin Corascf5c7742022-06-28 14:34:45 -0700208 "wrk-mqs-segment-size",
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200209 "64M",
210 "event-queue-length",
211 f"{evt_q_len}",
212 "preallocated-sessions",
213 "1024",
214 "v4-session-table-buckets",
215 "20000",
216 "v4-session-table-memory",
217 "64M",
218 "v4-halfopen-table-buckets",
219 "20000",
220 "v4-halfopen-table-memory",
221 "64M",
222 "local-endpoints-table-buckets",
223 "250000",
224 "local-endpoints-table-memory",
225 "512M",
226 "}",
227 ]
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400228
229 def setUp(self):
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000230 super(QUICEchoExtTestCase, self).setUp()
Chore464e1dc2019-06-25 14:21:26 +0430231 common_args = [
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200232 "uri",
233 self.uri,
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000234 "json",
Dave Wallace3ad078d2019-10-21 22:45:23 +0000235 self.test_bytes,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200236 "socket-name",
237 self.get_api_sock_path(),
238 "quic-setup",
239 self.quic_setup,
240 "nthreads",
241 "1",
242 "mq-size",
243 f"{self.evt_q_len}",
Dave Wallace3ce03522020-01-27 18:21:15 -0500244 ]
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200245 self.server_echo_test_args = common_args + [
246 "server",
247 "appns",
248 "server",
249 "fifo-size",
250 f"{self.server_fifo_size}",
251 ]
252 self.client_echo_test_args = common_args + [
253 "client",
254 "appns",
255 "client",
256 "fifo-size",
257 f"{self.client_fifo_size}",
258 ]
Dave Wallacef9d784b2019-10-30 16:58:30 +0000259 error = self.vapi.cli("quic set fifo-size 2M")
Dave Wallace91af1852019-10-21 03:28:17 +0000260 if error:
261 self.logger.critical(error)
262 self.assertNotIn("failed", error)
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400263
Dave Wallace47e77302019-06-05 10:40:07 -0400264 def server(self, *args):
265 _args = self.server_echo_test_args + list(args)
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200266 self.worker_server = QUICAppWorker(self.app, _args, self.logger, "server", self)
Dave Wallace47e77302019-06-05 10:40:07 -0400267 self.worker_server.start()
268 self.sleep(self.pre_test_sleep)
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400269
Dave Wallace47e77302019-06-05 10:40:07 -0400270 def client(self, *args):
271 _args = self.client_echo_test_args + list(args)
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200272 self.worker_client = QUICAppWorker(self.app, _args, self.logger, "client", self)
Dave Wallace47e77302019-06-05 10:40:07 -0400273 self.worker_client.start()
Dave Wallace91af1852019-10-21 03:28:17 +0000274 timeout = None if self.debug_all else self.timeout
275 self.worker_client.join(timeout)
Dave Wallace3ce03522020-01-27 18:21:15 -0500276 if self.worker_client.is_alive():
277 error = f"Client failed to complete in {timeout} seconds!"
278 self.logger.critical(error)
279 return
Dave Wallace91af1852019-10-21 03:28:17 +0000280 self.worker_server.join(timeout)
Dave Wallace3ce03522020-01-27 18:21:15 -0500281 if self.worker_server.is_alive():
282 error = f"Server failed to complete in {timeout} seconds!"
283 self.logger.critical(error)
Dave Wallace47e77302019-06-05 10:40:07 -0400284 self.sleep(self.post_test_sleep)
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400285
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000286 def validate_ext_test_results(self):
Dave Wallace47e77302019-06-05 10:40:07 -0400287 server_result = self.worker_server.result
288 client_result = self.worker_client.result
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200289 self.logger.info("Server worker result is `%s'" % server_result)
290 self.logger.info("Client worker result is `%s'" % client_result)
Dave Wallace47e77302019-06-05 10:40:07 -0400291 server_kill_error = False
292 if self.worker_server.result is None:
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200293 server_kill_error = self.worker_server.teardown(self.logger, self.timeout)
Dave Wallace47e77302019-06-05 10:40:07 -0400294 if self.worker_client.result is None:
295 self.worker_client.teardown(self.logger, self.timeout)
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000296 err_msg = "Wrong server worker return code (%s)" % server_result
297 self.assertEqual(server_result, 0, err_msg)
Chore464e1dc2019-06-25 14:21:26 +0430298 self.assertIsNotNone(
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200299 client_result, "Timeout! Client worker did not finish in %ss" % self.timeout
300 )
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000301 err_msg = "Wrong client worker return code (%s)" % client_result
302 self.assertEqual(client_result, 0, err_msg)
Dave Wallace47e77302019-06-05 10:40:07 -0400303 self.assertFalse(server_kill_error, "Server kill errored")
304
305
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000306class QUICEchoExtTransferTestCase(QUICEchoExtTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400307 """QUIC Echo External Transfer Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200308
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -0500309 timeout = 60
310
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000311 def test_quic_ext_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000312 """QUIC external transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400313 self.server()
314 self.client()
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000315 self.validate_ext_test_results()
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400316
Chore464e1dc2019-06-25 14:21:26 +0430317
Dave Wallace3ad078d2019-10-21 22:45:23 +0000318class QUICEchoExtTransferBigTestCase(QUICEchoExtTestCase):
319 """QUIC Echo External Transfer Big Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200320
321 server_fifo_size = "4M"
322 client_fifo_size = "4M"
323 test_bytes = ""
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -0500324 timeout = 60
Dave Wallace3ad078d2019-10-21 22:45:23 +0000325
Klement Sekerab23ffd72021-05-31 16:08:53 +0200326 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace3ad078d2019-10-21 22:45:23 +0000327 def test_quic_ext_transfer_big(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000328 """QUIC external transfer, big stream"""
Dave Wallace2edff142020-02-07 17:55:53 -0500329 self.server("TX=0", "RX=2G")
330 self.client("TX=2G", "RX=0")
Dave Wallace3ad078d2019-10-21 22:45:23 +0000331 self.validate_ext_test_results()
332
333
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000334class QUICEchoExtQcloseRxTestCase(QUICEchoExtTestCase):
335 """QUIC Echo External Transfer Qclose Rx Test Case"""
336
Klement Sekerab23ffd72021-05-31 16:08:53 +0200337 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500338 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000339 def test_quic_ext_qclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000340 """QUIC external transfer, rx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500341 self.server("TX=0", "RX=10M", "qclose=Y", "sclose=N")
342 self.client("TX=10M", "RX=0", "qclose=W", "sclose=W")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000343 self.validate_ext_test_results()
344
345
346class QUICEchoExtQcloseTxTestCase(QUICEchoExtTestCase):
347 """QUIC Echo External Transfer Qclose Tx Test Case"""
348
Klement Sekerab23ffd72021-05-31 16:08:53 +0200349 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500350 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000351 def test_quic_ext_qclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000352 """QUIC external transfer, tx close"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200353 self.server("TX=0", "RX=10M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500354 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000355 self.validate_ext_test_results()
356
357
358class QUICEchoExtEarlyQcloseRxTestCase(QUICEchoExtTestCase):
359 """QUIC Echo External Transfer Early Qclose Rx Test Case"""
360
Klement Sekerab23ffd72021-05-31 16:08:53 +0200361 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500362 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000363 def test_quic_ext_early_qclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000364 """QUIC external transfer, early rx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500365 self.server("TX=0", "RX=10M", "qclose=Y", "sclose=N")
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200366 self.client("TX=20M", "RX=0", "qclose=W", "sclose=W", "tx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000367 self.validate_ext_test_results()
368
369
370class QUICEchoExtEarlyQcloseTxTestCase(QUICEchoExtTestCase):
371 """QUIC Echo External Transfer Early Qclose Tx Test Case"""
372
Klement Sekerab23ffd72021-05-31 16:08:53 +0200373 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500374 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000375 def test_quic_ext_early_qclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000376 """QUIC external transfer, early tx close"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200377 self.server("TX=0", "RX=20M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500378 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000379 self.validate_ext_test_results()
380
381
382class QUICEchoExtScloseRxTestCase(QUICEchoExtTestCase):
383 """QUIC Echo External Transfer Sclose Rx Test Case"""
384
Klement Sekerab23ffd72021-05-31 16:08:53 +0200385 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500386 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000387 def test_quic_ext_sclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000388 """QUIC external transfer, rx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500389 self.server("TX=0", "RX=10M", "qclose=N", "sclose=Y")
390 self.client("TX=10M", "RX=0", "qclose=W", "sclose=W")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000391 self.validate_ext_test_results()
392
393
394class QUICEchoExtScloseTxTestCase(QUICEchoExtTestCase):
395 """QUIC Echo External Transfer Sclose Tx Test Case"""
396
Klement Sekerab23ffd72021-05-31 16:08:53 +0200397 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500398 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000399 def test_quic_ext_sclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000400 """QUIC external transfer, tx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500401 self.server("TX=0", "RX=10M", "qclose=W", "sclose=W")
402 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000403 self.validate_ext_test_results()
404
405
406class QUICEchoExtEarlyScloseRxTestCase(QUICEchoExtTestCase):
407 """QUIC Echo External Transfer Early Sclose Rx Test Case"""
408
Klement Sekerab23ffd72021-05-31 16:08:53 +0200409 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500410 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000411 def test_quic_ext_early_sclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000412 """QUIC external transfer, early rx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500413 self.server("TX=0", "RX=10M", "qclose=N", "sclose=Y")
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200414 self.client("TX=20M", "RX=0", "qclose=W", "sclose=W", "tx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000415 self.validate_ext_test_results()
416
417
418class QUICEchoExtEarlyScloseTxTestCase(QUICEchoExtTestCase):
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400419 """QUIC Echo External Transfer Early Sclose Tx Test Case"""
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000420
Klement Sekerab23ffd72021-05-31 16:08:53 +0200421 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500422 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000423 def test_quic_ext_early_sclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000424 """QUIC external transfer, early tx stream close"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200425 self.server("TX=0", "RX=20M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500426 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000427 self.validate_ext_test_results()
428
429
430class QUICEchoExtServerStreamTestCase(QUICEchoExtTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400431 """QUIC Echo External Transfer Server Stream Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200432
Dave Wallace47e77302019-06-05 10:40:07 -0400433 quic_setup = "serverstream"
Dave Wallace3ce03522020-01-27 18:21:15 -0500434 timeout = 60
Dave Wallace47e77302019-06-05 10:40:07 -0400435
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000436 def test_quic_ext_transfer_server_stream(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000437 """QUIC external server transfer"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500438 self.server("TX=10M", "RX=0")
439 self.client("TX=0", "RX=10M")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000440 self.validate_ext_test_results()
Dave Wallace47e77302019-06-05 10:40:07 -0400441
Chore464e1dc2019-06-25 14:21:26 +0430442
Dave Wallace3ce03522020-01-27 18:21:15 -0500443class QUICEchoExtServerStreamBigTestCase(QUICEchoExtTestCase):
444 """QUIC Echo External Transfer Server Stream Big Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200445
Dave Wallace3ad078d2019-10-21 22:45:23 +0000446 quic_setup = "serverstream"
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200447 server_fifo_size = "4M"
448 client_fifo_size = "4M"
449 test_bytes = ""
Dave Wallace3ce03522020-01-27 18:21:15 -0500450 timeout = 60
Dave Wallace3ad078d2019-10-21 22:45:23 +0000451
Klement Sekerab23ffd72021-05-31 16:08:53 +0200452 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace3ce03522020-01-27 18:21:15 -0500453 def test_quic_ext_transfer_server_stream_big(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000454 """QUIC external server transfer, big stream"""
Dave Wallace2edff142020-02-07 17:55:53 -0500455 self.server("TX=2G", "RX=0")
456 self.client("TX=0", "RX=2G")
Dave Wallace3ad078d2019-10-21 22:45:23 +0000457 self.validate_ext_test_results()
458
459
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000460class QUICEchoExtServerStreamQcloseRxTestCase(QUICEchoExtTestCase):
461 """QUIC Echo External Transfer Server Stream Qclose Rx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200462
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000463 quic_setup = "serverstream"
464
Klement Sekerab23ffd72021-05-31 16:08:53 +0200465 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500466 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000467 def test_quic_ext_server_stream_qclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000468 """QUIC external server transfer, rx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500469 self.server("TX=10M", "RX=0", "qclose=W", "sclose=W")
470 self.client("TX=0", "RX=10M", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000471 self.validate_ext_test_results()
472
473
474class QUICEchoExtServerStreamQcloseTxTestCase(QUICEchoExtTestCase):
475 """QUIC Echo External Transfer Server Stream Qclose Tx 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_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000482 """QUIC external server transfer, tx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500483 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=N")
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200484 self.client("TX=0", "RX=10M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000485 self.validate_ext_test_results()
486
487
488class QUICEchoExtServerStreamEarlyQcloseRxTestCase(QUICEchoExtTestCase):
489 """QUIC Echo External Transfer Server Stream Early Qclose Rx 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_early_qclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000496 """QUIC external server transfer, early rx close"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200497 self.server("TX=20M", "RX=0", "qclose=W", "sclose=W", "tx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500498 self.client("TX=0", "RX=10M", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000499 self.validate_ext_test_results()
500
501
502class QUICEchoExtServerStreamEarlyQcloseTxTestCase(QUICEchoExtTestCase):
503 """QUIC Echo External Transfer Server Stream Early Qclose Tx 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_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000510 """QUIC external server transfer, early tx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500511 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=N")
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200512 self.client("TX=0", "RX=20M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000513 self.validate_ext_test_results()
514
515
516class QUICEchoExtServerStreamScloseRxTestCase(QUICEchoExtTestCase):
517 """QUIC Echo External Transfer Server Stream Sclose Rx 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_sclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000524 """QUIC external server transfer, rx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500525 self.server("TX=10M", "RX=0", "qclose=W", "sclose=W")
526 self.client("TX=0", "RX=10M", "qclose=N", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000527 self.validate_ext_test_results()
528
529
530class QUICEchoExtServerStreamScloseTxTestCase(QUICEchoExtTestCase):
531 """QUIC Echo External Transfer Server Stream Sclose Tx 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_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000538 """QUIC external server transfer, tx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500539 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
540 self.client("TX=0", "RX=10M", "qclose=W", "sclose=W")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000541 self.validate_ext_test_results()
542
543
544class QUICEchoExtServerStreamEarlyScloseRxTestCase(QUICEchoExtTestCase):
545 """QUIC Echo External Transfer Server Stream Early Sclose Rx 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_early_sclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000552 """QUIC external server transfer, early rx stream close"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200553 self.server("TX=20M", "RX=0", "qclose=W", "sclose=W", "tx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500554 self.client("TX=0", "RX=10M", "qclose=N", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000555 self.validate_ext_test_results()
556
557
558class QUICEchoExtServerStreamEarlyScloseTxTestCase(QUICEchoExtTestCase):
559 """QUIC Echo Ext Transfer Server Stream Early Sclose Tx 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_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000566 """QUIC external server transfer, early tx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500567 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200568 self.client("TX=0", "RX=20M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000569 self.validate_ext_test_results()
570
571
572class QUICEchoExtServerStreamWorkersTestCase(QUICEchoExtTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400573 """QUIC Echo External Transfer Server Stream MultiWorker Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200574
Dave Wallace47e77302019-06-05 10:40:07 -0400575 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_transfer_server_stream_multi_workers(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000580 """QUIC external server transfer, multi-worker"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500581 self.server("nclients", "4", "quic-streams", "4", "TX=10M", "RX=0")
582 self.client("nclients", "4", "quic-streams", "4", "TX=0", "RX=10M")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000583 self.validate_ext_test_results()
Dave Wallace211b28a2019-05-08 20:46:33 -0400584
Dave Wallaceb063ad02019-04-09 21:01:09 -0400585
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200586if __name__ == "__main__":
Dave Wallaceb063ad02019-04-09 21:01:09 -0400587 unittest.main(testRunner=VppTestRunner)