From 871cd53f8f9b8c36eacbdfd546a0a4acba29e53b Mon Sep 17 00:00:00 2001 From: Ken-ichirou MATSUZAWA Date: Tue, 7 Oct 2014 13:40:08 +0900 Subject: qa: build unshared nfct environment nssocket forks and change netns pre-establishd by ip(8), serves its socket descriptor to parent via nssocket(). Since this socket is isolated, it can be used to create regression tests for conntrack. This also adds a conntrack event testcase as a first user. A ct_echo_event.sh script is provided to build and run this test automatically: # ./qa/ct_echo_event.sh make: Entering directory... ...debug output like: [NEW] tcp 6 2 SYN_SENT src=10.255.255.249 dst=10.255.255.250 sport... [UPDATE] tcp 6 2 SYN_RECV src=10.255.255.249 dst=10.255.255.250 sport... ... [DESTROY] icmp 1 src=10.255.255.249 dst=10.255.255.250 type=8 code=0... # echo $? 0 Signed-off-by: Ken-ichirou MATSUZAWA Signed-off-by: Florian Westphal --- qa/Makefile.am | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'qa/Makefile.am') diff --git a/qa/Makefile.am b/qa/Makefile.am index abe063f..b16ab01 100644 --- a/qa/Makefile.am +++ b/qa/Makefile.am @@ -1,6 +1,7 @@ include $(top_srcdir)/Make_global.am -check_PROGRAMS = test_api test_filter test_connlabel ct_stress ct_events_reliable +check_PROGRAMS = test_api test_filter test_connlabel ct_stress \ + ct_events_reliable ct_echo_event test_api_SOURCES = test_api.c test_api_LDADD = ../src/libnetfilter_conntrack.la @@ -16,3 +17,8 @@ ct_stress_LDADD = ../src/libnetfilter_conntrack.la ct_events_reliable_SOURCES = ct_events_reliable.c ct_events_reliable_LDADD = ../src/libnetfilter_conntrack.la + +AM_CFLAGS += -D_GNU_SOURCE +ct_echo_event_SOURCES = ct_echo_event.c nssocket.c +ct_echo_event_DEPENDENCIES = ct_echo_event.sh +ct_echo_event_LDADD = ../src/libnetfilter_conntrack.la -lmnl -- cgit v1.2.3