diff options
author | Hugo Landau <hlandau@openssl.org> | 2023-03-22 18:46:55 +0000 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-03-30 11:14:16 +0100 |
commit | 54b86b7fa313789e7cc79317c692410c8f336660 (patch) | |
tree | 28d158611cf89dff20d1d15237a0b44d0a0ca57b /test | |
parent | 9cf091a3c5f34277dca1cac979c7d632c7236d7b (diff) | |
download | openssl-new-54b86b7fa313789e7cc79317c692410c8f336660.tar.gz |
QUIC test fix
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20348)
Diffstat (limited to 'test')
-rw-r--r-- | test/quicapitest.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/test/quicapitest.c b/test/quicapitest.c index 487e6fa936..5f167aa382 100644 --- a/test/quicapitest.c +++ b/test/quicapitest.c @@ -65,13 +65,21 @@ static int test_quic_write_read(int idx) /* Check that sending and receiving app data is ok */ if (!TEST_true(SSL_write_ex(clientquic, msg, msglen, &numbytes))) goto end; - if (idx == 1 && !TEST_true(wait_until_sock_readable(ssock))) - goto end; - ossl_quic_tserver_tick(qtserv); - if (!TEST_true(ossl_quic_tserver_read(qtserv, buf, sizeof(buf), - &numbytes)) - || !TEST_mem_eq(buf, numbytes, msg, msglen)) - goto end; + if (idx == 1) { + do { + if (!TEST_true(wait_until_sock_readable(ssock))) + goto end; + + ossl_quic_tserver_tick(qtserv); + + if (!TEST_true(ossl_quic_tserver_read(qtserv, buf, sizeof(buf), + &numbytes))) + goto end; + } while (numbytes == 0); + + if (!TEST_mem_eq(buf, numbytes, msg, msglen)) + goto end; + } if (!TEST_true(ossl_quic_tserver_write(qtserv, (unsigned char *)msg, msglen, &numbytes))) |