blob: c4fa69121146cce58528167900570d5b25de6ba2 [file] [log] [blame]
Renato Botelho do Coutoead1e532019-10-31 13:31:07 -05001#!/usr/bin/env python3
Dave Wallace3bffd4b2019-05-13 15:51:52 -04002""" Vpp QUIC tests """
Dave Wallaceb063ad02019-04-09 21:01:09 -04003
4import unittest
Dave Wallace211b28a2019-05-08 20:46:33 -04005import os
Dave Wallace3bffd4b2019-05-13 15:51:52 -04006import signal
Klement Sekerab23ffd72021-05-31 16:08:53 +02007from config import config
Dave Wallace8800f732023-08-31 00:47:44 -04008from asfframework import VppAsfTestCase, VppTestRunner, Worker, tag_fixme_vpp_workers
Dave Wallaceb063ad02019-04-09 21:01:09 -04009from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
10
11
Dave Wallace3bffd4b2019-05-13 15:51:52 -040012class QUICAppWorker(Worker):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020013 """QUIC Test Application Worker"""
14
Dave Wallace47e77302019-06-05 10:40:07 -040015 process = None
Dave Wallace3bffd4b2019-05-13 15:51:52 -040016
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020017 def __init__(
18 self,
19 appname,
20 executable_args,
21 logger,
22 role,
23 testcase,
24 env=None,
25 *args,
26 **kwargs,
27 ):
Paul Vinciguerra48bdbcd2019-12-04 19:43:53 -050028 if env is None:
29 env = {}
Klement Sekerab23ffd72021-05-31 16:08:53 +020030 app = f"{config.vpp_build_dir}/vpp/bin/{appname}"
Paul Vinciguerra48bdbcd2019-12-04 19:43:53 -050031 self.args = [app] + executable_args
Dave Wallace91af1852019-10-21 03:28:17 +000032 self.role = role
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020033 self.wait_for_gdb = "wait-for-gdb"
Dave Wallace91af1852019-10-21 03:28:17 +000034 self.testcase = testcase
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020035 super(QUICAppWorker, self).__init__(self.args, logger, env, *args, **kwargs)
Dave Wallace3bffd4b2019-05-13 15:51:52 -040036
Dave Wallace47e77302019-06-05 10:40:07 -040037 def run(self):
38 super(QUICAppWorker, self).run()
Dave Wallace47e77302019-06-05 10:40:07 -040039
40 def teardown(self, logger, timeout):
41 if self.process is None:
Chore464e1dc2019-06-25 14:21:26 +043042 return False
Dave Wallace47e77302019-06-05 10:40:07 -040043 try:
Dave Wallace8430c402023-01-26 12:44:01 -050044 logger.debug(f"Killing worker process (pid {self.process.pid})")
Dave Wallace47e77302019-06-05 10:40:07 -040045 os.killpg(os.getpgid(self.process.pid), signal.SIGKILL)
46 self.join(timeout)
47 except OSError as e:
48 logger.debug("Couldn't kill worker process")
49 return True
50 return False
51
Dave Wallace3bffd4b2019-05-13 15:51:52 -040052
Andrew Yourtchenkobc378782023-09-26 16:01:21 +020053@unittest.skipIf("quic" in config.excluded_plugins, "Exclude QUIC plugin tests")
Dave Wallace8800f732023-08-31 00:47:44 -040054class QUICTestCase(VppAsfTestCase):
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020055 """QUIC Test Case"""
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -050056
57 timeout = 20
58 pre_test_sleep = 0.3
Dave Wallace3ce03522020-01-27 18:21:15 -050059 post_test_sleep = 0.3
Dave Wallace8430c402023-01-26 12:44:01 -050060 server_appns = "server"
61 server_appns_secret = None
62 client_appns = "client"
63 client_appns_secret = None
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -050064
Aloys Augustinbaf1c7c2019-09-02 16:29:19 +020065 @classmethod
66 def setUpClass(cls):
67 cls.extra_vpp_plugin_config.append("plugin quic_plugin.so { enable }")
68 super(QUICTestCase, cls).setUpClass()
Dave Wallaceb063ad02019-04-09 21:01:09 -040069
Dave Wallaceb063ad02019-04-09 21:01:09 -040070 def setUp(self):
Dave Wallace47e77302019-06-05 10:40:07 -040071 super(QUICTestCase, self).setUp()
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020072 self.vppDebug = "vpp_debug" in config.vpp_build_dir
Dave Wallace211b28a2019-05-08 20:46:33 -040073
Dave Wallaceb063ad02019-04-09 21:01:09 -040074 self.create_loopback_interfaces(2)
Dave Wallace8430c402023-01-26 12:44:01 -050075 self.uri = f"quic://{self.loop0.local_ip4}/1234"
Dave Wallaceb063ad02019-04-09 21:01:09 -040076 table_id = 1
Dave Wallaceb063ad02019-04-09 21:01:09 -040077 for i in self.lo_interfaces:
78 i.admin_up()
79
80 if table_id != 0:
81 tbl = VppIpTable(self, table_id)
82 tbl.add_vpp_config()
83
84 i.set_table_ip4(table_id)
85 i.config_ip4()
86 table_id += 1
87
88 # Configure namespaces
Nathan Skrzypczak51f1b262023-04-27 12:43:46 +020089 self.vapi.app_namespace_add_del_v4(
Dave Wallace8430c402023-01-26 12:44:01 -050090 namespace_id=self.server_appns,
91 secret=self.server_appns_secret,
92 sw_if_index=self.loop0.sw_if_index,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020093 )
Nathan Skrzypczak51f1b262023-04-27 12:43:46 +020094 self.vapi.app_namespace_add_del_v4(
Dave Wallace8430c402023-01-26 12:44:01 -050095 namespace_id=self.client_appns,
96 secret=self.client_appns_secret,
97 sw_if_index=self.loop1.sw_if_index,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +020098 )
Dave Wallaceb063ad02019-04-09 21:01:09 -040099
Dave Wallace211b28a2019-05-08 20:46:33 -0400100 # Add inter-table routes
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200101 self.ip_t01 = VppIpRoute(
102 self,
103 self.loop1.local_ip4,
104 32,
105 [VppRoutePath("0.0.0.0", 0xFFFFFFFF, nh_table_id=2)],
106 table_id=1,
107 )
108 self.ip_t10 = VppIpRoute(
109 self,
110 self.loop0.local_ip4,
111 32,
112 [VppRoutePath("0.0.0.0", 0xFFFFFFFF, nh_table_id=1)],
113 table_id=2,
114 )
Dave Wallace211b28a2019-05-08 20:46:33 -0400115 self.ip_t01.add_vpp_config()
116 self.ip_t10.add_vpp_config()
117 self.logger.debug(self.vapi.cli("show ip fib"))
118
Dave Wallace47e77302019-06-05 10:40:07 -0400119 def tearDown(self):
Steven Luong67bae202024-07-08 11:21:23 -0700120 self.vapi.app_namespace_add_del_v4(
121 is_add=0,
122 namespace_id=self.server_appns,
123 secret=self.server_appns_secret,
124 sw_if_index=self.loop0.sw_if_index,
125 )
126 self.vapi.app_namespace_add_del_v4(
127 is_add=0,
128 namespace_id=self.client_appns,
129 secret=self.client_appns_secret,
130 sw_if_index=self.loop1.sw_if_index,
131 )
Dave Wallace211b28a2019-05-08 20:46:33 -0400132 # Delete inter-table routes
133 self.ip_t01.remove_vpp_config()
134 self.ip_t10.remove_vpp_config()
135
Dave Wallaceb063ad02019-04-09 21:01:09 -0400136 for i in self.lo_interfaces:
137 i.unconfig_ip4()
138 i.set_table_ip4(0)
139 i.admin_down()
Dave Wallace47e77302019-06-05 10:40:07 -0400140 super(QUICTestCase, self).tearDown()
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400141
Dave Wallace211b28a2019-05-08 20:46:33 -0400142
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000143class QUICEchoIntTestCase(QUICTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400144 """QUIC Echo Internal Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200145
146 test_bytes = " test-bytes"
Klement Sekerad3e0d102023-01-26 12:35:35 +0100147 extra_vpp_config = ["session", "{", "enable", "poll-main", "}"]
Chore464e1dc2019-06-25 14:21:26 +0430148
Dave Wallace211b28a2019-05-08 20:46:33 -0400149 def setUp(self):
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000150 super(QUICEchoIntTestCase, self).setUp()
Dave Wallace8430c402023-01-26 12:44:01 -0500151 self.client_args = (
Filip Tehlarefe875e2023-09-04 14:17:52 +0200152 f"uri {self.uri} fifo-size 64k{self.test_bytes} appns {self.client_appns} "
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200153 )
Filip Tehlarefe875e2023-09-04 14:17:52 +0200154 self.server_args = f"uri {self.uri} fifo-size 64k appns {self.server_appns} "
Dave Wallace211b28a2019-05-08 20:46:33 -0400155
Dave Wallace3ce03522020-01-27 18:21:15 -0500156 def tearDown(self):
157 super(QUICEchoIntTestCase, self).tearDown()
158
Dave Wallace47e77302019-06-05 10:40:07 -0400159 def server(self, *args):
Dave Wallace8430c402023-01-26 12:44:01 -0500160 _args = self.server_args + " ".join(args)
161 error = self.vapi.cli(f"test echo server {_args}")
Dave Wallace47e77302019-06-05 10:40:07 -0400162 if error:
163 self.logger.critical(error)
164 self.assertNotIn("failed", error)
Dave Wallace211b28a2019-05-08 20:46:33 -0400165
Dave Wallace47e77302019-06-05 10:40:07 -0400166 def client(self, *args):
Dave Wallace8430c402023-01-26 12:44:01 -0500167 _args = self.client_args + " ".join(args)
168 error = self.vapi.cli(f"test echo client {_args}")
Dave Wallace47e77302019-06-05 10:40:07 -0400169 if error:
170 self.logger.critical(error)
171 self.assertNotIn("failed", error)
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 QUICEchoIntTransferTestCase(QUICEchoIntTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400176 """QUIC Echo Internal Transfer Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200177
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000178 def test_quic_int_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000179 """QUIC internal transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400180 self.server()
Filip Tehlarefe875e2023-09-04 14:17:52 +0200181 self.client("mbytes", "2")
Dave Wallaceb063ad02019-04-09 21:01:09 -0400182
Chore464e1dc2019-06-25 14:21:26 +0430183
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +0000184@tag_fixme_vpp_workers
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000185class QUICEchoIntSerialTestCase(QUICEchoIntTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400186 """QUIC Echo Internal Serial Transfer Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200187
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000188 def test_quic_serial_int_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000189 """QUIC serial internal transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400190 self.server()
Filip Tehlarefe875e2023-09-04 14:17:52 +0200191 self.client("mbytes", "2")
192 self.client("mbytes", "2")
193 self.client("mbytes", "2")
194 self.client("mbytes", "2")
195 self.client("mbytes", "2")
Dave Wallace0d144c72019-05-15 21:41:23 -0400196
Chore464e1dc2019-06-25 14:21:26 +0430197
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +0000198@tag_fixme_vpp_workers
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000199class QUICEchoIntMStreamTestCase(QUICEchoIntTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400200 """QUIC Echo Internal MultiStream Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200201
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000202 def test_quic_int_multistream_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000203 """QUIC internal multi-stream transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400204 self.server()
Filip Tehlarefe875e2023-09-04 14:17:52 +0200205 self.client("nclients", "10", "mbytes", "1")
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400206
207
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000208class QUICEchoExtTestCase(QUICTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400209 quic_setup = "default"
Dave Wallace3ad078d2019-10-21 22:45:23 +0000210 test_bytes = "test-bytes:assert"
Dave Wallace3ce03522020-01-27 18:21:15 -0500211 pre_test_sleep = 1
212 post_test_sleep = 1
Dave Wallace91af1852019-10-21 03:28:17 +0000213 app = "vpp_echo"
Dave Wallace3ce03522020-01-27 18:21:15 -0500214 evt_q_len = 16384
Klement Sekera8d815022021-03-15 16:58:10 +0100215 vpp_worker_count = 1
Dave Wallace3ce03522020-01-27 18:21:15 -0500216 server_fifo_size = "1M"
217 client_fifo_size = "4M"
Klement Sekerad3e0d102023-01-26 12:35:35 +0100218 extra_vpp_config = [
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200219 "session",
220 "{",
221 "enable",
222 "poll-main",
Dave Wallace8430c402023-01-26 12:44:01 -0500223 "use-app-socket-api",
Florin Corascf5c7742022-06-28 14:34:45 -0700224 "wrk-mqs-segment-size",
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200225 "64M",
226 "event-queue-length",
227 f"{evt_q_len}",
228 "preallocated-sessions",
229 "1024",
230 "v4-session-table-buckets",
231 "20000",
232 "v4-session-table-memory",
233 "64M",
234 "v4-halfopen-table-buckets",
235 "20000",
236 "v4-halfopen-table-memory",
237 "64M",
238 "local-endpoints-table-buckets",
239 "250000",
240 "local-endpoints-table-memory",
241 "512M",
242 "}",
243 ]
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400244
245 def setUp(self):
Dave Wallace8430c402023-01-26 12:44:01 -0500246 self.server_appns_secret = 1234
247 self.client_appns_secret = 5678
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000248 super(QUICEchoExtTestCase, self).setUp()
Chore464e1dc2019-06-25 14:21:26 +0430249 common_args = [
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200250 "uri",
251 self.uri,
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000252 "json",
Dave Wallace3ad078d2019-10-21 22:45:23 +0000253 self.test_bytes,
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200254 "quic-setup",
255 self.quic_setup,
256 "nthreads",
257 "1",
258 "mq-size",
259 f"{self.evt_q_len}",
Dave Wallace8430c402023-01-26 12:44:01 -0500260 "use-app-socket-api",
Dave Wallace3ce03522020-01-27 18:21:15 -0500261 ]
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200262 self.server_echo_test_args = common_args + [
263 "server",
264 "appns",
Dave Wallace8430c402023-01-26 12:44:01 -0500265 f"{self.server_appns}",
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200266 "fifo-size",
267 f"{self.server_fifo_size}",
Dave Wallace8430c402023-01-26 12:44:01 -0500268 "socket-name",
269 f"{self.tempdir}/app_ns_sockets/{self.server_appns}",
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200270 ]
271 self.client_echo_test_args = common_args + [
272 "client",
273 "appns",
Dave Wallace8430c402023-01-26 12:44:01 -0500274 f"{self.client_appns}",
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200275 "fifo-size",
276 f"{self.client_fifo_size}",
Dave Wallace8430c402023-01-26 12:44:01 -0500277 "socket-name",
278 f"{self.tempdir}/app_ns_sockets/{self.client_appns}",
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200279 ]
Dave Wallacef9d784b2019-10-30 16:58:30 +0000280 error = self.vapi.cli("quic set fifo-size 2M")
Dave Wallace91af1852019-10-21 03:28:17 +0000281 if error:
282 self.logger.critical(error)
283 self.assertNotIn("failed", error)
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400284
Dave Wallace47e77302019-06-05 10:40:07 -0400285 def server(self, *args):
286 _args = self.server_echo_test_args + list(args)
Dave Wallace8430c402023-01-26 12:44:01 -0500287 self.worker_server = QUICAppWorker(
288 self.app, _args, self.logger, self.server_appns, self
289 )
Dave Wallace47e77302019-06-05 10:40:07 -0400290 self.worker_server.start()
291 self.sleep(self.pre_test_sleep)
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400292
Dave Wallace47e77302019-06-05 10:40:07 -0400293 def client(self, *args):
294 _args = self.client_echo_test_args + list(args)
Dave Wallace8430c402023-01-26 12:44:01 -0500295 self.worker_client = QUICAppWorker(
296 self.app, _args, self.logger, self.client_appns, self
297 )
Dave Wallace47e77302019-06-05 10:40:07 -0400298 self.worker_client.start()
Dave Wallace91af1852019-10-21 03:28:17 +0000299 timeout = None if self.debug_all else self.timeout
300 self.worker_client.join(timeout)
Dave Wallace3ce03522020-01-27 18:21:15 -0500301 if self.worker_client.is_alive():
302 error = f"Client failed to complete in {timeout} seconds!"
303 self.logger.critical(error)
304 return
Dave Wallace91af1852019-10-21 03:28:17 +0000305 self.worker_server.join(timeout)
Dave Wallace3ce03522020-01-27 18:21:15 -0500306 if self.worker_server.is_alive():
307 error = f"Server failed to complete in {timeout} seconds!"
308 self.logger.critical(error)
Dave Wallace47e77302019-06-05 10:40:07 -0400309 self.sleep(self.post_test_sleep)
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400310
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000311 def validate_ext_test_results(self):
Dave Wallace47e77302019-06-05 10:40:07 -0400312 server_result = self.worker_server.result
Florin Corase8a1dbf2023-09-06 19:09:30 -0700313 self.logger.debug(self.vapi.cli(f"show session verbose 2"))
Dave Wallace47e77302019-06-05 10:40:07 -0400314 client_result = self.worker_client.result
Dave Wallace8430c402023-01-26 12:44:01 -0500315 self.logger.info(f"Server worker result is `{server_result}'")
316 self.logger.info(f"Client worker result is `{client_result}'")
Dave Wallace47e77302019-06-05 10:40:07 -0400317 server_kill_error = False
318 if self.worker_server.result is None:
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200319 server_kill_error = self.worker_server.teardown(self.logger, self.timeout)
Dave Wallace47e77302019-06-05 10:40:07 -0400320 if self.worker_client.result is None:
321 self.worker_client.teardown(self.logger, self.timeout)
Dave Wallace8430c402023-01-26 12:44:01 -0500322 err_msg = f"Wrong server worker return code ({server_result})"
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000323 self.assertEqual(server_result, 0, err_msg)
Chore464e1dc2019-06-25 14:21:26 +0430324 self.assertIsNotNone(
Dave Wallace8430c402023-01-26 12:44:01 -0500325 client_result, f"Timeout! Client worker did not finish in {self.timeout}s"
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200326 )
Dave Wallace8430c402023-01-26 12:44:01 -0500327 err_msg = f"Wrong client worker return code ({client_result})"
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000328 self.assertEqual(client_result, 0, err_msg)
Dave Wallace47e77302019-06-05 10:40:07 -0400329 self.assertFalse(server_kill_error, "Server kill errored")
330
331
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000332class QUICEchoExtTransferTestCase(QUICEchoExtTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400333 """QUIC Echo External Transfer Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200334
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -0500335 timeout = 60
336
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000337 def test_quic_ext_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000338 """QUIC external transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400339 self.server()
340 self.client()
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000341 self.validate_ext_test_results()
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400342
Chore464e1dc2019-06-25 14:21:26 +0430343
Dave Wallace3ad078d2019-10-21 22:45:23 +0000344class QUICEchoExtTransferBigTestCase(QUICEchoExtTestCase):
345 """QUIC Echo External Transfer Big Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200346
347 server_fifo_size = "4M"
348 client_fifo_size = "4M"
349 test_bytes = ""
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -0500350 timeout = 60
Dave Wallace3ad078d2019-10-21 22:45:23 +0000351
Klement Sekerab23ffd72021-05-31 16:08:53 +0200352 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace3ad078d2019-10-21 22:45:23 +0000353 def test_quic_ext_transfer_big(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000354 """QUIC external transfer, big stream"""
Dave Wallace2edff142020-02-07 17:55:53 -0500355 self.server("TX=0", "RX=2G")
356 self.client("TX=2G", "RX=0")
Dave Wallace3ad078d2019-10-21 22:45:23 +0000357 self.validate_ext_test_results()
358
359
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000360class QUICEchoExtQcloseRxTestCase(QUICEchoExtTestCase):
361 """QUIC Echo External Transfer Qclose Rx 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_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000366 """QUIC external transfer, rx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500367 self.server("TX=0", "RX=10M", "qclose=Y", "sclose=N")
368 self.client("TX=10M", "RX=0", "qclose=W", "sclose=W")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000369 self.validate_ext_test_results()
370
371
372class QUICEchoExtQcloseTxTestCase(QUICEchoExtTestCase):
373 """QUIC Echo External Transfer Qclose Tx 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_qclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000378 """QUIC external transfer, tx close"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200379 self.server("TX=0", "RX=10M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500380 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000381 self.validate_ext_test_results()
382
383
384class QUICEchoExtEarlyQcloseRxTestCase(QUICEchoExtTestCase):
385 """QUIC Echo External Transfer Early Qclose Rx 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_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000390 """QUIC external transfer, early rx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500391 self.server("TX=0", "RX=10M", "qclose=Y", "sclose=N")
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200392 self.client("TX=20M", "RX=0", "qclose=W", "sclose=W", "tx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000393 self.validate_ext_test_results()
394
395
396class QUICEchoExtEarlyQcloseTxTestCase(QUICEchoExtTestCase):
397 """QUIC Echo External Transfer Early Qclose Tx 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_early_qclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000402 """QUIC external transfer, early tx close"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200403 self.server("TX=0", "RX=20M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500404 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000405 self.validate_ext_test_results()
406
407
408class QUICEchoExtScloseRxTestCase(QUICEchoExtTestCase):
409 """QUIC Echo External Transfer Sclose Rx 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_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000414 """QUIC external transfer, rx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500415 self.server("TX=0", "RX=10M", "qclose=N", "sclose=Y")
416 self.client("TX=10M", "RX=0", "qclose=W", "sclose=W")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000417 self.validate_ext_test_results()
418
419
420class QUICEchoExtScloseTxTestCase(QUICEchoExtTestCase):
421 """QUIC Echo External Transfer Sclose Tx 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_sclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000426 """QUIC external transfer, tx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500427 self.server("TX=0", "RX=10M", "qclose=W", "sclose=W")
428 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000429 self.validate_ext_test_results()
430
431
432class QUICEchoExtEarlyScloseRxTestCase(QUICEchoExtTestCase):
433 """QUIC Echo External Transfer Early Sclose Rx Test Case"""
434
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_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000438 """QUIC external transfer, early rx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500439 self.server("TX=0", "RX=10M", "qclose=N", "sclose=Y")
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200440 self.client("TX=20M", "RX=0", "qclose=W", "sclose=W", "tx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000441 self.validate_ext_test_results()
442
443
444class QUICEchoExtEarlyScloseTxTestCase(QUICEchoExtTestCase):
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400445 """QUIC Echo External Transfer Early Sclose Tx Test Case"""
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000446
Klement Sekerab23ffd72021-05-31 16:08:53 +0200447 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500448 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000449 def test_quic_ext_early_sclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000450 """QUIC external transfer, early tx stream close"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200451 self.server("TX=0", "RX=20M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500452 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000453 self.validate_ext_test_results()
454
455
456class QUICEchoExtServerStreamTestCase(QUICEchoExtTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400457 """QUIC Echo External Transfer Server Stream Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200458
Dave Wallace47e77302019-06-05 10:40:07 -0400459 quic_setup = "serverstream"
Dave Wallace3ce03522020-01-27 18:21:15 -0500460 timeout = 60
Dave Wallace47e77302019-06-05 10:40:07 -0400461
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000462 def test_quic_ext_transfer_server_stream(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000463 """QUIC external server transfer"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500464 self.server("TX=10M", "RX=0")
465 self.client("TX=0", "RX=10M")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000466 self.validate_ext_test_results()
Dave Wallace47e77302019-06-05 10:40:07 -0400467
Chore464e1dc2019-06-25 14:21:26 +0430468
Dave Wallace3ce03522020-01-27 18:21:15 -0500469class QUICEchoExtServerStreamBigTestCase(QUICEchoExtTestCase):
470 """QUIC Echo External Transfer Server Stream Big Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200471
Dave Wallace3ad078d2019-10-21 22:45:23 +0000472 quic_setup = "serverstream"
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200473 server_fifo_size = "4M"
474 client_fifo_size = "4M"
475 test_bytes = ""
Dave Wallace3ce03522020-01-27 18:21:15 -0500476 timeout = 60
Dave Wallace3ad078d2019-10-21 22:45:23 +0000477
Klement Sekerab23ffd72021-05-31 16:08:53 +0200478 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace3ce03522020-01-27 18:21:15 -0500479 def test_quic_ext_transfer_server_stream_big(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000480 """QUIC external server transfer, big stream"""
Dave Wallace2edff142020-02-07 17:55:53 -0500481 self.server("TX=2G", "RX=0")
482 self.client("TX=0", "RX=2G")
Dave Wallace3ad078d2019-10-21 22:45:23 +0000483 self.validate_ext_test_results()
484
485
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000486class QUICEchoExtServerStreamQcloseRxTestCase(QUICEchoExtTestCase):
487 """QUIC Echo External Transfer Server Stream Qclose Rx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200488
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000489 quic_setup = "serverstream"
490
Klement Sekerab23ffd72021-05-31 16:08:53 +0200491 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500492 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000493 def test_quic_ext_server_stream_qclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000494 """QUIC external server transfer, rx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500495 self.server("TX=10M", "RX=0", "qclose=W", "sclose=W")
496 self.client("TX=0", "RX=10M", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000497 self.validate_ext_test_results()
498
499
500class QUICEchoExtServerStreamQcloseTxTestCase(QUICEchoExtTestCase):
501 """QUIC Echo External Transfer Server Stream Qclose Tx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200502
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000503 quic_setup = "serverstream"
504
Klement Sekerab23ffd72021-05-31 16:08:53 +0200505 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500506 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000507 def test_quic_ext_server_stream_qclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000508 """QUIC external server transfer, tx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500509 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=N")
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200510 self.client("TX=0", "RX=10M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000511 self.validate_ext_test_results()
512
513
514class QUICEchoExtServerStreamEarlyQcloseRxTestCase(QUICEchoExtTestCase):
515 """QUIC Echo External Transfer Server Stream Early Qclose Rx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200516
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000517 quic_setup = "serverstream"
518
Klement Sekerab23ffd72021-05-31 16:08:53 +0200519 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500520 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000521 def test_quic_ext_server_stream_early_qclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000522 """QUIC external server transfer, early rx close"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200523 self.server("TX=20M", "RX=0", "qclose=W", "sclose=W", "tx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500524 self.client("TX=0", "RX=10M", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000525 self.validate_ext_test_results()
526
527
528class QUICEchoExtServerStreamEarlyQcloseTxTestCase(QUICEchoExtTestCase):
529 """QUIC Echo External Transfer Server Stream Early Qclose Tx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200530
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000531 quic_setup = "serverstream"
532
Klement Sekerab23ffd72021-05-31 16:08:53 +0200533 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500534 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000535 def test_quic_ext_server_stream_early_qclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000536 """QUIC external server transfer, early tx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500537 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=N")
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200538 self.client("TX=0", "RX=20M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000539 self.validate_ext_test_results()
540
541
542class QUICEchoExtServerStreamScloseRxTestCase(QUICEchoExtTestCase):
543 """QUIC Echo External Transfer Server Stream Sclose Rx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200544
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000545 quic_setup = "serverstream"
546
Klement Sekerab23ffd72021-05-31 16:08:53 +0200547 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500548 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000549 def test_quic_ext_server_stream_sclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000550 """QUIC external server transfer, rx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500551 self.server("TX=10M", "RX=0", "qclose=W", "sclose=W")
552 self.client("TX=0", "RX=10M", "qclose=N", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000553 self.validate_ext_test_results()
554
555
556class QUICEchoExtServerStreamScloseTxTestCase(QUICEchoExtTestCase):
557 """QUIC Echo External Transfer Server Stream Sclose Tx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200558
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000559 quic_setup = "serverstream"
560
Klement Sekerab23ffd72021-05-31 16:08:53 +0200561 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500562 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000563 def test_quic_ext_server_stream_sclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000564 """QUIC external server transfer, tx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500565 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
566 self.client("TX=0", "RX=10M", "qclose=W", "sclose=W")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000567 self.validate_ext_test_results()
568
569
570class QUICEchoExtServerStreamEarlyScloseRxTestCase(QUICEchoExtTestCase):
571 """QUIC Echo External Transfer Server Stream Early Sclose Rx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200572
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000573 quic_setup = "serverstream"
574
Klement Sekerab23ffd72021-05-31 16:08:53 +0200575 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500576 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000577 def test_quic_ext_server_stream_early_sclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000578 """QUIC external server transfer, early rx stream close"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200579 self.server("TX=20M", "RX=0", "qclose=W", "sclose=W", "tx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500580 self.client("TX=0", "RX=10M", "qclose=N", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000581 self.validate_ext_test_results()
582
583
584class QUICEchoExtServerStreamEarlyScloseTxTestCase(QUICEchoExtTestCase):
585 """QUIC Echo Ext Transfer Server Stream Early Sclose Tx Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200586
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000587 quic_setup = "serverstream"
588
Klement Sekerab23ffd72021-05-31 16:08:53 +0200589 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500590 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000591 def test_quic_ext_server_stream_early_sclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000592 """QUIC external server transfer, early tx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500593 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200594 self.client("TX=0", "RX=20M", "qclose=W", "sclose=W", "rx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000595 self.validate_ext_test_results()
596
597
598class QUICEchoExtServerStreamWorkersTestCase(QUICEchoExtTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400599 """QUIC Echo External Transfer Server Stream MultiWorker Test Case"""
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200600
Dave Wallace47e77302019-06-05 10:40:07 -0400601 quic_setup = "serverstream"
602
Klement Sekerab23ffd72021-05-31 16:08:53 +0200603 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500604 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000605 def test_quic_ext_transfer_server_stream_multi_workers(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000606 """QUIC external server transfer, multi-worker"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500607 self.server("nclients", "4", "quic-streams", "4", "TX=10M", "RX=0")
608 self.client("nclients", "4", "quic-streams", "4", "TX=0", "RX=10M")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000609 self.validate_ext_test_results()
Dave Wallace211b28a2019-05-08 20:46:33 -0400610
Dave Wallaceb063ad02019-04-09 21:01:09 -0400611
Klement Sekerad9b0c6f2022-04-26 19:02:15 +0200612if __name__ == "__main__":
Dave Wallaceb063ad02019-04-09 21:01:09 -0400613 unittest.main(testRunner=VppTestRunner)