OSSP CVS Repository

ossp - Difference in ossp-pkg/lmtp2nntp/test.sh versions 1.8 and 1.9
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/lmtp2nntp/test.sh 1.8 -> 1.9

--- test.sh      2001/11/14 14:22:25     1.8
+++ test.sh      2002/02/05 14:14:54     1.9
@@ -16,10 +16,10 @@
 Message-Id: <200108141251.f7ECpmn74812@dev.de.cw.net>
 From: Thomas Lotterer <Thomas.Lotterer@example.com>
 Received: from cw.example.com (cw.example.com [10.1.1.32])
-    by gateway.example.com (8.9.2/8.9.2/$Revision: 1.8 $) with SMTP id NAA08840
+    by gateway.example.com (8.9.2/8.9.2/$Revision: 1.9 $) with SMTP id NAA08840
     for <thomas.lotterer@gateway.example.com>; Mon, 2 Apr 2001 13:20:25 +0200 (MET DST)
 Received: from history (history.example.org [195.143.102.41])
-    by cw.example.com (8.11.0/8.11.0/$Revision: 1.8 $) with ESMTP id f32BKPb12235
+    by cw.example.com (8.11.0/8.11.0/$Revision: 1.9 $) with ESMTP id f32BKPb12235
     for <thomas.lotterer@example.com>; Mon, 2 Apr 2001 13:20:25 +0200
 Received: from example.org (littlemua.example.org [195.143.103.160])
         by history (8.8.8/8.8.8) with ESMTP id LAA12678;
@@ -77,8 +77,12 @@
 TMPFILE="${PREFIX}tmp"
 DMALLOC="${PREFIX}dmalloc.log"
 
-    LOG="debug"
-   FILE="${PREFIX}stdlog"
+ L2CONF="${PREFIX}logspec"
+ L2FILE="${PREFIX}log"
+ L2SPEC="'debug: prefix(prefix=\"%%b %%d %%H:%%M:%%S <%%L> lmtp2nntp[%%P]: \",timezone=local) -> file(path=\"${L2FILE}\",append=0,perm=432)'" 
+ echo >${L2CONF} "l2spec ${L2SPEC}"
+    LOG="-i ${L2CONF}"
+
   STDIN="${PREFIX}stdin"
  STDOUT="${PREFIX}stdout"
  STDERR="${PREFIX}stderr"
@@ -108,8 +112,38 @@
 prolog
 newmsg
 ./lmtp2nntp -? >${STDOUT} 2>${STDERR}
-RC=`cat ${STDERR} | egrep -- '-C.*-D.*-K.*-P.*-V.*-a.*-b.*-d.*-g.*-h.*-l.*-m.*-n.*-o.*-r.*-s.*-t.*-v.*newsgroup' | wc -l`
-if [ ${RC} -ne 1 -o -s ${STDOUT} ]; then
+RC="";
+if [ 1 -eq `egrep <${STDOUT} -- '-C.*--childsmax'       | wc -l` ]; then RC="${RC}-C "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '-D.*--daemonize'       | wc -l` ]; then RC="${RC}-D "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '-K.*--kill'            | wc -l` ]; then RC="${RC}-K "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '-P.*--pidfile'         | wc -l` ]; then RC="${RC}-P "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '-a.*--acl'             | wc -l` ]; then RC="${RC}-a "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '-b.*--bind'            | wc -l` ]; then RC="${RC}-b "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '-c.*--client'          | wc -l` ]; then RC="${RC}-c "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '-d.*--destination'     | wc -l` ]; then RC="${RC}-d "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '-g.*--groupmode'       | wc -l` ]; then RC="${RC}-g "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '-h.*--headervalue'     | wc -l` ]; then RC="${RC}-h "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '-i.*--include'         | wc -l` ]; then RC="${RC}-i "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '--timeoutlmtp'         | wc -l` ]; then RC="${RC}--timeoutlmtp "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '--timeoutlmtpaccept'   | wc -l` ]; then RC="${RC}--timeoutlmtpaccept "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '--timeoutlmtpread'     | wc -l` ]; then RC="${RC}--timeoutlmtpread "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '--timeoutlmtpwrite'    | wc -l` ]; then RC="${RC}--timeoutlmtpwrite "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '--timeoutnntp'         | wc -l` ]; then RC="${RC}--timeoutnntp "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '--timeoutnntpconnect'  | wc -l` ]; then RC="${RC}--timeoutnntpconnect "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '--timeoutnntpread'     | wc -l` ]; then RC="${RC}--timeoutnntpread "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '--timeoutnntpwrite'    | wc -l` ]; then RC="${RC}--timeoutnntpwrite "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '-l.*--l2spec'          | wc -l` ]; then RC="${RC}-l "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '-m.*--mailfrom'        | wc -l` ]; then RC="${RC}-m "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '-n.*--nodename'        | wc -l` ]; then RC="${RC}-n "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '-o.*--operationmode'   | wc -l` ]; then RC="${RC}-o "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '-r.*--restrictheader'  | wc -l` ]; then RC="${RC}-r "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '-s.*--size'            | wc -l` ]; then RC="${RC}-s "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '-u.*--user'            | wc -l` ]; then RC="${RC}-u "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '-v.*--version'         | wc -l` ]; then RC="${RC}-v "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '--newsgroup'           | wc -l` ]; then RC="${RC}--newsgroup "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '-?.*--help'            | wc -l` ]; then RC="${RC}-? "; fi
+if [ 1 -eq `egrep <${STDOUT} -- '--usage'               | wc -l` ]; then RC="${RC}--usage "; fi
+if [ "${RC}" != "-C -D -K -P -a -b -c -d -g -h -i --timeoutlmtpaccept --timeoutlmtpread --timeoutlmtpwrite --timeoutnntpconnect --timeoutnntpread --timeoutnntpwrite -l -m -n -o -r -s -u -v --newsgroup -? --usage " ]; then
     echo "NO (got ${RC})"
     exit 1;
 fi
@@ -118,7 +152,8 @@
 echon "checking whether a valid fake posting succeeds ... "
 prolog
 newmsg
-./lmtp2nntp <${STDIN} -c ${LOCAL} -o 250/2.0.0 -g arg -d ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 1500 -t nntp:connect=1 ${GROUP} >${STDOUT} 2>${STDERR} ; RC=$
+echo ./lmtp2nntp ${STDIN} -c ${LOCAL} -o 250/2.0.0 -g arg -d ${HOST} ${LOG} -m "${MFILT}" -n ${NODE} -s 1500 -t nntp:connect=1 ${GROUP} ${STDOUT} 2${STDERR} ; RC=$
+./lmtp2nntp <${STDIN} -c ${LOCAL} -o 250/2.0.0 -g arg -d ${HOST} ${LOG} -m "${MFILT}" -n ${NODE} -s 1500 -t nntp:connect=1 ${GROUP} >${STDOUT} 2>${STDERR} ; RC=$
 RC="";
 if [ 1 -eq `egrep <${STDOUT} '^220[- ]LMTP Service ready'       | wc -l` ]; then RC="${RC}init "; fi
 if [ 1 -eq `egrep <${STDOUT} '^250[- ].*pleased to meet you'    | wc -l` ]; then RC="${RC}LHLO "; fi
@@ -129,6 +164,10 @@
 if [ 1 -eq `egrep <${STDOUT} '^221[- ]2.0.0.+closing.+channel'  | wc -l` ]; then RC="${RC}QUIT "; fi
 if [ "${RC}" != "init LHLO MAIL RCPT DATA post QUIT " ]; then
     echo "NO (got ${RC})"
+    echo STDIN  cat ${STDIN}
+    echo STDOUT cat ${STDOUT}
+    echo STDERR cat ${STDERR}
+    echo LOG    cat ${L2FILE}
     exit 1;
 fi
 echo "yes"
@@ -136,7 +175,7 @@
 echon "checking whether -m option blocks invalid sender ... "
 prolog
 newmsg
-( MFILT=".*@is.invalid" ; ./lmtp2nntp <${STDIN} -c ${LOCAL} -o 250/2.0.0 -g arg -d ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 1500 -t nntp:connect=1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$?
+( MFILT=".*@is.invalid" ; ./lmtp2nntp <${STDIN} -c ${LOCAL} -o 250/2.0.0 -g arg -d ${HOST} ${LOG} -m "${MFILT}" -n ${NODE} -s 1500 -t nntp:connect=1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$?
 RC="";
 if [ 1 -eq `egrep <${STDOUT} '^220[- ]LMTP Service ready'       | wc -l` ]; then RC="${RC}init "; fi
 if [ 1 -eq `egrep <${STDOUT} '^250[- ].+pleased to meet you'    | wc -l` ]; then RC="${RC}LHLO "; fi
@@ -154,7 +193,7 @@
 echon "checking whether -s option rejects article with invalid size ... "
 prolog
 newmsg
-./lmtp2nntp <${STDIN} -c ${LOCAL} -o 250/2.0.0 -g arg -d ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 100 -t nntp:connect=1 ${GROUP} >${STDOUT} 2>${STDERR} ; RC=$?
+./lmtp2nntp <${STDIN} -c ${LOCAL} -o 250/2.0.0 -g arg -d ${HOST} ${LOG} -m "${MFILT}" -n ${NODE} -s 100 -t nntp:connect=1 ${GROUP} >${STDOUT} 2>${STDERR} ; RC=$?
 RC="";
 if [ 1 -eq `egrep <${STDOUT} '^220[- ]LMTP Service ready'       | wc -l` ]; then RC="${RC}init "; fi
 if [ 1 -eq `egrep <${STDOUT} '^250[- ].*pleased to meet you'    | wc -l` ]; then RC="${RC}LHLO "; fi
@@ -172,7 +211,7 @@
 echon "checking whether -c option fails on invalid local host address ... "
 prolog
 newmsg
-( LOCAL="10.255.255.255" ; ./lmtp2nntp <${STDIN} -c ${LOCAL} -o 250/2.0.0 -g arg -d ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 1500 -t nntp:connect=1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$?
+( LOCAL="10.255.255.255" ; ./lmtp2nntp <${STDIN} -c ${LOCAL} -o 250/2.0.0 -g arg -d ${HOST} ${LOG} -m "${MFILT}" -n ${NODE} -s 1500 -t nntp:connect=1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$?
 RC="";
 if [ 1 -eq `egrep <${STDOUT} '^220[- ]LMTP Service ready'       | wc -l` ]; then RC="${RC}init "; fi
 if [ 1 -eq `egrep <${FILE}   'error.+binding'                   | wc -l` ]; then RC="${RC}bind "; fi
@@ -185,7 +224,7 @@
 echon "checking whether -g envelope option blocks invalid group ... "
 prolog
 newmsg
-( GROUP="foo.*" ; ./lmtp2nntp <${STDIN} -c ${LOCAL} -o 250/2.0.0 -g envelope -d ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 1500 -t nntp:connect=1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$?
+( GROUP="foo.*" ; ./lmtp2nntp <${STDIN} -c ${LOCAL} -o 250/2.0.0 -g envelope -d ${HOST} ${LOG} -m "${MFILT}" -n ${NODE} -s 1500 -t nntp:connect=1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$?
 RC="";
 if [ 1 -eq `egrep <${STDOUT} '^220[- ]LMTP Service ready'       | wc -l` ]; then RC="${RC}init "; fi
 if [ 1 -eq `egrep <${STDOUT} '^250[- ].*pleased to meet you'    | wc -l` ]; then RC="${RC}LHLO "; fi
@@ -204,7 +243,7 @@
 echon "checking whether -d option times out for invalid host ... "
 prolog
 newmsg
-( HOST="10.255.255.255" ; ./lmtp2nntp <${STDIN} -c ${LOCAL} -o 250/2.0.0 -g arg -d ${HOST} -l ${LOG}:${FILE} -m "${MFILT}" -n ${NODE} -s 1500 -t nntp:connect=1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$?
+( HOST="10.255.255.255" ; ./lmtp2nntp <${STDIN} -c ${LOCAL} -o 250/2.0.0 -g arg -d ${HOST} ${LOG} -m "${MFILT}" -n ${NODE} -s 1500 -t nntp:connect=1 ${GROUP} >${STDOUT} 2>${STDERR} ) ; RC=$?
 RC="";
 if [ 1 -eq `egrep <${STDOUT} '^220[- ]LMTP Service ready'       | wc -l` ]; then RC="${RC}init "; fi
 if [ 1 -eq `egrep <${FILE}   'warning.+connect.+failed'         | wc -l` ]; then RC="${RC}conn "; fi

CVSTrac 2.0.1