From 9c9f2180f398e9316e005fdbc262800919e3d76e Mon Sep 17 00:00:00 2001 From: Andy Green Date: Fri, 4 Dec 2015 12:04:59 +0800 Subject: [PATCH] attack.sh update for test server changes Currently he can survive all the tests correctly Signed-off-by: Andy Green --- test-server/attack.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test-server/attack.sh b/test-server/attack.sh index 16ed1b57..3413b44e 100755 --- a/test-server/attack.sh +++ b/test-server/attack.sh @@ -6,6 +6,9 @@ SERVER=127.0.0.1 PORT=7681 LOG=/tmp/lwslog +A=`which libwebsockets-test-server` +INSTALLED=`dirname $A` + CPID= LEN=0 @@ -18,7 +21,7 @@ function check { dd if=$LOG bs=1 skip=$LEN 2>/dev/null if [ "$1" = "default" ] ; then - diff /tmp/lwscap /usr/share/libwebsockets-test-server/test.html > /dev/null + diff /tmp/lwscap $INSTALLED/../share/libwebsockets-test-server/test.html > /dev/null if [ $? -ne 0 ] ; then echo "FAIL: got something other than test.html back" exit 1 @@ -26,7 +29,7 @@ function check { fi if [ "$1" = "forbidden" ] ; then - if [ -z "`grep '

403 Forbidden

' /tmp/lwscap`" ] ; then + if [ -z "`grep '

403

' /tmp/lwscap`" ] ; then echo "FAIL: should have told forbidden (test server has no dirs)" exit 1 fi