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