Skip to content

Commit 33be31a

Browse files
committed
test: dtls: add description for WANT_WRITE tests
1 parent bb28424 commit 33be31a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/api/test_dtls.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,12 @@ int test_dtls13_basic_connection_id(void)
568568
return EXPECT_RESULT();
569569
}
570570

571+
/** Test DTLS 1.3 behavior when server hits WANT_WRITE during HRR
572+
* The test sets up a DTLS 1.3 connection where the server is forced to
573+
* return WANT_WRITE when sending the HelloRetryRequest. After the handshake,
574+
* application data is exchanged in both directions to verify the connection
575+
* works as expected.
576+
*/
571577
int test_dtls13_hrr_want_write(void)
572578
{
573579
EXPECT_DECLS;
@@ -636,6 +642,15 @@ static int test_dtls13_want_write_send_cb(WOLFSSL *ssl, char *data, int sz, void
636642
return test_memio_write_cb(ssl, data, sz, wwctx->text_ctx);
637643
}
638644
#endif
645+
/** Test DTLS 1.3 behavior when every other write returns WANT_WRITE
646+
* The test sets up a DTLS 1.3 connection where both client and server
647+
* alternate between WANT_WRITE and successful writes. After the handshake,
648+
* application data is exchanged in both directions to verify the connection
649+
* works as expected.
650+
*
651+
* Data exchanged after the handshake is also tested with simulated WANT_WRITE
652+
* conditions to ensure the connection remains functional.
653+
*/
639654
int test_dtls13_every_write_want_write(void)
640655
{
641656
EXPECT_DECLS;

0 commit comments

Comments
 (0)