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/ct_echo_event.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 qa/ct_echo_event.sh (limited to 'qa/ct_echo_event.sh') diff --git a/qa/ct_echo_event.sh b/qa/ct_echo_event.sh new file mode 100755 index 0000000..b4d7409 --- /dev/null +++ b/qa/ct_echo_event.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +. `dirname $0`/nssocket_env.sh + +echo "---- TCP echo" +pre_sync +echo | nc -q 0 $VETH_CHILD_ADDR $DSTPORT +post_sync + +echo "---- UDP echo" +pre_sync +echo | nc -q 0 -u $VETH_CHILD_ADDR $DSTPORT +post_sync + +echo "---- ICMP echo" +pre_sync +ping -c 1 $VETH_CHILD_ADDR > /dev/null 2>&1 +post_sync + +fin -- cgit v1.2.3