From: "flichtenheld (Code Review)" Date: Thu, 8 Jan 2026 12:29:39 +0000 References: Reply-To: frank@...2641..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: <970cb20104185eed6a00c248c6fd923439fb2043-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="oEVl+JLzg40="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: Fix building test_tls_crypt with cmocka 2.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: openvpn-devel --oEVl+JLzg40= 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 do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1460?usp=3Demail to review the following change. Change subject: Fix building test_tls_crypt with cmocka 2.0 ...................................................................... Fix building test_tls_crypt with cmocka 2.0 This was missed in commit 6db186e0b1d9783ea96e8a945a47fd23b45e4778 since we only built with cmocka 2.0 on macOS and that doesn't build test_tls_crypt. Now that we build with cmocka 2.0 also on Debian Sid we noticed the additional issues. Change-Id: Ibc964c13724316ca96276ba6b7d34dbbfcf52064 Signed-off-by: Frank Lichtenheld --- M tests/unit_tests/openvpn/test_tls_crypt.c 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/60/1460/1 diff --git a/tests/unit_tests/openvpn/test_tls_crypt.c b/tests/unit_tests/o= penvpn/test_tls_crypt.c index 4a80a4c..730841e 100644 --- a/tests/unit_tests/openvpn/test_tls_crypt.c +++ b/tests/unit_tests/openvpn/test_tls_crypt.c @@ -110,8 +110,8 @@ __wrap_buffer_write_file(const char *filename, const struct buffer *buf) { const char *pem =3D BSTR(buf); - check_expected(filename); - check_expected(pem); + check_expected_ptr(filename); + check_expected_ptr(pem); return mock_type(bool); } @@ -119,7 +119,7 @@ struct buffer __wrap_buffer_read_from_file(const char *filename, struct gc_arena *gc) { - check_expected(filename); + check_expected_ptr(filename); const char *pem_str =3D mock_ptr_type(const char *); struct buffer ret =3D alloc_buf_gc(strlen(pem_str) + 1, gc); -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1460?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newchange Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ibc964c13724316ca96276ba6b7d34dbbfcf52064 Gerrit-Change-Number: 1460 Gerrit-PatchSet: 1 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos --oEVl+JLzg40= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: plaisthos.

flichtenheld would like plaisthos to review this change.

V= iew Change

Fix building test_tls_crypt with cmocka 2.0=


This was missed in commit
6db186e0b1d9783ea96e8a945a47fd23b45e47= 78 since we
only built with cmocka 2.0 on macOS and that doesn't
= build test_tls_crypt.

Now that we build with cmocka 2.0 also on Debi= an Sid
we noticed the additional issues.

Change-Id: Ibc964c137243= 16ca96276ba6b7d34dbbfcf52064
Signed-off-by: Frank Lichtenheld <frank@= ...2641...>
---
M tests/unit_tests/openvpn/test_tls_crypt.c
1 f= ile changed, 3 insertions(+), 3 deletions(-)

git=
 pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/60/1460/1
diff --git a/tests/unit_tests/openvpn/test_tls_crypt.c b/tests/unit_tests/= openvpn/test_tls_crypt.c
index 4a80a4c..730841e 100644
--- a/tests/unit_tests/openvpn/test_tls_crypt.c
+++ b/tests/unit_tests/openvpn/test_tls_crypt.c

@@ -110,8 = +110,8 @@
__wrap_buffer_write_file(const char *filename, c= onst struct buffer *buf)
{
const char= *pem =3D BSTR(buf);
- = check_expected(filename);
- check_expected(pem);
+ check_expected_ptr(filename);
+ check_expected_ptr(pem);

return mock_type(bool);
}
@@ -119,7 +119,7 @@

struct buffer
__wr= ap_buffer_read_from_file(const char *filename, struct gc_arena *gc)<= br> {
- check_= expected(filename);
+= check_expected_ptr(filename);

co= nst char *pem_str =3D mock_ptr_type(const char *);
str= uct buffer ret =3D alloc_buf_gc(strlen(pem_str) + 1, gc);
<= /span>

To view, visit change 1460. To unsubscribe, or for help writ= ing mail filters, visit settings.

=
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ibc964c13724316ca96276ba6b7d= 34dbbfcf52064
Gerrit-Change-Number: 1460
Gerrit-PatchSet: 1
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...>
= --oEVl+JLzg40=--