added bad case dave to ikev2/rw-eap-sim-radius scenario
[strongswan.git] / testing / do-tests.in
index 56a3b7d..2e1dc46 100755 (executable)
@@ -233,13 +233,6 @@ do
 @EOF
     fi
 
-    if [ $SUBDIR = "ipv6" ]
-    then
-       IPTABLES="ip6tables"
-    else
-       IPTABLES="iptables"
-    fi
-
     for name in $SUBTESTS
     do
        let "testnumber += 1"
@@ -252,6 +245,13 @@ do
            continue
        fi
 
+       if [ $SUBDIR = "ipv6" -o $name = "rw-psk-ipv6" ]
+       then
+           IPTABLES="ip6tables"
+       else
+           IPTABLES="iptables"
+       fi
+
        [ -f $DEFAULTTESTSDIR/${testname}/description.txt ] || die "!! File 'description.txt' is missing"
        [ -f $DEFAULTTESTSDIR/${testname}/test.conf ]       || die "!! File 'test.conf' is missing"
        [ -f $DEFAULTTESTSDIR/${testname}/pretest.dat ]     || die "!! File 'pretest.dat' is missing"
@@ -463,46 +463,50 @@ do
                    > $TESTRESULTDIR/${host}.$command 2>/dev/null
            done
 
-           for file in ipsec.conf ipsec.secrets
+           for file in strongswan.conf ipsec.conf ipsec.secrets
            do
                scp $HOSTLOGIN:/etc/$file \
                    $TESTRESULTDIR/${host}.$file  > /dev/null 2>&1
            done
 
-               if [ $SUBDIR = "sql" ]
-               then
-                       scp $HOSTLOGIN:/etc/ipsec.d/ipsec.sql \
-                       $TESTRESULTDIR/${host}.ipsec.sql  > /dev/null 2>&1
-               else
-                       touch $TESTRESULTDIR/${host}.ipsec.sql
-               fi
+           scp $HOSTLOGIN:/etc/ipsec.d/ipsec.sql \
+               $TESTRESULTDIR/${host}.ipsec.sql  > /dev/null 2>&1
+
+           ssh $HOSTLOGIN ip -s xfrm policy \
+                   > $TESTRESULTDIR/${host}.ip.policy 2>/dev/null
+           ssh $HOSTLOGIN ip -s xfrm state \
+                   > $TESTRESULTDIR/${host}.ip.state 2>/dev/null
            ssh $HOSTLOGIN ip route list table $SOURCEIP_ROUTING_TABLE \
-                   > $TESTRESULTDIR/${host}.iproute 2>/dev/null
+                   > $TESTRESULTDIR/${host}.ip.route 2>/dev/null
            ssh $HOSTLOGIN $IPTABLES -v -n -L \
                    > $TESTRESULTDIR/${host}.iptables 2>/dev/null
+           chmod a+r $TESTRESULTDIR/*
            cat >> $TESTRESULTDIR/index.html <<@EOF
     <h3>$host</h3>
       <table border="0" cellspacing="0" width="600">
       <tr>
-       <td>
+       <td valign="top">
          <ul>
            <li><a href="$host.ipsec.conf">ipsec.conf</a></li>
            <li><a href="$host.ipsec.secrets">ipsec.secrets</a></li>
-           <li><a href="$host.statusall">ipsec statusall</a></li>
-           <li><a href="$host.listall">ipsec listall</a></li>
+           <li><a href="$host.ipsec.sql">ipsec.sql</a></li>
+           <li><a href="$host.strongswan.conf">strongswan.conf</a></li>
          </ul>
        </td>
-       <td>
+       <td valign="top">
          <ul>
+           <li><a href="$host.statusall">ipsec statusall</a></li>
+           <li><a href="$host.listall">ipsec listall</a></li>
            <li><a href="$host.auth.log">auth.log</a></li>
            <li><a href="$host.daemon.log">daemon.log</a></li>
-           <li><a href="$host.iproute">ip route list table $SOURCEIP_ROUTING_TABLE</a></li>
-           <li><a href="$host.iptables">$IPTABLES -L</a></li>
          </ul>
       </td>
        <td valign="top">
          <ul>
-           <li><a href="$host.ipsec.sql">ipsec.sql</a></li>
+           <li><a href="$host.ip.policy">ip -s xfrm policy</a></li>
+           <li><a href="$host.ip.state">ip -s xfrm state</a></li>
+           <li><a href="$host.ip.route">ip route list table $SOURCEIP_ROUTING_TABLE</a></li>
+           <li><a href="$host.iptables">$IPTABLES -L</a></li>
          </ul>
       </td>
     </tr>