[gnutls-devel] GnuTLS | Rewrite TLS protocol tests as a single process (#1472)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Wed Mar 15 07:50:03 CET 2023



Daiki Ueno created an issue: https://gitlab.com/gnutls/gnutls/-/issues/1472



There are a couple of different ways of writing unit tests for TLS handshake/record protocols in GnuTLS:
- Run a TLS server and client in separate processes, communicate through FDs created using `socketpair`
- Run both a TLS server and client in a single process, using helper macros such as `HANDSHAKE`, defined in [tests/eagain-common.h](https://gitlab.com/gnutls/gnutls/-/blob/1351f3e8e3a0a454613b9d686c948912a3928df6/tests/eagain-common.h)

While the former could emulate a more practical scenario, it has a portability problem (the tests written in this way cannot run on Windows, and thus are skipped) as well as makes debugging hard. It would be nice if we could port those tests in the latter style.

Tests under [tests/tls13/](https://gitlab.com/gnutls/gnutls/-/tree/master/tests/tls13) are a good candidate for the rewrite. 754098302c07b262d50b9aa70174edc74bc9e547 is an example of such rewrite.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/issues/1472
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20230315/92d7587b/attachment-0001.html>


More information about the Gnutls-devel mailing list