• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

UltraMonkey-L7 V3(multi-thread implementation)


Commit MetaInfo

修訂1088c6365feea8bf7da63a28254549be7ffa275f (tree)
時間2010-10-08 13:21:15
作者0809216 <0809216@1ed6...>
Commiter0809216

Log Message

Add l7vsadm signal test

git-svn-id: http://10.144.169.20/repos/um/branches/l7vsd-3.x-ramiel-epoll-cond@10353 1ed66053-1c2d-0410-8867-f7571e6e31d3

Change Summary

差異

--- /dev/null
+++ b/test/script/l7vsadm/l7vsadm-12-1-1.sh
@@ -0,0 +1,31 @@
1+#!/bin/bash
2+
3+. ${SET_DEFAULT_CONF}
4+
5+# temp log
6+tmp_log="/tmp/`uuidgen`.log"
7+
8+for sig in SIGHUP SIGINT SIGQUIT SIGUSR1 SIGUSR2 SIGPIPE SIGTERM; do
9+ flock -n -x $L7VSADM $L7VSADM >> $tmp_log 2>&1 &
10+
11+ # sleep a little
12+ usleep 20000
13+
14+ # send signal
15+ kill -$sig `pidof $L7VSADM`
16+
17+ # wait for l7vsadm termination
18+ while true; do
19+ ps aux | grep $L7VSADM | grep -v grep > /dev/null 2>&1 || break
20+ done
21+done
22+
23+diff_result=`diff $tmp_log ./materials/l7vsadm-12-1-1.log`
24+if [ $? -ne 0 ]; then
25+ echo "Test failed: l7vsadm signal log was not matched."
26+ echo "$diff_result"
27+ exit 1
28+fi
29+
30+exit 0
31+
--- /dev/null
+++ b/test/script/l7vsadm/materials/l7vsadm-12-1-1.log
@@ -0,0 +1,7 @@
1+COMMON ERROR: Signal (1) Received.
2+COMMON ERROR: Signal (2) Received.
3+COMMON ERROR: Signal (3) Received.
4+COMMON ERROR: Signal (10) Received.
5+COMMON ERROR: Signal (12) Received.
6+COMMON ERROR: Signal (13) Received.
7+COMMON ERROR: Signal (15) Received.