/* 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
};
}
}
-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")