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