]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Migrate QUIC_TSERVER script 13 and script 14 to radix
authorAndrew Dinh <andrewd@openssl.org>
Mon, 13 Jul 2026 15:43:41 +0000 (22:43 +0700)
committerNorbert Pocs <norbertp@openssl.org>
Tue, 21 Jul 2026 09:19:33 +0000 (11:19 +0200)
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Bob Beck <beck@openssl.org>
MergeDate: Tue Jul 21 09:19:57 2026
(Merged from https://github.com/openssl/openssl/pull/31945)

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

index b9b263fe94d3f57ff9d6c5bd072431c4004a1990..3bed82376f46ab35b891c107573930ad862bf782 100644 (file)
@@ -2086,68 +2086,14 @@ static const struct script_op script_12[] = {
 };
 
 /* 13. Many threads accepted on the same client connection (stress test) */
-static const struct script_op script_13_child[] = {
-    OP_BEGIN_REPEAT(10),
-
-    OP_C_ACCEPT_STREAM_WAIT(a),
-    OP_C_READ_EXPECT(a, "foo", 3),
-    OP_C_EXPECT_FIN(a),
-    OP_C_FREE_STREAM(a),
-
-    OP_END_REPEAT(),
-
-    OP_END
-};
-
 static const struct script_op script_13[] = {
-    OP_C_SET_ALPN("ossltest"),
-    OP_C_CONNECT_WAIT(),
-    OP_C_SET_DEFAULT_STREAM_MODE(SSL_DEFAULT_STREAM_MODE_NONE),
-
-    OP_NEW_THREAD(5, script_13_child),
-
-    OP_BEGIN_REPEAT(50),
-
-    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(),
-
+    /* test moved to test/radix/quic_tests.c */
     OP_END
 };
 
 /* 14. Many threads initiating on the same client connection (stress test) */
-static const struct script_op script_14_child[] = {
-    OP_BEGIN_REPEAT(10),
-
-    OP_C_NEW_STREAM_BIDI(a, ANY_ID),
-    OP_C_WRITE(a, "foo", 3),
-    OP_C_CONCLUDE(a),
-    OP_C_FREE_STREAM(a),
-
-    OP_END_REPEAT(),
-
-    OP_END
-};
-
 static const struct script_op script_14[] = {
-    OP_C_SET_ALPN("ossltest"),
-    OP_C_CONNECT_WAIT(),
-    OP_C_SET_DEFAULT_STREAM_MODE(SSL_DEFAULT_STREAM_MODE_NONE),
-
-    OP_NEW_THREAD(5, script_14_child),
-
-    OP_BEGIN_REPEAT(50),
-
-    OP_S_ACCEPT_STREAM_WAIT(a),
-    OP_S_READ_EXPECT(a, "foo", 3),
-    OP_S_EXPECT_FIN(a),
-    OP_S_UNBIND_STREAM_ID(a),
-
-    OP_END_REPEAT(),
-
+    /* test moved to test/radix/quic_tests.c */
     OP_END
 };
 
index 3047ef08a12195f4df17ee0139d71a4df86ebe19..a6e15f7c8af9be609bf12105bda2f2a659a701e1 100644 (file)
@@ -1085,12 +1085,187 @@ DEF_SCRIPT(script_12, "Many threads initiated on the same client connection")
     OP_SLEEP(10);
 }
 
-DEF_SCRIPT(script_13, "place holder for multistrem script_13")
+/* 13. Many threads accepted on the same client connection (stress test) */
+DEF_SCRIPT(script_13_child_1,
+    "child: 10x accept stream from C, read, expect FIN, free")
 {
+    size_t i;
+
+    for (i = 0; i < 10; i++) {
+        OP_ACCEPT_STREAM_WAIT(C, C1, OP_F_REPLACE_STREAM);
+        OP_READ_EXPECT_B(C1, "foo");
+        OP_EXPECT_FIN(C1);
+    }
+}
+
+DEF_SCRIPT(script_13_child_2,
+    "child: 10x accept stream from C, read, expect FIN, free")
+{
+    size_t i;
+
+    for (i = 0; i < 10; i++) {
+        OP_ACCEPT_STREAM_WAIT(C, C2, OP_F_REPLACE_STREAM);
+        OP_READ_EXPECT_B(C2, "foo");
+        OP_EXPECT_FIN(C2);
+    }
+}
+
+DEF_SCRIPT(script_13_child_3,
+    "child: 10x accept stream from C, read, expect FIN, free")
+{
+    size_t i;
+
+    for (i = 0; i < 10; i++) {
+        OP_ACCEPT_STREAM_WAIT(C, C3, OP_F_REPLACE_STREAM);
+        OP_READ_EXPECT_B(C3, "foo");
+        OP_EXPECT_FIN(C3);
+    }
+}
+
+DEF_SCRIPT(script_13_child_4,
+    "child: 10x accept stream from C, read, expect FIN, free")
+{
+    size_t i;
+
+    for (i = 0; i < 10; i++) {
+        OP_ACCEPT_STREAM_WAIT(C, C4, OP_F_REPLACE_STREAM);
+        OP_READ_EXPECT_B(C4, "foo");
+        OP_EXPECT_FIN(C4);
+    }
+}
+
+DEF_SCRIPT(script_13_child_5,
+    "child: 10x accept stream from C, read, expect FIN, free")
+{
+    size_t i;
+
+    for (i = 0; i < 10; i++) {
+        OP_ACCEPT_STREAM_WAIT(C, C5, OP_F_REPLACE_STREAM);
+        OP_READ_EXPECT_B(C5, "foo");
+        OP_EXPECT_FIN(C5);
+    }
+}
+
+DEF_SCRIPT(script_13,
+    "Many threads accepted on same client connection (stress test)")
+{
+    size_t i;
+
+    OP_SIMPLE_PAIR_CONN_ND();
+    OP_ACCEPT_CONN_WAIT_ND(L, S, 0);
+
+    /*
+     * put empty objects to radix process cache.
+     * objects C1 - C5 are going to be used for
+     * SSL streams in _child_1 - _child_5 threads.
+     */
+    OP_BIND(C1);
+    OP_BIND(C2);
+    OP_BIND(C3);
+    OP_BIND(C4);
+    OP_BIND(C5);
+    OP_BIND(Sa);
+
+    OP_SPAWN_THREAD(script_13_child_1);
+    OP_SPAWN_THREAD(script_13_child_2);
+    OP_SPAWN_THREAD(script_13_child_3);
+    OP_SPAWN_THREAD(script_13_child_4);
+    OP_SPAWN_THREAD(script_13_child_5);
+
+    for (i = 0; i < 50; ++i) {
+        OP_NEW_STREAM(S, Sa, OP_F_REPLACE_STREAM);
+        OP_WRITE_B(Sa, "foo");
+        OP_CONCLUDE(Sa);
+    }
+}
+
+/* 14. Many threads initiating on the same client connection (stress test) */
+DEF_SCRIPT(script_14_child_1,
+    "child: 10x create stream on C, write, conclude, free")
+{
+    size_t i;
+
+    for (i = 0; i < 10; i++) {
+        OP_NEW_STREAM(C, C1, OP_F_REPLACE_STREAM);
+        OP_WRITE_B(C1, "foo");
+        OP_CONCLUDE(C1);
+    }
+}
+
+DEF_SCRIPT(script_14_child_2,
+    "child: 10x create stream on C, write, conclude, free")
+{
+    size_t i;
+
+    for (i = 0; i < 10; i++) {
+        OP_NEW_STREAM(C, C2, OP_F_REPLACE_STREAM);
+        OP_WRITE_B(C2, "foo");
+        OP_CONCLUDE(C2);
+    }
+}
+
+DEF_SCRIPT(script_14_child_3,
+    "child: 10x create stream on C, write, conclude, free")
+{
+    size_t i;
+
+    for (i = 0; i < 10; i++) {
+        OP_NEW_STREAM(C, C3, OP_F_REPLACE_STREAM);
+        OP_WRITE_B(C3, "foo");
+        OP_CONCLUDE(C3);
+    }
+}
+
+DEF_SCRIPT(script_14_child_4,
+    "child: 10x create stream on C, write, conclude, free")
+{
+    size_t i;
+
+    for (i = 0; i < 10; i++) {
+        OP_NEW_STREAM(C, C4, OP_F_REPLACE_STREAM);
+        OP_WRITE_B(C4, "foo");
+        OP_CONCLUDE(C4);
+    }
 }
 
-DEF_SCRIPT(script_14, "place holder for multistrem script_14")
+DEF_SCRIPT(script_14_child_5,
+    "child: 10x create stream on C, write, conclude, free")
 {
+    size_t i;
+
+    for (i = 0; i < 10; i++) {
+        OP_NEW_STREAM(C, C5, OP_F_REPLACE_STREAM);
+        OP_WRITE_B(C5, "foo");
+        OP_CONCLUDE(C5);
+    }
+}
+
+DEF_SCRIPT(script_14,
+    "Many threads initiating on same client connection (stress test)")
+{
+    size_t i;
+
+    OP_SIMPLE_PAIR_CONN_ND();
+    OP_ACCEPT_CONN_WAIT_ND(L, S, 0);
+
+    OP_BIND(C1);
+    OP_BIND(C2);
+    OP_BIND(C3);
+    OP_BIND(C4);
+    OP_BIND(C5);
+    OP_BIND(Sa);
+
+    OP_SPAWN_THREAD(script_14_child_1);
+    OP_SPAWN_THREAD(script_14_child_2);
+    OP_SPAWN_THREAD(script_14_child_3);
+    OP_SPAWN_THREAD(script_14_child_4);
+    OP_SPAWN_THREAD(script_14_child_5);
+
+    for (i = 0; i < 50; ++i) {
+        OP_ACCEPT_STREAM_WAIT(S, Sa, OP_F_REPLACE_STREAM);
+        OP_READ_EXPECT_B(Sa, "foo");
+        OP_EXPECT_FIN(Sa);
+    }
 }
 
 DEF_SCRIPT(script_15, "place holder for multistrem script_15")