]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Port script11
authorAndrew Dinh <andrewd@openssl.org>
Wed, 1 Jul 2026 16:37:20 +0000 (23:37 +0700)
committerAlexandr Nedvedicky <sashan@openssl.org>
Fri, 17 Jul 2026 08:01:26 +0000 (10:01 +0200)
Assisted-by: Claude:claude-sonnet-4-6
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
MergeDate: Fri Jul 17 08:02:02 2026
(Merged from https://github.com/openssl/openssl/pull/31821)

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

index cf7cca98b9ee14d9c9cd252148aa4cab2ed1d667..a8dae2966a9daa127c2e429088e59129cafdd97c 100644 (file)
@@ -2074,42 +2074,8 @@ static const struct script_op script_10[] = {
 };
 
 /* 11. Many threads accepted on the same client connection */
-static const struct script_op script_11_child[] = {
-    OP_C_ACCEPT_STREAM_WAIT(a),
-    OP_C_READ_EXPECT(a, "foo", 3),
-    OP_SLEEP(10),
-    OP_C_EXPECT_FIN(a),
-
-    OP_END
-};
-
 static const struct script_op script_11[] = {
-    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_11_child),
-
-    OP_S_NEW_STREAM_BIDI(a, ANY_ID),
-    OP_S_WRITE(a, "foo", 3),
-    OP_S_CONCLUDE(a),
-
-    OP_S_NEW_STREAM_BIDI(b, ANY_ID),
-    OP_S_WRITE(b, "foo", 3),
-    OP_S_CONCLUDE(b),
-
-    OP_S_NEW_STREAM_BIDI(c, ANY_ID),
-    OP_S_WRITE(c, "foo", 3),
-    OP_S_CONCLUDE(c),
-
-    OP_S_NEW_STREAM_BIDI(d, ANY_ID),
-    OP_S_WRITE(d, "foo", 3),
-    OP_S_CONCLUDE(d),
-
-    OP_S_NEW_STREAM_BIDI(e, ANY_ID),
-    OP_S_WRITE(e, "foo", 3),
-    OP_S_CONCLUDE(e),
-
+    /* test moved to test/radix/quic_tests.c */
     OP_END
 };
 
index c732b62393616ec48af706c24f163033ff5401ba..a101cad9246cdc9f39732fa26c7cf67e038a669b 100644 (file)
@@ -951,7 +951,48 @@ DEF_SCRIPT(script_11_child_3,
     OP_EXPECT_FIN(C3);
 }
 
-DEF_SCRIPT(script_11, "place holder for multistrem script_11")
+DEF_SCRIPT(script_11_child_4,
+    "child: accept stream from C, read, sleep, expect FIN")
+{
+    OP_ACCEPT_STREAM_WAIT(C, C4, 0 /* bidirectional */);
+    OP_READ_EXPECT_B(C4, "foo");
+    OP_SLEEP(10);
+    OP_EXPECT_FIN(C4);
+}
+
+DEF_SCRIPT(script_11, "Many threads accepted on the same client connection")
+{
+    OP_SIMPLE_PAIR_CONN_ND();
+    OP_ACCEPT_CONN_WAIT(L, S, 0);
+
+    OP_SPAWN_THREAD(script_11_child_0);
+    OP_SPAWN_THREAD(script_11_child_1);
+    OP_SPAWN_THREAD(script_11_child_2);
+    OP_SPAWN_THREAD(script_11_child_3);
+    OP_SPAWN_THREAD(script_11_child_4);
+
+    OP_NEW_STREAM(S, Sa, 0 /* bidirectional */);
+    OP_WRITE_B(Sa, "foo");
+    OP_CONCLUDE(Sa);
+
+    OP_NEW_STREAM(S, Sb, 0 /* bidirectional */);
+    OP_WRITE_B(Sb, "foo");
+    OP_CONCLUDE(Sb);
+
+    OP_NEW_STREAM(S, Sc, 0 /* bidirectional */);
+    OP_WRITE_B(Sc, "foo");
+    OP_CONCLUDE(Sc);
+
+    OP_NEW_STREAM(S, Sd, 0 /* bidirectional */);
+    OP_WRITE_B(Sd, "foo");
+    OP_CONCLUDE(Sd);
+
+    OP_NEW_STREAM(S, Se, 0 /* bidirectional */);
+    OP_WRITE_B(Se, "foo");
+    OP_CONCLUDE(Se);
+    OP_SLEEP(10);
+}
+
 {
 }