diff options
author | Tomas Mraz <tomas@openssl.org> | 2023-08-18 17:08:18 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-08-23 17:18:48 +0200 |
commit | 64fd69911e04cec45f65b396a4e91d6caa4fdc9a (patch) | |
tree | 1168c70807302e3dcc65d29a0a9b47c4dded6be0 /test | |
parent | 96014840b69b3ec2f82e230a27cc5c1fa3bfb1bc (diff) |
ossl_quic_tx_packetiser_generate(): Always report if packets were sent
Even in case of later failure we need to flush
the previous packets.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21700)
Diffstat (limited to 'test')
-rw-r--r-- | test/quic_txp_test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/quic_txp_test.c b/test/quic_txp_test.c index e6acd5af80..7c3e84b41a 100644 --- a/test/quic_txp_test.c +++ b/test/quic_txp_test.c @@ -1244,16 +1244,16 @@ static int run_script(int script_idx, const struct script_op *script) for (op = script, opn = 0; op->opcode != OPK_END; ++op, ++opn) { switch (op->opcode) { case OPK_TXP_GENERATE: - if (!TEST_int_eq(ossl_quic_tx_packetiser_generate(h.txp, &status), - TX_PACKETISER_RES_SENT_PKT)) + if (!TEST_true(ossl_quic_tx_packetiser_generate(h.txp, &status)) + && !TEST_size_t_gt(status.sent_pkt, 0)) goto err; ossl_qtx_finish_dgram(h.args.qtx); ossl_qtx_flush_net(h.args.qtx); break; case OPK_TXP_GENERATE_NONE: - if (!TEST_int_eq(ossl_quic_tx_packetiser_generate(h.txp, &status), - TX_PACKETISER_RES_NO_PKT)) + if (!TEST_true(ossl_quic_tx_packetiser_generate(h.txp, &status)) + && !TEST_size_t_eq(status.sent_pkt, 0)) goto err; break; |