Commit 1ca326f0e7 for openssl.org

commit 1ca326f0e728ba1edd0c69635afd0f8ad72be7ab
Author: Andrew Dinh <andrewd@openssl.org>
Date:   Wed Jun 24 23:07:22 2026 +0700

    Port script_6

    Assisted-by: Claude:claude-sonnet-4-6

    Reviewed-by: Saša NedvÄ›dický <sashan@openssl.org>
    Reviewed-by: Norbert Pocs <norbertp@openssl.org>
    MergeDate: Tue Jun 30 07:54:47 2026
    (Merged from https://github.com/openssl/openssl/pull/31707)

diff --git a/test/quic_multistream_test.c b/test/quic_multistream_test.c
index 38289e6892..0459c8f194 100644
--- a/test/quic_multistream_test.c
+++ b/test/quic_multistream_test.c
@@ -373,18 +373,6 @@ static void s_unlock(struct helper *h, struct helper_local *hl);
 #define ACQUIRE_S() s_lock(h, hl)
 #define ACQUIRE_S_NOHL() s_lock(h, NULL)

-static int check_stream_stopped(struct helper *h, struct helper_local *hl)
-{
-    uint64_t stream_id = hl->check_op->arg2;
-
-    if (!ossl_quic_tserver_stream_has_peer_stop_sending(ACQUIRE_S(), stream_id, NULL)) {
-        h->check_spin_again = 1;
-        return 0;
-    }
-
-    return 1;
-}
-
 static int override_key_update(struct helper *h, struct helper_local *hl)
 {
     QUIC_CHANNEL *ch = ossl_quic_conn_get_channel(h->c_conn);
@@ -2057,19 +2045,7 @@ static const struct script_op script_5[] = {

 /* 6. Test STOP_SENDING functionality */
 static const struct script_op script_6[] = {
-    OP_C_SET_ALPN("ossltest"),
-    OP_C_CONNECT_WAIT(),
-
-    OP_C_SET_DEFAULT_STREAM_MODE(SSL_DEFAULT_STREAM_MODE_NONE),
-    OP_S_NEW_STREAM_BIDI(a, S_BIDI_ID(0)),
-    OP_S_WRITE(a, "apple", 5),
-
-    OP_C_ACCEPT_STREAM_WAIT(a),
-    OP_C_FREE_STREAM(a),
-    OP_C_ACCEPT_STREAM_NONE(),
-
-    OP_CHECK(check_stream_stopped, S_BIDI_ID(0)),
-
+    /* test moved to test/radix/quic_tests.c */
     OP_END
 };

diff --git a/test/radix/quic_tests.c b/test/radix/quic_tests.c
index 2f778e7a26..3fd6bcb741 100644
--- a/test/radix/quic_tests.c
+++ b/test/radix/quic_tests.c
@@ -827,8 +827,36 @@ DEF_SCRIPT(script_5, "Test stream reset functionality")
     OP_READ_EXPECT(Sb, "strawberry", 10);
 }

-DEF_SCRIPT(script_6, "place holder for multistram script_6")
+DEF_FUNC(check_stream_stopped_6)
 {
+    int ok = 0;
+    SSL *ssl;
+
+    REQUIRE_SSL(ssl);
+
+    if (SSL_get_stream_write_state(ssl) != SSL_STREAM_STATE_RESET_LOCAL)
+        F_SPIN_AGAIN();
+
+    ok = 1;
+err:
+    return ok;
+}
+
+/* 6. Test STOP_SENDING functionality */
+DEF_SCRIPT(script_6, "Test STOP_SENDING functionality")
+{
+    OP_SIMPLE_PAIR_CONN_ND();
+    OP_ACCEPT_CONN_WAIT_ND(L, S, 0);
+
+    OP_NEW_STREAM(S, Sa, 0 /* bidirectional */);
+    OP_WRITE(Sa, "apple", 5);
+
+    OP_ACCEPT_STREAM_WAIT(C, Ca, 0);
+    OP_UNBIND(Ca);
+    OP_ACCEPT_STREAM_NONE(C, 0);
+
+    OP_SELECT_SSL(0, Sa);
+    OP_FUNC(check_stream_stopped_6);
 }

 DEF_SCRIPT(script_7, "place holder for multistrem script_7")