Skip to content

Commit

Permalink
QUIC MULTISTREAM TEST: Fix script 38 stochastic failure on Windows
Browse files Browse the repository at this point in the history
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 #22578)

(cherry picked from commit a6eb287)
  • Loading branch information
hlandau committed Nov 2, 2023
1 parent 4febab7 commit 6366192
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/quic_multistream_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6366192

Please sign in to comment.