aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tests/tnc
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/tnc
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/tnc')
-rw-r--r--testing/tests/tnc/tnccs-11-fhh/pretest.dat4
-rw-r--r--testing/tests/tnc/tnccs-11-radius-block/pretest.dat4
-rw-r--r--testing/tests/tnc/tnccs-11-radius-pts/pretest.dat4
-rw-r--r--testing/tests/tnc/tnccs-11-radius/pretest.dat4
-rw-r--r--testing/tests/tnc/tnccs-11-supplicant/pretest.dat2
-rw-r--r--testing/tests/tnc/tnccs-11/pretest.dat4
-rw-r--r--testing/tests/tnc/tnccs-20-block/pretest.dat4
-rw-r--r--testing/tests/tnc/tnccs-20-client-retry/pretest.dat8
-rw-r--r--testing/tests/tnc/tnccs-20-fail-init/pretest.dat5
-rw-r--r--testing/tests/tnc/tnccs-20-fail-resp/pretest.dat4
-rw-r--r--testing/tests/tnc/tnccs-20-fhh/pretest.dat9
-rw-r--r--testing/tests/tnc/tnccs-20-hcd-eap/pretest.dat4
-rw-r--r--testing/tests/tnc/tnccs-20-mutual-eap/pretest.dat2
-rw-r--r--testing/tests/tnc/tnccs-20-mutual-pt-tls/pretest.dat4
-rw-r--r--testing/tests/tnc/tnccs-20-os-pts/pretest.dat4
-rw-r--r--testing/tests/tnc/tnccs-20-pdp-eap/pretest.dat3
-rw-r--r--testing/tests/tnc/tnccs-20-pdp-pt-tls/pretest.dat3
-rw-r--r--testing/tests/tnc/tnccs-20-pts-no-ecc/pretest.dat4
-rw-r--r--testing/tests/tnc/tnccs-20-pts/pretest.dat4
-rw-r--r--testing/tests/tnc/tnccs-20-server-retry/pretest.dat8
-rw-r--r--testing/tests/tnc/tnccs-20-tls/pretest.dat4
-rw-r--r--testing/tests/tnc/tnccs-20/pretest.dat8
-rw-r--r--testing/tests/tnc/tnccs-dynamic/pretest.dat4
23 files changed, 53 insertions, 51 deletions
diff --git a/testing/tests/tnc/tnccs-11-fhh/pretest.dat b/testing/tests/tnc/tnccs-11-fhh/pretest.dat
index 8fab1fb6c..7825f1fc9 100644
--- a/testing/tests/tnc/tnccs-11-fhh/pretest.dat
+++ b/testing/tests/tnc/tnccs-11-fhh/pretest.dat
@@ -9,7 +9,7 @@ dave::cat /etc/tnc/dummyimc.file
moon::LOG4CXX_CONFIGURATION=/etc/tnc/log4cxx.properties ipsec start
carol::LOG4CXX_CONFIGURATION=/etc/tnc/log4cxx.properties ipsec start
dave::LOG4CXX_CONFIGURATION=/etc/tnc/log4cxx.properties ipsec start
-carol::sleep 1
+carol::expect-connection home
carol::ipsec up home
+dave::expect-connection home
dave::ipsec up home
-dave::sleep 1
diff --git a/testing/tests/tnc/tnccs-11-radius-block/pretest.dat b/testing/tests/tnc/tnccs-11-radius-block/pretest.dat
index 96163aa36..d2bb94583 100644
--- a/testing/tests/tnc/tnccs-11-radius-block/pretest.dat
+++ b/testing/tests/tnc/tnccs-11-radius-block/pretest.dat
@@ -8,7 +8,7 @@ alice::LEAK_DETECTIVE_DISABLE=1 LOG4CXX_CONFIGURATION=/etc/tnc/log4cxx.propertie
moon::ipsec start
carol::ipsec start
dave::ipsec start
-carol::sleep 1
+carol::expect-connection home
carol::ipsec up home
+dave::expect-connection home
dave::ipsec up home
-dave::sleep 1
diff --git a/testing/tests/tnc/tnccs-11-radius-pts/pretest.dat b/testing/tests/tnc/tnccs-11-radius-pts/pretest.dat
index 03b24747e..b745ed4b3 100644
--- a/testing/tests/tnc/tnccs-11-radius-pts/pretest.dat
+++ b/testing/tests/tnc/tnccs-11-radius-pts/pretest.dat
@@ -14,9 +14,9 @@ dave::cat /etc/tnc_config
moon::ipsec start
dave::ipsec start
carol::ipsec start
-dave::sleep 1
+dave::expect-connection home
dave::ipsec up home
+carol::expect-connection home
carol::ipsec up home
-carol::sleep 1
alice::ipsec attest --sessions
alice::ipsec attest --devices
diff --git a/testing/tests/tnc/tnccs-11-radius/pretest.dat b/testing/tests/tnc/tnccs-11-radius/pretest.dat
index 71dff71b7..fcfb1451c 100644
--- a/testing/tests/tnc/tnccs-11-radius/pretest.dat
+++ b/testing/tests/tnc/tnccs-11-radius/pretest.dat
@@ -10,7 +10,7 @@ dave::cat /etc/tnc_config
moon::ipsec start
carol::ipsec start
dave::ipsec start
-carol::sleep 1
+carol::expect-connection home
carol::ipsec up home
+dave::expect-connection home
dave::ipsec up home
-dave::sleep 1
diff --git a/testing/tests/tnc/tnccs-11-supplicant/pretest.dat b/testing/tests/tnc/tnccs-11-supplicant/pretest.dat
index ac03fedbb..4dbff64a3 100644
--- a/testing/tests/tnc/tnccs-11-supplicant/pretest.dat
+++ b/testing/tests/tnc/tnccs-11-supplicant/pretest.dat
@@ -6,6 +6,6 @@ carol::cat /etc/tnc_config
dave::cat /etc/tnc_config
moon::hostapd -B /etc/hostapd/hostapd.conf
carol::LEAK_DETECTIVE_DISABLE=1 LOG4CXX_CONFIGURATION=/etc/tnc/log4cxx.properties wpa_supplicant -B -c /etc/wpa_supplicant.conf -D wired -i eth0
-carol::sleep 4
+carol::sleep 4
dave::LEAK_DETECTIVE_DISABLE=1 LOG4CXX_CONFIGURATION=/etc/tnc/log4cxx.properties wpa_supplicant -B -c /etc/wpa_supplicant.conf -D wired -i eth0
dave::sleep 4
diff --git a/testing/tests/tnc/tnccs-11/pretest.dat b/testing/tests/tnc/tnccs-11/pretest.dat
index cac1cfafc..85622034d 100644
--- a/testing/tests/tnc/tnccs-11/pretest.dat
+++ b/testing/tests/tnc/tnccs-11/pretest.dat
@@ -7,7 +7,7 @@ dave::cat /etc/tnc_config
moon::ipsec start
carol::ipsec start
dave::ipsec start
-carol::sleep 1
+carol::expect-connection home
carol::ipsec up home
+dave::expect-connection home
dave::ipsec up home
-dave::sleep 1
diff --git a/testing/tests/tnc/tnccs-20-block/pretest.dat b/testing/tests/tnc/tnccs-20-block/pretest.dat
index f5b3b2e8c..c66a2e1ec 100644
--- a/testing/tests/tnc/tnccs-20-block/pretest.dat
+++ b/testing/tests/tnc/tnccs-20-block/pretest.dat
@@ -8,7 +8,7 @@ dave::cat /etc/tnc_config
moon::ipsec start
carol::ipsec start
dave::ipsec start
-carol::sleep 1
+carol::expect-connection home
carol::ipsec up home
+dave::expect-connection home
dave::ipsec up home
-dave::sleep 1
diff --git a/testing/tests/tnc/tnccs-20-client-retry/pretest.dat b/testing/tests/tnc/tnccs-20-client-retry/pretest.dat
index b2b243ba3..85622034d 100644
--- a/testing/tests/tnc/tnccs-20-client-retry/pretest.dat
+++ b/testing/tests/tnc/tnccs-20-client-retry/pretest.dat
@@ -5,9 +5,9 @@ moon::cat /etc/tnc_config
carol::cat /etc/tnc_config
dave::cat /etc/tnc_config
moon::ipsec start
-carol::ipsec start
-dave::ipsec start
-carol::sleep 1
+carol::ipsec start
+dave::ipsec start
+carol::expect-connection home
carol::ipsec up home
+dave::expect-connection home
dave::ipsec up home
-dave::sleep 1
diff --git a/testing/tests/tnc/tnccs-20-fail-init/pretest.dat b/testing/tests/tnc/tnccs-20-fail-init/pretest.dat
index 38c651328..85622034d 100644
--- a/testing/tests/tnc/tnccs-20-fail-init/pretest.dat
+++ b/testing/tests/tnc/tnccs-20-fail-init/pretest.dat
@@ -5,8 +5,9 @@ moon::cat /etc/tnc_config
carol::cat /etc/tnc_config
dave::cat /etc/tnc_config
moon::ipsec start
-carol::ipsec start
+carol::ipsec start
dave::ipsec start
-carol::sleep 1
+carol::expect-connection home
carol::ipsec up home
+dave::expect-connection home
dave::ipsec up home
diff --git a/testing/tests/tnc/tnccs-20-fail-resp/pretest.dat b/testing/tests/tnc/tnccs-20-fail-resp/pretest.dat
index 6947c4bdf..e5c202947 100644
--- a/testing/tests/tnc/tnccs-20-fail-resp/pretest.dat
+++ b/testing/tests/tnc/tnccs-20-fail-resp/pretest.dat
@@ -3,6 +3,6 @@ carol::iptables-restore < /etc/iptables.rules
moon::cat /etc/tnc_config
carol::cat /etc/tnc_config
moon::ipsec start
-carol::ipsec start
-carol::sleep 1
+carol::ipsec start
+carol::expect-connection home
carol::ipsec up home
diff --git a/testing/tests/tnc/tnccs-20-fhh/pretest.dat b/testing/tests/tnc/tnccs-20-fhh/pretest.dat
index 72c9b1665..39b0e03eb 100644
--- a/testing/tests/tnc/tnccs-20-fhh/pretest.dat
+++ b/testing/tests/tnc/tnccs-20-fhh/pretest.dat
@@ -8,9 +8,10 @@ carol::cat /etc/tnc/dummyimc.file
dave::cat /etc/tnc/dummyimc.file
moon::cat /etc/tnc/dummyimv.policy
moon::LOG4CXX_CONFIGURATION=/etc/tnc/log4cxx.properties ipsec start
-carol::LOG4CXX_CONFIGURATION=/etc/tnc/log4cxx.properties ipsec start
-dave::LOG4CXX_CONFIGURATION=/etc/tnc/log4cxx.properties ipsec start
-carol::sleep 1
+carol::LOG4CXX_CONFIGURATION=/etc/tnc/log4cxx.properties ipsec start
+dave::LOG4CXX_CONFIGURATION=/etc/tnc/log4cxx.properties ipsec start
+moon::expect-connection rw-allow
+carol::expect-connection home
carol::ipsec up home
+dave::expect-connection home
dave::ipsec up home
-dave::sleep 1
diff --git a/testing/tests/tnc/tnccs-20-hcd-eap/pretest.dat b/testing/tests/tnc/tnccs-20-hcd-eap/pretest.dat
index 913dd2190..0978d1252 100644
--- a/testing/tests/tnc/tnccs-20-hcd-eap/pretest.dat
+++ b/testing/tests/tnc/tnccs-20-hcd-eap/pretest.dat
@@ -11,7 +11,7 @@ alice::ipsec start
moon::ipsec start
carol::ipsec start
dave::ipsec start
-dave::sleep 1
+carol::expect-connection home
carol::ipsec up home
+dave::expect-connection home
dave::ipsec up home
-dave::sleep 1
diff --git a/testing/tests/tnc/tnccs-20-mutual-eap/pretest.dat b/testing/tests/tnc/tnccs-20-mutual-eap/pretest.dat
index 3bce9f6e5..997a48167 100644
--- a/testing/tests/tnc/tnccs-20-mutual-eap/pretest.dat
+++ b/testing/tests/tnc/tnccs-20-mutual-eap/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 1
+moon::expect-connection host-host
moon::ipsec up host-host
diff --git a/testing/tests/tnc/tnccs-20-mutual-pt-tls/pretest.dat b/testing/tests/tnc/tnccs-20-mutual-pt-tls/pretest.dat
index fab55d11a..07b17600d 100644
--- a/testing/tests/tnc/tnccs-20-mutual-pt-tls/pretest.dat
+++ b/testing/tests/tnc/tnccs-20-mutual-pt-tls/pretest.dat
@@ -1,4 +1,4 @@
sun::ipsec start
moon::cat /etc/pts/options
-moon::sleep 1
-moon::ipsec pt-tls-client --optionsfrom /etc/pts/options
+sun::expect-connection pdp
+moon::ipsec pt-tls-client --optionsfrom /etc/pts/options
diff --git a/testing/tests/tnc/tnccs-20-os-pts/pretest.dat b/testing/tests/tnc/tnccs-20-os-pts/pretest.dat
index 7a562eec5..0fedb2608 100644
--- a/testing/tests/tnc/tnccs-20-os-pts/pretest.dat
+++ b/testing/tests/tnc/tnccs-20-os-pts/pretest.dat
@@ -11,9 +11,9 @@ dave::cat /etc/tnc_config
moon::ipsec start
dave::ipsec start
carol::ipsec start
-dave::sleep 1
+dave::expect-connection home
dave::ipsec up home
+carol::expect-connection home
carol::ipsec up home
-carol::sleep 1
moon::ipsec attest --sessions
moon::ipsec attest --devices
diff --git a/testing/tests/tnc/tnccs-20-pdp-eap/pretest.dat b/testing/tests/tnc/tnccs-20-pdp-eap/pretest.dat
index ca3c559d1..bc191651c 100644
--- a/testing/tests/tnc/tnccs-20-pdp-eap/pretest.dat
+++ b/testing/tests/tnc/tnccs-20-pdp-eap/pretest.dat
@@ -16,7 +16,8 @@ alice::ipsec start
moon::ipsec start
dave::ipsec start
carol::ipsec start
-carol::sleep 1
+dave::expect-connection home
dave::ipsec up home
+carol::expect-connection home
carol::ipsec up home
carol::sleep 1
diff --git a/testing/tests/tnc/tnccs-20-pdp-pt-tls/pretest.dat b/testing/tests/tnc/tnccs-20-pdp-pt-tls/pretest.dat
index eed7967ee..9427a5c47 100644
--- a/testing/tests/tnc/tnccs-20-pdp-pt-tls/pretest.dat
+++ b/testing/tests/tnc/tnccs-20-pdp-pt-tls/pretest.dat
@@ -13,7 +13,7 @@ alice::chgrp www-data /etc/pts/config.db; chmod g+w /etc/pts/config.db
alice::/var/www/tnc/manage.py setpassword strongSwan strongSwan
alice::service apache2 start
alice::ipsec start
-alice::sleep 1
+alice::expect-connection aaa
winnetou::ip route add 10.1.0.0/16 via 192.168.0.1
dave::ip route add 10.1.0.0/16 via 192.168.0.1
dave::cat /etc/pts/options
@@ -21,4 +21,3 @@ dave::ipsec pt-tls-client --optionsfrom /etc/pts/options
carol::ip route add 10.1.0.0/16 via 192.168.0.1
carol::cat /etc/pts/options
carol::ipsec pt-tls-client --optionsfrom /etc/pts/options
-carol::sleep 1
diff --git a/testing/tests/tnc/tnccs-20-pts-no-ecc/pretest.dat b/testing/tests/tnc/tnccs-20-pts-no-ecc/pretest.dat
index 7a562eec5..0fedb2608 100644
--- a/testing/tests/tnc/tnccs-20-pts-no-ecc/pretest.dat
+++ b/testing/tests/tnc/tnccs-20-pts-no-ecc/pretest.dat
@@ -11,9 +11,9 @@ dave::cat /etc/tnc_config
moon::ipsec start
dave::ipsec start
carol::ipsec start
-dave::sleep 1
+dave::expect-connection home
dave::ipsec up home
+carol::expect-connection home
carol::ipsec up home
-carol::sleep 1
moon::ipsec attest --sessions
moon::ipsec attest --devices
diff --git a/testing/tests/tnc/tnccs-20-pts/pretest.dat b/testing/tests/tnc/tnccs-20-pts/pretest.dat
index 7a562eec5..0fedb2608 100644
--- a/testing/tests/tnc/tnccs-20-pts/pretest.dat
+++ b/testing/tests/tnc/tnccs-20-pts/pretest.dat
@@ -11,9 +11,9 @@ dave::cat /etc/tnc_config
moon::ipsec start
dave::ipsec start
carol::ipsec start
-dave::sleep 1
+dave::expect-connection home
dave::ipsec up home
+carol::expect-connection home
carol::ipsec up home
-carol::sleep 1
moon::ipsec attest --sessions
moon::ipsec attest --devices
diff --git a/testing/tests/tnc/tnccs-20-server-retry/pretest.dat b/testing/tests/tnc/tnccs-20-server-retry/pretest.dat
index b2b243ba3..85622034d 100644
--- a/testing/tests/tnc/tnccs-20-server-retry/pretest.dat
+++ b/testing/tests/tnc/tnccs-20-server-retry/pretest.dat
@@ -5,9 +5,9 @@ moon::cat /etc/tnc_config
carol::cat /etc/tnc_config
dave::cat /etc/tnc_config
moon::ipsec start
-carol::ipsec start
-dave::ipsec start
-carol::sleep 1
+carol::ipsec start
+dave::ipsec start
+carol::expect-connection home
carol::ipsec up home
+dave::expect-connection home
dave::ipsec up home
-dave::sleep 1
diff --git a/testing/tests/tnc/tnccs-20-tls/pretest.dat b/testing/tests/tnc/tnccs-20-tls/pretest.dat
index cac1cfafc..85622034d 100644
--- a/testing/tests/tnc/tnccs-20-tls/pretest.dat
+++ b/testing/tests/tnc/tnccs-20-tls/pretest.dat
@@ -7,7 +7,7 @@ dave::cat /etc/tnc_config
moon::ipsec start
carol::ipsec start
dave::ipsec start
-carol::sleep 1
+carol::expect-connection home
carol::ipsec up home
+dave::expect-connection home
dave::ipsec up home
-dave::sleep 1
diff --git a/testing/tests/tnc/tnccs-20/pretest.dat b/testing/tests/tnc/tnccs-20/pretest.dat
index b2b243ba3..85622034d 100644
--- a/testing/tests/tnc/tnccs-20/pretest.dat
+++ b/testing/tests/tnc/tnccs-20/pretest.dat
@@ -5,9 +5,9 @@ moon::cat /etc/tnc_config
carol::cat /etc/tnc_config
dave::cat /etc/tnc_config
moon::ipsec start
-carol::ipsec start
-dave::ipsec start
-carol::sleep 1
+carol::ipsec start
+dave::ipsec start
+carol::expect-connection home
carol::ipsec up home
+dave::expect-connection home
dave::ipsec up home
-dave::sleep 1
diff --git a/testing/tests/tnc/tnccs-dynamic/pretest.dat b/testing/tests/tnc/tnccs-dynamic/pretest.dat
index 60775a11e..927b89d06 100644
--- a/testing/tests/tnc/tnccs-dynamic/pretest.dat
+++ b/testing/tests/tnc/tnccs-dynamic/pretest.dat
@@ -7,7 +7,7 @@ dave::cat /etc/tnc_config
moon::LEAK_DETECTIVE_DISABLE=1 ipsec start
carol::LEAK_DETECTIVE_DISABLE=1 ipsec start
dave::ipsec start
-carol::sleep 1
+carol::expect-connection home
carol::ipsec up home
+dave::expect-connection home
dave::ipsec up home
-dave::sleep 1