On 28/10/16 18:42, Heiko Hund wrote:
> misc.c is too crowded with different things to perform any
> sane unit testing due to its dependencies. So, in order to re-write
> the #ifdef'ed tests for the argv_* family of functions into unit
> tests I moved them into a dedicated file.
> 
> Signed-off-by: Heiko Hund <heiko.h...@sophos.com>
> ---
>  configure.ac                         |   1 +
>  src/openvpn/Makefile.am              |   1 +
>  src/openvpn/argv.c                   | 412 +++++++++++++++++++++++++++++++
>  src/openvpn/argv.h                   |  76 ++++++
>  src/openvpn/misc.c                   | 459 
> -----------------------------------
>  src/openvpn/misc.h                   |  48 +---
>  tests/unit_tests/Makefile.am         |   2 +-
>  tests/unit_tests/openvpn/Makefile.am |  15 ++
>  tests/unit_tests/openvpn/test_argv.c | 194 +++++++++++++++
>  9 files changed, 701 insertions(+), 507 deletions(-)
>  create mode 100644 src/openvpn/argv.c
>  create mode 100644 src/openvpn/argv.h
>  create mode 100644 tests/unit_tests/openvpn/Makefile.am
>  create mode 100644 tests/unit_tests/openvpn/test_argv.c
> 

ACK.  Reviewed that all argv_* functions and the related code is just
moved from misc.[ch] to argv.[ch].  One minor change was detected, but
it makes sense: The argv_clone() function is not declared static in
argv.c.  This makes sense as it is only used in this scope.

Good to see that we have proper unit testing on argv.c too!  These tests
doesn't test all functions explicitly, but the majority of them will be
tested indirectly through the other calls.  The exception is
argv_reset(), which I've understood will be changed further later on in
this process.

I will wait with applying this patch to the git tree until all the other
patches in this series have been reviewed and ACKed.


-- 
kind regards,

David Sommerseth
OpenVPN Technologies, Inc


Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to