Renato Botelho do Couto | ead1e53 | 2019-10-31 13:31:07 -0500 | [diff] [blame] | 1 | #!/usr/bin/env python3 |
Dave Wallace | 3bffd4b | 2019-05-13 15:51:52 -0400 | [diff] [blame] | 2 | """ Vpp QUIC tests """ |
Dave Wallace | b063ad0 | 2019-04-09 21:01:09 -0400 | [diff] [blame] | 3 | |
| 4 | import unittest |
Dave Wallace | 211b28a | 2019-05-08 20:46:33 -0400 | [diff] [blame] | 5 | import os |
Dave Wallace | 3bffd4b | 2019-05-13 15:51:52 -0400 | [diff] [blame] | 6 | import signal |
Klement Sekera | b23ffd7 | 2021-05-31 16:08:53 +0200 | [diff] [blame] | 7 | from config import config |
Dave Wallace | 8800f73 | 2023-08-31 00:47:44 -0400 | [diff] [blame^] | 8 | from asfframework import VppAsfTestCase, VppTestRunner, Worker, tag_fixme_vpp_workers |
Dave Wallace | b063ad0 | 2019-04-09 21:01:09 -0400 | [diff] [blame] | 9 | from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath |
| 10 | |
| 11 | |
Dave Wallace | 3bffd4b | 2019-05-13 15:51:52 -0400 | [diff] [blame] | 12 | class QUICAppWorker(Worker): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 13 | """QUIC Test Application Worker""" |
| 14 | |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 15 | process = None |
Dave Wallace | 3bffd4b | 2019-05-13 15:51:52 -0400 | [diff] [blame] | 16 | |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 17 | def __init__( |
| 18 | self, |
| 19 | appname, |
| 20 | executable_args, |
| 21 | logger, |
| 22 | role, |
| 23 | testcase, |
| 24 | env=None, |
| 25 | *args, |
| 26 | **kwargs, |
| 27 | ): |
Paul Vinciguerra | 48bdbcd | 2019-12-04 19:43:53 -0500 | [diff] [blame] | 28 | if env is None: |
| 29 | env = {} |
Klement Sekera | b23ffd7 | 2021-05-31 16:08:53 +0200 | [diff] [blame] | 30 | app = f"{config.vpp_build_dir}/vpp/bin/{appname}" |
Paul Vinciguerra | 48bdbcd | 2019-12-04 19:43:53 -0500 | [diff] [blame] | 31 | self.args = [app] + executable_args |
Dave Wallace | 91af185 | 2019-10-21 03:28:17 +0000 | [diff] [blame] | 32 | self.role = role |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 33 | self.wait_for_gdb = "wait-for-gdb" |
Dave Wallace | 91af185 | 2019-10-21 03:28:17 +0000 | [diff] [blame] | 34 | self.testcase = testcase |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 35 | super(QUICAppWorker, self).__init__(self.args, logger, env, *args, **kwargs) |
Dave Wallace | 3bffd4b | 2019-05-13 15:51:52 -0400 | [diff] [blame] | 36 | |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 37 | def run(self): |
| 38 | super(QUICAppWorker, self).run() |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 39 | |
| 40 | def teardown(self, logger, timeout): |
| 41 | if self.process is None: |
Chore | 464e1dc | 2019-06-25 14:21:26 +0430 | [diff] [blame] | 42 | return False |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 43 | try: |
Dave Wallace | 8430c40 | 2023-01-26 12:44:01 -0500 | [diff] [blame] | 44 | logger.debug(f"Killing worker process (pid {self.process.pid})") |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 45 | 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 Wallace | 3bffd4b | 2019-05-13 15:51:52 -0400 | [diff] [blame] | 52 | |
Andrew Yourtchenko | bc37878 | 2023-09-26 16:01:21 +0200 | [diff] [blame] | 53 | @unittest.skipIf("quic" in config.excluded_plugins, "Exclude QUIC plugin tests") |
Dave Wallace | 8800f73 | 2023-08-31 00:47:44 -0400 | [diff] [blame^] | 54 | class QUICTestCase(VppAsfTestCase): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 55 | """QUIC Test Case""" |
Paul Vinciguerra | 1063f2a | 2019-12-04 23:18:02 -0500 | [diff] [blame] | 56 | |
| 57 | timeout = 20 |
| 58 | pre_test_sleep = 0.3 |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 59 | post_test_sleep = 0.3 |
Dave Wallace | 8430c40 | 2023-01-26 12:44:01 -0500 | [diff] [blame] | 60 | server_appns = "server" |
| 61 | server_appns_secret = None |
| 62 | client_appns = "client" |
| 63 | client_appns_secret = None |
Paul Vinciguerra | 1063f2a | 2019-12-04 23:18:02 -0500 | [diff] [blame] | 64 | |
Aloys Augustin | baf1c7c | 2019-09-02 16:29:19 +0200 | [diff] [blame] | 65 | @classmethod |
| 66 | def setUpClass(cls): |
| 67 | cls.extra_vpp_plugin_config.append("plugin quic_plugin.so { enable }") |
| 68 | super(QUICTestCase, cls).setUpClass() |
Dave Wallace | b063ad0 | 2019-04-09 21:01:09 -0400 | [diff] [blame] | 69 | |
Dave Wallace | b063ad0 | 2019-04-09 21:01:09 -0400 | [diff] [blame] | 70 | def setUp(self): |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 71 | super(QUICTestCase, self).setUp() |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 72 | self.vppDebug = "vpp_debug" in config.vpp_build_dir |
Dave Wallace | 211b28a | 2019-05-08 20:46:33 -0400 | [diff] [blame] | 73 | |
Dave Wallace | b063ad0 | 2019-04-09 21:01:09 -0400 | [diff] [blame] | 74 | self.create_loopback_interfaces(2) |
Dave Wallace | 8430c40 | 2023-01-26 12:44:01 -0500 | [diff] [blame] | 75 | self.uri = f"quic://{self.loop0.local_ip4}/1234" |
Dave Wallace | b063ad0 | 2019-04-09 21:01:09 -0400 | [diff] [blame] | 76 | table_id = 1 |
Dave Wallace | b063ad0 | 2019-04-09 21:01:09 -0400 | [diff] [blame] | 77 | 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 Skrzypczak | 51f1b26 | 2023-04-27 12:43:46 +0200 | [diff] [blame] | 89 | self.vapi.app_namespace_add_del_v4( |
Dave Wallace | 8430c40 | 2023-01-26 12:44:01 -0500 | [diff] [blame] | 90 | namespace_id=self.server_appns, |
| 91 | secret=self.server_appns_secret, |
| 92 | sw_if_index=self.loop0.sw_if_index, |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 93 | ) |
Nathan Skrzypczak | 51f1b26 | 2023-04-27 12:43:46 +0200 | [diff] [blame] | 94 | self.vapi.app_namespace_add_del_v4( |
Dave Wallace | 8430c40 | 2023-01-26 12:44:01 -0500 | [diff] [blame] | 95 | namespace_id=self.client_appns, |
| 96 | secret=self.client_appns_secret, |
| 97 | sw_if_index=self.loop1.sw_if_index, |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 98 | ) |
Dave Wallace | b063ad0 | 2019-04-09 21:01:09 -0400 | [diff] [blame] | 99 | |
Dave Wallace | 211b28a | 2019-05-08 20:46:33 -0400 | [diff] [blame] | 100 | # Add inter-table routes |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 101 | 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 Wallace | 211b28a | 2019-05-08 20:46:33 -0400 | [diff] [blame] | 115 | 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 Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 119 | def tearDown(self): |
Dave Wallace | 211b28a | 2019-05-08 20:46:33 -0400 | [diff] [blame] | 120 | # Delete inter-table routes |
| 121 | self.ip_t01.remove_vpp_config() |
| 122 | self.ip_t10.remove_vpp_config() |
| 123 | |
Dave Wallace | b063ad0 | 2019-04-09 21:01:09 -0400 | [diff] [blame] | 124 | for i in self.lo_interfaces: |
| 125 | i.unconfig_ip4() |
| 126 | i.set_table_ip4(0) |
| 127 | i.admin_down() |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 128 | super(QUICTestCase, self).tearDown() |
Dave Wallace | 3bffd4b | 2019-05-13 15:51:52 -0400 | [diff] [blame] | 129 | |
Dave Wallace | 211b28a | 2019-05-08 20:46:33 -0400 | [diff] [blame] | 130 | |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 131 | class QUICEchoIntTestCase(QUICTestCase): |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 132 | """QUIC Echo Internal Test Case""" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 133 | |
| 134 | test_bytes = " test-bytes" |
Klement Sekera | d3e0d10 | 2023-01-26 12:35:35 +0100 | [diff] [blame] | 135 | extra_vpp_config = ["session", "{", "enable", "poll-main", "}"] |
Chore | 464e1dc | 2019-06-25 14:21:26 +0430 | [diff] [blame] | 136 | |
Dave Wallace | 211b28a | 2019-05-08 20:46:33 -0400 | [diff] [blame] | 137 | def setUp(self): |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 138 | super(QUICEchoIntTestCase, self).setUp() |
Dave Wallace | 8430c40 | 2023-01-26 12:44:01 -0500 | [diff] [blame] | 139 | self.client_args = ( |
Filip Tehlar | efe875e | 2023-09-04 14:17:52 +0200 | [diff] [blame] | 140 | f"uri {self.uri} fifo-size 64k{self.test_bytes} appns {self.client_appns} " |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 141 | ) |
Filip Tehlar | efe875e | 2023-09-04 14:17:52 +0200 | [diff] [blame] | 142 | self.server_args = f"uri {self.uri} fifo-size 64k appns {self.server_appns} " |
Dave Wallace | 211b28a | 2019-05-08 20:46:33 -0400 | [diff] [blame] | 143 | |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 144 | def tearDown(self): |
| 145 | super(QUICEchoIntTestCase, self).tearDown() |
| 146 | |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 147 | def server(self, *args): |
Dave Wallace | 8430c40 | 2023-01-26 12:44:01 -0500 | [diff] [blame] | 148 | _args = self.server_args + " ".join(args) |
| 149 | error = self.vapi.cli(f"test echo server {_args}") |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 150 | if error: |
| 151 | self.logger.critical(error) |
| 152 | self.assertNotIn("failed", error) |
Dave Wallace | 211b28a | 2019-05-08 20:46:33 -0400 | [diff] [blame] | 153 | |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 154 | def client(self, *args): |
Dave Wallace | 8430c40 | 2023-01-26 12:44:01 -0500 | [diff] [blame] | 155 | _args = self.client_args + " ".join(args) |
| 156 | error = self.vapi.cli(f"test echo client {_args}") |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 157 | if error: |
| 158 | self.logger.critical(error) |
| 159 | self.assertNotIn("failed", error) |
Dave Wallace | b063ad0 | 2019-04-09 21:01:09 -0400 | [diff] [blame] | 160 | |
Chore | 464e1dc | 2019-06-25 14:21:26 +0430 | [diff] [blame] | 161 | |
Andrew Yourtchenko | 8dc0d48 | 2021-01-29 13:17:19 +0000 | [diff] [blame] | 162 | @tag_fixme_vpp_workers |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 163 | class QUICEchoIntTransferTestCase(QUICEchoIntTestCase): |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 164 | """QUIC Echo Internal Transfer Test Case""" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 165 | |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 166 | def test_quic_int_transfer(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 167 | """QUIC internal transfer""" |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 168 | self.server() |
Filip Tehlar | efe875e | 2023-09-04 14:17:52 +0200 | [diff] [blame] | 169 | self.client("mbytes", "2") |
Dave Wallace | b063ad0 | 2019-04-09 21:01:09 -0400 | [diff] [blame] | 170 | |
Chore | 464e1dc | 2019-06-25 14:21:26 +0430 | [diff] [blame] | 171 | |
Andrew Yourtchenko | 8dc0d48 | 2021-01-29 13:17:19 +0000 | [diff] [blame] | 172 | @tag_fixme_vpp_workers |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 173 | class QUICEchoIntSerialTestCase(QUICEchoIntTestCase): |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 174 | """QUIC Echo Internal Serial Transfer Test Case""" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 175 | |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 176 | def test_quic_serial_int_transfer(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 177 | """QUIC serial internal transfer""" |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 178 | self.server() |
Filip Tehlar | efe875e | 2023-09-04 14:17:52 +0200 | [diff] [blame] | 179 | self.client("mbytes", "2") |
| 180 | self.client("mbytes", "2") |
| 181 | self.client("mbytes", "2") |
| 182 | self.client("mbytes", "2") |
| 183 | self.client("mbytes", "2") |
Dave Wallace | 0d144c7 | 2019-05-15 21:41:23 -0400 | [diff] [blame] | 184 | |
Chore | 464e1dc | 2019-06-25 14:21:26 +0430 | [diff] [blame] | 185 | |
Andrew Yourtchenko | 8dc0d48 | 2021-01-29 13:17:19 +0000 | [diff] [blame] | 186 | @tag_fixme_vpp_workers |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 187 | class QUICEchoIntMStreamTestCase(QUICEchoIntTestCase): |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 188 | """QUIC Echo Internal MultiStream Test Case""" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 189 | |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 190 | def test_quic_int_multistream_transfer(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 191 | """QUIC internal multi-stream transfer""" |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 192 | self.server() |
Filip Tehlar | efe875e | 2023-09-04 14:17:52 +0200 | [diff] [blame] | 193 | self.client("nclients", "10", "mbytes", "1") |
Dave Wallace | 3bffd4b | 2019-05-13 15:51:52 -0400 | [diff] [blame] | 194 | |
| 195 | |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 196 | class QUICEchoExtTestCase(QUICTestCase): |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 197 | quic_setup = "default" |
Dave Wallace | 3ad078d | 2019-10-21 22:45:23 +0000 | [diff] [blame] | 198 | test_bytes = "test-bytes:assert" |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 199 | pre_test_sleep = 1 |
| 200 | post_test_sleep = 1 |
Dave Wallace | 91af185 | 2019-10-21 03:28:17 +0000 | [diff] [blame] | 201 | app = "vpp_echo" |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 202 | evt_q_len = 16384 |
Klement Sekera | 8d81502 | 2021-03-15 16:58:10 +0100 | [diff] [blame] | 203 | vpp_worker_count = 1 |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 204 | server_fifo_size = "1M" |
| 205 | client_fifo_size = "4M" |
Klement Sekera | d3e0d10 | 2023-01-26 12:35:35 +0100 | [diff] [blame] | 206 | extra_vpp_config = [ |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 207 | "session", |
| 208 | "{", |
| 209 | "enable", |
| 210 | "poll-main", |
Dave Wallace | 8430c40 | 2023-01-26 12:44:01 -0500 | [diff] [blame] | 211 | "use-app-socket-api", |
Florin Coras | cf5c774 | 2022-06-28 14:34:45 -0700 | [diff] [blame] | 212 | "wrk-mqs-segment-size", |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 213 | "64M", |
| 214 | "event-queue-length", |
| 215 | f"{evt_q_len}", |
| 216 | "preallocated-sessions", |
| 217 | "1024", |
| 218 | "v4-session-table-buckets", |
| 219 | "20000", |
| 220 | "v4-session-table-memory", |
| 221 | "64M", |
| 222 | "v4-halfopen-table-buckets", |
| 223 | "20000", |
| 224 | "v4-halfopen-table-memory", |
| 225 | "64M", |
| 226 | "local-endpoints-table-buckets", |
| 227 | "250000", |
| 228 | "local-endpoints-table-memory", |
| 229 | "512M", |
| 230 | "}", |
| 231 | ] |
Dave Wallace | 3bffd4b | 2019-05-13 15:51:52 -0400 | [diff] [blame] | 232 | |
| 233 | def setUp(self): |
Dave Wallace | 8430c40 | 2023-01-26 12:44:01 -0500 | [diff] [blame] | 234 | self.server_appns_secret = 1234 |
| 235 | self.client_appns_secret = 5678 |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 236 | super(QUICEchoExtTestCase, self).setUp() |
Chore | 464e1dc | 2019-06-25 14:21:26 +0430 | [diff] [blame] | 237 | common_args = [ |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 238 | "uri", |
| 239 | self.uri, |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 240 | "json", |
Dave Wallace | 3ad078d | 2019-10-21 22:45:23 +0000 | [diff] [blame] | 241 | self.test_bytes, |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 242 | "quic-setup", |
| 243 | self.quic_setup, |
| 244 | "nthreads", |
| 245 | "1", |
| 246 | "mq-size", |
| 247 | f"{self.evt_q_len}", |
Dave Wallace | 8430c40 | 2023-01-26 12:44:01 -0500 | [diff] [blame] | 248 | "use-app-socket-api", |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 249 | ] |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 250 | self.server_echo_test_args = common_args + [ |
| 251 | "server", |
| 252 | "appns", |
Dave Wallace | 8430c40 | 2023-01-26 12:44:01 -0500 | [diff] [blame] | 253 | f"{self.server_appns}", |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 254 | "fifo-size", |
| 255 | f"{self.server_fifo_size}", |
Dave Wallace | 8430c40 | 2023-01-26 12:44:01 -0500 | [diff] [blame] | 256 | "socket-name", |
| 257 | f"{self.tempdir}/app_ns_sockets/{self.server_appns}", |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 258 | ] |
| 259 | self.client_echo_test_args = common_args + [ |
| 260 | "client", |
| 261 | "appns", |
Dave Wallace | 8430c40 | 2023-01-26 12:44:01 -0500 | [diff] [blame] | 262 | f"{self.client_appns}", |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 263 | "fifo-size", |
| 264 | f"{self.client_fifo_size}", |
Dave Wallace | 8430c40 | 2023-01-26 12:44:01 -0500 | [diff] [blame] | 265 | "socket-name", |
| 266 | f"{self.tempdir}/app_ns_sockets/{self.client_appns}", |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 267 | ] |
Dave Wallace | f9d784b | 2019-10-30 16:58:30 +0000 | [diff] [blame] | 268 | error = self.vapi.cli("quic set fifo-size 2M") |
Dave Wallace | 91af185 | 2019-10-21 03:28:17 +0000 | [diff] [blame] | 269 | if error: |
| 270 | self.logger.critical(error) |
| 271 | self.assertNotIn("failed", error) |
Dave Wallace | 3bffd4b | 2019-05-13 15:51:52 -0400 | [diff] [blame] | 272 | |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 273 | def server(self, *args): |
| 274 | _args = self.server_echo_test_args + list(args) |
Dave Wallace | 8430c40 | 2023-01-26 12:44:01 -0500 | [diff] [blame] | 275 | self.worker_server = QUICAppWorker( |
| 276 | self.app, _args, self.logger, self.server_appns, self |
| 277 | ) |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 278 | self.worker_server.start() |
| 279 | self.sleep(self.pre_test_sleep) |
Dave Wallace | 3bffd4b | 2019-05-13 15:51:52 -0400 | [diff] [blame] | 280 | |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 281 | def client(self, *args): |
| 282 | _args = self.client_echo_test_args + list(args) |
Dave Wallace | 8430c40 | 2023-01-26 12:44:01 -0500 | [diff] [blame] | 283 | self.worker_client = QUICAppWorker( |
| 284 | self.app, _args, self.logger, self.client_appns, self |
| 285 | ) |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 286 | self.worker_client.start() |
Dave Wallace | 91af185 | 2019-10-21 03:28:17 +0000 | [diff] [blame] | 287 | timeout = None if self.debug_all else self.timeout |
| 288 | self.worker_client.join(timeout) |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 289 | if self.worker_client.is_alive(): |
| 290 | error = f"Client failed to complete in {timeout} seconds!" |
| 291 | self.logger.critical(error) |
| 292 | return |
Dave Wallace | 91af185 | 2019-10-21 03:28:17 +0000 | [diff] [blame] | 293 | self.worker_server.join(timeout) |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 294 | if self.worker_server.is_alive(): |
| 295 | error = f"Server failed to complete in {timeout} seconds!" |
| 296 | self.logger.critical(error) |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 297 | self.sleep(self.post_test_sleep) |
Dave Wallace | 3bffd4b | 2019-05-13 15:51:52 -0400 | [diff] [blame] | 298 | |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 299 | def validate_ext_test_results(self): |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 300 | server_result = self.worker_server.result |
Florin Coras | e8a1dbf | 2023-09-06 19:09:30 -0700 | [diff] [blame] | 301 | self.logger.debug(self.vapi.cli(f"show session verbose 2")) |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 302 | client_result = self.worker_client.result |
Dave Wallace | 8430c40 | 2023-01-26 12:44:01 -0500 | [diff] [blame] | 303 | self.logger.info(f"Server worker result is `{server_result}'") |
| 304 | self.logger.info(f"Client worker result is `{client_result}'") |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 305 | server_kill_error = False |
| 306 | if self.worker_server.result is None: |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 307 | server_kill_error = self.worker_server.teardown(self.logger, self.timeout) |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 308 | if self.worker_client.result is None: |
| 309 | self.worker_client.teardown(self.logger, self.timeout) |
Dave Wallace | 8430c40 | 2023-01-26 12:44:01 -0500 | [diff] [blame] | 310 | err_msg = f"Wrong server worker return code ({server_result})" |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 311 | self.assertEqual(server_result, 0, err_msg) |
Chore | 464e1dc | 2019-06-25 14:21:26 +0430 | [diff] [blame] | 312 | self.assertIsNotNone( |
Dave Wallace | 8430c40 | 2023-01-26 12:44:01 -0500 | [diff] [blame] | 313 | client_result, f"Timeout! Client worker did not finish in {self.timeout}s" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 314 | ) |
Dave Wallace | 8430c40 | 2023-01-26 12:44:01 -0500 | [diff] [blame] | 315 | err_msg = f"Wrong client worker return code ({client_result})" |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 316 | self.assertEqual(client_result, 0, err_msg) |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 317 | self.assertFalse(server_kill_error, "Server kill errored") |
| 318 | |
| 319 | |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 320 | class QUICEchoExtTransferTestCase(QUICEchoExtTestCase): |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 321 | """QUIC Echo External Transfer Test Case""" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 322 | |
Paul Vinciguerra | 1063f2a | 2019-12-04 23:18:02 -0500 | [diff] [blame] | 323 | timeout = 60 |
| 324 | |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 325 | def test_quic_ext_transfer(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 326 | """QUIC external transfer""" |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 327 | self.server() |
| 328 | self.client() |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 329 | self.validate_ext_test_results() |
Dave Wallace | 3bffd4b | 2019-05-13 15:51:52 -0400 | [diff] [blame] | 330 | |
Chore | 464e1dc | 2019-06-25 14:21:26 +0430 | [diff] [blame] | 331 | |
Dave Wallace | 3ad078d | 2019-10-21 22:45:23 +0000 | [diff] [blame] | 332 | class QUICEchoExtTransferBigTestCase(QUICEchoExtTestCase): |
| 333 | """QUIC Echo External Transfer Big Test Case""" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 334 | |
| 335 | server_fifo_size = "4M" |
| 336 | client_fifo_size = "4M" |
| 337 | test_bytes = "" |
Paul Vinciguerra | 1063f2a | 2019-12-04 23:18:02 -0500 | [diff] [blame] | 338 | timeout = 60 |
Dave Wallace | 3ad078d | 2019-10-21 22:45:23 +0000 | [diff] [blame] | 339 | |
Klement Sekera | b23ffd7 | 2021-05-31 16:08:53 +0200 | [diff] [blame] | 340 | @unittest.skipUnless(config.extended, "part of extended tests") |
Dave Wallace | 3ad078d | 2019-10-21 22:45:23 +0000 | [diff] [blame] | 341 | def test_quic_ext_transfer_big(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 342 | """QUIC external transfer, big stream""" |
Dave Wallace | 2edff14 | 2020-02-07 17:55:53 -0500 | [diff] [blame] | 343 | self.server("TX=0", "RX=2G") |
| 344 | self.client("TX=2G", "RX=0") |
Dave Wallace | 3ad078d | 2019-10-21 22:45:23 +0000 | [diff] [blame] | 345 | self.validate_ext_test_results() |
| 346 | |
| 347 | |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 348 | class QUICEchoExtQcloseRxTestCase(QUICEchoExtTestCase): |
| 349 | """QUIC Echo External Transfer Qclose Rx Test Case""" |
| 350 | |
Klement Sekera | b23ffd7 | 2021-05-31 16:08:53 +0200 | [diff] [blame] | 351 | @unittest.skipUnless(config.extended, "part of extended tests") |
Dave Wallace | 2edff14 | 2020-02-07 17:55:53 -0500 | [diff] [blame] | 352 | @unittest.skip("testcase under development") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 353 | def test_quic_ext_qclose_rx(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 354 | """QUIC external transfer, rx close""" |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 355 | self.server("TX=0", "RX=10M", "qclose=Y", "sclose=N") |
| 356 | self.client("TX=10M", "RX=0", "qclose=W", "sclose=W") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 357 | self.validate_ext_test_results() |
| 358 | |
| 359 | |
| 360 | class QUICEchoExtQcloseTxTestCase(QUICEchoExtTestCase): |
| 361 | """QUIC Echo External Transfer Qclose Tx Test Case""" |
| 362 | |
Klement Sekera | b23ffd7 | 2021-05-31 16:08:53 +0200 | [diff] [blame] | 363 | @unittest.skipUnless(config.extended, "part of extended tests") |
Dave Wallace | 2edff14 | 2020-02-07 17:55:53 -0500 | [diff] [blame] | 364 | @unittest.skip("testcase under development") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 365 | def test_quic_ext_qclose_tx(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 366 | """QUIC external transfer, tx close""" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 367 | self.server("TX=0", "RX=10M", "qclose=W", "sclose=W", "rx-results-diff") |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 368 | self.client("TX=10M", "RX=0", "qclose=Y", "sclose=N") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 369 | self.validate_ext_test_results() |
| 370 | |
| 371 | |
| 372 | class QUICEchoExtEarlyQcloseRxTestCase(QUICEchoExtTestCase): |
| 373 | """QUIC Echo External Transfer Early Qclose Rx Test Case""" |
| 374 | |
Klement Sekera | b23ffd7 | 2021-05-31 16:08:53 +0200 | [diff] [blame] | 375 | @unittest.skipUnless(config.extended, "part of extended tests") |
Dave Wallace | 2edff14 | 2020-02-07 17:55:53 -0500 | [diff] [blame] | 376 | @unittest.skip("testcase under development") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 377 | def test_quic_ext_early_qclose_rx(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 378 | """QUIC external transfer, early rx close""" |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 379 | self.server("TX=0", "RX=10M", "qclose=Y", "sclose=N") |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 380 | self.client("TX=20M", "RX=0", "qclose=W", "sclose=W", "tx-results-diff") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 381 | self.validate_ext_test_results() |
| 382 | |
| 383 | |
| 384 | class QUICEchoExtEarlyQcloseTxTestCase(QUICEchoExtTestCase): |
| 385 | """QUIC Echo External Transfer Early Qclose Tx Test Case""" |
| 386 | |
Klement Sekera | b23ffd7 | 2021-05-31 16:08:53 +0200 | [diff] [blame] | 387 | @unittest.skipUnless(config.extended, "part of extended tests") |
Dave Wallace | 2edff14 | 2020-02-07 17:55:53 -0500 | [diff] [blame] | 388 | @unittest.skip("testcase under development") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 389 | def test_quic_ext_early_qclose_tx(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 390 | """QUIC external transfer, early tx close""" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 391 | self.server("TX=0", "RX=20M", "qclose=W", "sclose=W", "rx-results-diff") |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 392 | self.client("TX=10M", "RX=0", "qclose=Y", "sclose=N") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 393 | self.validate_ext_test_results() |
| 394 | |
| 395 | |
| 396 | class QUICEchoExtScloseRxTestCase(QUICEchoExtTestCase): |
| 397 | """QUIC Echo External Transfer Sclose Rx Test Case""" |
| 398 | |
Klement Sekera | b23ffd7 | 2021-05-31 16:08:53 +0200 | [diff] [blame] | 399 | @unittest.skipUnless(config.extended, "part of extended tests") |
Dave Wallace | 2edff14 | 2020-02-07 17:55:53 -0500 | [diff] [blame] | 400 | @unittest.skip("testcase under development") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 401 | def test_quic_ext_sclose_rx(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 402 | """QUIC external transfer, rx stream close""" |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 403 | self.server("TX=0", "RX=10M", "qclose=N", "sclose=Y") |
| 404 | self.client("TX=10M", "RX=0", "qclose=W", "sclose=W") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 405 | self.validate_ext_test_results() |
| 406 | |
| 407 | |
| 408 | class QUICEchoExtScloseTxTestCase(QUICEchoExtTestCase): |
| 409 | """QUIC Echo External Transfer Sclose Tx Test Case""" |
| 410 | |
Klement Sekera | b23ffd7 | 2021-05-31 16:08:53 +0200 | [diff] [blame] | 411 | @unittest.skipUnless(config.extended, "part of extended tests") |
Dave Wallace | 2edff14 | 2020-02-07 17:55:53 -0500 | [diff] [blame] | 412 | @unittest.skip("testcase under development") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 413 | def test_quic_ext_sclose_tx(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 414 | """QUIC external transfer, tx stream close""" |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 415 | self.server("TX=0", "RX=10M", "qclose=W", "sclose=W") |
| 416 | self.client("TX=10M", "RX=0", "qclose=Y", "sclose=Y") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 417 | self.validate_ext_test_results() |
| 418 | |
| 419 | |
| 420 | class QUICEchoExtEarlyScloseRxTestCase(QUICEchoExtTestCase): |
| 421 | """QUIC Echo External Transfer Early Sclose Rx Test Case""" |
| 422 | |
Klement Sekera | b23ffd7 | 2021-05-31 16:08:53 +0200 | [diff] [blame] | 423 | @unittest.skipUnless(config.extended, "part of extended tests") |
Dave Wallace | 2edff14 | 2020-02-07 17:55:53 -0500 | [diff] [blame] | 424 | @unittest.skip("testcase under development") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 425 | def test_quic_ext_early_sclose_rx(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 426 | """QUIC external transfer, early rx stream close""" |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 427 | self.server("TX=0", "RX=10M", "qclose=N", "sclose=Y") |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 428 | self.client("TX=20M", "RX=0", "qclose=W", "sclose=W", "tx-results-diff") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 429 | self.validate_ext_test_results() |
| 430 | |
| 431 | |
| 432 | class QUICEchoExtEarlyScloseTxTestCase(QUICEchoExtTestCase): |
Dave Wallace | ff5a9b6 | 2019-09-25 17:58:24 -0400 | [diff] [blame] | 433 | """QUIC Echo External Transfer Early Sclose Tx Test Case""" |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 434 | |
Klement Sekera | b23ffd7 | 2021-05-31 16:08:53 +0200 | [diff] [blame] | 435 | @unittest.skipUnless(config.extended, "part of extended tests") |
Dave Wallace | 2edff14 | 2020-02-07 17:55:53 -0500 | [diff] [blame] | 436 | @unittest.skip("testcase under development") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 437 | def test_quic_ext_early_sclose_tx(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 438 | """QUIC external transfer, early tx stream close""" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 439 | self.server("TX=0", "RX=20M", "qclose=W", "sclose=W", "rx-results-diff") |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 440 | self.client("TX=10M", "RX=0", "qclose=Y", "sclose=Y") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 441 | self.validate_ext_test_results() |
| 442 | |
| 443 | |
| 444 | class QUICEchoExtServerStreamTestCase(QUICEchoExtTestCase): |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 445 | """QUIC Echo External Transfer Server Stream Test Case""" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 446 | |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 447 | quic_setup = "serverstream" |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 448 | timeout = 60 |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 449 | |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 450 | def test_quic_ext_transfer_server_stream(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 451 | """QUIC external server transfer""" |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 452 | self.server("TX=10M", "RX=0") |
| 453 | self.client("TX=0", "RX=10M") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 454 | self.validate_ext_test_results() |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 455 | |
Chore | 464e1dc | 2019-06-25 14:21:26 +0430 | [diff] [blame] | 456 | |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 457 | class QUICEchoExtServerStreamBigTestCase(QUICEchoExtTestCase): |
| 458 | """QUIC Echo External Transfer Server Stream Big Test Case""" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 459 | |
Dave Wallace | 3ad078d | 2019-10-21 22:45:23 +0000 | [diff] [blame] | 460 | quic_setup = "serverstream" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 461 | server_fifo_size = "4M" |
| 462 | client_fifo_size = "4M" |
| 463 | test_bytes = "" |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 464 | timeout = 60 |
Dave Wallace | 3ad078d | 2019-10-21 22:45:23 +0000 | [diff] [blame] | 465 | |
Klement Sekera | b23ffd7 | 2021-05-31 16:08:53 +0200 | [diff] [blame] | 466 | @unittest.skipUnless(config.extended, "part of extended tests") |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 467 | def test_quic_ext_transfer_server_stream_big(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 468 | """QUIC external server transfer, big stream""" |
Dave Wallace | 2edff14 | 2020-02-07 17:55:53 -0500 | [diff] [blame] | 469 | self.server("TX=2G", "RX=0") |
| 470 | self.client("TX=0", "RX=2G") |
Dave Wallace | 3ad078d | 2019-10-21 22:45:23 +0000 | [diff] [blame] | 471 | self.validate_ext_test_results() |
| 472 | |
| 473 | |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 474 | class QUICEchoExtServerStreamQcloseRxTestCase(QUICEchoExtTestCase): |
| 475 | """QUIC Echo External Transfer Server Stream Qclose Rx Test Case""" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 476 | |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 477 | quic_setup = "serverstream" |
| 478 | |
Klement Sekera | b23ffd7 | 2021-05-31 16:08:53 +0200 | [diff] [blame] | 479 | @unittest.skipUnless(config.extended, "part of extended tests") |
Dave Wallace | 2edff14 | 2020-02-07 17:55:53 -0500 | [diff] [blame] | 480 | @unittest.skip("testcase under development") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 481 | def test_quic_ext_server_stream_qclose_rx(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 482 | """QUIC external server transfer, rx close""" |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 483 | self.server("TX=10M", "RX=0", "qclose=W", "sclose=W") |
| 484 | self.client("TX=0", "RX=10M", "qclose=Y", "sclose=N") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 485 | self.validate_ext_test_results() |
| 486 | |
| 487 | |
| 488 | class QUICEchoExtServerStreamQcloseTxTestCase(QUICEchoExtTestCase): |
| 489 | """QUIC Echo External Transfer Server Stream Qclose Tx Test Case""" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 490 | |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 491 | quic_setup = "serverstream" |
| 492 | |
Klement Sekera | b23ffd7 | 2021-05-31 16:08:53 +0200 | [diff] [blame] | 493 | @unittest.skipUnless(config.extended, "part of extended tests") |
Dave Wallace | 2edff14 | 2020-02-07 17:55:53 -0500 | [diff] [blame] | 494 | @unittest.skip("testcase under development") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 495 | def test_quic_ext_server_stream_qclose_tx(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 496 | """QUIC external server transfer, tx close""" |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 497 | self.server("TX=10M", "RX=0", "qclose=Y", "sclose=N") |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 498 | self.client("TX=0", "RX=10M", "qclose=W", "sclose=W", "rx-results-diff") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 499 | self.validate_ext_test_results() |
| 500 | |
| 501 | |
| 502 | class QUICEchoExtServerStreamEarlyQcloseRxTestCase(QUICEchoExtTestCase): |
| 503 | """QUIC Echo External Transfer Server Stream Early Qclose Rx Test Case""" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 504 | |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 505 | quic_setup = "serverstream" |
| 506 | |
Klement Sekera | b23ffd7 | 2021-05-31 16:08:53 +0200 | [diff] [blame] | 507 | @unittest.skipUnless(config.extended, "part of extended tests") |
Dave Wallace | 2edff14 | 2020-02-07 17:55:53 -0500 | [diff] [blame] | 508 | @unittest.skip("testcase under development") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 509 | def test_quic_ext_server_stream_early_qclose_rx(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 510 | """QUIC external server transfer, early rx close""" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 511 | self.server("TX=20M", "RX=0", "qclose=W", "sclose=W", "tx-results-diff") |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 512 | self.client("TX=0", "RX=10M", "qclose=Y", "sclose=N") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 513 | self.validate_ext_test_results() |
| 514 | |
| 515 | |
| 516 | class QUICEchoExtServerStreamEarlyQcloseTxTestCase(QUICEchoExtTestCase): |
| 517 | """QUIC Echo External Transfer Server Stream Early Qclose Tx Test Case""" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 518 | |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 519 | quic_setup = "serverstream" |
| 520 | |
Klement Sekera | b23ffd7 | 2021-05-31 16:08:53 +0200 | [diff] [blame] | 521 | @unittest.skipUnless(config.extended, "part of extended tests") |
Dave Wallace | 2edff14 | 2020-02-07 17:55:53 -0500 | [diff] [blame] | 522 | @unittest.skip("testcase under development") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 523 | def test_quic_ext_server_stream_early_qclose_tx(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 524 | """QUIC external server transfer, early tx close""" |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 525 | self.server("TX=10M", "RX=0", "qclose=Y", "sclose=N") |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 526 | self.client("TX=0", "RX=20M", "qclose=W", "sclose=W", "rx-results-diff") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 527 | self.validate_ext_test_results() |
| 528 | |
| 529 | |
| 530 | class QUICEchoExtServerStreamScloseRxTestCase(QUICEchoExtTestCase): |
| 531 | """QUIC Echo External Transfer Server Stream Sclose Rx Test Case""" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 532 | |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 533 | quic_setup = "serverstream" |
| 534 | |
Klement Sekera | b23ffd7 | 2021-05-31 16:08:53 +0200 | [diff] [blame] | 535 | @unittest.skipUnless(config.extended, "part of extended tests") |
Dave Wallace | 2edff14 | 2020-02-07 17:55:53 -0500 | [diff] [blame] | 536 | @unittest.skip("testcase under development") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 537 | def test_quic_ext_server_stream_sclose_rx(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 538 | """QUIC external server transfer, rx stream close""" |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 539 | self.server("TX=10M", "RX=0", "qclose=W", "sclose=W") |
| 540 | self.client("TX=0", "RX=10M", "qclose=N", "sclose=Y") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 541 | self.validate_ext_test_results() |
| 542 | |
| 543 | |
| 544 | class QUICEchoExtServerStreamScloseTxTestCase(QUICEchoExtTestCase): |
| 545 | """QUIC Echo External Transfer Server Stream Sclose Tx Test Case""" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 546 | |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 547 | quic_setup = "serverstream" |
| 548 | |
Klement Sekera | b23ffd7 | 2021-05-31 16:08:53 +0200 | [diff] [blame] | 549 | @unittest.skipUnless(config.extended, "part of extended tests") |
Dave Wallace | 2edff14 | 2020-02-07 17:55:53 -0500 | [diff] [blame] | 550 | @unittest.skip("testcase under development") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 551 | def test_quic_ext_server_stream_sclose_tx(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 552 | """QUIC external server transfer, tx stream close""" |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 553 | self.server("TX=10M", "RX=0", "qclose=Y", "sclose=Y") |
| 554 | self.client("TX=0", "RX=10M", "qclose=W", "sclose=W") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 555 | self.validate_ext_test_results() |
| 556 | |
| 557 | |
| 558 | class QUICEchoExtServerStreamEarlyScloseRxTestCase(QUICEchoExtTestCase): |
| 559 | """QUIC Echo External Transfer Server Stream Early Sclose Rx Test Case""" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 560 | |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 561 | quic_setup = "serverstream" |
| 562 | |
Klement Sekera | b23ffd7 | 2021-05-31 16:08:53 +0200 | [diff] [blame] | 563 | @unittest.skipUnless(config.extended, "part of extended tests") |
Dave Wallace | 2edff14 | 2020-02-07 17:55:53 -0500 | [diff] [blame] | 564 | @unittest.skip("testcase under development") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 565 | def test_quic_ext_server_stream_early_sclose_rx(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 566 | """QUIC external server transfer, early rx stream close""" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 567 | self.server("TX=20M", "RX=0", "qclose=W", "sclose=W", "tx-results-diff") |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 568 | self.client("TX=0", "RX=10M", "qclose=N", "sclose=Y") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 569 | self.validate_ext_test_results() |
| 570 | |
| 571 | |
| 572 | class QUICEchoExtServerStreamEarlyScloseTxTestCase(QUICEchoExtTestCase): |
| 573 | """QUIC Echo Ext Transfer Server Stream Early Sclose Tx Test Case""" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 574 | |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 575 | quic_setup = "serverstream" |
| 576 | |
Klement Sekera | b23ffd7 | 2021-05-31 16:08:53 +0200 | [diff] [blame] | 577 | @unittest.skipUnless(config.extended, "part of extended tests") |
Dave Wallace | 2edff14 | 2020-02-07 17:55:53 -0500 | [diff] [blame] | 578 | @unittest.skip("testcase under development") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 579 | def test_quic_ext_server_stream_early_sclose_tx(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 580 | """QUIC external server transfer, early tx stream close""" |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 581 | self.server("TX=10M", "RX=0", "qclose=Y", "sclose=Y") |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 582 | self.client("TX=0", "RX=20M", "qclose=W", "sclose=W", "rx-results-diff") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 583 | self.validate_ext_test_results() |
| 584 | |
| 585 | |
| 586 | class QUICEchoExtServerStreamWorkersTestCase(QUICEchoExtTestCase): |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 587 | """QUIC Echo External Transfer Server Stream MultiWorker Test Case""" |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 588 | |
Dave Wallace | 47e7730 | 2019-06-05 10:40:07 -0400 | [diff] [blame] | 589 | quic_setup = "serverstream" |
| 590 | |
Klement Sekera | b23ffd7 | 2021-05-31 16:08:53 +0200 | [diff] [blame] | 591 | @unittest.skipUnless(config.extended, "part of extended tests") |
Dave Wallace | 2edff14 | 2020-02-07 17:55:53 -0500 | [diff] [blame] | 592 | @unittest.skip("testcase under development") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 593 | def test_quic_ext_transfer_server_stream_multi_workers(self): |
Dave Wallace | 03ec134 | 2020-05-05 19:45:10 +0000 | [diff] [blame] | 594 | """QUIC external server transfer, multi-worker""" |
Dave Wallace | 3ce0352 | 2020-01-27 18:21:15 -0500 | [diff] [blame] | 595 | self.server("nclients", "4", "quic-streams", "4", "TX=10M", "RX=0") |
| 596 | self.client("nclients", "4", "quic-streams", "4", "TX=0", "RX=10M") |
Dave Wallace | 83c1e9a | 2019-09-21 04:19:26 +0000 | [diff] [blame] | 597 | self.validate_ext_test_results() |
Dave Wallace | 211b28a | 2019-05-08 20:46:33 -0400 | [diff] [blame] | 598 | |
Dave Wallace | b063ad0 | 2019-04-09 21:01:09 -0400 | [diff] [blame] | 599 | |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 600 | if __name__ == "__main__": |
Dave Wallace | b063ad0 | 2019-04-09 21:01:09 -0400 | [diff] [blame] | 601 | unittest.main(testRunner=VppTestRunner) |