aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tests/tnc
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2015-11-06 16:00:29 +0100
committerTobias Brunner <tobias@strongswan.org>2015-11-09 15:18:38 +0100
commit10fa70ee5c0c3e6b36efdd9328bae267385b4b96 (patch)
treeb033ff0b4e3f88d13b5496940220178db464ae2a /testing/tests/tnc
parentf24ec20ebb55d10726adffd25030256ef4e3b15c (diff)
downloadstrongswan-10fa70ee5c0c3e6b36efdd9328bae267385b4b96.tar.bz2
strongswan-10fa70ee5c0c3e6b36efdd9328bae267385b4b96.tar.xz
testing: Improve runtime of TNC tests by storing the SQLite DB in ramfs
This saves about 50%-70% of the time needed for scenarios that use a DB.
Diffstat (limited to 'testing/tests/tnc')
-rw-r--r--testing/tests/tnc/tnccs-11-radius-pts/posttest.dat2
-rw-r--r--testing/tests/tnc/tnccs-11-radius-pts/pretest.dat3
-rw-r--r--testing/tests/tnc/tnccs-20-os-pts/posttest.dat2
-rw-r--r--testing/tests/tnc/tnccs-20-os-pts/pretest.dat3
-rw-r--r--testing/tests/tnc/tnccs-20-os/posttest.dat2
-rw-r--r--testing/tests/tnc/tnccs-20-os/pretest.dat3
-rw-r--r--testing/tests/tnc/tnccs-20-pdp-eap/posttest.dat2
-rw-r--r--testing/tests/tnc/tnccs-20-pdp-eap/pretest.dat5
-rw-r--r--testing/tests/tnc/tnccs-20-pdp-pt-tls/posttest.dat2
-rw-r--r--testing/tests/tnc/tnccs-20-pdp-pt-tls/pretest.dat5
-rw-r--r--testing/tests/tnc/tnccs-20-pts-no-ecc/posttest.dat2
-rw-r--r--testing/tests/tnc/tnccs-20-pts-no-ecc/pretest.dat3
-rw-r--r--testing/tests/tnc/tnccs-20-pts/posttest.dat2
-rw-r--r--testing/tests/tnc/tnccs-20-pts/pretest.dat3
14 files changed, 30 insertions, 9 deletions
diff --git a/testing/tests/tnc/tnccs-11-radius-pts/posttest.dat b/testing/tests/tnc/tnccs-11-radius-pts/posttest.dat
index dc8507d26..9fe4fbfa2 100644
--- a/testing/tests/tnc/tnccs-11-radius-pts/posttest.dat
+++ b/testing/tests/tnc/tnccs-11-radius-pts/posttest.dat
@@ -3,7 +3,7 @@ carol::ipsec stop
dave::ipsec stop
alice::killall radiusd
alice::rm /etc/freeradius/sites-enabled/inner-tunnel-second
-alice::rm /etc/pts/config.db
+alice::umount /etc/pts
carol::echo 1 > /proc/sys/net/ipv4/ip_forward
moon::iptables-restore < /etc/iptables.flush
carol::iptables-restore < /etc/iptables.flush
diff --git a/testing/tests/tnc/tnccs-11-radius-pts/pretest.dat b/testing/tests/tnc/tnccs-11-radius-pts/pretest.dat
index b745ed4b3..aeac9d388 100644
--- a/testing/tests/tnc/tnccs-11-radius-pts/pretest.dat
+++ b/testing/tests/tnc/tnccs-11-radius-pts/pretest.dat
@@ -5,6 +5,9 @@ carol::echo 0 > /proc/sys/net/ipv4/ip_forward
dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
alice::ln -s /etc/freeradius/sites-available/inner-tunnel-second /etc/freeradius/sites-enabled/inner-tunnel-second
alice::cat /etc/freeradius/sites-enabled/inner-tunnel-second
+alice::mv /etc/pts/data1.sql /tmp/
+alice::mount -t ramfs -o size=5m ramfs /etc/pts
+alice::mv /tmp/data1.sql /etc/pts/
alice::sed -i "s:DEBIAN_VERSION:\`cat /etc/debian_version\`:" /etc/pts/data1.sql
alice::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db
alice::LEAK_DETECTIVE_DISABLE=1 LOG4CXX_CONFIGURATION=/etc/tnc/log4cxx.properties radiusd
diff --git a/testing/tests/tnc/tnccs-20-os-pts/posttest.dat b/testing/tests/tnc/tnccs-20-os-pts/posttest.dat
index 48514d6e0..ec9be6145 100644
--- a/testing/tests/tnc/tnccs-20-os-pts/posttest.dat
+++ b/testing/tests/tnc/tnccs-20-os-pts/posttest.dat
@@ -5,4 +5,4 @@ moon::iptables-restore < /etc/iptables.flush
carol::iptables-restore < /etc/iptables.flush
dave::iptables-restore < /etc/iptables.flush
carol::echo 1 > /proc/sys/net/ipv4/ip_forward
-moon::rm /etc/pts/config.db
+moon::umount /etc/pts
diff --git a/testing/tests/tnc/tnccs-20-os-pts/pretest.dat b/testing/tests/tnc/tnccs-20-os-pts/pretest.dat
index 0fedb2608..5bfd6e77d 100644
--- a/testing/tests/tnc/tnccs-20-os-pts/pretest.dat
+++ b/testing/tests/tnc/tnccs-20-os-pts/pretest.dat
@@ -3,6 +3,9 @@ carol::iptables-restore < /etc/iptables.rules
dave::iptables-restore < /etc/iptables.rules
carol::echo 0 > /proc/sys/net/ipv4/ip_forward
dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
+moon::mv /etc/pts/data1.sql /tmp/
+moon::mount -t ramfs -o size=5m ramfs /etc/pts
+moon::mv /tmp/data1.sql /etc/pts/
moon::sed -i "s:DEBIAN_VERSION:\`cat /etc/debian_version\`:" /etc/pts/data1.sql
moon::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db
moon::cat /etc/tnc_config
diff --git a/testing/tests/tnc/tnccs-20-os/posttest.dat b/testing/tests/tnc/tnccs-20-os/posttest.dat
index 48514d6e0..ec9be6145 100644
--- a/testing/tests/tnc/tnccs-20-os/posttest.dat
+++ b/testing/tests/tnc/tnccs-20-os/posttest.dat
@@ -5,4 +5,4 @@ moon::iptables-restore < /etc/iptables.flush
carol::iptables-restore < /etc/iptables.flush
dave::iptables-restore < /etc/iptables.flush
carol::echo 1 > /proc/sys/net/ipv4/ip_forward
-moon::rm /etc/pts/config.db
+moon::umount /etc/pts
diff --git a/testing/tests/tnc/tnccs-20-os/pretest.dat b/testing/tests/tnc/tnccs-20-os/pretest.dat
index fc102ec12..dc43ed516 100644
--- a/testing/tests/tnc/tnccs-20-os/pretest.dat
+++ b/testing/tests/tnc/tnccs-20-os/pretest.dat
@@ -3,6 +3,9 @@ carol::iptables-restore < /etc/iptables.rules
dave::iptables-restore < /etc/iptables.rules
carol::echo 0 > /proc/sys/net/ipv4/ip_forward
dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
+moon::mv /etc/pts/data1.sql /tmp/
+moon::mount -t ramfs -o size=5m ramfs /etc/pts
+moon::mv /tmp/data1.sql /etc/pts/
moon::sed -i "s/NOW/`date +%s`/g" /etc/pts/data1.sql
moon::sed -i "s:DEBIAN_VERSION:\`cat /etc/debian_version\`:" /etc/pts/data1.sql
moon::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db
diff --git a/testing/tests/tnc/tnccs-20-pdp-eap/posttest.dat b/testing/tests/tnc/tnccs-20-pdp-eap/posttest.dat
index 1e5c3f8cd..319ec495c 100644
--- a/testing/tests/tnc/tnccs-20-pdp-eap/posttest.dat
+++ b/testing/tests/tnc/tnccs-20-pdp-eap/posttest.dat
@@ -3,7 +3,7 @@ carol::ipsec stop
dave::ipsec stop
alice::ipsec stop
alice::service apache2 stop
-alice::rm /etc/pts/config.db
+alice::umount /etc/pts
moon::iptables-restore < /etc/iptables.flush
carol::iptables-restore < /etc/iptables.flush
dave::iptables-restore < /etc/iptables.flush
diff --git a/testing/tests/tnc/tnccs-20-pdp-eap/pretest.dat b/testing/tests/tnc/tnccs-20-pdp-eap/pretest.dat
index bc191651c..b892dd545 100644
--- a/testing/tests/tnc/tnccs-20-pdp-eap/pretest.dat
+++ b/testing/tests/tnc/tnccs-20-pdp-eap/pretest.dat
@@ -6,10 +6,13 @@ carol::cat /etc/tnc_config
dave::cat /etc/tnc_config
carol::echo 0 > /proc/sys/net/ipv4/ip_forward
dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
+alice::mv /etc/pts/data1.sql /tmp/
+alice::mount -t ramfs -o size=5m ramfs /etc/pts
+alice::mv /tmp/data1.sql /etc/pts/
alice::sed -i "s/NOW/`date +%s`/g" /etc/pts/data1.sql
alice::sed -i "s:DEBIAN_VERSION:\`cat /etc/debian_version\`:" /etc/pts/data1.sql
alice::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db
-alice::chgrp www-data /etc/pts/config.db; chmod g+w /etc/pts/config.db
+alice::chgrp -R www-data /etc/pts; chmod -R g+w /etc/pts
alice::/var/www/tnc/manage.py setpassword strongSwan strongSwan
alice::service apache2 start
alice::ipsec start
diff --git a/testing/tests/tnc/tnccs-20-pdp-pt-tls/posttest.dat b/testing/tests/tnc/tnccs-20-pdp-pt-tls/posttest.dat
index b7da857a7..c4f591a62 100644
--- a/testing/tests/tnc/tnccs-20-pdp-pt-tls/posttest.dat
+++ b/testing/tests/tnc/tnccs-20-pdp-pt-tls/posttest.dat
@@ -3,7 +3,7 @@ dave::ip route del 10.1.0.0/16 via 192.168.0.1
winnetou::ip route del 10.1.0.0/16 via 192.168.0.1
alice::ipsec stop
alice::service apache2 stop
-alice::rm /etc/pts/config.db
+alice::umount /etc/pts
alice::iptables-restore < /etc/iptables.flush
carol::iptables-restore < /etc/iptables.flush
dave::iptables-restore < /etc/iptables.flush
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 9427a5c47..8c6974e03 100644
--- a/testing/tests/tnc/tnccs-20-pdp-pt-tls/pretest.dat
+++ b/testing/tests/tnc/tnccs-20-pdp-pt-tls/pretest.dat
@@ -6,10 +6,13 @@ carol::cat /etc/tnc_config
carol::echo 0 > /proc/sys/net/ipv4/ip_forward
dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
dave::cat /etc/tnc_config
+alice::mv /etc/pts/data1.sql /tmp/
+alice::mount -t ramfs -o size=5m ramfs /etc/pts
+alice::mv /tmp/data1.sql /etc/pts/
alice::sed -i "s/NOW/`date +%s`/g" /etc/pts/data1.sql
alice::sed -i "s:DEBIAN_VERSION:\`cat /etc/debian_version\`:" /etc/pts/data1.sql
alice::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db
-alice::chgrp www-data /etc/pts/config.db; chmod g+w /etc/pts/config.db
+alice::chgrp -R www-data /etc/pts; chmod -R g+w /etc/pts
alice::/var/www/tnc/manage.py setpassword strongSwan strongSwan
alice::service apache2 start
alice::ipsec start
diff --git a/testing/tests/tnc/tnccs-20-pts-no-ecc/posttest.dat b/testing/tests/tnc/tnccs-20-pts-no-ecc/posttest.dat
index 48514d6e0..ec9be6145 100644
--- a/testing/tests/tnc/tnccs-20-pts-no-ecc/posttest.dat
+++ b/testing/tests/tnc/tnccs-20-pts-no-ecc/posttest.dat
@@ -5,4 +5,4 @@ moon::iptables-restore < /etc/iptables.flush
carol::iptables-restore < /etc/iptables.flush
dave::iptables-restore < /etc/iptables.flush
carol::echo 1 > /proc/sys/net/ipv4/ip_forward
-moon::rm /etc/pts/config.db
+moon::umount /etc/pts
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 0fedb2608..5bfd6e77d 100644
--- a/testing/tests/tnc/tnccs-20-pts-no-ecc/pretest.dat
+++ b/testing/tests/tnc/tnccs-20-pts-no-ecc/pretest.dat
@@ -3,6 +3,9 @@ carol::iptables-restore < /etc/iptables.rules
dave::iptables-restore < /etc/iptables.rules
carol::echo 0 > /proc/sys/net/ipv4/ip_forward
dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
+moon::mv /etc/pts/data1.sql /tmp/
+moon::mount -t ramfs -o size=5m ramfs /etc/pts
+moon::mv /tmp/data1.sql /etc/pts/
moon::sed -i "s:DEBIAN_VERSION:\`cat /etc/debian_version\`:" /etc/pts/data1.sql
moon::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db
moon::cat /etc/tnc_config
diff --git a/testing/tests/tnc/tnccs-20-pts/posttest.dat b/testing/tests/tnc/tnccs-20-pts/posttest.dat
index 48514d6e0..ec9be6145 100644
--- a/testing/tests/tnc/tnccs-20-pts/posttest.dat
+++ b/testing/tests/tnc/tnccs-20-pts/posttest.dat
@@ -5,4 +5,4 @@ moon::iptables-restore < /etc/iptables.flush
carol::iptables-restore < /etc/iptables.flush
dave::iptables-restore < /etc/iptables.flush
carol::echo 1 > /proc/sys/net/ipv4/ip_forward
-moon::rm /etc/pts/config.db
+moon::umount /etc/pts
diff --git a/testing/tests/tnc/tnccs-20-pts/pretest.dat b/testing/tests/tnc/tnccs-20-pts/pretest.dat
index 0fedb2608..5bfd6e77d 100644
--- a/testing/tests/tnc/tnccs-20-pts/pretest.dat
+++ b/testing/tests/tnc/tnccs-20-pts/pretest.dat
@@ -3,6 +3,9 @@ carol::iptables-restore < /etc/iptables.rules
dave::iptables-restore < /etc/iptables.rules
carol::echo 0 > /proc/sys/net/ipv4/ip_forward
dave::echo aabbccddeeff11223344556677889900 > /var/lib/dbus/machine-id
+moon::mv /etc/pts/data1.sql /tmp/
+moon::mount -t ramfs -o size=5m ramfs /etc/pts
+moon::mv /tmp/data1.sql /etc/pts/
moon::sed -i "s:DEBIAN_VERSION:\`cat /etc/debian_version\`:" /etc/pts/data1.sql
moon::cd /usr/local/share/strongswan/templates/database/imv; cat tables.sql data.sql /etc/pts/data1.sql | sqlite3 /etc/pts/config.db
moon::cat /etc/tnc_config