]> git.ipfire.org Git - thirdparty/openvpn.git/commit
unit tests: implement test for sitnl
authorAntonio Quartulli <a@unstable.cc>
Wed, 19 Dec 2018 05:01:17 +0000 (15:01 +1000)
committerGert Doering <gert@greenie.muc.de>
Thu, 6 Jun 2019 06:23:48 +0000 (08:23 +0200)
commitc4d5bcd7c90abbab2378ac865e326933b0ff1e1c
tree88e1f65fb1a1f45c832b9252ee60ffe24fef0f07
parentaec4a3d1b6a9e4d9e584b368126da061c15b174b
unit tests: implement test for sitnl

This patch introduces a new unit test that is not executed
by the cmocka framework, but rather used by a new t_net.sh
bash script.

The idea behind this test is to ensure that invoking sitnl
functions or running iproute commands leads to the same
networking (interface and routing table) state.

To achieve this, the t_net.sh script first runs a binary
implemented invoking sitnl functions and then takes a
"screenshot" of the state. Subsequently a series of
iproute commands, expected to mimic exactly the same behaviour
as the sitnl functions invoked before, are executed.
The final state is then compared with the screenshot
previously taken.

If no mismatching is found, the test is passed.

The current unit_test, however, does not cover all the
sitnl functionalities and it is expected to be extended
in the future.

Signed-off-by: Antonio Quartulli <a@unstable.cc>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <20181219050118.6568-7-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18027.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
configure.ac
tests/Makefile.am
tests/t_net.sh [new file with mode: 0755]
tests/unit_tests/openvpn/Makefile.am
tests/unit_tests/openvpn/test_networking.c [new file with mode: 0644]