Skip to content

Commit

Permalink
QUIC: Multistream test fixes
Browse files Browse the repository at this point in the history
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from #21135)
  • Loading branch information
hlandau authored and paulidale committed Jul 16, 2023
1 parent 49a38de commit 70cafc4
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions test/quic_multistream_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -2467,13 +2467,20 @@ static const struct script_op script_28[] = {
OP_C_CONNECT_WAIT ()
OP_C_SET_DEFAULT_STREAM_MODE(SSL_DEFAULT_STREAM_MODE_NONE)

OP_C_NEW_STREAM_UNI (a, C_UNI_ID(0))
OP_C_WRITE (a, "apple", 5)
OP_C_NEW_STREAM_BIDI (a, C_BIDI_ID(0))
OP_C_WRITE (a, "orange", 6)

OP_S_BIND_STREAM_ID (a, C_UNI_ID(0))
OP_S_READ_EXPECT (a, "apple", 5)
OP_S_BIND_STREAM_ID (a, C_BIDI_ID(0))
OP_S_READ_EXPECT (a, "orange", 6)

OP_C_NEW_STREAM_UNI (b, C_UNI_ID(0))
OP_C_WRITE (b, "apple", 5)

OP_S_BIND_STREAM_ID (b, C_UNI_ID(0))
OP_S_READ_EXPECT (b, "apple", 5)

OP_SET_INJECT_WORD (C_UNI_ID(0) + 1, OSSL_QUIC_FRAME_TYPE_RESET_STREAM)
OP_S_WRITE (a, "fruit", 5)

OP_C_EXPECT_CONN_CLOSE_INFO(QUIC_ERR_STREAM_STATE_ERROR,0,0)

Expand All @@ -2487,13 +2494,20 @@ static const struct script_op script_29[] = {
OP_C_CONNECT_WAIT ()
OP_C_SET_DEFAULT_STREAM_MODE(SSL_DEFAULT_STREAM_MODE_NONE)

OP_C_NEW_STREAM_UNI (a, C_UNI_ID(0))
OP_C_WRITE (a, "apple", 5)
OP_C_NEW_STREAM_BIDI (a, C_BIDI_ID(0))
OP_C_WRITE (a, "orange", 6)

OP_S_BIND_STREAM_ID (a, C_UNI_ID(0))
OP_S_READ_EXPECT (a, "apple", 5)
OP_S_BIND_STREAM_ID (a, C_BIDI_ID(0))
OP_S_READ_EXPECT (a, "orange", 6)

OP_C_NEW_STREAM_UNI (b, C_UNI_ID(0))
OP_C_WRITE (b, "apple", 5)

OP_S_BIND_STREAM_ID (b, C_UNI_ID(0))
OP_S_READ_EXPECT (b, "apple", 5)

OP_SET_INJECT_WORD (C_UNI_ID(1) + 1, OSSL_QUIC_FRAME_TYPE_RESET_STREAM)
OP_S_WRITE (a, "fruit", 5)

OP_C_EXPECT_CONN_CLOSE_INFO(QUIC_ERR_STREAM_STATE_ERROR,0,0)

Expand Down Expand Up @@ -2849,7 +2863,7 @@ static int test_script(int idx)

/* Dynamically generated tests. */
static struct script_op dyn_frame_types_script[] = {
OP_S_SET_INJECT_PLAIN (script_19_inject_plain)
OP_S_SET_INJECT_PLAIN (script_20_inject_plain)
OP_SET_INJECT_WORD (0, 0) /* dynamic */

OP_C_SET_ALPN ("ossltest")
Expand Down

0 comments on commit 70cafc4

Please sign in to comment.