QUIC MULTISTREAM TEST: Fix connect-or-fail
authorHugo Landau <hlandau@openssl.org>
Thu, 17 Aug 2023 17:32:16 +0000 (18:32 +0100)
committerTomas Mraz <tomas@openssl.org>
Tue, 29 Aug 2023 13:33:22 +0000 (15:33 +0200)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21764)

test/quic_multistream_test.c

index ba973ed11ea868d2e4a63907c74ea79463b0b011..42221880d170224e407c7187293dedc1d6f05f6c 100644 (file)
@@ -987,12 +987,13 @@ static int run_script_worker(struct helper *h, const struct script_op *script,
                 connect_started = 1;
 
                 ret = SSL_connect(h->c_conn);
-                if (!TEST_true((ret == 1 || op->arg1 > 0)
-                               || (!h->blocking && is_want(h->c_conn, ret))))
-                    goto out;
+                if (ret != 1) {
+                    if (!h->blocking && is_want(h->c_conn, ret))
+                        SPIN_AGAIN();
 
-                if (!h->blocking && ret < 0)
-                    SPIN_AGAIN();
+                    if (op->arg1 == 0 && !TEST_int_eq(ret, 1))
+                        goto out;
+                }
             }
             break;