From: Andrew Dinh Date: Mon, 29 Jun 2026 15:38:43 +0000 (+0700) Subject: Port script_15 to radix test framework X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b27fe1419c2a043eb34d18cdc9469a093f9892c9;p=thirdparty%2Fopenssl.git Port script_15 to radix test framework Assisted-by: Claude:claude-sonnet-4-6 Reviewed-by: Saša Nedvědický Reviewed-by: Neil Horman Reviewed-by: Bob Beck MergeDate: Tue Jul 21 09:22:44 2026 (Merged from https://github.com/openssl/openssl/pull/31889) --- diff --git a/test/quic_multistream_test.c b/test/quic_multistream_test.c index 3bed82376f4..c78ffacecaf 100644 --- a/test/quic_multistream_test.c +++ b/test/quic_multistream_test.c @@ -2099,45 +2099,7 @@ static const struct script_op script_14[] = { /* 15. Client sending large number of streams, MAX_STREAMS test */ static const struct script_op script_15[] = { - 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 server if we are - * not handling the stream limit correctly on the TX side. - */ - OP_BEGIN_REPEAT(200), - - OP_C_NEW_STREAM_BIDI_EX(a, ANY_ID, SSL_STREAM_FLAG_ADVANCE), - OP_C_WRITE(a, "foo", 3), - OP_C_CONCLUDE(a), - OP_C_FREE_STREAM(a), - - OP_END_REPEAT(), - - /* Prove the connection is still good. */ - OP_S_NEW_STREAM_BIDI(a, S_BIDI_ID(0)), - OP_S_WRITE(a, "bar", 3), - OP_S_CONCLUDE(a), - - OP_C_ACCEPT_STREAM_WAIT(a), - OP_C_READ_EXPECT(a, "bar", 3), - OP_C_EXPECT_FIN(a), - - /* - * Drain the queue of incoming streams. We should be able to get all 200 - * even though only 100 can be initiated at a time. - */ - OP_BEGIN_REPEAT(200), - - OP_S_ACCEPT_STREAM_WAIT(b), - OP_S_READ_EXPECT(b, "foo", 3), - OP_S_EXPECT_FIN(b), - OP_S_UNBIND_STREAM_ID(b), - - OP_END_REPEAT(), - + /* 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 a6e15f7c8af..c8026ce7c33 100644 --- a/test/radix/quic_tests.c +++ b/test/radix/quic_tests.c @@ -1268,8 +1268,44 @@ DEF_SCRIPT(script_14, } } -DEF_SCRIPT(script_15, "place holder for multistrem script_15") +/* 15. Client sending large number of streams, MAX_STREAMS test */ +DEF_SCRIPT(script_15, "Client 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 server if we are + * not handling the stream limit correctly on the TX side. + */ + for (i = 0; i < 200; ++i) { + OP_NEW_STREAM(C, Ca, SSL_STREAM_FLAG_ADVANCE); + OP_WRITE(Ca, "foo", 3); + OP_CONCLUDE(Ca); + OP_UNBIND(Ca); + } + + /* Prove the connection is still good. */ + OP_NEW_STREAM(S, Sa, 0); + OP_WRITE(Sa, "bar", 3); + OP_CONCLUDE(Sa); + + OP_ACCEPT_STREAM_WAIT(C, Ca, 0); + OP_READ_EXPECT(Ca, "bar", 3); + OP_EXPECT_FIN(Ca); + + /* + * Drain the queue of incoming streams. We should be able to get all 200 + * even though only 100 can be initiated at a time. + */ + for (i = 0; i < 200; ++i) { + OP_ACCEPT_STREAM_WAIT(S, Sb, 0); + OP_READ_EXPECT(Sb, "foo", 3); + OP_EXPECT_FIN(Sb); + OP_UNBIND(Sb); + } } DEF_SCRIPT(script_16, "place holder for multistrem script_16")