From: Neil Horman Date: Fri, 21 Feb 2025 17:22:17 +0000 (-0500) Subject: Convert test_bio_ssl to use fake time X-Git-Tag: openssl-3.5.0-alpha1~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=192f096afd4935599233efadff0a8d8d57f2075e;p=thirdparty%2Fopenssl.git Convert test_bio_ssl to use fake time 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) --- 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);