]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Port script10
authorAndrew Dinh <andrewd@openssl.org>
Wed, 1 Jul 2026 16:36:44 +0000 (23:36 +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:00 2026
(Merged from https://github.com/openssl/openssl/pull/31821)

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

index 1a70b07cf6a6b6669d24302198f1c060ba103159..cf7cca98b9ee14d9c9cd252148aa4cab2ed1d667 100644 (file)
@@ -2069,17 +2069,7 @@ static const struct script_op script_9[] = {
 
 /* 10. Shutdown */
 static const struct script_op script_10[] = {
-    OP_C_SET_ALPN("ossltest"),
-    OP_C_CONNECT_WAIT(),
-
-    OP_C_WRITE(DEFAULT, "apple", 5),
-    OP_S_BIND_STREAM_ID(a, C_BIDI_ID(0)),
-    OP_S_READ_EXPECT(a, "apple", 5),
-
-    OP_C_SHUTDOWN_WAIT(NULL, 0),
-    OP_C_EXPECT_CONN_CLOSE_INFO(0, 1, 0),
-    OP_S_EXPECT_CONN_CLOSE_INFO(0, 1, 1),
-
+    /* test moved to test/radix/quic_tests.c */
     OP_END
 };
 
index a770f9f018fdfbda31c6ea8363742b9b55321a5a..c732b62393616ec48af706c24f163033ff5401ba 100644 (file)
@@ -900,8 +900,55 @@ DEF_SCRIPT(script_9, "Unidirectional default stream mode (server sends bidi firs
     OP_READ_EXPECT(Sa, "orange", 6);
 }
 
-DEF_SCRIPT(script_10, "place holder for multistrem script_10")
+/* 10. Shutdown */
+DEF_SCRIPT(script_10, "Shutdown test")
 {
+    OP_SIMPLE_PAIR_CONN();
+
+    OP_WRITE(C, "apple", 5);
+    OP_ACCEPT_CONN_WAIT(L, S, 0);
+    OP_READ_EXPECT(S, "apple", 5);
+
+    OP_SHUTDOWN_WAIT(C, 0, 0, NULL);
+    OP_EXPECT_CONN_CLOSE_INFO(C, 0, 1, 0);
+    OP_EXPECT_CONN_CLOSE_INFO(S, 0, 1, 1);
+}
+
+/* 11. Many threads accepted on the same client connection */
+DEF_SCRIPT(script_11_child_0,
+    "child: accept stream from C, read, sleep, expect FIN")
+{
+    OP_ACCEPT_STREAM_WAIT(C, C0, 0 /* bidirectional */);
+    OP_READ_EXPECT_B(C0, "foo");
+    OP_SLEEP(10);
+    OP_EXPECT_FIN(C0);
+}
+
+DEF_SCRIPT(script_11_child_1,
+    "child: accept stream from C, read, sleep, expect FIN")
+{
+    OP_ACCEPT_STREAM_WAIT(C, C1, 0 /* bidirectional */);
+    OP_READ_EXPECT_B(C1, "foo");
+    OP_SLEEP(10);
+    OP_EXPECT_FIN(C1);
+}
+
+DEF_SCRIPT(script_11_child_2,
+    "child: accept stream from C, read, sleep, expect FIN")
+{
+    OP_ACCEPT_STREAM_WAIT(C, C2, 0 /* bidirectional */);
+    OP_READ_EXPECT_B(C2, "foo");
+    OP_SLEEP(10);
+    OP_EXPECT_FIN(C2);
+}
+
+DEF_SCRIPT(script_11_child_3,
+    "child: accept stream from C, read, sleep, expect FIN")
+{
+    OP_ACCEPT_STREAM_WAIT(C, C3, 0 /* bidirectional */);
+    OP_READ_EXPECT_B(C3, "foo");
+    OP_SLEEP(10);
+    OP_EXPECT_FIN(C3);
 }
 
 DEF_SCRIPT(script_11, "place holder for multistrem script_11")