]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
testing: Improve runtime of TNC tests by storing the SQLite DB in ramfs
authorTobias Brunner <tobias@strongswan.org>
Fri, 6 Nov 2015 15:00:29 +0000 (16:00 +0100)
committerTobias Brunner <tobias@strongswan.org>
Mon, 9 Nov 2015 14:18:38 +0000 (15:18 +0100)
This saves about 50%-70% of the time needed for scenarios that use a DB.

14 files changed:
testing/tests/tnc/tnccs-11-radius-pts/posttest.dat
testing/tests/tnc/tnccs-11-radius-pts/pretest.dat
testing/tests/tnc/tnccs-20-os-pts/posttest.dat
testing/tests/tnc/tnccs-20-os-pts/pretest.dat
testing/tests/tnc/tnccs-20-os/posttest.dat
testing/tests/tnc/tnccs-20-os/pretest.dat
testing/tests/tnc/tnccs-20-pdp-eap/posttest.dat
testing/tests/tnc/tnccs-20-pdp-eap/pretest.dat
testing/tests/tnc/tnccs-20-pdp-pt-tls/posttest.dat
testing/tests/tnc/tnccs-20-pdp-pt-tls/pretest.dat
testing/tests/tnc/tnccs-20-pts-no-ecc/posttest.dat
testing/tests/tnc/tnccs-20-pts-no-ecc/pretest.dat
testing/tests/tnc/tnccs-20-pts/posttest.dat
testing/tests/tnc/tnccs-20-pts/pretest.dat

index dc8507d264a1c22d1c9f375b009fe85c1cac8b91..9fe4fbfa2b7ca590bb6ff50326ca925abc6ea3c4 100644 (file)
@@ -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
index b745ed4b32a77b3891b27872dbe48e7d9850eb8d..aeac9d38893b8af41e3ecddf9e77a67b38697de8 100644 (file)
@@ -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
index 48514d6e0c96a0ff37480a6b35c02e07862a943b..ec9be6145ea2922e8c53580fb4cec53bc5a9eaa5 100644 (file)
@@ -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
index 0fedb2608c026bebd0cb054137072a4924197ddc..5bfd6e77d7f6d0e0595a43005f8c5f626d90b804 100644 (file)
@@ -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
index 48514d6e0c96a0ff37480a6b35c02e07862a943b..ec9be6145ea2922e8c53580fb4cec53bc5a9eaa5 100644 (file)
@@ -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
index fc102ec12c226901d6267d80656f392944700258..dc43ed5166383eb7b0792710dca3492f0693a7de 100644 (file)
@@ -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
index 1e5c3f8cdf35fa09e622603b89f4c5164c3a56a6..319ec495c408f71f72ac94393aa39ed860932fbd 100644 (file)
@@ -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
index bc191651cb9c82cdbfd418123ec5e291315a7cba..b892dd5451feeeda875a592285ef60e4e8f8f4cd 100644 (file)
@@ -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
index b7da857a770b8f860f61950516533c88f919f1ce..c4f591a62f77f045ae92f0a9179e58e44a145fc7 100644 (file)
@@ -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
index 9427a5c47aa8512b5a0b6ba1aa42490bda13374c..8c6974e03138058c7d51c677c1ce54fcc6d68cbd 100644 (file)
@@ -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
index 48514d6e0c96a0ff37480a6b35c02e07862a943b..ec9be6145ea2922e8c53580fb4cec53bc5a9eaa5 100644 (file)
@@ -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
index 0fedb2608c026bebd0cb054137072a4924197ddc..5bfd6e77d7f6d0e0595a43005f8c5f626d90b804 100644 (file)
@@ -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
index 48514d6e0c96a0ff37480a6b35c02e07862a943b..ec9be6145ea2922e8c53580fb4cec53bc5a9eaa5 100644 (file)
@@ -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
index 0fedb2608c026bebd0cb054137072a4924197ddc..5bfd6e77d7f6d0e0595a43005f8c5f626d90b804 100644 (file)
@@ -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