]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
quic_multistream_test: Output info about connection close reason
authorTomas Mraz <tomas@openssl.org>
Mon, 23 Oct 2023 14:05:27 +0000 (16:05 +0200)
committerMatt Caswell <matt@openssl.org>
Wed, 25 Oct 2023 08:39:41 +0000 (09:39 +0100)
In case the connection close error code is unexpected
print out the reason to help with diagnostics.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22474)

test/quic_multistream_test.c

index 36be2dc80c02b57cf808a94ac795c77b0c78a1a7..09792c2f716df29cca2b085f0f87e37dbc747e41 100644 (file)
@@ -1640,8 +1640,10 @@ static int run_script_worker(struct helper *h, const struct script_op *script,
                     || !TEST_int_eq(expect_remote,
                                     (cc_info.flags
                                      & SSL_CONN_CLOSE_FLAG_LOCAL) == 0)
-                    || !TEST_uint64_t_eq(error_code, cc_info.error_code))
+                    || !TEST_uint64_t_eq(error_code, cc_info.error_code)) {
+                    TEST_info("Connection close reason: %s", cc_info.reason);
                     goto out;
+                }
             }
             break;