From: "flichtenheld (Code Review)"
Date: Wed, 17 Dec 2025 16:41:25 +0000
In-Reply-To:
References:
Reply-To: frank@...2641..., arne-openvpn@...1227...,
openvpn-devel@lists.sourceforge.net
Message-ID:
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Type: multipart/alternative; boundary="A5XHXiArITo="; charset=UTF-8
Subject: [Openvpn-devel] [M] Change in openvpn[master]: tests/unit_tests:
Port to cmocka 2.0.0 API
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
To: plaisthos
Cc: openvpn-devel
--A5XHXiArITo=
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/1449?usp=3Demail
to look at the new patch set (#2).
Change subject: tests/unit_tests: Port to cmocka 2.0.0 API
......................................................................
tests/unit_tests: Port to cmocka 2.0.0 API
But add compat layer so that we can still build
against older versions of cmocka. Mostly this is
trivial but the custom check function changed its
prototype, so that requires some more work.
Change-Id: Ifb6594700db71d219643a29c581099c778bcbbc6
Signed-off-by: Frank Lichtenheld
---
M CMakeLists.txt
M config.h.cmake.in
M configure.ac
M tests/unit_tests/openvpn/test_common.h
M tests/unit_tests/openvpn/test_options_parse.c
M tests/unit_tests/openvpn/test_push_update_msg.c
M tests/unit_tests/openvpn/test_user_pass.c
7 files changed, 79 insertions(+), 46 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/49/1449/2
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bdb1904..fc5eaf1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -379,6 +379,18 @@
)
set(HAVE_CONFIG_VERSION_H YES)
+if (BUILD_TESTING)
+ find_package(cmocka CONFIG)
+ if (TARGET cmocka::cmocka)
+ set(CMOCKA_LIBRARIES cmocka::cmocka)
+ else ()
+ pkg_search_module(cmocka cmocka REQUIRED IMPORTED_TARGET)
+ set(CMOCKA_LIBRARIES PkgConfig::cmocka)
+ endif ()
+ set(CMAKE_REQUIRED_LIBRARIES ${CMOCKA_LIBRARIES})
+ check_include_files(cmocka_version.h HAVE_CMOCKA_VERSION_H)
+endif ()
+
configure_file(config.h.cmake.in config.h)
configure_file(include/openvpn-plugin.h.in openvpn-plugin.h)
# TODO we should remove the need for this, and always include config.h
@@ -636,14 +648,6 @@
option(UT_ALLOW_BIG_ALLOC "Allow unit-tests to use > 1 GB of memory" ON)
if (BUILD_TESTING)
- find_package(cmocka CONFIG)
- if (TARGET cmocka::cmocka)
- set(CMOCKA_LIBRARIES cmocka::cmocka)
- else ()
- pkg_search_module(cmocka cmocka REQUIRED IMPORTED_TARGET)
- set(CMOCKA_LIBRARIES PkgConfig::cmocka)
- endif ()
-
set(unit_tests
"test_argv"
"test_auth_token"
diff --git a/config.h.cmake.in b/config.h.cmake.in
index 53c3598..01bbadc 100644
--- a/config.h.cmake.in
+++ b/config.h.cmake.in
@@ -86,6 +86,9 @@
/* git version information in config-version.h */
#cmakedefine HAVE_CONFIG_VERSION_H
+/* cmocka version information available in cmocka_version.h (>=3D 2.0.0) */
+#cmakedefine HAVE_CMOCKA_VERSION_H
+
/* Define to 1 if you have the `daemon' function. */
#cmakedefine HAVE_DAEMON
diff --git a/configure.ac b/configure.ac
index d5a0c70..ef7d305 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1415,7 +1415,16 @@
[have_cmocka=3D"yes"],
[AC_MSG_WARN([cmocka.pc not found on the system using pkg-config ${pkg_co=
nfig_found}. Unit tests disabled])]
)
-AM_CONDITIONAL([ENABLE_UNITTESTS], [test "${enable_unit_tests}" =3D "yes" =
-a "${have_cmocka}" =3D "yes" ])
+AM_CONDITIONAL([ENABLE_UNITTESTS], [false])
+if test "${enable_unit_tests}" =3D "yes" -a "${have_cmocka}" =3D "yes"; th=
en
+ AM_CONDITIONAL([ENABLE_UNITTESTS], [true])
+
+ saved_CFLAGS=3D"${CFLAGS}"
+ CFLAGS=3D"${CFLAGS} ${LZO_CFLAGS}"
+ # detect cmocka < 2.0.0 that had no cmocka_version.h
+ AC_CHECK_HEADERS([cmocka_version.h])
+ CFLAGS=3D"${saved_CFLAGS}"
+fi
AC_SUBST([ENABLE_UNITTESTS])
TEST_LDFLAGS=3D"${OPTIONAL_CRYPTO_LIBS} ${OPTIONAL_PKCS11_HELPER_LIBS} ${O=
PTIONAL_LIBCAPNG_LIBS}"
diff --git a/tests/unit_tests/openvpn/test_common.h b/tests/unit_tests/open=
vpn/test_common.h
index da98531..3a0598d 100644
--- a/tests/unit_tests/openvpn/test_common.h
+++ b/tests/unit_tests/openvpn/test_common.h
@@ -24,6 +24,27 @@
#include
#include
+/* Do we use cmocka < 2.0.0? */
+#ifndef HAVE_CMOCKA_VERSION_H
+#define HAVE_OLD_CMOCKA_API 1
+/* compat with various versions of cmocka.h
+ * Older versions have LargestIntegralType. Newer
+ * versions use uintmax_t. But LargestIntegralType
+ * is not guaranteed to be equal to uintmax_t, so
+ * we can't use that unconditionally. So we only use
+ * it if cmocka.h does not define LargestIntegralType.
+ */
+#ifndef LargestIntegralType
+#define LargestIntegralType uintmax_t
+#endif
+/* redefine 2.x API in terms of 1.x API */
+#define CMockaValueData LargestIntegralType
+#define check_expected_uint check_expected
+#define expect_uint_value expect_value
+#define expect_check_data expect_check
+#define cast_ptr_to_cmocka_value(x) (x)
+#endif
+
/**
* 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.
diff --git a/tests/unit_tests/openvpn/test_options_parse.c b/tests/unit_tes=
ts/openvpn/test_options_parse.c
index adf3e5b..5af84f5 100644
--- a/tests/unit_tests/openvpn/test_options_parse.c
+++ b/tests/unit_tests/openvpn/test_options_parse.c
@@ -44,8 +44,8 @@
struct env_set *es)
{
function_called();
- check_expected(p);
- check_expected(is_inline);
+ check_expected_ptr(p);
+ check_expected_uint(is_inline);
}
void
@@ -198,31 +198,27 @@
&option_types_found, &es);
}
-/* compat with various versions of cmocka.h
- * Older versions have LargestIntegralType. Newer
- * versions use uintmax_t. But LargestIntegralType
- * is not guaranteed to be equal to uintmax_t, so
- * we can't use that unconditionally. So we only use
- * it if cmocka.h does not define LargestIntegralType.
- */
-#ifndef LargestIntegralType
-#define LargestIntegralType uintmax_t
+#if HAVE_OLD_CMOCKA_API
+union token_parameter
+{
+ LargestIntegralType int_val;
+ void *ptr;
+};
#endif
-union tokens_parameter
-{
- LargestIntegralType as_int;
- void *as_pointer;
-};
-
static int
-check_tokens(const LargestIntegralType value, const LargestIntegralType ex=
pected)
+check_tokens(const CMockaValueData value, const CMockaValueData expected)
{
- union tokens_parameter temp;
- temp.as_int =3D value;
- const char **p =3D (const char **)temp.as_pointer;
- temp.as_int =3D expected;
- const char **expected_p =3D (const char **)temp.as_pointer;
+#if HAVE_OLD_CMOCKA_API
+ union token_parameter temp;
+ temp.int_val =3D value;
+ const char **p =3D (const char **)temp.ptr;
+ temp.int_val =3D expected;
+ const char **expected_p =3D (const char **)temp.ptr;
+#else
+ const char **p =3D (const char **)value.ptr;
+ const char **expected_p =3D (const char **)expected.ptr;
+#endif
for (int i =3D 0; i < MAX_PARMS; i++)
{
if (!p[i] && !expected_p[i])
@@ -271,33 +267,33 @@
/* basic test */
expect_function_call(add_option);
- expect_check(add_option, p, check_tokens, p_expect_someopt);
- expect_value(add_option, is_inline, 0);
+ expect_check_data(add_option, p, check_tokens, cast_ptr_to_cmocka_valu=
e(p_expect_someopt));
+ expect_uint_value(add_option, is_inline, 0);
expect_function_call(add_option);
- expect_check(add_option, p, check_tokens, p_expect_otheropt);
- expect_value(add_option, is_inline, 0);
+ expect_check_data(add_option, p, check_tokens, cast_ptr_to_cmocka_valu=
e(p_expect_otheropt));
+ expect_uint_value(add_option, is_inline, 0);
read_single_config(&o, "someopt parm1 parm2\n otheropt 1 2");
/* -- gets stripped */
expect_function_call(add_option);
- expect_check(add_option, p, check_tokens, p_expect_someopt);
- expect_value(add_option, is_inline, 0);
+ expect_check_data(add_option, p, check_tokens, cast_ptr_to_cmocka_valu=
e(p_expect_someopt));
+ expect_uint_value(add_option, is_inline, 0);
expect_function_call(add_option);
- expect_check(add_option, p, check_tokens, p_expect_otheropt);
- expect_value(add_option, is_inline, 0);
+ expect_check_data(add_option, p, check_tokens, cast_ptr_to_cmocka_valu=
e(p_expect_otheropt));
+ expect_uint_value(add_option, is_inline, 0);
read_single_config(&o, "someopt parm1 parm2\n\t--otheropt 1 2");
/* inline options */
expect_function_call(add_option);
- expect_check(add_option, p, check_tokens, p_expect_inlineopt);
- expect_value(add_option, is_inline, 1);
+ expect_check_data(add_option, p, check_tokens, cast_ptr_to_cmocka_valu=
e(p_expect_inlineopt));
+ expect_uint_value(add_option, is_inline, 1);
read_single_config(&o, "\nsome text\nother text\n");
p_expect_inlineopt[0] =3D "inlineopt";
p_expect_inlineopt[1] =3D A_TIMES_256 A_TIMES_256 A_TIMES_256 A_TIMES_=
256 A_TIMES_256 "\n";
expect_function_call(add_option);
- expect_check(add_option, p, check_tokens, p_expect_inlineopt);
- expect_value(add_option, is_inline, 1);
+ expect_check_data(add_option, p, check_tokens, cast_ptr_to_cmocka_valu=
e(p_expect_inlineopt));
+ expect_uint_value(add_option, is_inline, 1);
read_single_config(&o, "\n" A_TIMES_256 A_TIMES_256 A_TIMES=
_256 A_TIMES_256 A_TIMES_256 "\n ");
gc_free(&o.gc);
diff --git a/tests/unit_tests/openvpn/test_push_update_msg.c b/tests/unit_t=
ests/openvpn/test_push_update_msg.c
index 5c16001..9b7978e 100644
--- a/tests/unit_tests/openvpn/test_push_update_msg.c
+++ b/tests/unit_tests/openvpn/test_push_update_msg.c
@@ -171,7 +171,7 @@
bool
send_control_channel_string(struct context *c, const char *str, msglvl_t m=
sglevel)
{
- check_expected(str);
+ check_expected_ptr(str);
return true;
}
diff --git a/tests/unit_tests/openvpn/test_user_pass.c b/tests/unit_tests/o=
penvpn/test_user_pass.c
index abe223c..a109201 100644
--- a/tests/unit_tests/openvpn/test_user_pass.c
+++ b/tests/unit_tests/openvpn/test_user_pass.c
@@ -52,7 +52,7 @@
/* Loop through configured query_user slots */
for (int i =3D 0; i < QUERY_USER_NUMSLOTS && query_user[i].response !=
=3D NULL; i++)
{
- check_expected(query_user[i].prompt);
+ check_expected_ptr(query_user[i].prompt);
strncpy(query_user[i].response, mock_ptr_type(char *), query_user[=
i].response_len);
}
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1449?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: master
Gerrit-Change-Id: Ifb6594700db71d219643a29c581099c778bcbbc6
Gerrit-Change-Number: 1449
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld
Gerrit-Reviewer: plaisthos
Gerrit-CC: openvpn-devel
Gerrit-Attention: plaisthos
--A5XHXiArITo=
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is cur=
rently required from: plaisthos.
flichtenheld uploaded patch set #2 to this change.
<=
p>View C=
hange
tests/unit_tests: Port to cmocka 2.0.0 APIBut add compat layer so that we can still build against older versions=
of cmocka. Mostly this is trivial but the custom check function changed=
its prototype, so that requires some more work. Change-Id: Ifb65=
94700db71d219643a29c581099c778bcbbc6 Signed-off-by: Frank Lichtenheld &l=
t;frank@...2641...> --- M CMakeLists.txt M config.h.cmake.in M configure.ac M tests/unit_tests/openvpn/test_common.h M tests/unit=
_tests/openvpn/test_options_parse.c M tests/unit_tests/openvpn/test_push=
_update_msg.c M tests/unit_tests/openvpn/test_user_pass.c 7 files cha=
nged, 79 insertions(+), 46 deletions(-) git pull=
ssh://gerrit.openvpn.net:29418/openvpn refs/changes/49/1449/2 diff=
--git a/CMakeLists.txt b/CMakeLists.txt index bdb1904..fc5=
eaf1 100644 --- a/CMakeLists.txt +++ b/CMak=
eLists.txt @@ -379,6 +379,18 @@ ) set(HAVE_CONFIG_VERSION_H YES) +if (BUILD_TESTING) + find_package(cmocka CONFIG)+ if (TARGET cmocka:=
:cmocka) + set=
(CMOCKA_LIBRARIES cmocka::cmocka) + else () + pkg_search_module(cmocka cmocka REQUIRED IMPORTED_TARGET)+ set(CMOCKA_LIBR=
ARIES PkgConfig::cmocka) + endif () + =
set(CMAKE_REQUIRED_LIBRARIES ${CMOCKA_LIBRARIES}) + check_include_files(cmocka_version.h =
HAVE_CMOCKA_VERSION_H) +endif () + <=
br> configure_file(config.h.cmake.in config.h) confi=
gure_file(include/openvpn-plugin.h.in openvpn-plugin.h) # =
TODO we should remove the need for this, and always include config.h =
@@ -636,14 +648,6 @@ option(UT_ALLOW_BIG_ALLOC &=
quot;Allow unit-tests to use > 1 GB of memory" ON) =
if (BUILD_TESTING) - find_package(cmocka CONFIG) - if (TARGET cmocka::cmocka) - set(CMOCKA_LIBRARIES cmocka::cmo=
cka) - else () - pkg_search_module(c=
mocka cmocka REQUIRED IMPORTED_TARGET) - set(CMOCKA_LIBRARIES PkgConfig::cmocka) =
- endif () - set(unit_tests "test_argv" "t=
est_auth_token" diff --git a/config.h.cmake.in b/confi=
g.h.cmake.in index 53c3598..01bbadc 100644 =
--- a/config.h.cmake.in +++ b/config.h.cmake.in <=
span>@@ -86,6 +86,9 @@ /* git version information in confi=
g-version.h */ #cmakedefine HAVE_CONFIG_VERSION_H +/* cmocka =
version information available in cmocka_version.h (>=3D 2.0.0) */ =
+#cmakedefine HAVE_CMOCKA_V=
ERSION_H + =
/* Define to 1 if you have the `daemon' function. */ <=
span> #cmakedefine HAVE_DAEMON diff --git=
a/configure.ac b/configure.ac index d5a0c70..ef7d305 10064=
4 --- a/configure.ac +++ b/configure.ac@@ -1415,7 +1415,16 @@ [have_cmocka=3D"=
yes"], [AC_MSG_WARN([cmocka.pc not found on the syst=
em using pkg-config ${pkg_config_found}. Unit tests disabled])] =
) -AM_CONDITIONA=
L([ENABLE_UNITTESTS], [test "${enable_unit_tests}" =3D "yes&=
quot; -a "${have_cmocka}" =3D "yes" ]) +AM_CONDITIONAL([ENABLE_UNITTESTS], [=
false]) +if test &quo=
t;${enable_unit_tests}" =3D "yes" -a "${have_cmocka}&qu=
ot; =3D "yes"; then + AM_CONDITIONAL([ENABLE_UNITTESTS], [true]) + + saved_CFLAGS=3D"${CFLAGS}" + CFLAGS=3D"${CFLAGS} ${LZO_CFLA=
GS}" + # detec=
t cmocka < 2.0.0 that had no cmocka_version.h + AC_CHECK_HEADERS([cmocka_version.h]) =
+ CFLAGS=3D"${saved_=
CFLAGS}" +fi AC_SUBST([ENABLE_UNITTESTS]) TEST_LDFLAGS=3D"${OPTIONAL_CRYPTO_LIBS} ${OPTIONAL_PKCS11_HELPER_LI=
BS} ${OPTIONAL_LIBCAPNG_LIBS}" diff --git a/tests/unit=
_tests/openvpn/test_common.h b/tests/unit_tests/openvpn/test_common.h index da98531..3a0598d 100644 --- a/tests/unit_t=
ests/openvpn/test_common.h +++ b/tests/unit_tests/openvpn/t=
est_common.h @@ -24,6 +24,27 @@ #include &=
lt;setjmp.h> #include <cmocka.h> =
+/* Do we use cmock=
a < 2.0.0? */ +#if=
ndef HAVE_CMOCKA_VERSION_H +#define HAVE_OLD_CMOCKA_API 1 +/* compat with various versions of cmocka.h + * Older versions have LargestInte=
gralType. Newer + * v=
ersions use uintmax_t. But LargestIntegralType + * is not guaranteed to be equal to uintmax_t, s=
o + * we can't us=
e that unconditionally. So we only use + * it if cmocka.h does not define LargestIntegralType.=
span>+ */ +#ifndef LargestIntegralType +#define LargestIntegralType u=
intmax_t +#endif+/* redefine 2.x API in t=
erms of 1.x API */ +#=
define CMockaValueData LargestIntegralType +#define check_expected_uint chec=
k_expected +#define e=
xpect_uint_value expect_value +#define expect_check_data expect_check =
+#define cast_ptr_to_cmocka=
_value(x) (x) +#endif=
+ /=
** * Sets up the environment for unit tests like making b=
oth stderr and stdout * non-buffered to avoid messages ge=
tting lost if the program exits early. diff --git a/tests/u=
nit_tests/openvpn/test_options_parse.c b/tests/unit_tests/openvpn/test_opti=
ons_parse.c index adf3e5b..5af84f5 100644 -=
-- a/tests/unit_tests/openvpn/test_options_parse.c +++ b/te=
sts/unit_tests/openvpn/test_options_parse.c @@ -44,8 +44,8 =
@@ struct env_set *es) { function_called(); - check_expected(p); - check_expected(is_inline); + check_expected_ptr(p); + check_expected_uint(is_inline); } void @@ -1=
98,31 +198,27 @@ &option_types_=
found, &es); } -/* compat with various versions of cmocka.h=
- * Older versions hav=
e LargestIntegralType. Newer - * versions use uintmax_t. But LargestIntegralType - * is not guaranteed to be equal to uin=
tmax_t, so - * we can=
39;t use that unconditionally. So we only use - * it if cmocka.h does not define LargestIntegralTy=
pe. - */ -#ifndef LargestIntegralType -#define LargestIntegralType ui=
ntmax_t +#if HAVE_OLD=
_CMOCKA_API +union to=
ken_parameter +{+ LargestIntegralType =
int_val; + void *p=
tr; +}; #endif -union tokens_parameter -{ - LargestI=
ntegralType as_int; - =
void *as_pointer; -};=
- sta=
tic int -check_tokens(c=
onst LargestIntegralType value, const LargestIntegralType expected) <=
br>+check_tokens(const CMockaVa=
lueData value, const CMockaValueData expected) { - union tokens_parameter temp=
; - temp.as_int =3D =
value; - const char =
**p =3D (const char **)temp.as_pointer; - temp.as_int =3D expected; - const char **expected_p =3D (const char **)te=
mp.as_pointer; +#if H=
AVE_OLD_CMOCKA_API + =
union token_parameter temp; + temp.int_val =3D value; + const char **p =3D (const char **)temp.ptr; + temp.int_val =3D expecte=
d; + const char **=
expected_p =3D (const char **)temp.ptr; +#else + const char **p =3D (const char **)value.ptr; + const char **expected_p =3D (const c=
har **)expected.ptr; =
+#endif for (int i =3D 0; i < MAX_PARMS; i++) { if (!p[i] && !expected_p=
[i]) @@ -271,33 +267,33 @@ /* basic test */ expect_function_call(add_optio=
n); - expect_check(a=
dd_option, p, check_tokens, p_expect_someopt); - expect_value(add_option, is_inline, 0); =
+ expect_check_data(add_=
option, p, check_tokens, cast_ptr_to_cmocka_value(p_expect_someopt)); + expect_uint_value(add=
_option, is_inline, 0); expect_function_call(add_optio=
n); - expect_check(a=
dd_option, p, check_tokens, p_expect_otheropt); - expect_value(add_option, is_inline, 0); + expect_check_data(add=
_option, p, check_tokens, cast_ptr_to_cmocka_value(p_expect_otheropt));+ expect_uint_value(a=
dd_option, is_inline, 0); read_single_config(&o, &=
quot;someopt parm1 parm2\n otheropt 1 2"); /* -- gets stripped */ expect_function_ca=
ll(add_option); - ex=
pect_check(add_option, p, check_tokens, p_expect_someopt); - expect_value(add_option, is_inline=
, 0); + expect_che=
ck_data(add_option, p, check_tokens, cast_ptr_to_cmocka_value(p_expect_some=
opt)); + expect_ui=
nt_value(add_option, is_inline, 0); expect_function_ca=
ll(add_option); - ex=
pect_check(add_option, p, check_tokens, p_expect_otheropt); - expect_value(add_option, is_inlin=
e, 0); + expect_ch=
eck_data(add_option, p, check_tokens, cast_ptr_to_cmocka_value(p_expect_oth=
eropt)); + expect_=
uint_value(add_option, is_inline, 0); read_single_conf=
ig(&o, "someopt parm1 parm2\n\t--otheropt 1 2"); /* inline options */ expect=
_function_call(add_option); - expect_check(add_option, p, check_tokens, p_expect_inlineopt);- expect_value(add_opt=
ion, is_inline, 1); +=
expect_check_data(add_option, p, check_tokens, cast_ptr_to_cmocka_value=
(p_expect_inlineopt)); + expect_uint_value(add_option, is_inline, 1); re=
ad_single_config(&o, "<inlineopt>\nsome text\nother text\n&l=
t;/inlineopt>"); p_expect_in=
lineopt[0] =3D "inlineopt"; p_expect_inlineo=
pt[1] =3D A_TIMES_256 A_TIMES_256 A_TIMES_256 A_TIMES_256 A_TIMES_256 "=
;\n"; expect_function_call(add_option); - expect_check(add_option, p,=
check_tokens, p_expect_inlineopt); - expect_value(add_option, is_inline, 1); + expect_check_data(add_option, p, =
check_tokens, cast_ptr_to_cmocka_value(p_expect_inlineopt)); + expect_uint_value(add_option, =
is_inline, 1); read_single_config(&o, "<in=
lineopt>\n" A_TIMES_256 A_TIMES_256 A_TIMES_256 A_TIMES_256 A_TIMES=
_256 "\n</inlineopt>"); =
gc_free(&o.gc); diff --git a/tests/unit_tests/openv=
pn/test_push_update_msg.c b/tests/unit_tests/openvpn/test_push_update_msg.c=
index 5c16001..9b7978e 100644 --- a/tests/=
unit_tests/openvpn/test_push_update_msg.c +++ b/tests/unit_=
tests/openvpn/test_push_update_msg.c @@ -171,7 +171,7 @@ bool send_control_channel_string(struct con=
text *c, const char *str, msglvl_t msglevel) { <=
span style=3D"color: hsl(0, 100%, 40%);">- check_expected(str); + check_expected_ptr(str);=
return true; } diff --git a/tests/unit_tests/openvpn/test_user_pass.c b/tests=
/unit_tests/openvpn/test_user_pass.c index abe223c..a109201=
100644 --- a/tests/unit_tests/openvpn/test_user_pass.c+++ b/tests/unit_tests/openvpn/test_user_pass.c @@ -52,7 +52,7 @@ /* Loop through configured query_u=
ser slots */ for (int i =3D 0; i < QUERY_USER_NUMSL=
OTS && query_user[i].response !=3D NULL; i++) =
{ - check_expect=
ed(query_user[i].prompt); + check_expected_ptr(query_user[i].prompt); =
strncpy(query_user[i].response, mock_ptr_type(char *), query_user[i].=
response_len); } To view, visit change 1449 . To unsubscribe, or for help writin=
g mail filters, visit settings .
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ifb6594700db71d219643a29c581=
099c778bcbbc6
Gerrit-Change-Number: 1449
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <frank@...2723...=
.>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...=
.1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...=
ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...=
..1227...>
=
--A5XHXiArITo=--