examples/ipsec-secgw: add scapy based tests
authorMarcin Smoczynski <marcinx.smoczynski@intel.com>
Mon, 24 Jun 2019 13:40:00 +0000 (15:40 +0200)
committerAkhil Goyal <akhil.goyal@nxp.com>
Fri, 5 Jul 2019 13:28:14 +0000 (15:28 +0200)
commit9a18283a54d418da86fa4836321bf2806ee920da
tree2cc770c82f435d04689b96ffbbb3144013293b41
parent1e05895e3505860072818db48cffe5dbf46bd297
examples/ipsec-secgw: add scapy based tests

Add new unittest-like mechanism which uses scapy to craft custom
packets and a set of assertions to check how ipsec-secgw example
application is processing them. Python3 with scapy module is
required by pkttest.sh to run test scripts.

A new mechanism is used to test IPv6 transport mode traffic with
header extensions (trs_ipv6opts.py).

Fix incomplete test log problem by disabling buffering of ipsec-secgw
standard output with stdbuf application.

Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
examples/ipsec-secgw/test/common_defs.sh
examples/ipsec-secgw/test/common_defs_secgw.sh [new file with mode: 0644]
examples/ipsec-secgw/test/pkttest.py [new file with mode: 0755]
examples/ipsec-secgw/test/pkttest.sh [new file with mode: 0755]
examples/ipsec-secgw/test/run_test.sh [changed mode: 0644->0755]
examples/ipsec-secgw/test/trs_ipv6opts.py [new file with mode: 0755]