blob: 339557d4419dfff58b8e5ec1694d54b064fd413a [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
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +00009from 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):
15 """ QUIC Test Application Worker """
Dave Wallace47e77302019-06-05 10:40:07 -040016 process = None
Dave Wallace3bffd4b2019-05-13 15:51:52 -040017
Klement Sekerab23ffd72021-05-31 16:08:53 +020018 def __init__(self, appname, executable_args, logger, role,
Paul Vinciguerra48bdbcd2019-12-04 19:43:53 -050019 testcase, env=None, *args, **kwargs):
20 if env is None:
21 env = {}
Klement Sekerab23ffd72021-05-31 16:08:53 +020022 app = f"{config.vpp_build_dir}/vpp/bin/{appname}"
Paul Vinciguerra48bdbcd2019-12-04 19:43:53 -050023 self.args = [app] + executable_args
Dave Wallace91af1852019-10-21 03:28:17 +000024 self.role = role
25 self.wait_for_gdb = 'wait-for-gdb'
26 self.testcase = testcase
Paul Vinciguerra48bdbcd2019-12-04 19:43:53 -050027 super(QUICAppWorker, self).__init__(self.args, logger, env,
28 *args, **kwargs)
Dave Wallace3bffd4b2019-05-13 15:51:52 -040029
Dave Wallace47e77302019-06-05 10:40:07 -040030 def run(self):
31 super(QUICAppWorker, self).run()
Dave Wallace47e77302019-06-05 10:40:07 -040032
33 def teardown(self, logger, timeout):
34 if self.process is None:
Chore464e1dc2019-06-25 14:21:26 +043035 return False
Dave Wallace47e77302019-06-05 10:40:07 -040036 try:
37 logger.debug("Killing worker process (pid %d)" % self.process.pid)
38 os.killpg(os.getpgid(self.process.pid), signal.SIGKILL)
39 self.join(timeout)
40 except OSError as e:
41 logger.debug("Couldn't kill worker process")
42 return True
43 return False
44
Dave Wallace3bffd4b2019-05-13 15:51:52 -040045
Dave Wallace211b28a2019-05-08 20:46:33 -040046class QUICTestCase(VppTestCase):
Dave Wallaceb063ad02019-04-09 21:01:09 -040047 """ QUIC Test Case """
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -050048
49 timeout = 20
50 pre_test_sleep = 0.3
Dave Wallace3ce03522020-01-27 18:21:15 -050051 post_test_sleep = 0.3
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -050052
Aloys Augustinbaf1c7c2019-09-02 16:29:19 +020053 @classmethod
54 def setUpClass(cls):
55 cls.extra_vpp_plugin_config.append("plugin quic_plugin.so { enable }")
56 super(QUICTestCase, cls).setUpClass()
Dave Wallaceb063ad02019-04-09 21:01:09 -040057
Dave Wallaceb063ad02019-04-09 21:01:09 -040058 def setUp(self):
Dave Wallace47e77302019-06-05 10:40:07 -040059 super(QUICTestCase, self).setUp()
Klement Sekerab23ffd72021-05-31 16:08:53 +020060 self.vppDebug = 'vpp_debug' in config.vpp_build_dir
Dave Wallace211b28a2019-05-08 20:46:33 -040061
Dave Wallaceb063ad02019-04-09 21:01:09 -040062 self.create_loopback_interfaces(2)
Dave Wallace211b28a2019-05-08 20:46:33 -040063 self.uri = "quic://%s/1234" % self.loop0.local_ip4
Dave Wallaceb063ad02019-04-09 21:01:09 -040064 table_id = 1
Dave Wallaceb063ad02019-04-09 21:01:09 -040065 for i in self.lo_interfaces:
66 i.admin_up()
67
68 if table_id != 0:
69 tbl = VppIpTable(self, table_id)
70 tbl.add_vpp_config()
71
72 i.set_table_ip4(table_id)
73 i.config_ip4()
74 table_id += 1
75
76 # Configure namespaces
Jakub Grajciarb4e5e502020-01-31 09:35:29 +010077 self.vapi.app_namespace_add_del(namespace_id="server",
Dave Wallaceb063ad02019-04-09 21:01:09 -040078 sw_if_index=self.loop0.sw_if_index)
Jakub Grajciarb4e5e502020-01-31 09:35:29 +010079 self.vapi.app_namespace_add_del(namespace_id="client",
Dave Wallaceb063ad02019-04-09 21:01:09 -040080 sw_if_index=self.loop1.sw_if_index)
81
Dave Wallace211b28a2019-05-08 20:46:33 -040082 # Add inter-table routes
83 self.ip_t01 = VppIpRoute(self, self.loop1.local_ip4, 32,
84 [VppRoutePath("0.0.0.0",
85 0xffffffff,
86 nh_table_id=2)], table_id=1)
87 self.ip_t10 = VppIpRoute(self, self.loop0.local_ip4, 32,
88 [VppRoutePath("0.0.0.0",
89 0xffffffff,
90 nh_table_id=1)], table_id=2)
91 self.ip_t01.add_vpp_config()
92 self.ip_t10.add_vpp_config()
93 self.logger.debug(self.vapi.cli("show ip fib"))
94
Dave Wallace47e77302019-06-05 10:40:07 -040095 def tearDown(self):
Dave Wallace211b28a2019-05-08 20:46:33 -040096 # Delete inter-table routes
97 self.ip_t01.remove_vpp_config()
98 self.ip_t10.remove_vpp_config()
99
Dave Wallaceb063ad02019-04-09 21:01:09 -0400100 for i in self.lo_interfaces:
101 i.unconfig_ip4()
102 i.set_table_ip4(0)
103 i.admin_down()
Dave Wallace47e77302019-06-05 10:40:07 -0400104 super(QUICTestCase, self).tearDown()
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400105
Dave Wallace211b28a2019-05-08 20:46:33 -0400106
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000107class QUICEchoIntTestCase(QUICTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400108 """QUIC Echo Internal Test Case"""
Dave Wallace3ad078d2019-10-21 22:45:23 +0000109 test_bytes = ' test-bytes'
Florin Corase92c9462020-11-25 08:44:16 -0800110 extra_vpp_punt_config = ["session", "{", "enable", "poll-main", "}"]
Chore464e1dc2019-06-25 14:21:26 +0430111
Dave Wallace211b28a2019-05-08 20:46:33 -0400112 def setUp(self):
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000113 super(QUICEchoIntTestCase, self).setUp()
Dave Wallace3ad078d2019-10-21 22:45:23 +0000114 self.client_args = 'uri {uri} fifo-size 64{testbytes} appns client' \
115 .format(uri=self.uri, testbytes=self.test_bytes)
Dave Wallace47e77302019-06-05 10:40:07 -0400116 self.server_args = "uri %s fifo-size 64 appns server" % self.uri
Dave Wallace211b28a2019-05-08 20:46:33 -0400117
Dave Wallace3ce03522020-01-27 18:21:15 -0500118 def tearDown(self):
119 super(QUICEchoIntTestCase, self).tearDown()
120
Dave Wallace47e77302019-06-05 10:40:07 -0400121 def server(self, *args):
Chore464e1dc2019-06-25 14:21:26 +0430122 error = self.vapi.cli(
123 "test echo server %s %s" %
124 (self.server_args, ' '.join(args)))
Dave Wallace47e77302019-06-05 10:40:07 -0400125 if error:
126 self.logger.critical(error)
127 self.assertNotIn("failed", error)
Dave Wallace211b28a2019-05-08 20:46:33 -0400128
Dave Wallace47e77302019-06-05 10:40:07 -0400129 def client(self, *args):
Chore464e1dc2019-06-25 14:21:26 +0430130 error = self.vapi.cli(
131 "test echo client %s %s" %
132 (self.client_args, ' '.join(args)))
Dave Wallace47e77302019-06-05 10:40:07 -0400133 if error:
134 self.logger.critical(error)
135 self.assertNotIn("failed", error)
Dave Wallaceb063ad02019-04-09 21:01:09 -0400136
Chore464e1dc2019-06-25 14:21:26 +0430137
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +0000138@tag_fixme_vpp_workers
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000139class QUICEchoIntTransferTestCase(QUICEchoIntTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400140 """QUIC Echo Internal Transfer Test Case"""
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000141 def test_quic_int_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000142 """QUIC internal transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400143 self.server()
Aloys Augustin706079c2019-06-27 16:10:23 +0200144 self.client("no-output", "mbytes", "2")
Dave Wallaceb063ad02019-04-09 21:01:09 -0400145
Chore464e1dc2019-06-25 14:21:26 +0430146
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +0000147@tag_fixme_vpp_workers
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000148class QUICEchoIntSerialTestCase(QUICEchoIntTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400149 """QUIC Echo Internal Serial Transfer Test Case"""
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000150 def test_quic_serial_int_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000151 """QUIC serial internal transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400152 self.server()
Aloys Augustin706079c2019-06-27 16:10:23 +0200153 self.client("no-output", "mbytes", "2")
154 self.client("no-output", "mbytes", "2")
155 self.client("no-output", "mbytes", "2")
156 self.client("no-output", "mbytes", "2")
157 self.client("no-output", "mbytes", "2")
Dave Wallace0d144c72019-05-15 21:41:23 -0400158
Chore464e1dc2019-06-25 14:21:26 +0430159
Andrew Yourtchenko8dc0d482021-01-29 13:17:19 +0000160@tag_fixme_vpp_workers
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000161class QUICEchoIntMStreamTestCase(QUICEchoIntTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400162 """QUIC Echo Internal MultiStream Test Case"""
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000163 def test_quic_int_multistream_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000164 """QUIC internal multi-stream transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400165 self.server()
166 self.client("nclients", "10", "mbytes", "1", "no-output")
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400167
168
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000169class QUICEchoExtTestCase(QUICTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400170 quic_setup = "default"
Dave Wallace3ad078d2019-10-21 22:45:23 +0000171 test_bytes = "test-bytes:assert"
Dave Wallace3ce03522020-01-27 18:21:15 -0500172 pre_test_sleep = 1
173 post_test_sleep = 1
Dave Wallace91af1852019-10-21 03:28:17 +0000174 app = "vpp_echo"
Dave Wallace3ce03522020-01-27 18:21:15 -0500175 evt_q_len = 16384
Klement Sekera8d815022021-03-15 16:58:10 +0100176 vpp_worker_count = 1
Dave Wallace3ce03522020-01-27 18:21:15 -0500177 server_fifo_size = "1M"
178 client_fifo_size = "4M"
179 extra_vpp_punt_config = ["session", "{",
Florin Corase92c9462020-11-25 08:44:16 -0800180 "enable", "poll-main", "evt_qs_memfd_seg",
Dave Wallace3ce03522020-01-27 18:21:15 -0500181 "evt_qs_seg_size", "64M",
182 "event-queue-length", f"{evt_q_len}",
183 "preallocated-sessions", "1024",
184 "v4-session-table-buckets", "20000",
185 "v4-session-table-memory", "64M",
186 "v4-halfopen-table-buckets", "20000",
187 "v4-halfopen-table-memory", "64M",
188 "local-endpoints-table-buckets", "250000",
189 "local-endpoints-table-memory", "512M",
190 "}"]
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400191
192 def setUp(self):
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000193 super(QUICEchoExtTestCase, self).setUp()
Chore464e1dc2019-06-25 14:21:26 +0430194 common_args = [
Dave Wallace3ce03522020-01-27 18:21:15 -0500195 "uri", self.uri,
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000196 "json",
Dave Wallace3ad078d2019-10-21 22:45:23 +0000197 self.test_bytes,
Klement Sekerae2636852021-03-16 12:52:12 +0100198 "socket-name", self.get_api_sock_path(),
Dave Wallace3ce03522020-01-27 18:21:15 -0500199 "quic-setup", self.quic_setup,
200 "nthreads", "1",
201 "mq-size", f"{self.evt_q_len}"
202 ]
Chore464e1dc2019-06-25 14:21:26 +0430203 self.server_echo_test_args = common_args + \
Dave Wallace3ce03522020-01-27 18:21:15 -0500204 ["server", "appns", "server", "fifo-size",
205 f"{self.server_fifo_size}"]
Chore464e1dc2019-06-25 14:21:26 +0430206 self.client_echo_test_args = common_args + \
Dave Wallace3ce03522020-01-27 18:21:15 -0500207 ["client", "appns", "client", "fifo-size",
208 f"{self.client_fifo_size}"]
Dave Wallacef9d784b2019-10-30 16:58:30 +0000209 error = self.vapi.cli("quic set fifo-size 2M")
Dave Wallace91af1852019-10-21 03:28:17 +0000210 if error:
211 self.logger.critical(error)
212 self.assertNotIn("failed", error)
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400213
Dave Wallace47e77302019-06-05 10:40:07 -0400214 def server(self, *args):
215 _args = self.server_echo_test_args + list(args)
Chore464e1dc2019-06-25 14:21:26 +0430216 self.worker_server = QUICAppWorker(
Dave Wallace91af1852019-10-21 03:28:17 +0000217 self.app,
Chore464e1dc2019-06-25 14:21:26 +0430218 _args,
Dave Wallace91af1852019-10-21 03:28:17 +0000219 self.logger,
220 'server',
221 self)
Dave Wallace47e77302019-06-05 10:40:07 -0400222 self.worker_server.start()
223 self.sleep(self.pre_test_sleep)
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400224
Dave Wallace47e77302019-06-05 10:40:07 -0400225 def client(self, *args):
226 _args = self.client_echo_test_args + list(args)
Chore464e1dc2019-06-25 14:21:26 +0430227 self.worker_client = QUICAppWorker(
Dave Wallace91af1852019-10-21 03:28:17 +0000228 self.app,
Chore464e1dc2019-06-25 14:21:26 +0430229 _args,
Dave Wallace91af1852019-10-21 03:28:17 +0000230 self.logger,
231 'client',
232 self)
Dave Wallace47e77302019-06-05 10:40:07 -0400233 self.worker_client.start()
Dave Wallace91af1852019-10-21 03:28:17 +0000234 timeout = None if self.debug_all else self.timeout
235 self.worker_client.join(timeout)
Dave Wallace3ce03522020-01-27 18:21:15 -0500236 if self.worker_client.is_alive():
237 error = f"Client failed to complete in {timeout} seconds!"
238 self.logger.critical(error)
239 return
Dave Wallace91af1852019-10-21 03:28:17 +0000240 self.worker_server.join(timeout)
Dave Wallace3ce03522020-01-27 18:21:15 -0500241 if self.worker_server.is_alive():
242 error = f"Server failed to complete in {timeout} seconds!"
243 self.logger.critical(error)
Dave Wallace47e77302019-06-05 10:40:07 -0400244 self.sleep(self.post_test_sleep)
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400245
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000246 def validate_ext_test_results(self):
Dave Wallace47e77302019-06-05 10:40:07 -0400247 server_result = self.worker_server.result
248 client_result = self.worker_client.result
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000249 self.logger.info("Server worker result is `%s'" %
250 server_result)
251 self.logger.info("Client worker result is `%s'" %
252 client_result)
Dave Wallace47e77302019-06-05 10:40:07 -0400253 server_kill_error = False
254 if self.worker_server.result is None:
Chore464e1dc2019-06-25 14:21:26 +0430255 server_kill_error = self.worker_server.teardown(
256 self.logger, self.timeout)
Dave Wallace47e77302019-06-05 10:40:07 -0400257 if self.worker_client.result is None:
258 self.worker_client.teardown(self.logger, self.timeout)
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000259 err_msg = "Wrong server worker return code (%s)" % server_result
260 self.assertEqual(server_result, 0, err_msg)
Chore464e1dc2019-06-25 14:21:26 +0430261 self.assertIsNotNone(
262 client_result,
263 "Timeout! Client worker did not finish in %ss" %
264 self.timeout)
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000265 err_msg = "Wrong client worker return code (%s)" % client_result
266 self.assertEqual(client_result, 0, err_msg)
Dave Wallace47e77302019-06-05 10:40:07 -0400267 self.assertFalse(server_kill_error, "Server kill errored")
268
269
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000270class QUICEchoExtTransferTestCase(QUICEchoExtTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400271 """QUIC Echo External Transfer Test Case"""
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -0500272 timeout = 60
273
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000274 def test_quic_ext_transfer(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000275 """QUIC external transfer"""
Dave Wallace47e77302019-06-05 10:40:07 -0400276 self.server()
277 self.client()
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000278 self.validate_ext_test_results()
Dave Wallace3bffd4b2019-05-13 15:51:52 -0400279
Chore464e1dc2019-06-25 14:21:26 +0430280
Dave Wallace3ad078d2019-10-21 22:45:23 +0000281class QUICEchoExtTransferBigTestCase(QUICEchoExtTestCase):
282 """QUIC Echo External Transfer Big Test Case"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500283 server_fifo_size = '4M'
284 client_fifo_size = '4M'
Dave Wallace3ad078d2019-10-21 22:45:23 +0000285 test_bytes = ''
Paul Vinciguerra1063f2a2019-12-04 23:18:02 -0500286 timeout = 60
Dave Wallace3ad078d2019-10-21 22:45:23 +0000287
Klement Sekerab23ffd72021-05-31 16:08:53 +0200288 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace3ad078d2019-10-21 22:45:23 +0000289 def test_quic_ext_transfer_big(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000290 """QUIC external transfer, big stream"""
Dave Wallace2edff142020-02-07 17:55:53 -0500291 self.server("TX=0", "RX=2G")
292 self.client("TX=2G", "RX=0")
Dave Wallace3ad078d2019-10-21 22:45:23 +0000293 self.validate_ext_test_results()
294
295
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000296class QUICEchoExtQcloseRxTestCase(QUICEchoExtTestCase):
297 """QUIC Echo External Transfer Qclose Rx Test Case"""
298
Klement Sekerab23ffd72021-05-31 16:08:53 +0200299 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500300 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000301 def test_quic_ext_qclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000302 """QUIC external transfer, rx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500303 self.server("TX=0", "RX=10M", "qclose=Y", "sclose=N")
304 self.client("TX=10M", "RX=0", "qclose=W", "sclose=W")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000305 self.validate_ext_test_results()
306
307
308class QUICEchoExtQcloseTxTestCase(QUICEchoExtTestCase):
309 """QUIC Echo External Transfer Qclose Tx Test Case"""
310
Klement Sekerab23ffd72021-05-31 16:08:53 +0200311 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500312 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000313 def test_quic_ext_qclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000314 """QUIC external transfer, tx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500315 self.server("TX=0", "RX=10M", "qclose=W", "sclose=W",
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400316 "rx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500317 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000318 self.validate_ext_test_results()
319
320
321class QUICEchoExtEarlyQcloseRxTestCase(QUICEchoExtTestCase):
322 """QUIC Echo External Transfer Early Qclose Rx Test Case"""
323
Klement Sekerab23ffd72021-05-31 16:08:53 +0200324 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500325 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000326 def test_quic_ext_early_qclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000327 """QUIC external transfer, early rx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500328 self.server("TX=0", "RX=10M", "qclose=Y", "sclose=N")
329 self.client("TX=20M", "RX=0", "qclose=W", "sclose=W",
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400330 "tx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000331 self.validate_ext_test_results()
332
333
334class QUICEchoExtEarlyQcloseTxTestCase(QUICEchoExtTestCase):
335 """QUIC Echo External Transfer Early Qclose Tx 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_early_qclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000340 """QUIC external transfer, early tx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500341 self.server("TX=0", "RX=20M", "qclose=W", "sclose=W",
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400342 "rx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500343 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000344 self.validate_ext_test_results()
345
346
347class QUICEchoExtScloseRxTestCase(QUICEchoExtTestCase):
348 """QUIC Echo External Transfer Sclose Rx Test Case"""
349
Klement Sekerab23ffd72021-05-31 16:08:53 +0200350 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500351 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000352 def test_quic_ext_sclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000353 """QUIC external transfer, rx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500354 self.server("TX=0", "RX=10M", "qclose=N", "sclose=Y")
355 self.client("TX=10M", "RX=0", "qclose=W", "sclose=W")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000356 self.validate_ext_test_results()
357
358
359class QUICEchoExtScloseTxTestCase(QUICEchoExtTestCase):
360 """QUIC Echo External Transfer Sclose Tx Test Case"""
361
Klement Sekerab23ffd72021-05-31 16:08:53 +0200362 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500363 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000364 def test_quic_ext_sclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000365 """QUIC external transfer, tx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500366 self.server("TX=0", "RX=10M", "qclose=W", "sclose=W")
367 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000368 self.validate_ext_test_results()
369
370
371class QUICEchoExtEarlyScloseRxTestCase(QUICEchoExtTestCase):
372 """QUIC Echo External Transfer Early Sclose Rx Test Case"""
373
Klement Sekerab23ffd72021-05-31 16:08:53 +0200374 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500375 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000376 def test_quic_ext_early_sclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000377 """QUIC external transfer, early rx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500378 self.server("TX=0", "RX=10M", "qclose=N", "sclose=Y")
379 self.client("TX=20M", "RX=0", "qclose=W", "sclose=W",
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400380 "tx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000381 self.validate_ext_test_results()
382
383
384class QUICEchoExtEarlyScloseTxTestCase(QUICEchoExtTestCase):
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400385 """QUIC Echo External Transfer Early Sclose Tx Test Case"""
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000386
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_sclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000390 """QUIC external transfer, early tx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500391 self.server("TX=0", "RX=20M", "qclose=W", "sclose=W",
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400392 "rx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500393 self.client("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000394 self.validate_ext_test_results()
395
396
397class QUICEchoExtServerStreamTestCase(QUICEchoExtTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400398 """QUIC Echo External Transfer Server Stream Test Case"""
399 quic_setup = "serverstream"
Dave Wallace3ce03522020-01-27 18:21:15 -0500400 timeout = 60
Dave Wallace47e77302019-06-05 10:40:07 -0400401
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000402 def test_quic_ext_transfer_server_stream(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000403 """QUIC external server transfer"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500404 self.server("TX=10M", "RX=0")
405 self.client("TX=0", "RX=10M")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000406 self.validate_ext_test_results()
Dave Wallace47e77302019-06-05 10:40:07 -0400407
Chore464e1dc2019-06-25 14:21:26 +0430408
Dave Wallace3ce03522020-01-27 18:21:15 -0500409class QUICEchoExtServerStreamBigTestCase(QUICEchoExtTestCase):
410 """QUIC Echo External Transfer Server Stream Big Test Case"""
Dave Wallace3ad078d2019-10-21 22:45:23 +0000411 quic_setup = "serverstream"
Dave Wallace3ce03522020-01-27 18:21:15 -0500412 server_fifo_size = '4M'
413 client_fifo_size = '4M'
Dave Wallace3ad078d2019-10-21 22:45:23 +0000414 test_bytes = ''
Dave Wallace3ce03522020-01-27 18:21:15 -0500415 timeout = 60
Dave Wallace3ad078d2019-10-21 22:45:23 +0000416
Klement Sekerab23ffd72021-05-31 16:08:53 +0200417 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace3ce03522020-01-27 18:21:15 -0500418 def test_quic_ext_transfer_server_stream_big(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000419 """QUIC external server transfer, big stream"""
Dave Wallace2edff142020-02-07 17:55:53 -0500420 self.server("TX=2G", "RX=0")
421 self.client("TX=0", "RX=2G")
Dave Wallace3ad078d2019-10-21 22:45:23 +0000422 self.validate_ext_test_results()
423
424
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000425class QUICEchoExtServerStreamQcloseRxTestCase(QUICEchoExtTestCase):
426 """QUIC Echo External Transfer Server Stream Qclose Rx Test Case"""
427 quic_setup = "serverstream"
428
Klement Sekerab23ffd72021-05-31 16:08:53 +0200429 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500430 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000431 def test_quic_ext_server_stream_qclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000432 """QUIC external server transfer, rx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500433 self.server("TX=10M", "RX=0", "qclose=W", "sclose=W")
434 self.client("TX=0", "RX=10M", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000435 self.validate_ext_test_results()
436
437
438class QUICEchoExtServerStreamQcloseTxTestCase(QUICEchoExtTestCase):
439 """QUIC Echo External Transfer Server Stream Qclose Tx Test Case"""
440 quic_setup = "serverstream"
441
Klement Sekerab23ffd72021-05-31 16:08:53 +0200442 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500443 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000444 def test_quic_ext_server_stream_qclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000445 """QUIC external server transfer, tx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500446 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=N")
447 self.client("TX=0", "RX=10M", "qclose=W", "sclose=W",
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400448 "rx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000449 self.validate_ext_test_results()
450
451
452class QUICEchoExtServerStreamEarlyQcloseRxTestCase(QUICEchoExtTestCase):
453 """QUIC Echo External Transfer Server Stream Early Qclose Rx Test Case"""
454 quic_setup = "serverstream"
455
Klement Sekerab23ffd72021-05-31 16:08:53 +0200456 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500457 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000458 def test_quic_ext_server_stream_early_qclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000459 """QUIC external server transfer, early rx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500460 self.server("TX=20M", "RX=0", "qclose=W", "sclose=W",
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400461 "tx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500462 self.client("TX=0", "RX=10M", "qclose=Y", "sclose=N")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000463 self.validate_ext_test_results()
464
465
466class QUICEchoExtServerStreamEarlyQcloseTxTestCase(QUICEchoExtTestCase):
467 """QUIC Echo External Transfer Server Stream Early Qclose Tx Test Case"""
468 quic_setup = "serverstream"
469
Klement Sekerab23ffd72021-05-31 16:08:53 +0200470 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500471 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000472 def test_quic_ext_server_stream_early_qclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000473 """QUIC external server transfer, early tx close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500474 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=N")
475 self.client("TX=0", "RX=20M", "qclose=W", "sclose=W",
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400476 "rx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000477 self.validate_ext_test_results()
478
479
480class QUICEchoExtServerStreamScloseRxTestCase(QUICEchoExtTestCase):
481 """QUIC Echo External Transfer Server Stream Sclose Rx Test Case"""
482 quic_setup = "serverstream"
483
Klement Sekerab23ffd72021-05-31 16:08:53 +0200484 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500485 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000486 def test_quic_ext_server_stream_sclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000487 """QUIC external server transfer, rx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500488 self.server("TX=10M", "RX=0", "qclose=W", "sclose=W")
489 self.client("TX=0", "RX=10M", "qclose=N", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000490 self.validate_ext_test_results()
491
492
493class QUICEchoExtServerStreamScloseTxTestCase(QUICEchoExtTestCase):
494 """QUIC Echo External Transfer Server Stream Sclose Tx Test Case"""
495 quic_setup = "serverstream"
496
Klement Sekerab23ffd72021-05-31 16:08:53 +0200497 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500498 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000499 def test_quic_ext_server_stream_sclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000500 """QUIC external server transfer, tx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500501 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
502 self.client("TX=0", "RX=10M", "qclose=W", "sclose=W")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000503 self.validate_ext_test_results()
504
505
506class QUICEchoExtServerStreamEarlyScloseRxTestCase(QUICEchoExtTestCase):
507 """QUIC Echo External Transfer Server Stream Early Sclose Rx Test Case"""
508 quic_setup = "serverstream"
509
Klement Sekerab23ffd72021-05-31 16:08:53 +0200510 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500511 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000512 def test_quic_ext_server_stream_early_sclose_rx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000513 """QUIC external server transfer, early rx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500514 self.server("TX=20M", "RX=0", "qclose=W", "sclose=W",
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400515 "tx-results-diff")
Dave Wallace3ce03522020-01-27 18:21:15 -0500516 self.client("TX=0", "RX=10M", "qclose=N", "sclose=Y")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000517 self.validate_ext_test_results()
518
519
520class QUICEchoExtServerStreamEarlyScloseTxTestCase(QUICEchoExtTestCase):
521 """QUIC Echo Ext Transfer Server Stream Early Sclose Tx Test Case"""
522 quic_setup = "serverstream"
523
Klement Sekerab23ffd72021-05-31 16:08:53 +0200524 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500525 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000526 def test_quic_ext_server_stream_early_sclose_tx(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000527 """QUIC external server transfer, early tx stream close"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500528 self.server("TX=10M", "RX=0", "qclose=Y", "sclose=Y")
529 self.client("TX=0", "RX=20M", "qclose=W", "sclose=W",
Dave Wallaceff5a9b62019-09-25 17:58:24 -0400530 "rx-results-diff")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000531 self.validate_ext_test_results()
532
533
534class QUICEchoExtServerStreamWorkersTestCase(QUICEchoExtTestCase):
Dave Wallace47e77302019-06-05 10:40:07 -0400535 """QUIC Echo External Transfer Server Stream MultiWorker Test Case"""
536 quic_setup = "serverstream"
537
Klement Sekerab23ffd72021-05-31 16:08:53 +0200538 @unittest.skipUnless(config.extended, "part of extended tests")
Dave Wallace2edff142020-02-07 17:55:53 -0500539 @unittest.skip("testcase under development")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000540 def test_quic_ext_transfer_server_stream_multi_workers(self):
Dave Wallace03ec1342020-05-05 19:45:10 +0000541 """QUIC external server transfer, multi-worker"""
Dave Wallace3ce03522020-01-27 18:21:15 -0500542 self.server("nclients", "4", "quic-streams", "4", "TX=10M", "RX=0")
543 self.client("nclients", "4", "quic-streams", "4", "TX=0", "RX=10M")
Dave Wallace83c1e9a2019-09-21 04:19:26 +0000544 self.validate_ext_test_results()
Dave Wallace211b28a2019-05-08 20:46:33 -0400545
Dave Wallaceb063ad02019-04-09 21:01:09 -0400546
547if __name__ == '__main__':
548 unittest.main(testRunner=VppTestRunner)