summaryrefslogtreecommitdiffstats
path: root/tests/ct_echo_event.sh
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2019-03-09 11:56:05 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2019-03-11 13:34:51 +0100
commit9c0ed46f68cada9f3455be91adb553d020012596 (patch)
tree249499eb5b3b977a29088b4bff905a82ce546a14 /tests/ct_echo_event.sh
parente0d8a7cec8ba5ca8fed95eacb5c9f1166f386490 (diff)
Rename 'qa' directory to 'tests'
When searching for library tests, 'qa' is easily overlooked. Use a more common name instead. Suggested-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/ct_echo_event.sh')
-rwxr-xr-xtests/ct_echo_event.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ct_echo_event.sh b/tests/ct_echo_event.sh
new file mode 100755
index 0000000..b4d7409
--- /dev/null
+++ b/tests/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