OSDN Git Service

Add test scripts
author6638678 <6638678@1ed66053-1c2d-0410-8867-f7571e6e31d3>
Fri, 17 Sep 2010 08:29:17 +0000 (08:29 +0000)
committer6638678 <6638678@1ed66053-1c2d-0410-8867-f7571e6e31d3>
Fri, 17 Sep 2010 08:29:17 +0000 (08:29 +0000)
git-svn-id: http://10.144.169.20/repos/um/branches/l7vsd-3.x-ramiel-epoll-cond@10307 1ed66053-1c2d-0410-8867-f7571e6e31d3

16 files changed:
test/script/session/session-76-1.sh [new file with mode: 0755]
test/script/session/session-76-2.sh [new file with mode: 0755]
test/script/session/session-77-1.sh [new file with mode: 0755]
test/script/session/session-77-2.sh [new file with mode: 0755]
test/script/session/session-78-1.sh [new file with mode: 0755]
test/script/session/session-78-2.sh [new file with mode: 0755]
test/script/session/session-79-1.sh [new file with mode: 0755]
test/script/session/session-79-2.sh [new file with mode: 0755]
test/script/session/session-80-1.sh [new file with mode: 0755]
test/script/session/session-80-2.sh [new file with mode: 0755]
test/script/session/session-81-1.sh [new file with mode: 0755]
test/script/session/session-81-2.sh [new file with mode: 0755]
test/script/session/session-82-1.sh [new file with mode: 0755]
test/script/session/session-82-2.sh [new file with mode: 0755]
test/script/session/session-83-1.sh [new file with mode: 0755]
test/script/session/session-83-2.sh [new file with mode: 0755]

diff --git a/test/script/session/session-76-1.sh b/test/script/session/session-76-1.sh
new file mode 100755 (executable)
index 0000000..9800c52
--- /dev/null
@@ -0,0 +1,57 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+
+#Run http server
+RealServer1=RealServer1
+RealServer1_ADDR=127.0.0.1
+RealServer1_PORT=50001
+start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT -l ${L7VS_LOG_DIR}/session-76-real1-access.log
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer1"
+        exit 1
+fi
+
+# Start l7vsd
+$L7VSD
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSD"
+        exit 1
+fi
+usleep 100000
+
+# Add service
+$L7VSADM -A -t 127.0.0.1:40001 -m sessionless
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m sessionless"
+        exit 1
+fi
+
+$L7VSADM -a -t 127.0.0.1:40001 -m sessionless -r ${RealServer1_ADDR}:${RealServer1_PORT} -M
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -a -t 127.0.0.1:40001 -m sessionless -r ${RealServer1_ADDR}:${RealServer1_PORT} -M"
+        exit 1
+fi
+
+#Connect
+RET=`curl --retry 0 --interface 127.0.0.5 http://127.0.0.1:40001/`
+if [ "${RET}" != "${RealServer1}" ]
+then
+        echo "curl --retry 0 --interface 127.0.0.5 http://127.0.0.1:40001/"
+        exit 1
+fi
+
+#Check access logs
+RET=`cat ${L7VS_LOG_DIR}/session-76-real1-access.log | awk '{print $1}'`
+EXPECT="127.0.0.1"
+if [ "$RET" != "$EXPECT" ]
+then
+        echo "Test failed: ${L7VS_LOG_DIR}/session-76-real1-access.log"
+        exit 1
+fi
+
+exit 0
+
diff --git a/test/script/session/session-76-2.sh b/test/script/session/session-76-2.sh
new file mode 100755 (executable)
index 0000000..4c6aab3
--- /dev/null
@@ -0,0 +1,58 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+
+#Run http server
+RealServer1=RealServer1
+RealServer1_ADDR=[::1]
+RealServer1_PORT=50001
+start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT -l ${L7VS_LOG_DIR}/session-76-2-real1-access.log -i
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer1"
+        exit 1
+fi
+
+# Start l7vsd
+$L7VSD
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSD"
+        exit 1
+fi
+usleep 100000
+
+# Add service
+$L7VSADM -A -t [::1]:40001 -m sessionless
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -A -t [::1]:40001 -m sessionless"
+        exit 1
+fi
+
+$L7VSADM -a -t [::1]:40001 -m sessionless -r ${RealServer1_ADDR}:${RealServer1_PORT} -M
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -a -t [::1]:40001 -m sessionless -r ${RealServer1_ADDR}:${RealServer1_PORT} -M"
+        exit 1
+fi
+
+#Connect
+ifconfig lo add ::5
+RET=`curl -g --retry 0 --interface ::5 http://[::1]:40001/`
+if [ "${RET}" != "${RealServer1}" ]
+then
+        echo "curl --retry 0 --interface ::5 http://[::1]:40001/"
+        exit 1
+fi
+
+#Check access logs
+RET=`cat ${L7VS_LOG_DIR}/session-76-2-real1-access.log | awk '{print $1}'`
+EXPECT="::1"
+if [ "$RET" != "$EXPECT" ]
+then
+        echo "Test failed: ${L7VS_LOG_DIR}/session-76-2-real1-access.log"
+        exit 1
+fi
+
+exit 0
+
diff --git a/test/script/session/session-77-1.sh b/test/script/session/session-77-1.sh
new file mode 100755 (executable)
index 0000000..cd28a77
--- /dev/null
@@ -0,0 +1,57 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+
+#Run http server
+RealServer1=RealServer1
+RealServer1_ADDR=127.0.0.1
+RealServer1_PORT=50001
+start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT -l ${L7VS_LOG_DIR}/session-77-real1-access.log
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer1"
+        exit 1
+fi
+
+# Start l7vsd
+$L7VSD
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSD"
+        exit 1
+fi
+usleep 100000
+
+# Add service
+$L7VSADM -A -t 127.0.0.1:40001 -m sessionless
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m sessionless"
+        exit 1
+fi
+
+$L7VSADM -a -t 127.0.0.1:40001 -m sessionless -r ${RealServer1_ADDR}:${RealServer1_PORT} -T
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -a -t 127.0.0.1:40001 -m sessionless -r ${RealServer1_ADDR}:${RealServer1_PORT} -T"
+        exit 1
+fi
+
+#Connect
+RET=`curl --retry 0 --interface 127.0.0.5 http://127.0.0.1:40001/`
+if [ "${RET}" != "${RealServer1}" ]
+then
+        echo "curl --retry 0 --interface 127.0.0.5 http://127.0.0.1:40001/"
+        exit 1
+fi
+
+#Check access logs
+RET=`cat ${L7VS_LOG_DIR}/session-77-real1-access.log | awk '{print $1}'`
+EXPECT="127.0.0.5"
+if [ "$RET" != "$EXPECT" ]
+then
+        echo "Test failed: ${L7VS_LOG_DIR}/session-77-real1-access.log"
+        exit 1
+fi
+
+exit 0
+
diff --git a/test/script/session/session-77-2.sh b/test/script/session/session-77-2.sh
new file mode 100755 (executable)
index 0000000..688637d
--- /dev/null
@@ -0,0 +1,58 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+
+#Run http server
+RealServer1=RealServer1
+RealServer1_ADDR=[::1]
+RealServer1_PORT=50001
+start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT -l ${L7VS_LOG_DIR}/session-77-2-real1-access.log -i
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer1"
+        exit 1
+fi
+
+# Start l7vsd
+$L7VSD
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSD"
+        exit 1
+fi
+usleep 100000
+
+# Add service
+$L7VSADM -A -t [::1]:40001 -m sessionless
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -A -t [::1]:40001 -m sessionless"
+        exit 1
+fi
+
+$L7VSADM -a -t [::1]:40001 -m sessionless -r ${RealServer1_ADDR}:${RealServer1_PORT} -T
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -a -t [::1]:40001 -m sessionless -r ${RealServer1_ADDR}:${RealServer1_PORT} -T"
+        exit 1
+fi
+
+#Connect
+ifconfig lo add ::5
+RET=`curl -g --retry 0 --interface ::5 http://[::1]:40001/`
+if [ "${RET}" != "${RealServer1}" ]
+then
+        echo "curl --retry 0 --interface ::5 http://[::1]:40001/"
+        exit 1
+fi
+
+#Check access logs
+RET=`cat ${L7VS_LOG_DIR}/session-77-2-real1-access.log | awk '{print $1}'`
+EXPECT="::5"
+if [ "$RET" != "$EXPECT" ]
+then
+        echo "Test failed: ${L7VS_LOG_DIR}/session-77-2-real1-access.log"
+        exit 1
+fi
+
+exit 0
+
diff --git a/test/script/session/session-78-1.sh b/test/script/session/session-78-1.sh
new file mode 100755 (executable)
index 0000000..557b1d7
--- /dev/null
@@ -0,0 +1,51 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+
+#Run http server
+SorryServer=SorryServer
+SorryServer_ADDR=127.0.0.1
+SorryServer_PORT=50001
+start_lighttpd -s $SorryServer -a $SorryServer_ADDR -p $SorryServer_PORT -l ${L7VS_LOG_DIR}/session-78-sorry-access.log
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd SorryServer"
+        exit 1
+fi
+
+# Start l7vsd
+$L7VSD
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSD"
+        exit 1
+fi
+usleep 100000
+
+# Add service
+$L7VSADM -A -t 127.0.0.1:40001 -m sessionless -b ${SorryServer_ADDR}:${SorryServer_PORT} -M
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m sessionless -b ${SorryServer_ADDR}:${SorryServer_PORT} -M
+"
+        exit 1
+fi
+
+#Connect
+RET=`curl --retry 0 --interface 127.0.0.5 http://127.0.0.1:40001/`
+if [ "${RET}" != "${SorryServer}" ]
+then
+        echo "curl --retry 0 --interface 127.0.0.5 http://127.0.0.1:40001/"
+        exit 1
+fi
+
+#Check access logs
+RET=`cat ${L7VS_LOG_DIR}/session-78-sorry-access.log | awk '{print $1}'`
+EXPECT="127.0.0.1"
+if [ "$RET" != "$EXPECT" ]
+then
+        echo "Test failed: ${L7VS_LOG_DIR}/session-78-sorry-access.log"
+        exit 1
+fi
+
+exit 0
+
diff --git a/test/script/session/session-78-2.sh b/test/script/session/session-78-2.sh
new file mode 100755 (executable)
index 0000000..720e5f9
--- /dev/null
@@ -0,0 +1,52 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+
+#Run http server
+SorryServer=SorryServer
+SorryServer_ADDR=[::1]
+SorryServer_PORT=50001
+start_lighttpd -s $SorryServer -a $SorryServer_ADDR -p $SorryServer_PORT -l ${L7VS_LOG_DIR}/session-78-2-sorry-access.log -i
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd SorryServer"
+        exit 1
+fi
+
+# Start l7vsd
+$L7VSD
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSD"
+        exit 1
+fi
+usleep 100000
+
+# Add service
+$L7VSADM -A -t [::1]:40001 -m sessionless -b ${SorryServer_ADDR}:${SorryServer_PORT} -M
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -A -t [::1]:40001 -m sessionless -b ${SorryServer_ADDR}:${SorryServer_PORT} -M
+"
+        exit 1
+fi
+
+#Connect
+ifconfig lo add ::5
+RET=`curl -g --retry 0 --interface ::5 http://[::1]:40001/`
+if [ "${RET}" != "${SorryServer}" ]
+then
+        echo "curl --retry 0 --interface ::5 http://[::1]:40001/"
+        exit 1
+fi
+
+#Check access logs
+RET=`cat ${L7VS_LOG_DIR}/session-78-2-sorry-access.log | awk '{print $1}'`
+EXPECT="::1"
+if [ "$RET" != "$EXPECT" ]
+then
+        echo "Test failed: ${L7VS_LOG_DIR}/session-78-2-sorry-access.log"
+        exit 1
+fi
+
+exit 0
+
diff --git a/test/script/session/session-79-1.sh b/test/script/session/session-79-1.sh
new file mode 100755 (executable)
index 0000000..721c79a
--- /dev/null
@@ -0,0 +1,51 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+
+#Run http server
+SorryServer=SorryServer
+SorryServer_ADDR=127.0.0.1
+SorryServer_PORT=50001
+start_lighttpd -s $SorryServer -a $SorryServer_ADDR -p $SorryServer_PORT -l ${L7VS_LOG_DIR}/session-79-sorry-access.log
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd SorryServer"
+        exit 1
+fi
+
+# Start l7vsd
+$L7VSD
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSD"
+        exit 1
+fi
+usleep 100000
+
+# Add service
+$L7VSADM -A -t 127.0.0.1:40001 -m sessionless -b ${SorryServer_ADDR}:${SorryServer_PORT} -T
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m sessionless -b ${SorryServer_ADDR}:${SorryServer_PORT} -T
+"
+        exit 1
+fi
+
+#Connect
+RET=`curl --retry 0 --interface 127.0.0.5 http://127.0.0.1:40001/`
+if [ "${RET}" != "${SorryServer}" ]
+then
+        echo "curl --retry 0 --interface 127.0.0.5 http://127.0.0.1:40001/"
+        exit 1
+fi
+
+#Check access logs
+RET=`cat ${L7VS_LOG_DIR}/session-79-sorry-access.log | awk '{print $1}'`
+EXPECT="127.0.0.5"
+if [ "$RET" != "$EXPECT" ]
+then
+        echo "Test failed: ${L7VS_LOG_DIR}/session-79-sorry-access.log"
+        exit 1
+fi
+
+exit 0
+
diff --git a/test/script/session/session-79-2.sh b/test/script/session/session-79-2.sh
new file mode 100755 (executable)
index 0000000..f4dc18c
--- /dev/null
@@ -0,0 +1,52 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+
+#Run http server
+SorryServer=SorryServer
+SorryServer_ADDR=[::1]
+SorryServer_PORT=50001
+start_lighttpd -s $SorryServer -a $SorryServer_ADDR -p $SorryServer_PORT -l ${L7VS_LOG_DIR}/session-79-2-sorry-access.log -i
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd SorryServer"
+        exit 1
+fi
+
+# Start l7vsd
+$L7VSD
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSD"
+        exit 1
+fi
+usleep 100000
+
+# Add service
+$L7VSADM -A -t [::1]:40001 -m sessionless -b ${SorryServer_ADDR}:${SorryServer_PORT} -T
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -A -t [::1]:40001 -m sessionless -b ${SorryServer_ADDR}:${SorryServer_PORT} -T
+"
+        exit 1
+fi
+
+#Connect
+ifconfig lo add ::5
+RET=`curl -g --retry 0 --interface ::5 http://[::1]:40001/`
+if [ "${RET}" != "${SorryServer}" ]
+then
+        echo "curl --retry 0 --interface ::5 http://[::1]:40001/"
+        exit 1
+fi
+
+#Check access logs
+RET=`cat ${L7VS_LOG_DIR}/session-79-2-sorry-access.log | awk '{print $1}'`
+EXPECT="::5"
+if [ "$RET" != "$EXPECT" ]
+then
+        echo "Test failed: ${L7VS_LOG_DIR}/session-79-2-sorry-access.log"
+        exit 1
+fi
+
+exit 0
+
diff --git a/test/script/session/session-80-1.sh b/test/script/session/session-80-1.sh
new file mode 100755 (executable)
index 0000000..8d03d99
--- /dev/null
@@ -0,0 +1,57 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+
+#Run http server
+RealServer1=RealServer1
+RealServer1_ADDR=127.0.0.1
+RealServer1_PORT=50001
+start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT -l ${L7VS_LOG_DIR}/session-80-real1-access.log
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer1"
+        exit 1
+fi
+
+# Start l7vsd
+$L7VSD
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSD"
+        exit 1
+fi
+usleep 100000
+
+# Add service
+$L7VSADM -A -t 127.0.0.1:40001 -m sessionless -z $L7VSD_CONF_DIR/sslproxy/sslproxy.target.cf
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m sessionless"
+        exit 1
+fi
+
+$L7VSADM -a -t 127.0.0.1:40001 -m sessionless -r ${RealServer1_ADDR}:${RealServer1_PORT} -M
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -a -t 127.0.0.1:40001 -m sessionless -r ${RealServer1_ADDR}:${RealServer1_PORT} -M"
+        exit 1
+fi
+
+#Connect
+RET=`curl --retry 0 -k --interface 127.0.0.5 https://127.0.0.1:40001/`
+if [ "${RET}" != "${RealServer1}" ]
+then
+        echo "curl --retry 0 -k --interface 127.0.0.5 https://127.0.0.1:40001/"
+        exit 1
+fi
+
+#Check access logs
+RET=`cat ${L7VS_LOG_DIR}/session-80-real1-access.log | awk '{print $1}'`
+EXPECT="127.0.0.1"
+if [ "$RET" != "$EXPECT" ]
+then
+        echo "Test failed: ${L7VS_LOG_DIR}/session-80-real1-access.log"
+        exit 1
+fi
+
+exit 0
+
diff --git a/test/script/session/session-80-2.sh b/test/script/session/session-80-2.sh
new file mode 100755 (executable)
index 0000000..14bf294
--- /dev/null
@@ -0,0 +1,58 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+
+#Run http server
+RealServer1=RealServer1
+RealServer1_ADDR=[::1]
+RealServer1_PORT=50001
+start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT -l ${L7VS_LOG_DIR}/session-80-2-real1-access.log -i
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer1"
+        exit 1
+fi
+
+# Start l7vsd
+$L7VSD
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSD"
+        exit 1
+fi
+usleep 100000
+
+# Add service
+$L7VSADM -A -t [::1]:40001 -m sessionless -z $L7VSD_CONF_DIR/sslproxy/sslproxy.target.cf
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -A -t [::1]:40001 -m sessionless"
+        exit 1
+fi
+
+$L7VSADM -a -t [::1]:40001 -m sessionless -r ${RealServer1_ADDR}:${RealServer1_PORT} -M
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -a -t [::1]:40001 -m sessionless -r ${RealServer1_ADDR}:${RealServer1_PORT} -M"
+        exit 1
+fi
+
+#Connect
+ifconfig lo add ::5
+RET=`curl -g --retry 0 -k --interface ::5 https://[::1]:40001/`
+if [ "${RET}" != "${RealServer1}" ]
+then
+        echo "curl --retry 0 -k --interface 127.0.0.5 https://[::1]:40001/"
+        exit 1
+fi
+
+#Check access logs
+RET=`cat ${L7VS_LOG_DIR}/session-80-2-real1-access.log | awk '{print $1}'`
+EXPECT="::1"
+if [ "$RET" != "$EXPECT" ]
+then
+        echo "Test failed: ${L7VS_LOG_DIR}/session-80-2-real1-access.log"
+        exit 1
+fi
+
+exit 0
+
diff --git a/test/script/session/session-81-1.sh b/test/script/session/session-81-1.sh
new file mode 100755 (executable)
index 0000000..756b82c
--- /dev/null
@@ -0,0 +1,57 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+
+#Run http server
+RealServer1=RealServer1
+RealServer1_ADDR=127.0.0.1
+RealServer1_PORT=50001
+start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT -l ${L7VS_LOG_DIR}/session-81-real1-access.log
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer1"
+        exit 1
+fi
+
+# Start l7vsd
+$L7VSD
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSD"
+        exit 1
+fi
+usleep 100000
+
+# Add service
+$L7VSADM -A -t 127.0.0.1:40001 -m sessionless -z $L7VSD_CONF_DIR/sslproxy/sslproxy.target.cf
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m sessionless"
+        exit 1
+fi
+
+$L7VSADM -a -t 127.0.0.1:40001 -m sessionless -r ${RealServer1_ADDR}:${RealServer1_PORT} -T
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -a -t 127.0.0.1:40001 -m sessionless -r ${RealServer1_ADDR}:${RealServer1_PORT} -T"
+        exit 1
+fi
+
+#Connect
+RET=`curl --retry 0 -k --interface 127.0.0.5 https://127.0.0.1:40001/`
+if [ "${RET}" != "${RealServer1}" ]
+then
+        echo "curl --retry 0 -k --interface 127.0.0.5 https://127.0.0.1:40001/"
+        exit 1
+fi
+
+#Check access logs
+RET=`cat ${L7VS_LOG_DIR}/session-81-real1-access.log | awk '{print $1}'`
+EXPECT="127.0.0.5"
+if [ "$RET" != "$EXPECT" ]
+then
+        echo "Test failed: ${L7VS_LOG_DIR}/session-81-real1-access.log"
+        exit 1
+fi
+
+exit 0
+
diff --git a/test/script/session/session-81-2.sh b/test/script/session/session-81-2.sh
new file mode 100755 (executable)
index 0000000..da92b3b
--- /dev/null
@@ -0,0 +1,58 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+
+#Run http server
+RealServer1=RealServer1
+RealServer1_ADDR=[::1]
+RealServer1_PORT=50001
+start_lighttpd -s $RealServer1 -a $RealServer1_ADDR -p $RealServer1_PORT -l ${L7VS_LOG_DIR}/session-81-2-real1-access.log -i
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd RealServer1"
+        exit 1
+fi
+
+# Start l7vsd
+$L7VSD
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSD"
+        exit 1
+fi
+usleep 100000
+
+# Add service
+$L7VSADM -A -t [::1]:40001 -m sessionless -z $L7VSD_CONF_DIR/sslproxy/sslproxy.target.cf
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -A -t [::1]:40001 -m sessionless"
+        exit 1
+fi
+
+$L7VSADM -a -t [::1]:40001 -m sessionless -r ${RealServer1_ADDR}:${RealServer1_PORT} -T
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -a -t [::1]:40001 -m sessionless -r ${RealServer1_ADDR}:${RealServer1_PORT} -T"
+        exit 1
+fi
+
+#Connect
+ifconfig lo add ::5
+RET=`curl -g --retry 0 -k --interface ::5 https://[::1]:40001/`
+if [ "${RET}" != "${RealServer1}" ]
+then
+        echo "curl --retry 0 -k --interface 127.0.0.5 https://[::1]:40001/"
+        exit 1
+fi
+
+#Check access logs
+RET=`cat ${L7VS_LOG_DIR}/session-81-2-real1-access.log | awk '{print $1}'`
+EXPECT="::5"
+if [ "$RET" != "$EXPECT" ]
+then
+        echo "Test failed: ${L7VS_LOG_DIR}/session-81-2-real1-access.log"
+        exit 1
+fi
+
+exit 0
+
diff --git a/test/script/session/session-82-1.sh b/test/script/session/session-82-1.sh
new file mode 100755 (executable)
index 0000000..782ae00
--- /dev/null
@@ -0,0 +1,50 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+
+#Run http server
+SorryServer=SorryServer
+SorryServer_ADDR=127.0.0.1
+SorryServer_PORT=50001
+start_lighttpd -s $SorryServer -a $SorryServer_ADDR -p $SorryServer_PORT -l ${L7VS_LOG_DIR}/session-82-sorry-access.log
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd SorryServer"
+        exit 1
+fi
+
+# Start l7vsd
+$L7VSD
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSD"
+        exit 1
+fi
+usleep 100000
+
+# Add service
+$L7VSADM -A -t 127.0.0.1:40001 -m sessionless -b ${SorryServer_ADDR}:${SorryServer_PORT} -M -z $L7VSD_CONF_DIR/sslproxy/sslproxy.target.cf
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m sessionless -b ${SorryServer_ADDR}:${SorryServer_PORT} -M -z $L7VSD_CONF_DIR/sslproxy/sslproxy.target.cf"
+        exit 1
+fi
+
+#Connect
+RET=`curl --retry 0 -k --interface 127.0.0.5 https://127.0.0.1:40001/`
+if [ "${RET}" != "${SorryServer}" ]
+then
+        echo "curl --retry 0 --interface 127.0.0.5 http://127.0.0.1:40001/"
+        exit 1
+fi
+
+#Check access logs
+RET=`cat ${L7VS_LOG_DIR}/session-82-sorry-access.log | awk '{print $1}'`
+EXPECT="127.0.0.1"
+if [ "$RET" != "$EXPECT" ]
+then
+        echo "Test failed: ${L7VS_LOG_DIR}/session-82-sorry-access.log"
+        exit 1
+fi
+
+exit 0
+
diff --git a/test/script/session/session-82-2.sh b/test/script/session/session-82-2.sh
new file mode 100755 (executable)
index 0000000..784e015
--- /dev/null
@@ -0,0 +1,51 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+
+#Run http server
+SorryServer=SorryServer
+SorryServer_ADDR=[::1]
+SorryServer_PORT=50001
+start_lighttpd -s $SorryServer -a $SorryServer_ADDR -p $SorryServer_PORT -l ${L7VS_LOG_DIR}/session-82-2-sorry-access.log -i
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd SorryServer"
+        exit 1
+fi
+
+# Start l7vsd
+$L7VSD
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSD"
+        exit 1
+fi
+usleep 100000
+
+# Add service
+$L7VSADM -A -t [::1]:40001 -m sessionless -b ${SorryServer_ADDR}:${SorryServer_PORT} -M -z $L7VSD_CONF_DIR/sslproxy/sslproxy.target.cf
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -A -t [::1]:40001 -m sessionless -b ${SorryServer_ADDR}:${SorryServer_PORT} -M -z $L7VSD_CONF_DIR/sslproxy/sslproxy.target.cf"
+        exit 1
+fi
+
+#Connect
+ifconfig lo add ::5
+RET=`curl -g --retry 0 -k --interface ::5 https://[::1]:40001/`
+if [ "${RET}" != "${SorryServer}" ]
+then
+        echo "curl -g --retry 0 --interface 127.0.0.5 http://[::1]:40001/"
+        exit 1
+fi
+
+#Check access logs
+RET=`cat ${L7VS_LOG_DIR}/session-82-2-sorry-access.log | awk '{print $1}'`
+EXPECT="::1"
+if [ "$RET" != "$EXPECT" ]
+then
+        echo "Test failed: ${L7VS_LOG_DIR}/session-82-2-sorry-access.log"
+        exit 1
+fi
+
+exit 0
+
diff --git a/test/script/session/session-83-1.sh b/test/script/session/session-83-1.sh
new file mode 100755 (executable)
index 0000000..fe2455e
--- /dev/null
@@ -0,0 +1,50 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+
+#Run http server
+SorryServer=SorryServer
+SorryServer_ADDR=127.0.0.1
+SorryServer_PORT=50001
+start_lighttpd -s $SorryServer -a $SorryServer_ADDR -p $SorryServer_PORT -l ${L7VS_LOG_DIR}/session-83-sorry-access.log
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd SorryServer"
+        exit 1
+fi
+
+# Start l7vsd
+$L7VSD
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSD"
+        exit 1
+fi
+usleep 100000
+
+# Add service
+$L7VSADM -A -t 127.0.0.1:40001 -m sessionless -b ${SorryServer_ADDR}:${SorryServer_PORT} -T -z $L7VSD_CONF_DIR/sslproxy/sslproxy.target.cf
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -A -t 127.0.0.1:40001 -m sessionless -b ${SorryServer_ADDR}:${SorryServer_PORT} -T -z $L7VSD_CONF_DIR/sslproxy/sslproxy.target.cf"
+        exit 1
+fi
+
+#Connect
+RET=`curl --retry 0 -k --interface 127.0.0.5 https://127.0.0.1:40001/`
+if [ "${RET}" != "${SorryServer}" ]
+then
+        echo "curl --retry 0 --interface 127.0.0.5 http://127.0.0.1:40001/"
+        exit 1
+fi
+
+#Check access logs
+RET=`cat ${L7VS_LOG_DIR}/session-83-sorry-access.log | awk '{print $1}'`
+EXPECT="127.0.0.5"
+if [ "$RET" != "$EXPECT" ]
+then
+        echo "Test failed: ${L7VS_LOG_DIR}/session-83-sorry-access.log"
+        exit 1
+fi
+
+exit 0
+
diff --git a/test/script/session/session-83-2.sh b/test/script/session/session-83-2.sh
new file mode 100755 (executable)
index 0000000..c9f7645
--- /dev/null
@@ -0,0 +1,51 @@
+#!/bin/bash
+. ${SET_DEFAULT_CONF}
+
+#Run http server
+SorryServer=SorryServer
+SorryServer_ADDR=[::1]
+SorryServer_PORT=50001
+start_lighttpd -s $SorryServer -a $SorryServer_ADDR -p $SorryServer_PORT -l ${L7VS_LOG_DIR}/session-83-2-sorry-access.log -i
+if [ $? -ne 0 ]
+then
+        echo "Test failed: start_lighttpd SorryServer"
+        exit 1
+fi
+
+# Start l7vsd
+$L7VSD
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSD"
+        exit 1
+fi
+usleep 100000
+
+# Add service
+$L7VSADM -A -t [::1]:40001 -m sessionless -b ${SorryServer_ADDR}:${SorryServer_PORT} -T -z $L7VSD_CONF_DIR/sslproxy/sslproxy.target.cf
+if [ $? -ne 0 ]
+then
+        echo "Test failed: $L7VSADM -A -t [::1]:40001 -m sessionless -b ${SorryServer_ADDR}:${SorryServer_PORT} -T -z $L7VSD_CONF_DIR/sslproxy/sslproxy.target.cf"
+        exit 1
+fi
+
+#Connect
+ifconfig lo add ::5
+RET=`curl -g --retry 0 -k --interface ::5 https://[::1]:40001/`
+if [ "${RET}" != "${SorryServer}" ]
+then
+        echo "curl -g --retry 0 --interface 127.0.0.5 http://[::1]:40001/"
+        exit 1
+fi
+
+#Check access logs
+RET=`cat ${L7VS_LOG_DIR}/session-83-2-sorry-access.log | awk '{print $1}'`
+EXPECT="::5"
+if [ "$RET" != "$EXPECT" ]
+then
+        echo "Test failed: ${L7VS_LOG_DIR}/session-83-2-sorry-access.log"
+        exit 1
+fi
+
+exit 0
+