From: "cron2 (Code Review)" Date: Thu, 15 Jan 2026 09:23:22 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="z8eW9mYJD8E="; charset=UTF-8 Subject: [Openvpn-devel] [M] Change in openvpn[release/2.6]: Ensure that all unit tests use unbuffered stdout and stderr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --z8eW9mYJD8E= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#2) to the change originally created by= flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1461?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: Ensure that all unit tests use unbuffered stdout and stderr ...................................................................... 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 URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28= 122.html Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1461 (cherry picked from commit 7869617a0f85089fb5e6fbe2db6f03542a8f33f4) Message-Id: <20260115082807.18596-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35= 272.html Signed-off-by: Gert Doering --- M tests/unit_tests/openvpn/test_argv.c M tests/unit_tests/openvpn/test_auth_token.c M tests/unit_tests/openvpn/test_buffer.c A tests/unit_tests/openvpn/test_common.h M tests/unit_tests/openvpn/test_crypto.c M tests/unit_tests/openvpn/test_cryptoapi.c M tests/unit_tests/openvpn/test_misc.c M tests/unit_tests/openvpn/test_ncp.c M tests/unit_tests/openvpn/test_packet_id.c M tests/unit_tests/openvpn/test_pkt.c M tests/unit_tests/openvpn/test_provider.c M tests/unit_tests/openvpn/test_tls_crypt.c 12 files changed, 63 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/61/1461/2 diff --git a/tests/unit_tests/openvpn/test_argv.c b/tests/unit_tests/openvp= n/test_argv.c index 1b18ac0..33b3dec 100644 --- a/tests/unit_tests/openvpn/test_argv.c +++ b/tests/unit_tests/openvpn/test_argv.c @@ -12,6 +12,7 @@ #include "argv.h" #include "buffer.h" +#include "test_common.h" /* Defines for use in the tests and the mock parse_line() */ #define PATH1 "/s p a c e" @@ -252,6 +253,7 @@ int main(void) { + openvpn_unit_test_setup(); const struct CMUnitTest tests[] =3D { cmocka_unit_test(argv_printf__multiple_spaces_in_format__parsed_as= _one), cmocka_unit_test(argv_printf_cat__multiple_spaces_in_format__parse= d_as_one), diff --git a/tests/unit_tests/openvpn/test_auth_token.c b/tests/unit_tests/= openvpn/test_auth_token.c index a027330..3a3cb69 100644 --- a/tests/unit_tests/openvpn/test_auth_token.c +++ b/tests/unit_tests/openvpn/test_auth_token.c @@ -35,6 +35,7 @@ #include #include "auth_token.c" +#include "test_common.h" struct test_context { struct tls_multi multi; @@ -407,6 +408,7 @@ int main(void) { + openvpn_unit_test_setup(); const struct CMUnitTest tests[] =3D { cmocka_unit_test_setup_teardown(auth_token_basic_test, setup, tear= down), cmocka_unit_test_setup_teardown(auth_token_fail_invalid_key, setup= , teardown), diff --git a/tests/unit_tests/openvpn/test_buffer.c b/tests/unit_tests/open= vpn/test_buffer.c index df1fdcb..c30ba42 100644 --- a/tests/unit_tests/openvpn/test_buffer.c +++ b/tests/unit_tests/openvpn/test_buffer.c @@ -32,6 +32,7 @@ #include "buffer.h" #include "buffer.c" +#include "test_common.h" static void test_buffer_strprefix(void **state) @@ -369,6 +370,7 @@ int main(void) { + openvpn_unit_test_setup(); const struct CMUnitTest tests[] =3D { cmocka_unit_test(test_buffer_strprefix), cmocka_unit_test_setup_teardown(test_buffer_list_aggregate_separat= or_empty, diff --git a/tests/unit_tests/openvpn/test_common.h b/tests/unit_tests/open= vpn/test_common.h new file mode 100644 index 0000000..50e16d6 --- /dev/null +++ b/tests/unit_tests/openvpn/test_common.h @@ -0,0 +1,40 @@ +/* + * OpenVPN -- An application to securely tunnel IP networks + * over a single UDP port, with support for SSL/TLS-based + * session authentication and key exchange, + * packet encryption, packet authentication, and + * packet compression. + * + * Copyright (C) 2016-2021 Fox Crypto B.V. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include +#include +#include + +/** + * Sets up the environment for unit tests like making both stderr and stdo= ut + * non-buffered to avoid messages getting lost if the program exits early. + * + * This has a openvpn prefix to avoid confusion with cmocka's unit_test_se= tup_* + * methods + */ +void +openvpn_unit_test_setup() +{ + assert_int_equal(setvbuf(stdout, NULL, _IONBF, BUFSIZ), 0); + assert_int_equal(setvbuf(stderr, NULL, _IONBF, BUFSIZ), 0); +} diff --git a/tests/unit_tests/openvpn/test_crypto.c b/tests/unit_tests/open= vpn/test_crypto.c index 4b1627a..ff639678 100644 --- a/tests/unit_tests/openvpn/test_crypto.c +++ b/tests/unit_tests/openvpn/test_crypto.c @@ -39,6 +39,7 @@ #include "ssl_backend.h" #include "mss.h" +#include "test_common.h" static const char testtext[] =3D "Dummy text to test PEM encoding"; @@ -479,6 +480,7 @@ int main(void) { + openvpn_unit_test_setup(); const struct CMUnitTest tests[] =3D { cmocka_unit_test(crypto_pem_encode_decode_loopback), cmocka_unit_test(crypto_translate_cipher_names), diff --git a/tests/unit_tests/openvpn/test_cryptoapi.c b/tests/unit_tests/o= penvpn/test_cryptoapi.c index 18e38d0..e5f6557 100644 --- a/tests/unit_tests/openvpn/test_cryptoapi.c +++ b/tests/unit_tests/openvpn/test_cryptoapi.c @@ -40,6 +40,7 @@ #include #include #include +#include "test_common.h" #include #include /* pull-in the whole file to test static functions = */ @@ -582,6 +583,7 @@ int main(void) { + openvpn_unit_test_setup(); const struct CMUnitTest tests[] =3D { cmocka_unit_test(test_parse_hexstring), cmocka_unit_test(import_certs), diff --git a/tests/unit_tests/openvpn/test_misc.c b/tests/unit_tests/openvp= n/test_misc.c index eac3466..68ca9b6 100644 --- a/tests/unit_tests/openvpn/test_misc.c +++ b/tests/unit_tests/openvpn/test_misc.c @@ -36,6 +36,7 @@ #include "ssl_util.h" #include "options_util.h" +#include "test_common.h" static void test_compat_lzo_string(void **state) @@ -117,5 +118,6 @@ int main(void) { + openvpn_unit_test_setup(); return cmocka_run_group_tests(misc_tests, NULL, NULL); } diff --git a/tests/unit_tests/openvpn/test_ncp.c b/tests/unit_tests/openvpn= /test_ncp.c index 9e26c74..a8e1021 100644 --- a/tests/unit_tests/openvpn/test_ncp.c +++ b/tests/unit_tests/openvpn/test_ncp.c @@ -35,6 +35,7 @@ #include #include "ssl_ncp.c" +#include "test_common.h" /* Defines for use in the tests and the mock parse_line() */ @@ -272,6 +273,7 @@ int main(void) { + openvpn_unit_test_setup(); #if defined(ENABLE_CRYPTO_OPENSSL) OpenSSL_add_all_algorithms(); #endif diff --git a/tests/unit_tests/openvpn/test_packet_id.c b/tests/unit_tests/o= penvpn/test_packet_id.c index 2a2a973..ff3f788 100644 --- a/tests/unit_tests/openvpn/test_packet_id.c +++ b/tests/unit_tests/openvpn/test_packet_id.c @@ -35,6 +35,7 @@ #include "packet_id.h" #include "reliable.h" +#include "test_common.h" struct test_packet_id_write_data { struct { @@ -273,6 +274,7 @@ int main(void) { + openvpn_unit_test_setup(); const struct CMUnitTest tests[] =3D { cmocka_unit_test_setup_teardown(test_packet_id_write_short, test_packet_id_write_setup, diff --git a/tests/unit_tests/openvpn/test_pkt.c b/tests/unit_tests/openvpn= /test_pkt.c index 62abafa..3a68c56 100644 --- a/tests/unit_tests/openvpn/test_pkt.c +++ b/tests/unit_tests/openvpn/test_pkt.c @@ -33,6 +33,7 @@ #include #include #include +#include "test_common.h" #include "crypto.h" #include "options.h" @@ -778,6 +779,7 @@ int main(void) { + openvpn_unit_test_setup(); const struct CMUnitTest tests[] =3D { cmocka_unit_test(test_verify_hmac_none), cmocka_unit_test(test_tls_decrypt_lite_none), diff --git a/tests/unit_tests/openvpn/test_provider.c b/tests/unit_tests/op= envpn/test_provider.c index 8a0b816..934b2d3b 100644 --- a/tests/unit_tests/openvpn/test_provider.c +++ b/tests/unit_tests/openvpn/test_provider.c @@ -40,6 +40,8 @@ #include #include +#include "test_common.h" + struct management *management; /* global */ static int mgmt_callback_called; @@ -119,6 +121,7 @@ static void init_test() { + openvpn_unit_test_setup(); prov[0] =3D OSSL_PROVIDER_load(NULL, "default"); OSSL_PROVIDER_add_builtin(NULL, prov_name, xkey_provider_init); prov[1] =3D OSSL_PROVIDER_load(NULL, prov_name); diff --git a/tests/unit_tests/openvpn/test_tls_crypt.c b/tests/unit_tests/o= penvpn/test_tls_crypt.c index 3eac04c..5eb864e 100644 --- a/tests/unit_tests/openvpn/test_tls_crypt.c +++ b/tests/unit_tests/openvpn/test_tls_crypt.c @@ -34,6 +34,7 @@ #include #include +#include "test_common.h" #include "tls_crypt.c" /* Define this function here as dummy since including the ssl_*.c files @@ -673,6 +674,7 @@ int main(void) { + openvpn_unit_test_setup(); const struct CMUnitTest tests[] =3D { cmocka_unit_test_setup_teardown(tls_crypt_loopback, test_tls_crypt_setup, -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1461?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newpatchset Gerrit-Project: openvpn Gerrit-Branch: release/2.6 Gerrit-Change-Id: I5c06dc13e9d8ab73997f79b13c30ee8949e5e993 Gerrit-Change-Number: 1461 Gerrit-PatchSet: 2 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-CC: openvpn-devel Gerrit-CC: plaisthos --z8eW9mYJD8E= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 upl= oaded patch set #2 to the change originally created by flichtenhel= d.

View Change

The following approvals got outdated and were remove= d: Code-Review+2 by cron2

Ensure that all unit tests use unbu=
ffered stdout and stderr

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

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

Change-Id: I5c06dc13e9d8ab73997f79b13c30ee8949e5= e993
URL: https://www.mail-archive.com/openvpn-devel@...1223...= et/msg28122.html
Acked-by: Gert Doering <gert@...1296...>
Gerri= t URL: https://gerrit.openvpn.net/c/openvpn/+/1461
(cherry picked from c= ommit 7869617a0f85089fb5e6fbe2db6f03542a8f33f4)
Message-Id: <20260115= 082807.18596-1-gert@...1296...>
URL: https://www.mail-archive.com/ope= nvpn-devel@lists.sourceforge.net/msg35272.html
Signed-off-by: Gert Doeri= ng <gert@...1296...>
---
M tests/unit_tests/openvpn/test_argv.c=
M tests/unit_tests/openvpn/test_auth_token.c
M tests/unit_tests/open= vpn/test_buffer.c
A tests/unit_tests/openvpn/test_common.h
M tests/un= it_tests/openvpn/test_crypto.c
M tests/unit_tests/openvpn/test_cryptoapi= .c
M tests/unit_tests/openvpn/test_misc.c
M tests/unit_tests/openvpn/= test_ncp.c
M tests/unit_tests/openvpn/test_packet_id.c
M tests/unit_t= ests/openvpn/test_pkt.c
M tests/unit_tests/openvpn/test_provider.c
M = tests/unit_tests/openvpn/test_tls_crypt.c
12 files changed, 63 insertion= s(+), 0 deletions(-)

git pull ssh://gerrit.openv=
pn.net:29418/openvpn refs/changes/61/1461/2
diff --git a/tests/unit=
_tests/openvpn/test_argv.c b/tests/unit_tests/openvpn/test_argv.cindex 1b18ac0..33b3dec 100644
--- a/tests/unit_tests= /openvpn/test_argv.c
+++ b/tests/unit_tests/openvpn/test_ar= gv.c
@@ -12,6 +12,7 @@

#= include "argv.h"
#include "buffer.h"
+#include "test_c= ommon.h"

/* Defines for use in the = tests and the mock parse_line() */
#define PATH1 &qu= ot;/s p a c e"
@@ -252,6 +253,7 @@
in= t
main(void)
{
+ openvpn_unit_test_setup();
const struct CMUnitTest tests[] =3D {

cmocka= _unit_test(argv_printf__multiple_spaces_in_format__parsed_as_one), cmocka_unit_test(argv_printf_cat__multiple_spaces_in_forma= t__parsed_as_one),
diff --git a/tests/unit_tests/openvpn/te= st_auth_token.c b/tests/unit_tests/openvpn/test_auth_token.c
index a027330..3a3cb69 100644
--- a/tests/unit_tests/open= vpn/test_auth_token.c
+++ b/tests/unit_tests/openvpn/test_a= uth_token.c
@@ -35,6 +35,7 @@
#include <= ;cmocka.h>

#include "auth_token.= c"
+#include &qu= ot;test_common.h"

struct test_conte= xt {
struct tls_multi multi;
@@ -407,6= +408,7 @@
int
main(void)
{
+ openvpn_unit= _test_setup();
const struct CMUnitTest tests[] =3D {
cmocka_unit_test_setup_teardown(auth_token_basic_te= st, setup, teardown),
cmocka_unit_test_setup_teard= own(auth_token_fail_invalid_key, setup, teardown),
diff --g= it a/tests/unit_tests/openvpn/test_buffer.c b/tests/unit_tests/openvpn/test= _buffer.c
index df1fdcb..c30ba42 100644
---= a/tests/unit_tests/openvpn/test_buffer.c
+++ b/tests/unit_= tests/openvpn/test_buffer.c
@@ -32,6 +32,7 @@

#include "buffer.h"
#inclu= de "buffer.c"
+#include "test_common.h"

s= tatic void
test_buffer_strprefix(void **state)
<= span>@@ -369,6 +370,7 @@
int
main(void)
{
+ = openvpn_unit_test_setup();
const struct CMUnitTest t= ests[] =3D {
cmocka_unit_test(test_buffer_strprefi= x),
cmocka_unit_test_setup_teardown(test_buffer_li= st_aggregate_separator_empty,
diff --git a/tests/unit_tests= /openvpn/test_common.h b/tests/unit_tests/openvpn/test_common.h
<= span>new file mode 100644

index 0000000..50e16d6
= --- /dev/null
+++ b/tests/unit_tests/openvpn/test_com= mon.h
@@ -0,0 +1,40 @@
+/*
+ * OpenVPN -- An application to securely tunnel IP networks
+ * over a single UDP= port, with support for SSL/TLS-based
+ * session authentication and key exchange,
+ * packet= encryption, packet authentication, and
+ * packet compression.
+ *
+ * Copyright (C) 2016-2021 Fox Crypto B.V. <openvpn@...220...= ..2507...>
+ *
+ * This program is fre= e software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Pub= lic License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will b= e useful,
+ * but WI= THOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A P= ARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General = Public License along
= + * with this program; if not, write to the Free Software Foundation, Inc.= ,
+ * 51 Franklin St= reet, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include = <stdio.h>
+#inc= lude <setjmp.h>
+#include <cmocka.h>
+
+/**<= br>+ * Sets up the environment = for unit tests like making both stderr and stdout
+ * non-buffered to avoid messages getting los= t if the program exits early.
+ *
+ * This= has a openvpn prefix to avoid confusion with cmocka's unit_test_setup_= *
+ * methods<= br>+ */
+void
+openvpn_unit_test_setup()
+{
+ assert_int_equal(setvbuf(stdout, NULL, _IONBF, BUFSIZ), 0);

+ assert_int_equal(set= vbuf(stderr, NULL, _IONBF, BUFSIZ), 0);
+}
diff --git a/tests/unit_tests/openvpn= /test_crypto.c b/tests/unit_tests/openvpn/test_crypto.c
ind= ex 4b1627a..ff639678 100644
--- a/tests/unit_tests/openvpn/= test_crypto.c
+++ b/tests/unit_tests/openvpn/test_crypto.c<= /span>
@@ -39,6 +39,7 @@
#include "ssl_backe= nd.h"

#include "mss.h"
+#include "test_co= mmon.h"

static const char testtext[= ] =3D "Dummy text to test PEM encoding";
=
@@ -479,6 +480,7 @@
int
main(vo= id)
{
+#include "test_common.h"

#include <cryptoapi.h>
#includ= e <cryptoapi.c> /* pull-in the whole file to test static functions */=
@@ -582,6 +583,7 @@
int
= main(void)
{
+ openvpn_unit_test_setup();
const struct = CMUnitTest tests[] =3D {
cmocka_unit_test(test_par= se_hexstring),
cmocka_unit_test(import_certs),
diff --git a/tests/unit_tests/openvpn/test_misc.c b/tests/unit= _tests/openvpn/test_misc.c
index eac3466..68ca9b6 100644
--- a/tests/unit_tests/openvpn/test_misc.c
++= + b/tests/unit_tests/openvpn/test_misc.c
@@ -36,6 +36,7 @@<= /span>

#include "ssl_util.h" #include "options_util.h"
+#include "test_common.h"

static void
test_compat_lzo_string(voi= d **state)
@@ -117,5 +118,6 @@
int<= br> main(void)
{
+ openvpn_unit_test_setup();
ret= urn cmocka_run_group_tests(misc_tests, NULL, NULL);
}
diff --git a/tests/unit_tests/openvpn/test_ncp.c b/tests/unit_t= ests/openvpn/test_ncp.c
index 9e26c74..a8e1021 100644
--- a/tests/unit_tests/openvpn/test_ncp.c
+++ b/= tests/unit_tests/openvpn/test_ncp.c
@@ -35,6 +35,7 @@
#include <cmocka.h>

#i= nclude "ssl_ncp.c"
+#include "test_common.h"

/* Defines for use in the tests and the mock parse_line() */

=
@@ -272,6 +273,7 @@
int
= main(void)
{
+ openvpn_unit_test_setup();
#if define= d(ENABLE_CRYPTO_OPENSSL)
OpenSSL_add_all_algorithms();=
#endif
diff --git a/tests/unit_tests/open= vpn/test_packet_id.c b/tests/unit_tests/openvpn/test_packet_id.c
= index 2a2a973..ff3f788 100644
--- a/tests/unit_tests/= openvpn/test_packet_id.c
+++ b/tests/unit_tests/openvpn/tes= t_packet_id.c
@@ -35,6 +35,7 @@
#include "packet_id.h"
#include "re= liable.h"
+#incl= ude "test_common.h"

struct tes= t_packet_id_write_data {
struct {
@@ -= 273,6 +274,7 @@
int
main(void)
= {
+ openvpn= _unit_test_setup();
const struct CMUnitTest tests[] = =3D {
cmocka_unit_test_setup_teardown(test_packet_= id_write_short,
te= st_packet_id_write_setup,
diff --git a/tests/unit_tests/ope= nvpn/test_pkt.c b/tests/unit_tests/openvpn/test_pkt.c
index= 62abafa..3a68c56 100644
--- a/tests/unit_tests/openvpn/tes= t_pkt.c
+++ b/tests/unit_tests/openvpn/test_pkt.c@@ -33,6 +33,7 @@
#include <string.h><= br> #include <setjmp.h>
#include <cmocka.h&= gt;
+#include "t= est_common.h"

#include "crypto= .h"
#include "options.h"
@@= -778,6 +779,7 @@
int
main(void) {
+ openv= pn_unit_test_setup();
const struct CMUnitTest tests[] = =3D {
cmocka_unit_test(test_verify_hmac_none),
cmocka_unit_test(test_tls_decrypt_lite_none),<= br>diff --git a/tests/unit_tests/openvpn/test_provider.c b/tests/unit= _tests/openvpn/test_provider.c
index 8a0b816..934b2d3b 1006= 44
--- a/tests/unit_tests/openvpn/test_provider.c+++ b/tests/unit_tests/openvpn/test_provider.c
@@ -4= 0,6 +40,8 @@
#include <openssl/core_names.h><= br> #include <openssl/evp.h>

+#include "test_common.h"
+
str= uct management *management; /* global */
static int mgmt_c= allback_called;

@@ -119,6 +121,7 @@
static void
init_test()
{
+ openvpn_unit_test_s= etup();
prov[0] =3D OSSL_PROVIDER_load(NULL, "def= ault");
OSSL_PROVIDER_add_builtin(NULL, prov_name= , xkey_provider_init);
prov[1] =3D OSSL_PROVIDER_load(= NULL, prov_name);
diff --git a/tests/unit_tests/openvpn/tes= t_tls_crypt.c b/tests/unit_tests/openvpn/test_tls_crypt.c
i= ndex 3eac04c..5eb864e 100644
--- a/tests/unit_tests/openvpn= /test_tls_crypt.c
+++ b/tests/unit_tests/openvpn/test_tls_c= rypt.c
@@ -34,6 +34,7 @@
#include <setj= mp.h>
#include <cmocka.h>

+#include "test_commo= n.h"
#include "tls_crypt.c"

/* Define this function here as dummy since including t= he ssl_*.c files
@@ -673,6 +674,7 @@
int
main(void)
{
+ openvpn_unit_test_setup();
= const struct CMUnitTest tests[] =3D {
cmocka_un= it_test_setup_teardown(tls_crypt_loopback,
= test_tls_crypt_setup,

<= /pre>

To view, visit change 1461. To unsubscribe, or for help writing mail fi= lters, visit set= tings.

=
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: release/2.6
Gerrit-Change-Id: I5c06dc13e9d8ab73997f79b13c3= 0ee8949e5e993
Gerrit-Change-Number: 1461
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-CC: plaisthos <arne-openvpn@...2639...= ..>
= --z8eW9mYJD8E=--