From: Andrew Dinh Date: Mon, 29 Jun 2026 15:55:25 +0000 (+0700) Subject: Port script_16 to radix test framework X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e528888bc069f216620ea9d7062c673c18bafdcc;p=thirdparty%2Fopenssl.git Port script_16 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:46 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 c78ffaceca..b7472c4c37 100644 --- a/test/quic_multistream_test.c +++ b/test/quic_multistream_test.c @@ -2105,42 +2105,7 @@ static const struct script_op script_15[] = { /* 16. Server sending large number of streams, MAX_STREAMS test */ static const struct script_op script_16[] = { - 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 client if we are - * not handling the stream limit correctly on the TX side. - */ - OP_BEGIN_REPEAT(200), - - 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(), - - /* Prove that the connection is still good. */ - OP_C_NEW_STREAM_BIDI(a, ANY_ID), - OP_C_WRITE(a, "bar", 3), - OP_C_CONCLUDE(a), - - OP_S_ACCEPT_STREAM_WAIT(b), - OP_S_READ_EXPECT(b, "bar", 3), - OP_S_EXPECT_FIN(b), - - /* Drain the queue of incoming streams. */ - OP_BEGIN_REPEAT(200), - - OP_C_ACCEPT_STREAM_WAIT(b), - OP_C_READ_EXPECT(b, "foo", 3), - OP_C_EXPECT_FIN(b), - OP_C_FREE_STREAM(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 c8026ce7c3..350d763524 100644 --- a/test/radix/quic_tests.c +++ b/test/radix/quic_tests.c @@ -1308,8 +1308,41 @@ DEF_SCRIPT(script_15, "Client sending large number of streams, MAX_STREAMS test" } } -DEF_SCRIPT(script_16, "place holder for multistrem script_16") +/* 16. Server sending large number of streams, MAX_STREAMS test */ +DEF_SCRIPT(script_16, "Server 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 client if we are + * not handling the stream limit correctly on the TX side. + */ + for (i = 0; i < 200; ++i) { + OP_NEW_STREAM(S, Sa, SSL_STREAM_FLAG_ADVANCE); + OP_WRITE(Sa, "foo", 3); + OP_CONCLUDE(Sa); + OP_UNBIND(Sa); + } + + /* Prove that the connection is still good. */ + OP_NEW_STREAM(C, Ca, 0); + OP_WRITE(Ca, "bar", 3); + OP_CONCLUDE(Ca); + + OP_ACCEPT_STREAM_WAIT(S, Sb, 0); + OP_READ_EXPECT(Sb, "bar", 3); + OP_EXPECT_FIN(Sb); + + /* Drain the queue of incoming streams. */ + for (i = 0; i < 200; ++i) { + OP_ACCEPT_STREAM_WAIT(C, Cb, 0); + OP_READ_EXPECT(Cb, "foo", 3); + OP_EXPECT_FIN(Cb); + OP_UNBIND(Cb); + } } DEF_SCRIPT(script_17, "place holder for multistrem script_17")