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