]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Ensure that all unit tests use unbuffered stdout and stderr
authorArne Schwabe <arne@rfc2549.org>
Tue, 23 Jan 2024 10:43:58 +0000 (11:43 +0100)
committerGert Doering <gert@greenie.muc.de>
Tue, 23 Jan 2024 15:34:50 +0000 (16:34 +0100)
commit7869617a0f85089fb5e6fbe2db6f03542a8f33f4
tree93e62f7372e036c9ef4d845b2d01eeabbd3c2d0e
parentdc4fde8052639ffbc29ccc87130a0ce25f6dcd6c
Ensure that all unit tests use unbuffered stdout and stderr

stderr is normally always unbuffered but stdout can be buffered. Especially,
when stdout is redirected it will become buffered while it is normally
unbuffered when connected to a terminal. This mean that if the unit exits
prematurely, the output in the buffered output will be lost.

As the unit test x_msg mock implementation prints even fatal on stdout
we ensure with this setup method that stdout is also unbuffered.

Change-Id: I5c06dc13e9d8ab73997f79b13c30ee8949e5e993
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Message-Id: <20240123104358.495517-1-frank@lichtenheld.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28122.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
14 files changed:
tests/unit_tests/openvpn/test_argv.c
tests/unit_tests/openvpn/test_auth_token.c
tests/unit_tests/openvpn/test_buffer.c
tests/unit_tests/openvpn/test_common.h [new file with mode: 0644]
tests/unit_tests/openvpn/test_crypto.c
tests/unit_tests/openvpn/test_cryptoapi.c
tests/unit_tests/openvpn/test_misc.c
tests/unit_tests/openvpn/test_ncp.c
tests/unit_tests/openvpn/test_packet_id.c
tests/unit_tests/openvpn/test_pkcs11.c
tests/unit_tests/openvpn/test_pkt.c
tests/unit_tests/openvpn/test_provider.c
tests/unit_tests/openvpn/test_ssl.c
tests/unit_tests/openvpn/test_tls_crypt.c