Commit Message

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>
---
configure.ac | 2 +
tests/Makefile.am | 3 +-
tests/t_net.sh | 180 ++++++++++++++++
tests/unit_tests/openvpn/Makefile.am | 28 ++-
tests/unit_tests/openvpn/test_networking.c | 229 +++++++++++++++++++++
5 files changed, 437 insertions(+), 5 deletions(-)
create mode 100755 tests/t_net.sh
create mode 100644 tests/unit_tests/openvpn/test_networking.c