OSDN Git Service

Add PT test scrpts.
author6638678 <6638678@1ed66053-1c2d-0410-8867-f7571e6e31d3>
Tue, 19 Oct 2010 12:08:45 +0000 (12:08 +0000)
committer6638678 <6638678@1ed66053-1c2d-0410-8867-f7571e6e31d3>
Tue, 19 Oct 2010 12:08:45 +0000 (12:08 +0000)
git-svn-id: http://10.144.169.20/repos/um/branches/l7vsd-3.x-ramiel-epoll-cond@10390 1ed66053-1c2d-0410-8867-f7571e6e31d3

27 files changed:
test/script/PT/B/B-30.sh [new file with mode: 0755]
test/script/PT/B/B-32-IPv4v4.sh [new file with mode: 0755]
test/script/PT/B/B-32-IPv6v4.sh [new file with mode: 0755]
test/script/PT/B/B-32-IPv6v6.sh [new file with mode: 0755]
test/script/PT/B/B-33-IPv4v4.sh [new file with mode: 0755]
test/script/PT/B/B-33-IPv6v4.sh [new file with mode: 0755]
test/script/PT/B/B-33-IPv6v6.sh [new file with mode: 0755]
test/script/PT/B/B-34-IPv4v4.sh [new file with mode: 0755]
test/script/PT/B/B-34-IPv6v4.sh [new file with mode: 0755]
test/script/PT/B/B-34-IPv6v6.sh [new file with mode: 0755]
test/script/PT/B/B-35-IPv4v4.sh [new file with mode: 0755]
test/script/PT/B/B-36-IPv4v4.sh [new file with mode: 0755]
test/script/PT/B/B-37-IPv4v4.sh [new file with mode: 0755]
test/script/PT/B/materials/B-30-l7vs.cf [new file with mode: 0644]
test/script/PT/B/materials/B-32-IPv4v4-l7directord.cf [new file with mode: 0644]
test/script/PT/B/materials/B-32-IPv6v4-l7directord.cf [new file with mode: 0644]
test/script/PT/B/materials/B-32-IPv6v6-l7directord.cf [new file with mode: 0644]
test/script/PT/B/materials/B-32-l7vs.cf [new file with mode: 0644]
test/script/PT/B/materials/B-33-IPv4v4-l7directord.cf [new file with mode: 0644]
test/script/PT/B/materials/B-33-IPv6v4-l7directord.cf [new file with mode: 0644]
test/script/PT/B/materials/B-33-IPv6v6-l7directord.cf [new file with mode: 0644]
test/script/PT/B/materials/B-34-IPv4v4-l7directord.cf [new file with mode: 0644]
test/script/PT/B/materials/B-34-IPv6v4-l7directord.cf [new file with mode: 0644]
test/script/PT/B/materials/B-34-IPv6v6-l7directord.cf [new file with mode: 0644]
test/script/PT/B/materials/B-35-IPv4v4-l7directord.cf [new file with mode: 0644]
test/script/PT/B/materials/B-35-IPv6v4-l7directord.cf [new file with mode: 0644]
test/script/PT/B/materials/B-35-IPv6v6-l7directord.cf [new file with mode: 0644]

diff --git a/test/script/PT/B/B-30.sh b/test/script/PT/B/B-30.sh
new file mode 100755 (executable)
index 0000000..e2980d3
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+cp materials/B-30-l7vs.cf ${L7VSD_CONF_DIR}/l7vs.cf
+
+#Add Service
+$INIT_L7VSD start
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $INIT_L7VSD start"
+        exit 1
+fi
+usleep 100000
+
+RET=`$L7VSADM -V 2>&1 | grep -e "^l7vsd_network "`
+EXPECT="l7vsd_network                  info"
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM -V | grep l7vsd_network"
+        exit 1
+fi
+
+sed -i 's/l7vsd_network                    = "info"/l7vsd_network                    = "error"/' ${L7VSD_CONF_DIR}/l7vs.cf
+
+$L7VSADM -P -r all
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM --parameter --reload logger"
+        exit 1
+fi
+
+RET=`$L7VSADM -V 2>&1 | grep -e "^l7vsd_network "`
+EXPECT="l7vsd_network                  error"
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM -V | grep l7vsd_network"
+        exit 1
+fi
+
+exit 0
diff --git a/test/script/PT/B/B-32-IPv4v4.sh b/test/script/PT/B/B-32-IPv4v4.sh
new file mode 100755 (executable)
index 0000000..84f8520
--- /dev/null
@@ -0,0 +1,99 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+\cp -f materials/B-32-l7vs.cf ${L7VSD_CONF_DIR}/l7vs.cf
+\cp -f materials/B-32-IPv4v4-l7directord.cf ${L7DIRECTORD_CONF_DIR}/l7directord.cf
+
+VS="127.0.0.1"
+RS="127.0.0.1"
+
+#Run http server
+RealServer1=RealServer1
+RealServer1_ADDR=$RS
+RealServer1_PORT=50001
+start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer1"
+        exit 1
+fi
+
+#Add Service
+$INIT_L7VSD start
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $INIT_L7VSD start"
+        exit 1
+fi
+usleep 100000
+
+# Start l7directord
+$INIT_L7DIRECTORD start
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $INIT_L7DIRECTORD start"
+        exit 1
+fi
+sleep 3
+
+RET=`$L7VSADM -V | grep -e "^l7vsd_virtualservice "`
+EXPECT="l7vsd_virtualservice           debug"
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM -V | grep l7vsd_virtualservice"
+        exit 1
+fi
+
+RET=`$L7VSADM`
+EXPECT="Layer-7 Virtual Server version 3.0.0
+Prot LocalAddress:Port ProtoMod Scheduler
+  -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
+TCP localhost:50000 sessionless rr
+  -> localhost:50001              Masq    1      0          0         "
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM"
+        exit 1
+fi
+
+#Connect
+for ((i=0;i<256;i++)){
+       RET=`$WGET -t 1 -qO- http://$VS:50000/`
+       if [ "${RET}" != "${RealServer1}" ]
+       then
+               echo "Test failed: $WGET -t 1 -qO- http://$VS:40001/"
+               exit 1
+       fi
+}
+
+RET=`$L7VSADM | grep "localhost:50001" | awk '{print $6}'`
+if [ 256 -ne ${RET} ]
+then
+        echo "Test failed: $L7VSADM | grep localhost:50001 | awk '{print $6}'"
+        exit 1
+fi
+
+RET=`ls ${L7VS_LOG_DIR}/l7vsd.log* | wc -l`
+if [ ${RET} -ne 2 ]
+then
+        echo "Test failed: ls ${L7VS_LOG_DIR}/l7vsd.log*"
+        exit 1
+fi
+
+RET=`ls ${L7VS_LOG_DIR}/l7vsd.log`
+EXPECT="${L7VS_LOG_DIR}/l7vsd.log"
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: ls ${L7VS_LOG_DIR}/l7vsd.log"
+        exit 1
+fi
+
+RET=`ls ${L7VS_LOG_DIR}/l7vsd.log.1`
+EXPECT="${L7VS_LOG_DIR}/l7vsd.log.1"
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: ls ${L7VS_LOG_DIR}/l7vsd.log.1"
+        exit 1
+fi
+
+
+exit 0
diff --git a/test/script/PT/B/B-32-IPv6v4.sh b/test/script/PT/B/B-32-IPv6v4.sh
new file mode 100755 (executable)
index 0000000..087cd1a
--- /dev/null
@@ -0,0 +1,99 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+\cp -f materials/B-32-l7vs.cf ${L7VSD_CONF_DIR}/l7vs.cf
+\cp -f materials/B-32-IPv6v4-l7directord.cf ${L7DIRECTORD_CONF_DIR}/l7directord.cf
+
+VS="[::1]"
+RS="127.0.0.1"
+
+#Run http server
+RealServer1=RealServer1
+RealServer1_ADDR=$RS
+RealServer1_PORT=50001
+start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer1"
+        exit 1
+fi
+
+#Add Service
+$INIT_L7VSD start
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $INIT_L7VSD start"
+        exit 1
+fi
+usleep 100000
+
+# Start l7directord
+$INIT_L7DIRECTORD start
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $INIT_L7DIRECTORD start"
+        exit 1
+fi
+sleep 3
+
+RET=`$L7VSADM -V | grep -e "^l7vsd_virtualservice "`
+EXPECT="l7vsd_virtualservice           debug"
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM -V | grep l7vsd_virtualservice"
+        exit 1
+fi
+
+RET=`$L7VSADM`
+EXPECT="Layer-7 Virtual Server version 3.0.0
+Prot LocalAddress:Port ProtoMod Scheduler
+  -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
+TCP localhost:50000 sessionless rr
+  -> localhost:50001              Masq    1      0          0         "
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM"
+        exit 1
+fi
+
+#Connect
+for ((i=0;i<256;i++)){
+       RET=`$WGET -t 1 -qO- http://$VS:50000/`
+       if [ "${RET}" != "${RealServer1}" ]
+       then
+               echo "Test failed: $WGET -t 1 -qO- http://$VS:40001/"
+               exit 1
+       fi
+}
+
+RET=`$L7VSADM | grep "localhost:50001" | awk '{print $6}'`
+if [ 256 -ne ${RET} ]
+then
+        echo "Test failed: $L7VSADM | grep localhost:50001 | awk '{print $6}'"
+        exit 1
+fi
+
+RET=`ls ${L7VS_LOG_DIR}/l7vsd.log* | wc -l`
+if [ ${RET} -ne 2 ]
+then
+        echo "Test failed: ls ${L7VS_LOG_DIR}/l7vsd.log*"
+        exit 1
+fi
+
+RET=`ls ${L7VS_LOG_DIR}/l7vsd.log`
+EXPECT="${L7VS_LOG_DIR}/l7vsd.log"
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: ls ${L7VS_LOG_DIR}/l7vsd.log"
+        exit 1
+fi
+
+RET=`ls ${L7VS_LOG_DIR}/l7vsd.log.1`
+EXPECT="${L7VS_LOG_DIR}/l7vsd.log.1"
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: ls ${L7VS_LOG_DIR}/l7vsd.log.1"
+        exit 1
+fi
+
+
+exit 0
diff --git a/test/script/PT/B/B-32-IPv6v6.sh b/test/script/PT/B/B-32-IPv6v6.sh
new file mode 100755 (executable)
index 0000000..dd15d25
--- /dev/null
@@ -0,0 +1,99 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+\cp -f materials/B-32-l7vs.cf ${L7VSD_CONF_DIR}/l7vs.cf
+\cp -f materials/B-32-IPv6v6-l7directord.cf ${L7DIRECTORD_CONF_DIR}/l7directord.cf
+
+VS="[::1]"
+RS="[::1]"
+
+#Run http server
+RealServer1=RealServer1
+RealServer1_ADDR=$RS
+RealServer1_PORT=50001
+start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT -i
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer1"
+        exit 1
+fi
+
+#Add Service
+$INIT_L7VSD start
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $INIT_L7VSD start"
+        exit 1
+fi
+usleep 100000
+
+# Start l7directord
+$INIT_L7DIRECTORD start
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $INIT_L7DIRECTORD start"
+        exit 1
+fi
+sleep 3
+
+RET=`$L7VSADM -V | grep -e "^l7vsd_virtualservice "`
+EXPECT="l7vsd_virtualservice           debug"
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM -V | grep l7vsd_virtualservice"
+        exit 1
+fi
+
+RET=`$L7VSADM`
+EXPECT="Layer-7 Virtual Server version 3.0.0
+Prot LocalAddress:Port ProtoMod Scheduler
+  -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
+TCP localhost:50000 sessionless rr
+  -> localhost:50001              Masq    1      0          0         "
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM"
+        exit 1
+fi
+
+#Connect
+for ((i=0;i<256;i++)){
+       RET=`$WGET -t 1 -qO- http://$VS:50000/`
+       if [ "${RET}" != "${RealServer1}" ]
+       then
+               echo "Test failed: $WGET -t 1 -qO- http://$VS:40001/"
+               exit 1
+       fi
+}
+
+RET=`$L7VSADM | grep "localhost:50001" | awk '{print $6}'`
+if [ 256 -ne ${RET} ]
+then
+        echo "Test failed: $L7VSADM | grep localhost:50001 | awk '{print $6}'"
+        exit 1
+fi
+
+RET=`ls ${L7VS_LOG_DIR}/l7vsd.log* | wc -l`
+if [ ${RET} -ne 2 ]
+then
+        echo "Test failed: ls ${L7VS_LOG_DIR}/l7vsd.log*"
+        exit 1
+fi
+
+RET=`ls ${L7VS_LOG_DIR}/l7vsd.log`
+EXPECT="${L7VS_LOG_DIR}/l7vsd.log"
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: ls ${L7VS_LOG_DIR}/l7vsd.log"
+        exit 1
+fi
+
+RET=`ls ${L7VS_LOG_DIR}/l7vsd.log.1`
+EXPECT="${L7VS_LOG_DIR}/l7vsd.log.1"
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: ls ${L7VS_LOG_DIR}/l7vsd.log.1"
+        exit 1
+fi
+
+
+exit 0
diff --git a/test/script/PT/B/B-33-IPv4v4.sh b/test/script/PT/B/B-33-IPv4v4.sh
new file mode 100755 (executable)
index 0000000..d9e543b
--- /dev/null
@@ -0,0 +1,84 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+\cp -f materials/B-33-IPv4v4-l7directord.cf ${L7DIRECTORD_CONF_DIR}/l7directord.cf
+
+VS="127.0.0.1"
+RS="127.0.0.1"
+
+#Run http server
+RealServer1=RealServer1
+RealServer1_ADDR=$RS
+RealServer1_PORT=50001
+start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer1"
+        exit 1
+fi
+
+RealServer2=RealServer2
+RealServer2_ADDR=$RS
+RealServer2_PORT=50002
+start_lighttpd -s $RealServer2 -a $RealServer2_ADDR -p $RealServer2_PORT
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer2"
+        exit 1
+fi
+
+#Add Service
+$INIT_L7VSD start
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $INIT_L7VSD start"
+        exit 1
+fi
+usleep 100000
+
+# Start l7directord
+$INIT_L7DIRECTORD start
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $INIT_L7DIRECTORD start"
+        exit 1
+fi
+sleep 3
+
+RET=`$L7VSADM`
+EXPECT="Layer-7 Virtual Server version 3.0.0
+Prot LocalAddress:Port ProtoMod Scheduler
+  -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
+TCP localhost:50000 sessionless rr
+  -> localhost:50001              Masq    1      0          0         
+  -> localhost:50002              Masq    1      0          0         "
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM"
+        exit 1
+fi
+
+#Connect
+for ((i=0;i<128;i++)){
+       RET=`$WGET -t 1 -qO- http://$VS:50000/`
+       if [ $? -ne 0 ]
+       then
+               echo "Test failed: $WGET -t 1 -qO- http://$VS:50000/"
+               exit 1
+       fi
+}
+
+RET=`$L7VSADM | grep "localhost:50001" | awk '{print $6}'`
+if [ 64 -ne ${RET} ]
+then
+        echo "Test failed: $L7VSADM | grep localhost:50001 | awk '{print $6}'"
+        exit 1
+fi
+
+RET=`$L7VSADM | grep "localhost:50002" | awk '{print $6}'`
+if [ 64 -ne ${RET} ]
+then
+        echo "Test failed: $L7VSADM | grep localhost:50002 | awk '{print $6}'"
+        exit 1
+fi
+
+exit 0
diff --git a/test/script/PT/B/B-33-IPv6v4.sh b/test/script/PT/B/B-33-IPv6v4.sh
new file mode 100755 (executable)
index 0000000..3d66850
--- /dev/null
@@ -0,0 +1,84 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+\cp -f materials/B-33-IPv6v4-l7directord.cf ${L7DIRECTORD_CONF_DIR}/l7directord.cf
+
+VS="[::1]"
+RS="127.0.0.1"
+
+#Run http server
+RealServer1=RealServer1
+RealServer1_ADDR=$RS
+RealServer1_PORT=50001
+start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer1"
+        exit 1
+fi
+
+RealServer2=RealServer2
+RealServer2_ADDR=$RS
+RealServer2_PORT=50002
+start_lighttpd -s $RealServer2 -a $RealServer2_ADDR -p $RealServer2_PORT
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer2"
+        exit 1
+fi
+
+#Add Service
+$INIT_L7VSD start
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $INIT_L7VSD start"
+        exit 1
+fi
+usleep 100000
+
+# Start l7directord
+$INIT_L7DIRECTORD start
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $INIT_L7DIRECTORD start"
+        exit 1
+fi
+sleep 3
+
+RET=`$L7VSADM`
+EXPECT="Layer-7 Virtual Server version 3.0.0
+Prot LocalAddress:Port ProtoMod Scheduler
+  -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
+TCP localhost:50000 sessionless rr
+  -> localhost:50001              Masq    1      0          0         
+  -> localhost:50002              Masq    1      0          0         "
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM"
+        exit 1
+fi
+
+#Connect
+for ((i=0;i<128;i++)){
+       RET=`$WGET -t 1 -qO- http://$VS:50000/`
+       if [ $? -ne 0 ]
+       then
+               echo "Test failed: $WGET -t 1 -qO- http://$VS:50000/"
+               exit 1
+       fi
+}
+
+RET=`$L7VSADM | grep "localhost:50001" | awk '{print $6}'`
+if [ 64 -ne ${RET} ]
+then
+        echo "Test failed: $L7VSADM | grep localhost:50001 | awk '{print $6}'"
+        exit 1
+fi
+
+RET=`$L7VSADM | grep "localhost:50002" | awk '{print $6}'`
+if [ 64 -ne ${RET} ]
+then
+        echo "Test failed: $L7VSADM | grep localhost:50002 | awk '{print $6}'"
+        exit 1
+fi
+
+exit 0
diff --git a/test/script/PT/B/B-33-IPv6v6.sh b/test/script/PT/B/B-33-IPv6v6.sh
new file mode 100755 (executable)
index 0000000..2c79f78
--- /dev/null
@@ -0,0 +1,83 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+\cp -f materials/B-33-IPv6v6-l7directord.cf ${L7DIRECTORD_CONF_DIR}/l7directord.cf
+
+VS="[::1]"
+RS="[::1]"
+
+#Run http server
+RealServer1=RealServer1
+RealServer1_ADDR=$RS
+RealServer1_PORT=50001
+start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT -i
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer1"
+        exit 1
+fi
+
+RealServer2=RealServer2
+RealServer2_ADDR=$RS
+RealServer2_PORT=50002
+start_lighttpd -s $RealServer2 -a $RealServer2_ADDR -p $RealServer2_PORT -i
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer2"
+        exit 1
+fi
+#Add Service
+$INIT_L7VSD start
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $INIT_L7VSD start"
+        exit 1
+fi
+usleep 100000
+
+# Start l7directord
+$INIT_L7DIRECTORD start
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $INIT_L7DIRECTORD start"
+        exit 1
+fi
+sleep 3
+
+RET=`$L7VSADM`
+EXPECT="Layer-7 Virtual Server version 3.0.0
+Prot LocalAddress:Port ProtoMod Scheduler
+  -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
+TCP localhost:50000 sessionless rr
+  -> localhost:50001              Masq    1      0          0         
+  -> localhost:50002              Masq    1      0          0         "
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM"
+        exit 1
+fi
+
+#Connect
+for ((i=0;i<128;i++)){
+       RET=`$WGET -t 1 -qO- http://$VS:50000/`
+       if [ $? -ne 0 ]
+       then
+               echo "Test failed: $WGET -t 1 -qO- http://$VS:50000/"
+               exit 1
+       fi
+}
+
+RET=`$L7VSADM | grep "localhost:50001" | awk '{print $6}'`
+if [ 64 -ne ${RET} ]
+then
+        echo "Test failed: $L7VSADM | grep localhost:50001 | awk '{print $6}'"
+        exit 1
+fi
+
+RET=`$L7VSADM | grep "localhost:50002" | awk '{print $6}'`
+if [ 64 -ne ${RET} ]
+then
+        echo "Test failed: $L7VSADM | grep localhost:50002 | awk '{print $6}'"
+        exit 1
+fi
+
+exit 0
diff --git a/test/script/PT/B/B-34-IPv4v4.sh b/test/script/PT/B/B-34-IPv4v4.sh
new file mode 100755 (executable)
index 0000000..0d504e2
--- /dev/null
@@ -0,0 +1,84 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+\cp -f materials/B-34-IPv4v4-l7directord.cf ${L7DIRECTORD_CONF_DIR}/l7directord.cf
+
+VS="127.0.0.1"
+RS="127.0.0.1"
+
+#Run http server
+RealServer1=RealServer1
+RealServer1_ADDR=$RS
+RealServer1_PORT=50001
+start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer1"
+        exit 1
+fi
+
+RealServer2=RealServer2
+RealServer2_ADDR=$RS
+RealServer2_PORT=50002
+start_lighttpd -s $RealServer2 -a $RealServer2_ADDR -p $RealServer2_PORT
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer2"
+        exit 1
+fi
+
+#Add Service
+$INIT_L7VSD start
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $INIT_L7VSD start"
+        exit 1
+fi
+usleep 100000
+
+# Start l7directord
+$INIT_L7DIRECTORD start
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $INIT_L7DIRECTORD start"
+        exit 1
+fi
+sleep 3
+
+RET=`$L7VSADM`
+EXPECT="Layer-7 Virtual Server version 3.0.0
+Prot LocalAddress:Port ProtoMod Scheduler
+  -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
+TCP localhost:50000 sessionless wrr
+  -> localhost:50001              Masq    2      0          0         
+  -> localhost:50002              Masq    1      0          0         "
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM"
+        exit 1
+fi
+
+#Connect
+for ((i=0;i<128;i++)){
+       RET=`$WGET -t 1 -qO- http://$VS:50000/`
+       if [ $? -ne 0 ]
+       then
+               echo "Test failed: $WGET -t 1 -qO- http://$VS:50000/"
+               exit 1
+       fi
+}
+
+RET=`$L7VSADM | grep "localhost:50001" | awk '{print $6}'`
+if [ 86 -ne ${RET} ]
+then
+        echo "Test failed: $L7VSADM | grep localhost:50001 | awk '{print $6}'"
+        exit 1
+fi
+
+RET=`$L7VSADM | grep "localhost:50002" | awk '{print $6}'`
+if [ 42 -ne ${RET} ]
+then
+        echo "Test failed: $L7VSADM | grep localhost:50002 | awk '{print $6}'"
+        exit 1
+fi
+
+exit 0
diff --git a/test/script/PT/B/B-34-IPv6v4.sh b/test/script/PT/B/B-34-IPv6v4.sh
new file mode 100755 (executable)
index 0000000..4dd016a
--- /dev/null
@@ -0,0 +1,84 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+\cp -f materials/B-34-IPv6v4-l7directord.cf ${L7DIRECTORD_CONF_DIR}/l7directord.cf
+
+VS="[::1]"
+RS="127.0.0.1"
+
+#Run http server
+RealServer1=RealServer1
+RealServer1_ADDR=$RS
+RealServer1_PORT=50001
+start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer1"
+        exit 1
+fi
+
+RealServer2=RealServer2
+RealServer2_ADDR=$RS
+RealServer2_PORT=50002
+start_lighttpd -s $RealServer2 -a $RealServer2_ADDR -p $RealServer2_PORT
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer2"
+        exit 1
+fi
+
+#Add Service
+$INIT_L7VSD start
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $INIT_L7VSD start"
+        exit 1
+fi
+usleep 100000
+
+# Start l7directord
+$INIT_L7DIRECTORD start
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $INIT_L7DIRECTORD start"
+        exit 1
+fi
+sleep 3
+
+RET=`$L7VSADM`
+EXPECT="Layer-7 Virtual Server version 3.0.0
+Prot LocalAddress:Port ProtoMod Scheduler
+  -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
+TCP localhost:50000 sessionless wrr
+  -> localhost:50001              Masq    2      0          0         
+  -> localhost:50002              Masq    1      0          0         "
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM"
+        exit 1
+fi
+
+#Connect
+for ((i=0;i<128;i++)){
+       RET=`$WGET -t 1 -qO- http://$VS:50000/`
+       if [ $? -ne 0 ]
+       then
+               echo "Test failed: $WGET -t 1 -qO- http://$VS:50000/"
+               exit 1
+       fi
+}
+
+RET=`$L7VSADM | grep "localhost:50001" | awk '{print $6}'`
+if [ 86 -ne ${RET} ]
+then
+        echo "Test failed: $L7VSADM | grep localhost:50001 | awk '{print $6}'"
+        exit 1
+fi
+
+RET=`$L7VSADM | grep "localhost:50002" | awk '{print $6}'`
+if [ 42 -ne ${RET} ]
+then
+        echo "Test failed: $L7VSADM | grep localhost:50002 | awk '{print $6}'"
+        exit 1
+fi
+
+exit 0
diff --git a/test/script/PT/B/B-34-IPv6v6.sh b/test/script/PT/B/B-34-IPv6v6.sh
new file mode 100755 (executable)
index 0000000..b436d7b
--- /dev/null
@@ -0,0 +1,84 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+\cp -f materials/B-34-IPv6v6-l7directord.cf ${L7DIRECTORD_CONF_DIR}/l7directord.cf
+
+VS="[::1]"
+RS="[::1]"
+
+#Run http server
+RealServer1=RealServer1
+RealServer1_ADDR=$RS
+RealServer1_PORT=50001
+start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT -i
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer1"
+        exit 1
+fi
+
+RealServer2=RealServer2
+RealServer2_ADDR=$RS
+RealServer2_PORT=50002
+start_lighttpd -s $RealServer2 -a $RealServer2_ADDR -p $RealServer2_PORT -i
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer2"
+        exit 1
+fi
+
+#Add Service
+$INIT_L7VSD start
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $INIT_L7VSD start"
+        exit 1
+fi
+usleep 100000
+
+# Start l7directord
+$INIT_L7DIRECTORD start
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $INIT_L7DIRECTORD start"
+        exit 1
+fi
+sleep 3
+
+RET=`$L7VSADM`
+EXPECT="Layer-7 Virtual Server version 3.0.0
+Prot LocalAddress:Port ProtoMod Scheduler
+  -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
+TCP localhost:50000 sessionless wrr
+  -> localhost:50001              Masq    2      0          0         
+  -> localhost:50002              Masq    1      0          0         "
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM"
+        exit 1
+fi
+
+#Connect
+for ((i=0;i<128;i++)){
+       RET=`$WGET -t 1 -qO- http://$VS:50000/`
+       if [ $? -ne 0 ]
+       then
+               echo "Test failed: $WGET -t 1 -qO- http://$VS:50000/"
+               exit 1
+       fi
+}
+
+RET=`$L7VSADM | grep "localhost:50001" | awk '{print $6}'`
+if [ 86 -ne ${RET} ]
+then
+        echo "Test failed: $L7VSADM | grep localhost:50001 | awk '{print $6}'"
+        exit 1
+fi
+
+RET=`$L7VSADM | grep "localhost:50002" | awk '{print $6}'`
+if [ 42 -ne ${RET} ]
+then
+        echo "Test failed: $L7VSADM | grep localhost:50002 | awk '{print $6}'"
+        exit 1
+fi
+
+exit 0
diff --git a/test/script/PT/B/B-35-IPv4v4.sh b/test/script/PT/B/B-35-IPv4v4.sh
new file mode 100755 (executable)
index 0000000..57add25
--- /dev/null
@@ -0,0 +1,89 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+\cp -f materials/B-35-IPv4v4-l7directord.cf ${L7DIRECTORD_CONF_DIR}/l7directord.cf
+
+VS="127.0.0.1"
+RS="127.0.0.1"
+
+#Run http server
+RealServer1=RealServer1
+RealServer1_ADDR=$RS
+RealServer1_PORT=50001
+start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer1"
+        exit 1
+fi
+
+RealServer2=RealServer2
+RealServer2_ADDR=$RS
+RealServer2_PORT=50002
+start_lighttpd -s $RealServer2 -a $RealServer2_ADDR -p $RealServer2_PORT
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer2"
+        exit 1
+fi
+
+#Add Service
+$INIT_L7VSD start
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $INIT_L7VSD start"
+        exit 1
+fi
+usleep 100000
+
+# Start l7directord
+$INIT_L7DIRECTORD start
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $INIT_L7DIRECTORD start"
+        exit 1
+fi
+sleep 3
+
+$TEST_CLIENT $VS 50000 &
+CL1=$!
+usleep 100000
+
+RET=`$L7VSADM`
+EXPECT="Layer-7 Virtual Server version 3.0.0
+Prot LocalAddress:Port ProtoMod Scheduler
+  -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
+TCP localhost:50000 sessionless lc
+  -> localhost:50001              Masq    1      1          0         
+  -> localhost:50002              Masq    1      0          0         "
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM"
+        exit 1
+fi
+
+#Connect
+for ((i=0;i<128;i++)){
+       RET=`$WGET -t 1 -qO- http://$VS:50000/`
+       if [ $? -ne 0 ]
+       then
+               echo "Test failed: $WGET -t 1 -qO- http://$VS:50000/"
+               exit 1
+       fi
+}
+
+RET=`$L7VSADM | grep "localhost:50001" | awk '{print $6}'`
+if [ 0 -ne ${RET} ]
+then
+        echo "Test failed: $L7VSADM | grep localhost:50001 | awk '{print $6}'"
+        exit 1
+fi
+
+RET=`$L7VSADM | grep "localhost:50002" | awk '{print $6}'`
+if [ 128 -ne ${RET} ]
+then
+        echo "Test failed: $L7VSADM | grep localhost:50002 | awk '{print $6}'"
+        exit 1
+fi
+
+kill $CL1
+exit 0
diff --git a/test/script/PT/B/B-36-IPv4v4.sh b/test/script/PT/B/B-36-IPv4v4.sh
new file mode 100755 (executable)
index 0000000..5769d8e
--- /dev/null
@@ -0,0 +1,151 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+
+#Run http server
+SorryServer1=SorryServer1
+SorryServer1_ADDR=127.0.0.1
+SorryServer1_PORT=50001
+start_lighttpd -s $SorryServer1 -a $SorryServer1_ADDR -p $SorryServer1_PORT
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd SorryServer1"
+        exit 1
+fi
+
+RealServer1=RealServer1
+RealServer1_ADDR=127.0.0.1
+RealServer1_PORT=50002
+start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer1"
+        exit 1
+fi
+
+#Add Service
+$L7VSD
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSD"
+        exit 1
+fi
+usleep 100000
+
+$L7VSADM -A -t 127.0.0.1:40001 -m sessionless -b ${SorryServer1_ADDR}:${SorryServer1_PORT} -u 1
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m sessionless -b ${SorryServer1_ADDR}:${SorryServer1_PORT} -u 4"
+        exit 1
+fi
+
+$L7VSADM -a -t 127.0.0.1:40001 -m sessionless -r ${RealServer1_ADDR}:${RealServer1_PORT}
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -a -t 127.0.0.1:40001 -m sessionless -r ${RealServer1_ADDR}:${RealServer1_PORT}"
+        exit 1
+fi
+
+RET=`$L7VSADM -V`
+EXPECT="Layer-7 Virtual Server version 3.0.0
+L7vsd Log Level:
+Category                       Level
+l7vsd_network                  warn
+l7vsd_network_qos              warn
+l7vsd_network_bandwidth        warn
+l7vsd_network_num_connection   warn
+l7vsd_network_access           warn
+l7vsd_mainthread               warn
+l7vsd_virtualservice           warn
+l7vsd_virtualservice_thread    warn
+l7vsd_session                  warn
+l7vsd_session_thread           warn
+l7vsd_realserver               warn
+l7vsd_sorryserver              warn
+l7vsd_module                   warn
+l7vsd_replication              warn
+l7vsd_replication_sendthread   warn
+l7vsd_parameter                warn
+l7vsd_logger                   warn
+l7vsd_command                  warn
+l7vsd_start_stop               warn
+l7vsd_system                   warn
+l7vsd_system_memory            warn
+l7vsd_system_endpoint          warn
+l7vsd_system_signal            warn
+l7vsd_system_environment       warn
+l7vsd_snmpagent                info
+l7vsd_protocol                 warn
+l7vsd_schedule                 warn
+
+Replication Mode:
+SINGLE
+
+SNMPAgent:
+Agent Status                   inactive
+log trap status                none
+log trap level                 none
+cache update interval          none
+start date                     none
+last request date              none
+last trap date                 none
+total GET requests             none
+total SET requests             none
+total trap counts              none
+
+Prot LocalAddress:Port ProtoMod Scheduler Protomod_opt_string
+  -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
+TCP localhost:40001 sessionless rr --sorry-uri '/' --statistic 0
+  -> localhost:50002              Masq    1      0          0         
+  Bypass Settings:
+    Sorry Server                  localhost:50001 Masq
+    Max Connection                1
+    Sorry Flag                    off
+  SSL Settings:
+    SSL Config File               none
+  Logging Settings:
+    Access Log                    off
+    Access Log File               none
+    Access Log Rotate             --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M
+  Socket Settings:
+    TCP_DEFER_ACCEPT              disable
+    TCP_NODELAY                   disable
+    TCP_CORK                      disable
+    TCP_QUICKACK                  auto
+  Throughput:
+    Current Upload / Limit        0.000000 Mbps / 0.000000 Mbps
+    Current Download / Limit      0.000000 Mbps / 0.000000 Mbps
+  Statistics:
+    HTTP Total Requests           0
+    HTTP GET Requests             0
+    HTTP POST Requests            0"
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM -V"
+        exit 1
+fi
+
+$TEST_CLIENT 127.0.0.1 40001 &
+CONNECT1=$!
+usleep 100000
+
+#Connect
+RET=`$WGET -t 1 -qO- http://127.0.0.1:40001/`
+if [ "${RET}" != "${SorryServer1}" ]
+then
+        echo "Test failed: $WGET -t 1 -qO- http://127.0.0.1:40001/"
+        exit 1
+fi
+
+# kill active connect
+kill ${CONNECT1}
+if [ $? -ne 0 ]
+then
+        echo "Test failed: kill ${CONNECT1}"
+        exit 1
+fi
+
+stop_lighttpd $RealServer1
+stop_lighttpd $SorryServer1
+
+exit 0
+
diff --git a/test/script/PT/B/B-37-IPv4v4.sh b/test/script/PT/B/B-37-IPv4v4.sh
new file mode 100755 (executable)
index 0000000..da6ea68
--- /dev/null
@@ -0,0 +1,168 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+
+#Run http server
+SorryServer1=SorryServer1
+SorryServer1_ADDR=127.0.0.1
+SorryServer1_PORT=50001
+start_lighttpd -s $SorryServer1 -a $SorryServer1_ADDR -p $SorryServer1_PORT
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd SorryServer1"
+        exit 1
+fi
+
+RealServer1=RealServer1
+RealServer1_ADDR=127.0.0.1
+RealServer1_PORT=50002
+start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer1"
+        exit 1
+fi
+
+#Add Service
+$L7VSD
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSD"
+        exit 1
+fi
+usleep 100000
+
+$L7VSADM -A -t 127.0.0.1:40001 -m sessionless -b ${SorryServer1_ADDR}:${SorryServer1_PORT} -u 1
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m sessionless -b ${SorryServer1_ADDR}:${SorryServer1_PORT} -u 1"
+        exit 1
+fi
+
+$L7VSADM -a -t 127.0.0.1:40001 -m sessionless -r ${RealServer1_ADDR}:${RealServer1_PORT}
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -a -t 127.0.0.1:40001 -m sessionless -r ${RealServer1_ADDR}:${RealServer1_PORT}"
+        exit 1
+fi
+
+RET=`$L7VSADM -V`
+EXPECT="Layer-7 Virtual Server version 3.0.0
+L7vsd Log Level:
+Category                       Level
+l7vsd_network                  warn
+l7vsd_network_qos              warn
+l7vsd_network_bandwidth        warn
+l7vsd_network_num_connection   warn
+l7vsd_network_access           warn
+l7vsd_mainthread               warn
+l7vsd_virtualservice           warn
+l7vsd_virtualservice_thread    warn
+l7vsd_session                  warn
+l7vsd_session_thread           warn
+l7vsd_realserver               warn
+l7vsd_sorryserver              warn
+l7vsd_module                   warn
+l7vsd_replication              warn
+l7vsd_replication_sendthread   warn
+l7vsd_parameter                warn
+l7vsd_logger                   warn
+l7vsd_command                  warn
+l7vsd_start_stop               warn
+l7vsd_system                   warn
+l7vsd_system_memory            warn
+l7vsd_system_endpoint          warn
+l7vsd_system_signal            warn
+l7vsd_system_environment       warn
+l7vsd_snmpagent                info
+l7vsd_protocol                 warn
+l7vsd_schedule                 warn
+
+Replication Mode:
+SINGLE
+
+SNMPAgent:
+Agent Status                   inactive
+log trap status                none
+log trap level                 none
+cache update interval          none
+start date                     none
+last request date              none
+last trap date                 none
+total GET requests             none
+total SET requests             none
+total trap counts              none
+
+Prot LocalAddress:Port ProtoMod Scheduler Protomod_opt_string
+  -> RemoteAddress:Port           Forward Weight ActiveConn InactConn
+TCP localhost:40001 sessionless rr --sorry-uri '/' --statistic 0
+  -> localhost:50002              Masq    1      0          0         
+  Bypass Settings:
+    Sorry Server                  localhost:50001 Masq
+    Max Connection                1
+    Sorry Flag                    off
+  SSL Settings:
+    SSL Config File               none
+  Logging Settings:
+    Access Log                    off
+    Access Log File               none
+    Access Log Rotate             --ac-rotate-type size --ac-rotate-max-backup-index 10 --ac-rotate-max-filesize 10M
+  Socket Settings:
+    TCP_DEFER_ACCEPT              disable
+    TCP_NODELAY                   disable
+    TCP_CORK                      disable
+    TCP_QUICKACK                  auto
+  Throughput:
+    Current Upload / Limit        0.000000 Mbps / 0.000000 Mbps
+    Current Download / Limit      0.000000 Mbps / 0.000000 Mbps
+  Statistics:
+    HTTP Total Requests           0
+    HTTP GET Requests             0
+    HTTP POST Requests            0"
+if [ "${RET}" != "${EXPECT}" ]
+then
+        echo "Test failed: $L7VSADM -V"
+        exit 1
+fi
+
+$TEST_CLIENT 127.0.0.1 40001 &
+CONNECT1=$!
+usleep 100000
+
+#Connect
+RET=`$WGET -t 1 -qO- http://127.0.0.1:40001/`
+if [ "${RET}" != "${SorryServer1}" ]
+then
+        echo "Test failed: $WGET -t 1 -qO- http://127.0.0.1:40001/"
+        exit 1
+fi
+
+
+$L7VSADM -E -t 127.0.0.1:40001 -m sessionless -b ${SorryServer1_ADDR}:${SorryServer1_PORT} -u 10
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -E -t 127.0.0.1:40001 -m sessionless -b ${SorryServer1_ADDR}:${SorryServer1_PORT} -u 10"
+        exit 1
+fi
+
+#Connect
+RET=`$WGET -t 1 -qO- http://127.0.0.1:40001/`
+if [ "${RET}" != "${RealServer1}" ]
+then
+        echo "Test failed: $WGET -t 1 -qO- http://127.0.0.1:40001/"
+        exit 1
+fi
+
+
+# kill active connect
+kill ${CONNECT1}
+if [ $? -ne 0 ]
+then
+        echo "Test failed: kill ${CONNECT1}"
+        exit 1
+fi
+
+stop_lighttpd $RealServer1
+stop_lighttpd $SorryServer1
+
+exit 0
+
diff --git a/test/script/PT/B/materials/B-30-l7vs.cf b/test/script/PT/B/materials/B-30-l7vs.cf
new file mode 100644 (file)
index 0000000..478b67c
--- /dev/null
@@ -0,0 +1,155 @@
+#
+# UltraMonkey - L7 configuration file
+# Copyright (C) 2008-2009  NTT COMWARE Corporation.
+# License: GNU General Public License (GPL)
+#
+#
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA
+# 
+#
+# Rivision History.
+#    3.0.0    MultiThread version release.
+#    1.2.0    First verion release.(version was put together l7vsd)
+#        - 2008/03/26 Norihisa Nakai.
+
+
+#
+# l7vs log setting
+#
+[logger]
+# l7vsd logfile base name
+l7vsd_log_filename = "/var/log/l7vs/l7vsd.log"
+# l7vsd log rotate pattern
+l7vsd_rotation = "size"
+# l7vsd rotate max backup number
+l7vsd_max_backup_index = "10"
+# l7vsd rotate file size
+l7vsd_max_filesize = "10M"
+
+# l7vsd access log rotate pattern
+l7vsd_accesslog_rotate_type = "size"
+# l7vsd access rotate max backup number
+l7vsd_accesslog_rotate_max_backup_index = "10"
+# l7vsd access rotate file size
+l7vsd_accesslog_rotate_max_filesize = "10M"
+
+# l7vsd log categories level
+l7vsd_network                    = "info"
+l7vsd_network_qos                = "warn"
+l7vsd_network_bandwidth          = "warn"
+l7vsd_network_num_connection     = "warn"
+l7vsd_network_access             = "warn"
+l7vsd_mainthread                 = "warn"
+l7vsd_virtualservice             = "warn"
+l7vsd_virtualservice_thread      = "warn"
+l7vsd_session                    = "warn"
+l7vsd_session_thread             = "warn"
+l7vsd_realserver                 = "warn"
+l7vsd_sorryserver                = "warn"
+l7vsd_module                     = "warn"
+l7vsd_replication                = "warn"
+l7vsd_replication_sendthread     = "warn"
+l7vsd_parameter                  = "warn"
+l7vsd_logger                     = "warn"
+l7vsd_command                    = "warn"
+l7vsd_start_stop                 = "warn"
+l7vsd_system                     = "warn"
+l7vsd_system_memory              = "warn"
+l7vsd_system_endpoint            = "warn"
+l7vsd_system_signal              = "warn"
+l7vsd_system_environment         = "warn"
+l7vsd_snmpagent                  = "info"
+
+l7vsd_protocol                   = "warn"
+l7vsd_schedule                   = "warn"
+
+# l7vsadm log file base name
+l7vsadm_log_filename = "/var/log/l7vs/l7vsadm.log"
+# l7vsadm rotate pattern
+l7vsadm_rotation = "date"
+# l7vsadm rotate max backup number
+l7vsadm_max_backup_index = "10"
+# l7vsadm rotate timing ( every month rotate )
+l7vsadm_rotation_timing = "month"
+# l7vsadm rotate timing ( day and time )
+l7vsadm_rotation_timing_value = "1 0:01"
+
+# l7vsadm log categories level
+l7vsadm_parse                    = "warn"
+l7vsadm_operate                  = "warn"
+l7vsadm_config_result            = "warn"
+l7vsadm_common                   = "warn"
+l7vsadm_logger                   = "warn"
+l7vsadm_parameter                = "warn"
+l7vsadm_module                   = "warn"
+
+l7vsadm_protocol                 = "warn"
+l7vsadm_schedule                 = "warn"
+
+#
+# l7vsadm setting
+#
+[l7vsadm]
+cmd_interval = 1
+cmd_count = 10
+
+#
+# l7vsd setting
+#
+[l7vsd]
+maxfileno = 65535
+
+#
+# virtualservice setting
+#
+[virtualservice]
+session_thread_pool_size    = 32
+throughput_calc_interval    = 500
+
+#
+# l7vsd replication setting
+#
+[replication]
+#ip_addr = "192.168.0.254"
+#service_name = "40000"
+#recv_ip_addr = "192.168.0.253"
+#interval = 1000
+#compulsorily_interval = 40
+
+#cmponent_id_00 = "virtualservice"
+#cmponent_size_00 = 64
+#cmponent_id_01 = "chash"
+#cmponent_size_01 = 1
+#cmponent_id_02 = "sslid"
+#cmponent_size_02 = 222
+
+#
+# snmpagent settings
+#
+[snmpagent]
+enable = "false"
+cache_update_interval = 1
+logtrap = "false"
+logtrap_level = "warn"
+qos_up_alert_on = 85
+qos_up_alert_off = 50
+qos_down_alert_on = 85
+qos_down_alert_off = 50
+sessionpool_alert_on = 5
+sessionpool_alert_off = 8
+trap_queue_polling_interval = 100000000
+trap_queue_max_size = 1000
diff --git a/test/script/PT/B/materials/B-32-IPv4v4-l7directord.cf b/test/script/PT/B/materials/B-32-IPv4v4-l7directord.cf
new file mode 100644 (file)
index 0000000..560c694
--- /dev/null
@@ -0,0 +1,4 @@
+virtual=127.0.0.1:50000
+    real=127.0.0.1:50001
+
+
diff --git a/test/script/PT/B/materials/B-32-IPv6v4-l7directord.cf b/test/script/PT/B/materials/B-32-IPv6v4-l7directord.cf
new file mode 100644 (file)
index 0000000..8cc446f
--- /dev/null
@@ -0,0 +1,4 @@
+virtual=[::1]:50000
+    real=127.0.0.1:50001
+
+
diff --git a/test/script/PT/B/materials/B-32-IPv6v6-l7directord.cf b/test/script/PT/B/materials/B-32-IPv6v6-l7directord.cf
new file mode 100644 (file)
index 0000000..9d8568f
--- /dev/null
@@ -0,0 +1,4 @@
+virtual=[::1]:50000
+    real=[::1]:50001
+
+
diff --git a/test/script/PT/B/materials/B-32-l7vs.cf b/test/script/PT/B/materials/B-32-l7vs.cf
new file mode 100644 (file)
index 0000000..6a6cebe
--- /dev/null
@@ -0,0 +1,155 @@
+#
+# UltraMonkey - L7 configuration file
+# Copyright (C) 2008-2009  NTT COMWARE Corporation.
+# License: GNU General Public License (GPL)
+#
+#
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA
+# 
+#
+# Rivision History.
+#    3.0.0    MultiThread version release.
+#    1.2.0    First verion release.(version was put together l7vsd)
+#        - 2008/03/26 Norihisa Nakai.
+
+
+#
+# l7vs log setting
+#
+[logger]
+# l7vsd logfile base name
+l7vsd_log_filename = "/var/log/l7vs/l7vsd.log"
+# l7vsd log rotate pattern
+l7vsd_rotation = "size"
+# l7vsd rotate max backup number
+l7vsd_max_backup_index = "10"
+# l7vsd rotate file size
+l7vsd_max_filesize = "1M"
+
+# l7vsd access log rotate pattern
+l7vsd_accesslog_rotate_type = "size"
+# l7vsd access rotate max backup number
+l7vsd_accesslog_rotate_max_backup_index = "10"
+# l7vsd access rotate file size
+l7vsd_accesslog_rotate_max_filesize = "10M"
+
+# l7vsd log categories level
+l7vsd_network                    = "warn"
+l7vsd_network_qos                = "warn"
+l7vsd_network_bandwidth          = "warn"
+l7vsd_network_num_connection     = "warn"
+l7vsd_network_access             = "warn"
+l7vsd_mainthread                 = "warn"
+l7vsd_virtualservice             = "debug"
+l7vsd_virtualservice_thread      = "warn"
+l7vsd_session                    = "warn"
+l7vsd_session_thread             = "warn"
+l7vsd_realserver                 = "warn"
+l7vsd_sorryserver                = "warn"
+l7vsd_module                     = "warn"
+l7vsd_replication                = "warn"
+l7vsd_replication_sendthread     = "warn"
+l7vsd_parameter                  = "warn"
+l7vsd_logger                     = "warn"
+l7vsd_command                    = "warn"
+l7vsd_start_stop                 = "warn"
+l7vsd_system                     = "warn"
+l7vsd_system_memory              = "warn"
+l7vsd_system_endpoint            = "warn"
+l7vsd_system_signal              = "warn"
+l7vsd_system_environment         = "warn"
+l7vsd_snmpagent                  = "info"
+
+l7vsd_protocol                   = "warn"
+l7vsd_schedule                   = "warn"
+
+# l7vsadm log file base name
+l7vsadm_log_filename = "/var/log/l7vs/l7vsadm.log"
+# l7vsadm rotate pattern
+l7vsadm_rotation = "date"
+# l7vsadm rotate max backup number
+l7vsadm_max_backup_index = "10"
+# l7vsadm rotate timing ( every month rotate )
+l7vsadm_rotation_timing = "month"
+# l7vsadm rotate timing ( day and time )
+l7vsadm_rotation_timing_value = "1 0:01"
+
+# l7vsadm log categories level
+l7vsadm_parse                    = "warn"
+l7vsadm_operate                  = "warn"
+l7vsadm_config_result            = "warn"
+l7vsadm_common                   = "warn"
+l7vsadm_logger                   = "warn"
+l7vsadm_parameter                = "warn"
+l7vsadm_module                   = "warn"
+
+l7vsadm_protocol                 = "warn"
+l7vsadm_schedule                 = "warn"
+
+#
+# l7vsadm setting
+#
+[l7vsadm]
+cmd_interval = 1
+cmd_count = 10
+
+#
+# l7vsd setting
+#
+[l7vsd]
+maxfileno = 65535
+
+#
+# virtualservice setting
+#
+[virtualservice]
+session_thread_pool_size    = 32
+throughput_calc_interval    = 500
+
+#
+# l7vsd replication setting
+#
+[replication]
+#ip_addr = "192.168.0.254"
+#service_name = "40000"
+#recv_ip_addr = "192.168.0.253"
+#interval = 1000
+#compulsorily_interval = 40
+
+#cmponent_id_00 = "virtualservice"
+#cmponent_size_00 = 64
+#cmponent_id_01 = "chash"
+#cmponent_size_01 = 1
+#cmponent_id_02 = "sslid"
+#cmponent_size_02 = 222
+
+#
+# snmpagent settings
+#
+[snmpagent]
+enable = "false"
+cache_update_interval = 1
+logtrap = "false"
+logtrap_level = "warn"
+qos_up_alert_on = 85
+qos_up_alert_off = 50
+qos_down_alert_on = 85
+qos_down_alert_off = 50
+sessionpool_alert_on = 5
+sessionpool_alert_off = 8
+trap_queue_polling_interval = 100000000
+trap_queue_max_size = 1000
diff --git a/test/script/PT/B/materials/B-33-IPv4v4-l7directord.cf b/test/script/PT/B/materials/B-33-IPv4v4-l7directord.cf
new file mode 100644 (file)
index 0000000..9451b84
--- /dev/null
@@ -0,0 +1,5 @@
+virtual=127.0.0.1:50000
+    real=127.0.0.1:50001
+    real=127.0.0.1:50002
+    scheduler=rr
+
diff --git a/test/script/PT/B/materials/B-33-IPv6v4-l7directord.cf b/test/script/PT/B/materials/B-33-IPv6v4-l7directord.cf
new file mode 100644 (file)
index 0000000..72e8eb7
--- /dev/null
@@ -0,0 +1,5 @@
+virtual=[::1]:50000
+    real=127.0.0.1:50001
+    real=127.0.0.1:50002
+    scheduler=rr
+
diff --git a/test/script/PT/B/materials/B-33-IPv6v6-l7directord.cf b/test/script/PT/B/materials/B-33-IPv6v6-l7directord.cf
new file mode 100644 (file)
index 0000000..c03810e
--- /dev/null
@@ -0,0 +1,5 @@
+virtual=[::1]:50000
+    real=[::1]:50001
+    real=[::1]:50002
+    scheduler=rr
+
diff --git a/test/script/PT/B/materials/B-34-IPv4v4-l7directord.cf b/test/script/PT/B/materials/B-34-IPv4v4-l7directord.cf
new file mode 100644 (file)
index 0000000..1df20bc
--- /dev/null
@@ -0,0 +1,5 @@
+virtual=127.0.0.1:50000
+    real=127.0.0.1:50001 masq 2
+    real=127.0.0.1:50002 masq 1
+    scheduler=wrr
+
diff --git a/test/script/PT/B/materials/B-34-IPv6v4-l7directord.cf b/test/script/PT/B/materials/B-34-IPv6v4-l7directord.cf
new file mode 100644 (file)
index 0000000..4faa280
--- /dev/null
@@ -0,0 +1,5 @@
+virtual=[::1]:50000
+    real=127.0.0.1:50001 masq 2
+    real=127.0.0.1:50002 masq 1
+    scheduler=wrr
+
diff --git a/test/script/PT/B/materials/B-34-IPv6v6-l7directord.cf b/test/script/PT/B/materials/B-34-IPv6v6-l7directord.cf
new file mode 100644 (file)
index 0000000..2608df8
--- /dev/null
@@ -0,0 +1,5 @@
+virtual=[::1]:50000
+    real=[::1]:50001 masq 2
+    real=[::1]:50002 masq 1
+    scheduler=wrr
+
diff --git a/test/script/PT/B/materials/B-35-IPv4v4-l7directord.cf b/test/script/PT/B/materials/B-35-IPv4v4-l7directord.cf
new file mode 100644 (file)
index 0000000..9434e78
--- /dev/null
@@ -0,0 +1,5 @@
+virtual=127.0.0.1:50000
+    real=127.0.0.1:50001
+    real=127.0.0.1:50002
+    scheduler=lc
+
diff --git a/test/script/PT/B/materials/B-35-IPv6v4-l7directord.cf b/test/script/PT/B/materials/B-35-IPv6v4-l7directord.cf
new file mode 100644 (file)
index 0000000..5e9d79c
--- /dev/null
@@ -0,0 +1,5 @@
+virtual=[::1]:50000
+    real=127.0.0.1:50001
+    real=127.0.0.1:50002
+    scheduler=lc
+
diff --git a/test/script/PT/B/materials/B-35-IPv6v6-l7directord.cf b/test/script/PT/B/materials/B-35-IPv6v6-l7directord.cf
new file mode 100644 (file)
index 0000000..c03810e
--- /dev/null
@@ -0,0 +1,5 @@
+virtual=[::1]:50000
+    real=[::1]:50001
+    real=[::1]:50002
+    scheduler=rr
+