Change in openvpn[master]: Fix building test_tls_crypt with cmocka 2.0
A message that is not in the archive (sent off-list or not yet received): gerrit.1767875377000.Ibc964c13724316ca96276ba6b7d34dbbfcf52064@...2715...
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=email
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.
---
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
tests/unit_tests/openvpn/test_tls_crypt.c +3 -3
@@ -110,8 +110,8 @@ __wrap_buffer_write_file(const char *filename, const struct buffer *buf) { const char *pem = 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 = mock_ptr_type(const char *);struct buffer ret =alloc_buf_gc (strlen (pem_str) +1 , gc);
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1460?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ibc964c13724316ca96276ba6b7d34dbbfcf52064
Gerrit-Change-Number: 1460
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Attention is currently required from: flichtenheld, plaisthos.
cron2 has posted comments on this change by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1460?usp=email )
Change subject: Fix building test_tls_crypt with cmocka 2.0
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1460?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ibc964c13724316ca96276ba6b7d34dbbfcf52064
Gerrit-Change-Number: 1460
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Thu, 08 Jan 2026 15:42:35 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
PATCH 1/1 Fix building test_tls_crypt with cmocka 2.0
In reply to a message not in the archiveFrom: Frank Lichtenheld <[email protected]...>
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.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1460
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1460
This mail reflects revision 1 of this Change.
Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>
tests/unit_tests/openvpn/test_tls_crypt.c +3 -3
@@ -110,8 +110,8 @@ __wrap_buffer_write_file(const char *filename, const struct buffer *buf) { const char *pem = 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 = mock_ptr_type(const char *);struct buffer ret =alloc_buf_gc (strlen (pem_str) +1 , gc);
[Openvpn-devel] [PATCH applied] Re: Fix building test_tls_crypt with cmocka 2.0
As it says on the lid :-) - the change affects only UT test code, is straightforward, and the tests still pass for old libcmocka versions.
Onwards!
Your patch has been applied to the master branch.
commit 20f8127bcd31918af6f97570765d136ebf0fb801
Author: Frank Lichtenheld Date: Thu Jan 8 16:42:43 2026 +0100
Fix building test_tls_crypt with cmocka 2.0
Signed-off-by: Frank Lichtenheld <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1460
Message-Id: <[email protected]...>
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
cron2 has uploaded a new patch set (#2) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1460?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by cron2
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.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1460
Message-Id: <[email protected]...>
---
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/2
tests/unit_tests/openvpn/test_tls_crypt.c +3 -3
@@ -110,8 +110,8 @@ __wrap_buffer_write_file(const char *filename, const struct buffer *buf) { const char *pem = 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 = mock_ptr_type(const char *);struct buffer ret =alloc_buf_gc (strlen (pem_str) +1 , gc);
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1460?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ibc964c13724316ca96276ba6b7d34dbbfcf52064
Gerrit-Change-Number: 1460
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1460?usp=email )
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.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1460
Message-Id: <[email protected]...>
---
M tests/unit_tests/openvpn/test_tls_crypt.c
1 file changed, 3 insertions(+), 3 deletions(-)
tests/unit_tests/openvpn/test_tls_crypt.c +3 -3
@@ -110,8 +110,8 @@ __wrap_buffer_write_file(const char *filename, const struct buffer *buf) { const char *pem = 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 = mock_ptr_type(const char *);struct buffer ret =alloc_buf_gc (strlen (pem_str) +1 , gc);
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1460?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ibc964c13724316ca96276ba6b7d34dbbfcf52064
Gerrit-Change-Number: 1460
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>