]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Port script_16 to radix test framework
authorAndrew Dinh <andrewd@openssl.org>
Mon, 29 Jun 2026 15:55:25 +0000 (22:55 +0700)
committerNorbert Pocs <norbertp@openssl.org>
Tue, 21 Jul 2026 09:22:31 +0000 (11:22 +0200)
Assisted-by: Claude:claude-sonnet-4-6
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Bob Beck <beck@openssl.org>
MergeDate: Tue Jul 21 09:22:46 2026
(Merged from https://github.com/openssl/openssl/pull/31889)

test/quic_multistream_test.c
test/radix/quic_tests.c

index c78ffacecafa413f0907d518c92219c714ccb344..b7472c4c375b31fda4ed23ada428ec5236ffef7f 100644 (file)
@@ -2105,42 +2105,7 @@ static const struct script_op script_15[] = {
 
 /* 16. Server sending large number of streams, MAX_STREAMS test */
 static const struct script_op script_16[] = {
-    OP_C_SET_ALPN("ossltest"),
-    OP_C_CONNECT_WAIT(),
-    OP_C_SET_DEFAULT_STREAM_MODE(SSL_DEFAULT_STREAM_MODE_NONE),
-
-    /*
-     * This will cause a protocol violation to be raised by the client if we are
-     * not handling the stream limit correctly on the TX side.
-     */
-    OP_BEGIN_REPEAT(200),
-
-    OP_S_NEW_STREAM_BIDI(a, ANY_ID),
-    OP_S_WRITE(a, "foo", 3),
-    OP_S_CONCLUDE(a),
-    OP_S_UNBIND_STREAM_ID(a),
-
-    OP_END_REPEAT(),
-
-    /* Prove that the connection is still good. */
-    OP_C_NEW_STREAM_BIDI(a, ANY_ID),
-    OP_C_WRITE(a, "bar", 3),
-    OP_C_CONCLUDE(a),
-
-    OP_S_ACCEPT_STREAM_WAIT(b),
-    OP_S_READ_EXPECT(b, "bar", 3),
-    OP_S_EXPECT_FIN(b),
-
-    /* Drain the queue of incoming streams. */
-    OP_BEGIN_REPEAT(200),
-
-    OP_C_ACCEPT_STREAM_WAIT(b),
-    OP_C_READ_EXPECT(b, "foo", 3),
-    OP_C_EXPECT_FIN(b),
-    OP_C_FREE_STREAM(b),
-
-    OP_END_REPEAT(),
-
+    /* test moved to test/radix/quic_tests.c */
     OP_END
 };
 
index c8026ce7c337ba5d1f5d12e51372111346ca0c3a..350d7635247d58af163f93b9ec8d47ce4d4eb0e2 100644 (file)
@@ -1308,8 +1308,41 @@ DEF_SCRIPT(script_15, "Client sending large number of streams, MAX_STREAMS test"
     }
 }
 
-DEF_SCRIPT(script_16, "place holder for multistrem script_16")
+/* 16. Server sending large number of streams, MAX_STREAMS test */
+DEF_SCRIPT(script_16, "Server sending large number of streams, MAX_STREAMS test")
 {
+    size_t i;
+
+    OP_SIMPLE_PAIR_CONN_ND();
+    OP_ACCEPT_CONN_WAIT_ND(L, S, 0);
+
+    /*
+     * This will cause a protocol violation to be raised by the client if we are
+     * not handling the stream limit correctly on the TX side.
+     */
+    for (i = 0; i < 200; ++i) {
+        OP_NEW_STREAM(S, Sa, SSL_STREAM_FLAG_ADVANCE);
+        OP_WRITE(Sa, "foo", 3);
+        OP_CONCLUDE(Sa);
+        OP_UNBIND(Sa);
+    }
+
+    /* Prove that the connection is still good. */
+    OP_NEW_STREAM(C, Ca, 0);
+    OP_WRITE(Ca, "bar", 3);
+    OP_CONCLUDE(Ca);
+
+    OP_ACCEPT_STREAM_WAIT(S, Sb, 0);
+    OP_READ_EXPECT(Sb, "bar", 3);
+    OP_EXPECT_FIN(Sb);
+
+    /* Drain the queue of incoming streams. */
+    for (i = 0; i < 200; ++i) {
+        OP_ACCEPT_STREAM_WAIT(C, Cb, 0);
+        OP_READ_EXPECT(Cb, "foo", 3);
+        OP_EXPECT_FIN(Cb);
+        OP_UNBIND(Cb);
+    }
 }
 
 DEF_SCRIPT(script_17, "place holder for multistrem script_17")