aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tests/pfkey
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2015-11-05 14:47:58 +0100
committerTobias Brunner <tobias@strongswan.org>2015-11-09 15:18:35 +0100
commitf519acd42f9efe7e566b918495418b2772a82c2a (patch)
treecf02be49743fcbaafd8f614daa263fb72d816a65 /testing/tests/pfkey
parent747b64875f1577654d06a0d1517acfb8e3051c47 (diff)
downloadstrongswan-f519acd42f9efe7e566b918495418b2772a82c2a.tar.bz2
strongswan-f519acd42f9efe7e566b918495418b2772a82c2a.tar.xz
testing: Remove nearly all sleep calls from pretest and posttest scripts
By consistently using the `expect-connection` helper we can avoid pretty much all previously needed calls to sleep.
Diffstat (limited to 'testing/tests/pfkey')
-rw-r--r--testing/tests/pfkey/alg-aes-xcbc/pretest.dat2
-rw-r--r--testing/tests/pfkey/alg-sha384/pretest.dat2
-rw-r--r--testing/tests/pfkey/alg-sha512/pretest.dat2
-rw-r--r--testing/tests/pfkey/compress/pretest.dat2
-rw-r--r--testing/tests/pfkey/esp-alg-null/pretest.dat2
-rw-r--r--testing/tests/pfkey/host2host-transport/pretest.dat2
-rw-r--r--testing/tests/pfkey/nat-rw/pretest.dat5
-rw-r--r--testing/tests/pfkey/net2net-route/pretest.dat2
-rw-r--r--testing/tests/pfkey/protoport-dual/pretest.dat3
-rw-r--r--testing/tests/pfkey/protoport-route/pretest.dat4
-rw-r--r--testing/tests/pfkey/rw-cert/pretest.dat4
11 files changed, 16 insertions, 14 deletions
diff --git a/testing/tests/pfkey/alg-aes-xcbc/pretest.dat b/testing/tests/pfkey/alg-aes-xcbc/pretest.dat
index 4fc25772b..de4acbbf0 100644
--- a/testing/tests/pfkey/alg-aes-xcbc/pretest.dat
+++ b/testing/tests/pfkey/alg-aes-xcbc/pretest.dat
@@ -2,5 +2,5 @@ moon::iptables-restore < /etc/iptables.rules
carol::iptables-restore < /etc/iptables.rules
moon::ipsec start
carol::ipsec start
-carol::sleep 1
+carol::expect-connection home
carol::ipsec up home
diff --git a/testing/tests/pfkey/alg-sha384/pretest.dat b/testing/tests/pfkey/alg-sha384/pretest.dat
index 4fc25772b..de4acbbf0 100644
--- a/testing/tests/pfkey/alg-sha384/pretest.dat
+++ b/testing/tests/pfkey/alg-sha384/pretest.dat
@@ -2,5 +2,5 @@ moon::iptables-restore < /etc/iptables.rules
carol::iptables-restore < /etc/iptables.rules
moon::ipsec start
carol::ipsec start
-carol::sleep 1
+carol::expect-connection home
carol::ipsec up home
diff --git a/testing/tests/pfkey/alg-sha512/pretest.dat b/testing/tests/pfkey/alg-sha512/pretest.dat
index 4fc25772b..de4acbbf0 100644
--- a/testing/tests/pfkey/alg-sha512/pretest.dat
+++ b/testing/tests/pfkey/alg-sha512/pretest.dat
@@ -2,5 +2,5 @@ moon::iptables-restore < /etc/iptables.rules
carol::iptables-restore < /etc/iptables.rules
moon::ipsec start
carol::ipsec start
-carol::sleep 1
+carol::expect-connection home
carol::ipsec up home
diff --git a/testing/tests/pfkey/compress/pretest.dat b/testing/tests/pfkey/compress/pretest.dat
index 29a90355f..1fd37b6a8 100644
--- a/testing/tests/pfkey/compress/pretest.dat
+++ b/testing/tests/pfkey/compress/pretest.dat
@@ -2,5 +2,5 @@ carol::iptables-restore < /etc/iptables.rules
moon::iptables-restore < /etc/iptables.rules
carol::ipsec start
moon::ipsec start
-carol::sleep 2
+carol::expect-connection home
carol::ipsec up home
diff --git a/testing/tests/pfkey/esp-alg-null/pretest.dat b/testing/tests/pfkey/esp-alg-null/pretest.dat
index 4fc25772b..de4acbbf0 100644
--- a/testing/tests/pfkey/esp-alg-null/pretest.dat
+++ b/testing/tests/pfkey/esp-alg-null/pretest.dat
@@ -2,5 +2,5 @@ moon::iptables-restore < /etc/iptables.rules
carol::iptables-restore < /etc/iptables.rules
moon::ipsec start
carol::ipsec start
-carol::sleep 1
+carol::expect-connection home
carol::ipsec up home
diff --git a/testing/tests/pfkey/host2host-transport/pretest.dat b/testing/tests/pfkey/host2host-transport/pretest.dat
index 99789b90f..997a48167 100644
--- a/testing/tests/pfkey/host2host-transport/pretest.dat
+++ b/testing/tests/pfkey/host2host-transport/pretest.dat
@@ -2,5 +2,5 @@ moon::iptables-restore < /etc/iptables.rules
sun::iptables-restore < /etc/iptables.rules
moon::ipsec start
sun::ipsec start
-moon::sleep 2
+moon::expect-connection host-host
moon::ipsec up host-host
diff --git a/testing/tests/pfkey/nat-rw/pretest.dat b/testing/tests/pfkey/nat-rw/pretest.dat
index d701a1d61..e3d9fc858 100644
--- a/testing/tests/pfkey/nat-rw/pretest.dat
+++ b/testing/tests/pfkey/nat-rw/pretest.dat
@@ -6,8 +6,7 @@ moon::iptables -t nat -A POSTROUTING -o eth0 -s 10.1.0.0/16 -p tcp -j SNAT --to-
alice::ipsec start
venus::ipsec start
sun::ipsec start
-alice::sleep 2
+alice::expect-connection nat-t
alice::ipsec up nat-t
-venus::sleep 2
+venus::expect-connection nat-t
venus::ipsec up nat-t
-venus::sleep 2
diff --git a/testing/tests/pfkey/net2net-route/pretest.dat b/testing/tests/pfkey/net2net-route/pretest.dat
index e4ee3fac2..fadfeab73 100644
--- a/testing/tests/pfkey/net2net-route/pretest.dat
+++ b/testing/tests/pfkey/net2net-route/pretest.dat
@@ -2,5 +2,5 @@ moon::iptables-restore < /etc/iptables.rules
sun::iptables-restore < /etc/iptables.rules
moon::ipsec start
sun::ipsec start
-moon::sleep 2
+moon::expect-connection net-net
alice::ping -c 10 PH_IP_BOB
diff --git a/testing/tests/pfkey/protoport-dual/pretest.dat b/testing/tests/pfkey/protoport-dual/pretest.dat
index efb2e5712..12112b194 100644
--- a/testing/tests/pfkey/protoport-dual/pretest.dat
+++ b/testing/tests/pfkey/protoport-dual/pretest.dat
@@ -2,6 +2,7 @@ moon::iptables-restore < /etc/iptables.rules
carol::iptables-restore < /etc/iptables.rules
moon::ipsec start
carol::ipsec start
-carol::sleep 2
+carol::expect-connection home-icmp
carol::ipsec up home-icmp
+carol::expect-connection home-ssh
carol::ipsec up home-ssh
diff --git a/testing/tests/pfkey/protoport-route/pretest.dat b/testing/tests/pfkey/protoport-route/pretest.dat
index 5a15574d6..d242f06a8 100644
--- a/testing/tests/pfkey/protoport-route/pretest.dat
+++ b/testing/tests/pfkey/protoport-route/pretest.dat
@@ -2,7 +2,7 @@ moon::iptables-restore < /etc/iptables.rules
carol::iptables-restore < /etc/iptables.rules
moon::ipsec start
carol::ipsec start
-carol::sleep 1
+carol::expect-connection home-icmp
+carol::expect-connection home-ssh
carol::ssh PH_IP_ALICE hostname
carol::ping -c 1 PH_IP_ALICE > /dev/null
-carol::sleep 2
diff --git a/testing/tests/pfkey/rw-cert/pretest.dat b/testing/tests/pfkey/rw-cert/pretest.dat
index c582e030d..e87a8ee47 100644
--- a/testing/tests/pfkey/rw-cert/pretest.dat
+++ b/testing/tests/pfkey/rw-cert/pretest.dat
@@ -4,6 +4,8 @@ dave::iptables-restore < /etc/iptables.rules
moon::ipsec start
carol::ipsec start
dave::ipsec start
-carol::sleep 3
+moon::expect-connection rw
+carol::expect-connection home
carol::ipsec up home
+dave::expect-connection home
dave::ipsec up home