From a1d2a9d12d269ba551b1d2d3bc825aedad8984c9 Mon Sep 17 00:00:00 2001 From: Hugo Landau Date: Thu, 17 Aug 2023 18:32:16 +0100 Subject: [PATCH] QUIC MULTISTREAM TEST: Fix connect-or-fail Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/21764) --- test/quic_multistream_test.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/quic_multistream_test.c b/test/quic_multistream_test.c index ba973ed11ea..42221880d17 100644 --- a/test/quic_multistream_test.c +++ b/test/quic_multistream_test.c @@ -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; -- 2.47.2