QUIC: Multistream test fixes
authorHugo Landau <hlandau@openssl.org>
Wed, 7 Jun 2023 13:15:50 +0000 (14:15 +0100)
committerPauli <pauli@openssl.org>
Sun, 16 Jul 2023 22:18:05 +0000 (08:18 +1000)
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/21135)

test/quic_multistream_test.c

index 0d473dfb53d3b8bd5f8c5011679b2ed95d3b910e..7d35f80ce102e2e753ea025e98a08ecebaaf1c28 100644 (file)
@@ -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)
 
@@ -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)
 
@@ -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")