Commit 9cb5ef6
committed
Bug#37385923 routertest_integration_routing_sharing select_overlong times out
$ routertest_integration_routing_sharing
--gtest_filter=Spec/ShareConnectionTest.select_overlong/ssl_modes_PREFERRED__DISABLED_socket
takes over 150s to complete if Router is built with
-DCMAKE_BUILD_TYPE=Debug.
With RelWithDebInfo and Release the test takes 0.2s.
Background
==========
Building with CMAKE_BUILD_TYPE=Debug disables optimizations which leads
to std::vector.resize() trying to initialize every byte before each read
from an encrypted socket.
For "select_overlong", 16Mbyte of memory are allocated, passed to
SSL_read() which only uses 16kByte, but all 16M were tried to be
initialized.
Change
======
- before SSL_read() only resize() the std::vector by 16k, the max size
SSL_read() will return.
That reduces the test runtime from 150sec to 2sec.
Change-Id: I5b60712ca01ec84fcc33b23a7ab82864af7a6e651 parent 742e16a commit 9cb5ef6
1 file changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
238 | 246 | | |
239 | 247 | | |
240 | 248 | | |
241 | | - | |
| 249 | + | |
242 | 250 | | |
243 | 251 | | |
244 | 252 | | |
| |||
248 | 256 | | |
249 | 257 | | |
250 | 258 | | |
251 | | - | |
252 | 259 | | |
253 | 260 | | |
254 | 261 | | |
| |||
0 commit comments