Martin Kustermann
931ec382d4
[io/gardening] Fix client address binding & fix standalone/io/socket_local_port_test
...
Various changes to the stanalone/io/socket_local_port_test:
* Make server ports ephemeral: The test is testing client-side
binding of address & port, the server part can use ephemeral ports.
=> This eliminates the issue of another process using the
hard-coded port
* Close sockets normally instead of using `Socket.destroy()`
* Make dead code alive: There were test in the tests that were
not invoked by `main()`.
* Align the individual test helper functions.
* ...
Then we change the dart:io implementation of `Socket::CreateBindConnect`
to set the `SO_REUSEADDR` socket option. We do this already for the
server side in `Socket::CreateBindListen`, now we do it also for the
client side.
=> This will ensure that one can bind the client side socket to
specific address/source despite there being an old closed
socket that's now in `TIME_WAIT` state.
=> This is the same reason we also do it in `Socket::CreateBindListen`.
Fuchsia doesn't implement `Socket::CreateBindConnect` and on Windows
the socket option seemingly has different semantics (we also don't use
`SO_REUSEADDR` on windows for the server socket, but another option).
Issue https://github.com/dart-lang/sdk/issues/51477
TEST=standalone/io/socket_local_port_test
Change-Id: I7d07becad0cd98c3a9b973ef2f9037730d3f8b19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436902
Commit-Queue: Martin Kustermann <kustermann@google.com >
Reviewed-by: Slava Egorov <vegorov@google.com >
2025-06-25 02:56:21 -07:00
..
2025-05-15 22:53:41 -07:00
2023-10-11 18:41:57 +00:00
2023-04-12 01:11:05 +00:00
2025-05-21 02:53:49 -07:00
2025-06-17 16:07:39 -07:00
2023-04-12 01:11:05 +00:00
2025-04-15 09:07:59 -07:00
2023-04-12 01:11:05 +00:00
2025-05-13 14:25:36 -07:00
2024-07-10 19:45:29 +00:00
2024-07-10 19:45:29 +00:00
2024-04-17 19:14:41 +00:00
2023-04-12 20:32:29 +00:00
2024-02-09 14:10:49 +00:00
2023-04-12 01:11:05 +00:00
2025-06-24 05:59:21 -07:00
2025-04-25 08:51:22 -07:00
2024-04-17 19:14:41 +00:00
2023-10-31 17:11:51 +00:00
2024-11-08 04:36:23 +00:00
2025-06-09 10:51:49 -07:00
2025-01-16 09:15:01 -08:00
2025-06-24 05:59:21 -07:00
2025-06-24 05:59:21 -07:00
2025-06-24 05:59:21 -07:00
2025-02-03 12:55:53 -08:00
2024-04-17 19:14:41 +00:00
2024-02-09 14:10:49 +00:00
2023-04-12 01:11:05 +00:00
2023-04-12 01:11:05 +00:00
2024-08-15 17:51:10 +00:00
2024-01-11 23:54:59 +00:00
2024-03-12 08:29:36 +00:00
2025-06-11 04:43:24 -07:00
2025-04-01 09:50:12 -07:00
2025-01-24 03:21:22 -08:00
2023-07-14 01:31:38 +00:00
2023-04-12 20:32:29 +00:00
2024-09-24 22:41:40 +00:00
2024-08-06 12:26:19 +00:00
2025-05-05 13:07:38 -07:00
2024-08-06 12:26:19 +00:00
2024-09-24 22:41:40 +00:00
2024-08-06 12:26:19 +00:00
2025-01-16 07:47:51 -08:00
2025-01-23 04:19:48 -08:00
2023-04-12 01:11:05 +00:00
2024-08-06 12:26:19 +00:00
2024-06-06 19:10:19 +00:00
2024-06-06 19:10:19 +00:00
2025-05-05 13:07:38 -07:00
2025-04-01 09:50:12 -07:00
2025-04-01 09:50:12 -07:00
2025-04-01 09:50:12 -07:00
2024-04-17 19:14:41 +00:00
2024-02-09 14:10:49 +00:00
2024-08-07 12:59:35 +00:00
2024-08-06 12:26:19 +00:00
2023-07-04 13:10:42 +00:00
2024-04-17 19:14:41 +00:00
2025-04-01 09:50:12 -07:00
2024-08-15 17:51:10 +00:00
2024-07-30 18:08:46 +00:00
2025-04-01 09:50:12 -07:00
2024-08-20 18:13:33 +00:00
2024-08-20 18:13:33 +00:00
2025-06-17 02:40:40 -07:00
2023-04-12 01:11:05 +00:00
2024-09-30 10:23:45 +00:00
2024-07-17 16:47:50 +00:00
2024-07-17 16:47:50 +00:00
2024-02-09 14:10:49 +00:00
2024-02-09 14:10:49 +00:00
2023-04-18 20:56:00 +00:00
2024-02-09 14:10:49 +00:00
2024-08-20 18:13:33 +00:00
2024-10-22 23:09:20 +00:00
2024-10-22 23:09:20 +00:00
2024-10-22 23:09:20 +00:00
2024-10-22 23:09:20 +00:00
2023-04-12 01:11:05 +00:00
2025-02-03 12:55:53 -08:00
2025-04-15 09:07:59 -07:00
2024-06-26 11:10:06 +00:00
2025-01-23 04:19:48 -08:00
2025-06-11 04:43:24 -07:00
2025-06-03 05:56:59 -07:00
2025-06-24 05:59:21 -07:00
2025-06-11 15:19:55 -07:00
2025-06-03 05:56:59 -07:00
2025-06-03 05:56:59 -07:00
2025-06-03 05:56:59 -07:00
2024-04-17 19:14:41 +00:00
2024-02-09 14:10:49 +00:00
2023-04-12 01:11:05 +00:00
2024-03-12 08:29:36 +00:00
2023-04-12 20:32:29 +00:00
2023-04-12 20:32:29 +00:00
2025-06-18 02:10:55 -07:00
2024-06-12 16:45:19 +00:00
2023-04-12 01:11:05 +00:00
2023-04-12 01:11:05 +00:00
2023-09-05 22:15:58 +00:00
2024-02-09 14:10:49 +00:00
2024-08-07 19:28:10 +00:00
2025-06-11 12:32:39 -07:00
2023-04-12 01:11:05 +00:00
2023-09-05 22:15:58 +00:00
2025-01-16 09:15:01 -08:00
2025-05-28 10:28:20 -07:00
2025-05-28 10:28:20 -07:00
2023-04-12 01:11:05 +00:00
2025-05-06 17:10:25 -07:00
2025-02-10 09:38:42 -08:00
2025-01-16 09:15:01 -08:00
2023-07-11 15:13:58 +00:00
2023-04-12 01:11:05 +00:00
2023-10-31 17:11:51 +00:00
2025-06-04 15:14:15 -07:00
2025-06-24 12:17:24 -07:00
2025-06-24 12:17:24 -07:00
2024-07-01 21:00:00 +00:00
2023-04-12 01:11:05 +00:00
2023-04-12 01:11:05 +00:00
2024-01-31 19:24:29 +00:00
2025-06-24 12:17:24 -07:00
2025-06-24 12:17:24 -07:00
2025-06-24 12:17:24 -07:00
2025-06-24 12:17:24 -07:00
2024-07-01 21:00:00 +00:00
2025-06-24 12:17:24 -07:00
2025-05-27 06:30:20 -07:00
2025-06-18 13:07:22 -07:00
2025-06-24 05:59:21 -07:00
2024-04-17 19:14:41 +00:00
2024-02-09 14:10:49 +00:00
2023-04-12 01:11:05 +00:00
2024-02-09 14:10:49 +00:00
2024-08-06 12:26:19 +00:00
2025-03-28 14:49:19 -07:00
2024-12-26 12:28:58 -08:00
2023-04-12 01:11:05 +00:00
2025-06-25 02:56:21 -07:00
2025-06-25 02:56:21 -07:00
2024-10-23 19:13:05 +00:00
2024-04-17 19:14:41 +00:00
2024-04-17 19:14:41 +00:00
2025-03-31 14:31:47 -07:00
2025-03-31 14:31:47 -07:00
2023-04-12 01:11:05 +00:00
2023-04-12 01:11:05 +00:00
2024-02-09 14:10:49 +00:00
2023-04-12 01:11:05 +00:00
2023-04-12 20:32:29 +00:00
2023-04-12 20:32:29 +00:00
2023-04-12 20:32:29 +00:00
2024-09-24 22:41:40 +00:00
2024-09-24 22:41:40 +00:00
2024-09-24 22:41:40 +00:00
2024-09-24 22:41:40 +00:00
2024-09-24 22:41:40 +00:00
2024-09-24 22:41:40 +00:00
2024-09-24 22:41:40 +00:00
2024-01-26 22:08:37 +00:00
2024-06-26 11:10:06 +00:00
2024-09-30 10:21:57 +00:00
2024-06-26 11:10:06 +00:00
2023-04-12 01:11:05 +00:00
2024-02-09 14:10:49 +00:00
2024-04-17 19:14:41 +00:00
2025-05-06 17:10:25 -07:00
2025-05-06 17:10:25 -07:00
2023-04-12 01:11:05 +00:00
2025-02-28 02:24:38 -08:00
2023-04-12 01:11:05 +00:00
2025-06-11 15:19:55 -07:00
2024-12-20 09:00:17 -08:00