From 192f096afd4935599233efadff0a8d8d57f2075e Mon Sep 17 00:00:00 2001 From: Neil Horman Date: Fri, 21 Feb 2025 12:22:17 -0500 Subject: [PATCH] Convert test_bio_ssl to use fake time MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The test_bio_ssl test in quicapitest is failing on windows. Something about the timing there is causing wide variance in how long it takes to establish a handshake (between 130-6500 iterations). Convert it to use fake time to make it run consistently. Reviewed-by: Tim Hudson Reviewed-by: Saša Nedvědický Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/26801) --- test/quicapitest.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/quicapitest.c b/test/quicapitest.c index dee8f2f6c85..1e946877029 100644 --- a/test/quicapitest.c +++ b/test/quicapitest.c @@ -1005,8 +1005,8 @@ static int test_bio_ssl(void) goto err; if (!TEST_true(qtest_create_quic_objects(libctx, NULL, NULL, cert, privkey, - 0, &qtserv, &clientquic, NULL, - NULL))) + QTEST_FLAG_FAKE_TIME, &qtserv, + &clientquic, NULL, NULL))) goto err; msglen = strlen(msg); @@ -1031,6 +1031,7 @@ static int test_bio_ssl(void) if (!servererr && rets <= 0) { ossl_quic_tserver_tick(qtserv); + qtest_add_time(100); servererr = ossl_quic_tserver_is_term_any(qtserv); if (!servererr) rets = ossl_quic_tserver_is_handshake_confirmed(qtserv); -- 2.47.2