]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
QUIC MULTISTREAM TEST: Fix script 38 stochastic failure on Windows
authorHugo Landau <hlandau@openssl.org>
Tue, 31 Oct 2023 15:58:21 +0000 (15:58 +0000)
committerHugo Landau <hlandau@openssl.org>
Thu, 2 Nov 2023 08:11:31 +0000 (08:11 +0000)
The QUIC fault injector frame injection functionality injects injected
frames on whatever EL we happen to be using to generate a packet in.
This means we sometimes inject the frame into a packet type it is not
allowed to be in, causing a different error code to be generated.

Fix this by making sure the connection is fully established before
trying to generate the frame in question.

Fixes #22348.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22578)

test/quic_multistream_test.c

index 25cd83db349dca94f4a9f7e4738972bdb0c83b8f..795a8973a150de32cc519cf53a9142140934e74c 100644 (file)
@@ -3316,8 +3316,15 @@ static const struct script_op script_38[] = {
     OP_C_CONNECT_WAIT       ()
     OP_C_SET_DEFAULT_STREAM_MODE(SSL_DEFAULT_STREAM_MODE_NONE)
 
-    OP_S_NEW_STREAM_UNI     (b, S_UNI_ID(0))
+    OP_C_NEW_STREAM_UNI     (a, C_UNI_ID(0))
+    OP_C_WRITE              (a, "apple", 5)
+
+    OP_S_BIND_STREAM_ID     (a, C_UNI_ID(0))
+    OP_S_READ_EXPECT        (a, "apple", 5)
+
     OP_SET_INJECT_WORD      (C_BIDI_ID(0) + 1, OSSL_QUIC_FRAME_TYPE_STREAM_DATA_BLOCKED)
+
+    OP_S_NEW_STREAM_UNI     (b, S_UNI_ID(0))
     OP_S_WRITE              (b, "orange", 5)
 
     OP_C_EXPECT_CONN_CLOSE_INFO(QUIC_ERR_STREAM_STATE_ERROR,0,0)