On 19-12-16 00:01, Steffan Karger wrote: > The functions packet_id_alloc_outgoing() and packet_id_write() were > always called in tandem. Instead of forcing the caller to allocate a > packet_id_net to do so, merge the two functions. This simplifies the API > and reduces the chance on mistakes in the future. > > This patch adds unit tests to verify the behaviour of packet_id_write(). > Verifying that we assert out correctly required the change to mock_msg.c. > > Signed-off-by: Steffan Karger <stef...@karger.me> > --- > This patch is for the master branch only. > > src/openvpn/crypto.c | 19 ++-- > src/openvpn/packet_id.c | 24 ++++- > src/openvpn/packet_id.h | 35 +++---- > src/openvpn/tls_crypt.c | 4 +- > tests/unit_tests/openvpn/Makefile.am | 16 ++- > tests/unit_tests/openvpn/mock_msg.c | 15 ++- > tests/unit_tests/openvpn/test_packet_id.c | 168 > ++++++++++++++++++++++++++++++ > 7 files changed, 229 insertions(+), 52 deletions(-)
Can I tempt anyone into reviewing this patch? Don't get scared by the size - it's mostly adding tests. The function changes are very small. -Steffan ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel