]> git.ipfire.org Git - thirdparty/openvpn.git/commit
mbuf: Add unit tests
authorFrank Lichtenheld <frank@lichtenheld.com>
Fri, 12 Dec 2025 12:03:46 +0000 (13:03 +0100)
committerGert Doering <gert@greenie.muc.de>
Fri, 12 Dec 2025 12:52:02 +0000 (13:52 +0100)
commit75cc34eccca990a2efbaa02639311def6b2cd70f
treeef12dc4d7e6aaa76510a00f15d4d9c595cc7684a
parent2b8149a4fe0d73ea0bedf2e282188d55c8511c45
mbuf: Add unit tests

While fixing the conversion warning I was
somewhat confused how this works, so added
UTs to verify I understood it.

v2:
 - disable assert test for MS VS
 - add define for memory-intensive UTs and
   only enable it by default for CMake builds,
   so we do not break a lot of builds out there
   due to memory allocation failures

Change-Id: Icab68a5fd1b6288955f0073179f1ddde1468d951
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1432
Message-Id: <20251212120352.17402-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35050.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
CMakeLists.txt
src/openvpn/mbuf.c
src/openvpn/mbuf.h
src/openvpn/options.c
tests/unit_tests/openvpn/Makefile.am
tests/unit_tests/openvpn/test_buffer.c
tests/unit_tests/openvpn/test_mbuf.c [new file with mode: 0644]