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