]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
QUIC MULTISTREAM TEST: Adjust spin behaviour
authorHugo Landau <hlandau@openssl.org>
Wed, 30 Aug 2023 07:01:47 +0000 (08:01 +0100)
committerHugo Landau <hlandau@openssl.org>
Wed, 6 Sep 2023 09:32:14 +0000 (10:32 +0100)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21827)

test/quic_multistream_test.c

index bc32708d7241054f92ff2332668baed5c28c8737..1138e3e1e60250e16a2be61b465f9585ce58d475 100644 (file)
@@ -1005,14 +1005,24 @@ static int run_script_worker(struct helper *h, const struct script_op *script,
     if (!TEST_true(helper_local_init(hl, h, thread_idx)))
         goto out;
 
-#define S_SPIN_AGAIN() { OSSL_sleep(1); no_advance = 1; continue; }
+#define COMMON_SPIN_AGAIN()                             \
+    {                                                   \
+        no_advance = 1;                                 \
+        continue;                                       \
+    }
+#define S_SPIN_AGAIN()                                  \
+    {                                                   \
+        s_lock(h, hl);                                  \
+        ossl_quic_tserver_tick(h->s);                   \
+        COMMON_SPIN_AGAIN();                            \
+    }
 #define C_SPIN_AGAIN()                                  \
     {                                                   \
         if (h->blocking) {                              \
             TEST_error("spin again in blocking mode");  \
             goto out;                                   \
         }                                               \
-        S_SPIN_AGAIN();                                 \
+        COMMON_SPIN_AGAIN();                            \
     }
 
     for (;;) {