From d2096888e64090a12fea3ad2a66cd7d5b2c4d38c Mon Sep 17 00:00:00 2001 From: Alexandr Nedvedicky Date: Fri, 4 Sep 2026 01:24:34 +0200 Subject: test verifies the connection level RX flow control window is enforced. Reviewed-by: Neil Horman Reviewed-by: Tomas Mraz Reviewed-by: Andrew Dinh Merge-date: Tue Sep 29 11:58:11 2026 --- test/quic_fc_test.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/test/quic_fc_test.c b/test/quic_fc_test.c index 52351e5ffe1..87660948632 100644 --- a/test/quic_fc_test.c +++ b/test/quic_fc_test.c @@ -467,9 +467,30 @@ static const struct rx_test_op rx_script_2[] = { RX_OP_END }; +/* + * The test verifies connection window is still enforced. + * The stream frame fits to stream control window, but exceeds + * connection flow control window. + */ +static const struct rx_test_op rx_script_3[] = { + RX_OP_STEP_TIME(1000 * OSSL_TIME_MS) + RX_OP_INIT_CONN(INIT_WINDOW_SIZE, 10 * INIT_WINDOW_SIZE) + RX_OP_INIT_STREAM(0, INIT_S_WINDOW_SIZE, 30 * INIT_S_WINDOW_SIZE) + RX_OP_INIT_STREAM(1, INIT_S_WINDOW_SIZE, 30 * INIT_S_WINDOW_SIZE) + RX_OP_INIT_STREAM(2, INIT_S_WINDOW_SIZE, 30 * INIT_S_WINDOW_SIZE) + RX_OP_RX(0, INIT_S_WINDOW_SIZE, 0) + RX_OP_CHECK_ERROR_STREAM(0, OSSL_QUIC_ERR_NO_ERROR, 0) + RX_OP_RX(1, INIT_S_WINDOW_SIZE, 0) + RX_OP_CHECK_ERROR_STREAM(1, OSSL_QUIC_ERR_NO_ERROR, 0) + RX_OP_RX(2, INIT_S_WINDOW_SIZE, 0) + RX_OP_CHECK_ERROR_STREAM(2, OSSL_QUIC_ERR_FLOW_CONTROL_ERROR, 0) + RX_OP_END +}; + static const struct rx_test_op *rx_scripts[] = { rx_script_1, - rx_script_2 + rx_script_2, + rx_script_3 }; static int run_rxfc_script(const struct rx_test_op *script) -- cgit