[Openvpn-devel,v1] Fix broken unit tests after commit 5c6fbd0a11

Message ID 20261020145859.1457-1-gert@greenie.muc.de
State New
Headers
Series [Openvpn-devel,v1] Fix broken unit tests after commit 5c6fbd0a11 |

Commit Message

Gert Doering Oct. 20, 2026, 2:58 p.m. UTC
  Said commit only cherry-picked the "actual code change" but not the
required adjustments for the unit tests, leading to an unresolved symbol.

Master has all the mock functions in mock_push_dependencies.c which
does not exist in release/2.7, so import "uninit_options()" into the
actual unit test source (as are all the other mocked functions in 2.7)

Change-Id: I7f2db60564fa179ce5f56979912c7e484dad1e1d
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Razvan Cojocaru <razvanc@mailbox.org>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2023
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to release/2.7.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2023
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Razvan Cojocaru <razvanc@mailbox.org>
  

Patch

diff --git a/tests/unit_tests/openvpn/test_push_update_msg.c b/tests/unit_tests/openvpn/test_push_update_msg.c
index 9b7978e..75b654b 100644
--- a/tests/unit_tests/openvpn/test_push_update_msg.c
+++ b/tests/unit_tests/openvpn/test_push_update_msg.c
@@ -48,6 +48,13 @@ 
     return;
 }
 
+void
+uninit_options(struct options *options)
+{
+    gc_free(&options->gc);
+    gc_free(&options->dns_options.gc);
+}
+
 bool
 options_postprocess_pull(struct options *options, struct env_set *es)
 {