diff options
author | Hugo Landau <hlandau@openssl.org> | 2023-05-02 19:21:07 +0200 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-05-24 11:34:47 +0200 |
commit | 1a0de4c1eea1f32a3e1113add26625d49b3854d8 (patch) | |
tree | 6783c6ed6713f051406131b0dddb328c556d953b | |
parent | QUIC MSMT: macOS robustness fixes (diff) | |
download | openssl-1a0de4c1eea1f32a3e1113add26625d49b3854d8.tar.xz openssl-1a0de4c1eea1f32a3e1113add26625d49b3854d8.zip |
QUIC TSERVER: Use a random port in the tserver test
Fixes nondeterministic failures where BIO_bind would fail on some
platforms.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20856)
-rw-r--r-- | test/quic_tserver_test.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/test/quic_tserver_test.c b/test/quic_tserver_test.c index e9ae4703b2..cc412eafd0 100644 --- a/test/quic_tserver_test.c +++ b/test/quic_tserver_test.c @@ -64,7 +64,6 @@ static int do_test(int use_thread_assist, int use_fake_time, int use_inject) union BIO_sock_info_u s_info = {0}; SSL_CTX *c_ctx = NULL; SSL *c_ssl = NULL; - short port = 8186; int c_connected = 0, c_write_done = 0, c_begin_read = 0, s_read_done = 0; int c_wait_eos = 0, c_done_eos = 0; int c_start_idle_test = 0, c_done_idle_test = 0; @@ -89,8 +88,7 @@ static int do_test(int use_thread_assist, int use_fake_time, int use_inject) if (!TEST_ptr(s_addr_ = BIO_ADDR_new())) goto err; - if (!TEST_true(BIO_ADDR_rawmake(s_addr_, AF_INET, &ina, sizeof(ina), - htons(port)))) + if (!TEST_true(BIO_ADDR_rawmake(s_addr_, AF_INET, &ina, sizeof(ina), 0))) goto err; if (!TEST_true(BIO_bind(s_fd, s_addr_, 0))) |