Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Commit time: 2005-05-31 00:26:29 UTC

Modified files:
     ChangeLog ircd/test/Makefile.in ircd/test/channel-1.cmd
     ircd/test/client-1.cmd ircd/test/gline-1.cmd
     ircd/test/ircd-t1.conf ircd/test/ircd_match_t.c
     ircd/test/run-tests.sh ircd/test/stats-1.cmd
     ircd/test/test-driver.pl

Added files:
     ircd/test/commands-1.cmd ircd/test/feature-1.cmd
     ircd/test/ircd-t1-2.conf ircd/test/ircd-t2.conf
     ircd/test/jupe-1.cmd ircd/test/kill-block-1.cmd

Log message:

Add new test scripts and generally improve code coverage of tests.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.641 ircu2.10/ChangeLog:1.642
--- ircu2.10/ChangeLog:1.641    Mon May 30 14:11:38 2005
+++ ircu2.10/ChangeLog  Mon May 30 17:26:18 2005
@@ -1,5 +1,37 @@
 2005-05-30  Michael Poole <[EMAIL PROTECTED]>
 
+       * ircd/test/Makefile.in: Add LDFLAGS variable for profiling purposes.
+
+       * ircd/test/ircd_match_t.c: Test recovery from backtracking.
+
+       * ircd/test/channel-1.cmd: Modify to improve code coverage.
+
+       * ircd/test/client-1.cmd: Likewise.
+
+       * ircd/test/gline-1.cmd: Likewise.
+
+       * ircd/test/ircd-t1.conf: Likewise.
+
+       * ircd/test/stats-1.cmd: Likewise.
+
+       * ircd/test/run-tests.sh: Explicitly start ircds.  Add new test scripts.
+
+       * ircd/test/test-driver.pl: Silently handle more signals from IRC.
+
+       * ircd/test/commands-1.cmd: New test script.
+
+       * ircd/test/feature-1.cmd: New test script.
+
+       * ircd/test/jupe-1.cmd: New test script.
+
+       * ircd/test/kill-block-1.cmd: New test script.
+
+       * ircd/test/ircd-t1-2.conf: New configuration file for test scripts.
+
+       * ircd/test/ircd-t2.conf: Likewise.
+
+2005-05-30  Michael Poole <[EMAIL PROTECTED]>
+
        * ircd/s_debug.c (count_memory): Use count_listener_memory() to
        report memory used by listener structures.
 
Index: ircu2.10/ircd/test/Makefile.in
diff -u ircu2.10/ircd/test/Makefile.in:1.4 ircu2.10/ircd/test/Makefile.in:1.5
--- ircu2.10/ircd/test/Makefile.in:1.4  Mon May 30 08:11:39 2005
+++ ircu2.10/ircd/test/Makefile.in      Mon May 30 17:26:19 2005
@@ -3,6 +3,7 @@
 VPATH = @srcdir@
 CPPFLAGS = -I${top_srcdir}/include -I../..
 CFLAGS   = -g -Wall
+LDFLAGS  =
 CC = @CC@
 
 TESTPROGS = \
@@ -36,19 +37,19 @@
 
 IRCD_CHATTR_T_OBJS = ircd_chattr_t.o test_stub.o ../ircd_string.o
 ircd_chattr_t: $(IRCD_CHATTR_T_OBJS)
-       ${CC} -o $@ $(IRCD_CHATTR_T_OBJS)
+       ${CC} -o $@ $(LDFLAGS) $(IRCD_CHATTR_T_OBJS)
 
 IRCD_IN_ADDR_T_OBJS = ircd_in_addr_t.o test_stub.o ../ircd_alloc.o 
../ircd_string.o ../match.o ../numnicks.o
 ircd_in_addr_t: $(IRCD_IN_ADDR_T_OBJS)
-       ${CC} -o $@ $(IRCD_IN_ADDR_T_OBJS)
+       ${CC} -o $@ $(LDFLAGS) $(IRCD_IN_ADDR_T_OBJS)
 
 IRCD_MATCH_T_OBJS = ircd_match_t.o test_stub.o ../ircd_string.o ../match.o
 ircd_match_t: $(IRCD_MATCH_T_OBJS)
-       ${CC} -o $@ $(IRCD_MATCH_T_OBJS)
+       ${CC} -o $@ $(LDFLAGS) $(IRCD_MATCH_T_OBJS)
 
 IRCD_STRING_T_OBJS = ircd_string_t.o test_stub.o ../ircd_string.o
 ircd_string_t: $(IRCD_STRING_T_OBJS)
-       ${CC} -o $@ $(IRCD_STRING_T_OBJS)
+       ${CC} -o $@ $(LDFLAGS) $(IRCD_STRING_T_OBJS)
 
 .c.o:
        ${CC} ${CFLAGS} ${CPPFLAGS} -c $< -o $@
Index: ircu2.10/ircd/test/channel-1.cmd
diff -u ircu2.10/ircd/test/channel-1.cmd:1.2 
ircu2.10/ircd/test/channel-1.cmd:1.3
--- ircu2.10/ircd/test/channel-1.cmd:1.2        Tue May 10 21:15:04 2005
+++ ircu2.10/ircd/test/channel-1.cmd    Mon May 30 17:26:19 2005
@@ -1,29 +1,50 @@
-define srv localhost:7701
+define srv localhost
 
-connect cl1 Alex alex %srv% :Test client 1
-connect cl2 Bubb bubb %srv% :Test client 2
+connect cl1 Alex alex %srv%:7701 :Test client 1
+connect cl2 Bubb bubb %srv%:7711 :Test client 2
 :cl1 join #test
 :cl1 join #test2
 :cl1 mode #test +bb [EMAIL PROTECTED] [EMAIL PROTECTED]
 :cl2 wait cl1
-:cl2 join #test
-:cl1 wait cl2
+:cl2 raw :away :I'm not here, go away.  I'm not here, go away.  I'm not here, 
go away.  I'm not here, go away.  I'm not here, go away.  I'm not here, go 
away.  I'm not here, go away.  I'm not here, go away.  I'm not here, go away.  
I'm not here, go away.
+:cl2 raw :away :I'm not here, go away.
+:cl2 join #test,#test3,#test4,+local
+:cl1 wait cl2
+:cl1 join #test3
+:cl1 raw :invite Bubb
+:cl1 raw :invite #test
+:cl1 invite Bubb #non-existent-channel
+:cl1 invite Bubb #test3
+:cl1 invite Bubb #test4
 :cl1 invite Bubb #test
 :cl2 expect *cl1 invite #test
+:cl2 mode #test3 +o Alex
+:cl2 raw :invite
 :cl2 join #test
 :cl2 privmsg #test :Hello, *cl1.
+:cl2 notice #test :Hello, *cl1 (via notice).
+:cl2 notice @#test :Hello, *cl1 (via wallchops).
+:cl2 privmsg #test5 :Hello, *cl1.
 :cl2 nick Buba
 :cl2 mode #test +l 15
 :cl1 wait cl2
 :cl1 privmsg #test :Hello, *cl2.
+:cl1 raw :cprivmsg bubb #test :Hello, bubb.
+:cl1 raw :cnotice bubb #test :Hello, bubb.
 :cl1 mode #test -b+kv [EMAIL PROTECTED] secret Bubb
 :cl1 mode #test +b [EMAIL PROTECTED]
 :cl1 mode #test +b
 :cl1 mode #test :
 :cl1 mode #test
-:cl1 raw who #test %lfuh
+:cl1 raw :names
+:cl1 raw :names #test
+:cl1 raw :names +local
+:cl1 raw :names +local test-2.*
+:cl1 raw :who #test %lfuh
 :cl2 wait cl1
+:cl2 raw :part
 :cl2 part #test
+:cl2 part #test5
 :cl1 wait cl2
 :cl2 join #test public
 :cl2 join #test secret
@@ -45,4 +66,9 @@
 :cl2 wait cl1
 :cl2 mode #test2 -D
 :cl2 mode #test +v Alex
+:cl1 raw :kick #test bubb
+:cl2 raw :squit test-1.*
+:cl2 sleep 1
+:cl2 raw :connect test-1.*
+:cl2 raw :away :
 :cl1 wait cl2
Index: ircu2.10/ircd/test/client-1.cmd
diff -u ircu2.10/ircd/test/client-1.cmd:1.2 ircu2.10/ircd/test/client-1.cmd:1.3
--- ircu2.10/ircd/test/client-1.cmd:1.2 Tue May 10 21:15:04 2005
+++ ircu2.10/ircd/test/client-1.cmd     Mon May 30 17:26:19 2005
@@ -1,9 +1,12 @@
-define srv localhost:7701
+define srv localhost
 
-connect cl1 Alex alex %srv% :Test client 1
+connect cl1 Alex alex %srv%:7701 :Test client 1
 :cl1 oper oper1 oper1
-connect cl2 Bubb bubb %srv% :Test client 2
+:cl1 oper oper1 oper1
+connect cl2 Bubb bubb %srv%:7711 :Test client 2
+:cl1 raw :time
 :cl2 oper oper3 oper4
+:cl1 raw :version
 :cl2 oper oldoper wrongpass
 :cl2 oper md5oper wrongpass
 :cl2 oper cryptoper wrongpass
@@ -13,3 +16,10 @@
 :cl1 raw :privs Bubb
 :cl1 nick A
 :cl1 nick Alexey
+:cl1 raw :privmsg :
+:cl1 raw :privmsg Alexey :
+:cl1 raw :privmsg Bubb :hello Bubb
+:cl1 raw :privmsg $*.net :Hello all *.net servers.
+:cl1 raw :notice $*.net :Hello all *.net servers.
+:cl1 raw :kill Bubb :goodbye Bubb
+:cl1 raw :whowas Alex,Bubb 5
Index: ircu2.10/ircd/test/commands-1.cmd
diff -u /dev/null ircu2.10/ircd/test/commands-1.cmd:1.1
--- /dev/null   Mon May 30 17:26:30 2005
+++ ircu2.10/ircd/test/commands-1.cmd   Mon May 30 17:26:19 2005
@@ -0,0 +1,43 @@
+define srv localhost:7701
+
+connect cl1 Alex alex %srv% :Test client 1
+connect cl2 Bubb bubb %srv% :Test client 2
+:cl1 raw :help
+:cl1 raw :admin
+:cl1 raw :admin test-2.*
+:cl1 raw :info
+:cl1 raw :wallops :HELLO OPERZ!!!
+:cl1 wait cl2
+:cl1 raw :ison alex,bubb,alex,bubb,alex,bubb
+:cl1 raw :who b*b
+:cl1 raw :burst the bubble
+:cl1 raw :server huh huh i'm a server
+:cl1 raw :links
+:cl1 raw :map
+:cl1 raw :nick
+:cl1 raw :nick ~
+:cl1 raw :nick -dude-
+:cl1 raw :nick alex
+:cl1 raw :nick Bubb
+:cl1 raw :ping alex test-1.*
+
+:cl1 oper oper1 oper1
+:cl1 raw :admin
+:cl1 raw :admin test-2.*
+:cl1 raw :asll
+:cl1 raw :asll test-2.*
+:cl1 raw :info
+:cl1 raw :info test-2.*
+:cl1 raw :who x b*b
+:cl1 raw :close
+:cl1 raw :map
+:cl1 raw :links
+:cl1 raw :links test-2.*
+:cl1 raw :lusers
+:cl1 raw :lusers test-2.*
+:cl1 raw :motd
+:cl1 raw :motd test-2.*
+:cl1 raw :ping alex test-2.*
+:cl1 raw :rping test-2.*
+
+:cl2 raw :quit
Index: ircu2.10/ircd/test/feature-1.cmd
diff -u /dev/null ircu2.10/ircd/test/feature-1.cmd:1.1
--- /dev/null   Mon May 30 17:26:30 2005
+++ ircu2.10/ircd/test/feature-1.cmd    Mon May 30 17:26:19 2005
@@ -0,0 +1,18 @@
+define srv localhost:7701
+
+connect cl1 Alex alex %srv% :Test client 1
+:cl1 oper oper1 oper1
+:cl1 raw :GET LOG
+:cl1 raw :RESET LOG
+:cl1 raw :GET RANDOM_SEED
+:cl1 raw :SET RANDOM_SEED
+:cl1 raw :SET RANDOM_SEED abcdefghijklmnop
+:cl1 raw :GET DEFAULT_LIST_PARAM
+:cl1 raw :SET DEFAULT_LIST_PARAM FALSE
+:cl1 raw :SET DEFAULT_LIST_PARAM TRUE
+:cl1 nick Alexey
+:cl1 nick Amdahl
+:cl1 nick Andy
+:cl1 nick Aon
+:cl1 nick Apple
+:cl1 raw :SET NICKNAMEHISTORYLENGTH 4
Index: ircu2.10/ircd/test/gline-1.cmd
diff -u ircu2.10/ircd/test/gline-1.cmd:1.1 ircu2.10/ircd/test/gline-1.cmd:1.2
--- ircu2.10/ircd/test/gline-1.cmd:1.1  Tue May 10 21:15:04 2005
+++ ircu2.10/ircd/test/gline-1.cmd      Mon May 30 17:26:19 2005
@@ -7,6 +7,9 @@
 :cl1 raw :gline !+127.2.* 3600 :Localclone?
 :cl1 sleep 5
 :cl1 raw :gline !+127.2.* 3600 :Localclone?
+:cl1 raw :gline !+127.2.*/15 3600 :Localclone?
+:cl1 raw :gline !+127.2.0.0/33 3600 :Localclone?
+:cl1 raw :gline !+127.2.0.0/15 3600 :Localclone?
 connect cl2 Bubb bubb %srv% :Test client 2
 :cl1 raw :gline
 :cl1 raw :gline $Rbubb
Index: ircu2.10/ircd/test/ircd-t1-2.conf
diff -u /dev/null ircu2.10/ircd/test/ircd-t1-2.conf:1.1
--- /dev/null   Mon May 30 17:26:30 2005
+++ ircu2.10/ircd/test/ircd-t1-2.conf   Mon May 30 17:26:19 2005
@@ -0,0 +1,93 @@
+General {
+        name = "test-1.example.net";
+        vhost = "127.0.0.1";
+        vhost = "::1";
+        description = "Test Server 1";
+        numeric = 1;
+};
+
+Admin {
+        location = "Somewhere";
+        contact = "Someone";
+};
+
+Class {
+        name = "Server";
+        pingfreq = 180 seconds;
+        connectfreq = 300 seconds;
+        maxlinks = 1;
+        sendq = 9000000;
+};
+
+Class {
+        name = "others";
+        pingfreq = 180 seconds;
+        sendq = 160000;
+        maxlinks = 100;
+        usermode = "+oiwx";
+};
+
+Class {
+        name = "Opers";
+        pingfreq = 180 seconds;
+        sendq = 160000;
+        maxlinks = 10;
+        local = no;
+};
+
+Connect {
+        name = "bogus.example.net";
+        host = "example.net";
+        password = "bogus_example";
+        port = 7700;
+        class = "Server";
+        maxhops = 2;
+        hub = "*.example.net";
+        autoconnect = yes; # forces a DNS resolution attempt
+};
+
+CRule {
+        server = "bogus.example.net";
+        all = yes;
+        rule = "connected(*)";
+};
+
+CRule {
+        server = "bogus.example.net";
+        all = no;
+        rule = "directcon(*)";
+};
+
+UWorld {
+        name = "uworld.example.net";
+        name = "uworld2.example.net";
+};
+
+Jupe {
+        nick = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q";
+        nick = "R,S,T,U,V,W,X,Y,Z,{,|,},~,-,_,`";
+};
+
+Operator { name = "oper1"; host = "[EMAIL PROTECTED]"; password = 
"$PLAIN$oper1"; class = "Opers"; };
+Operator { name = "oper2"; host = "[EMAIL PROTECTED]"; password = 
"$PLAIN$oper2"; class = "Opers"; local = yes; };
+Operator { name = "oldoper"; host = "[EMAIL PROTECTED]"; password = 
"Xlfc26b4eYGWs"; class = "Opers"; };
+Operator { name = "md5oper"; host = "[EMAIL PROTECTED]"; password = 
"$SMD5$2O$4O.rSAmhE4Fg05MmG.047/"; class = "Opers"; };
+Operator { name = "cryptoper"; host = "[EMAIL PROTECTED]"; password = 
"$CRYPT$41ndrxPQu3B66"; class = "Opers"; };
+
+Kill { username = "sub7"; realname = "s*7*"; reason = "You are infected with a 
Trojan"; };
+Kill { realname = "Chloe"; reason = "drones"; };
+Kill { username = "sub7"; reason = "You are infected with a Trojan"; };
+
+Client { class = "others"; ip = "*"; };
+
+Port { server = yes; port = 7700; };
+Port { server = no;  port = 7702; };
+
+Quarantine {
+        "#shells" = "Thou shalt not support the h4><0rz";
+};
+
+Features {
+        "HIS_STATS_k" = "FALSE";
+        "PPATH" = "ircd-t1.pid";
+};
Index: ircu2.10/ircd/test/ircd-t1.conf
diff -u ircu2.10/ircd/test/ircd-t1.conf:1.2 ircu2.10/ircd/test/ircd-t1.conf:1.3
--- ircu2.10/ircd/test/ircd-t1.conf:1.2 Tue May 10 21:15:04 2005
+++ ircu2.10/ircd/test/ircd-t1.conf     Mon May 30 17:26:19 2005
@@ -46,6 +46,15 @@
         autoconnect = yes; # forces a DNS resolution attempt
 };
 
+Connect {
+        name = "test-2.example.net";
+        host = "::1";
+        password = "bogus_example";
+        port = 7710;
+        class = "Server";
+        autoconnect = no;
+};
+
 CRule {
         server = "bogus.example.net";
         all = yes;
@@ -94,4 +103,5 @@
 
 Features {
         "HIS_STATS_k" = "FALSE";
+        "PPATH" = "ircd-t1.pid";
 };
Index: ircu2.10/ircd/test/ircd-t2.conf
diff -u /dev/null ircu2.10/ircd/test/ircd-t2.conf:1.1
--- /dev/null   Mon May 30 17:26:30 2005
+++ ircu2.10/ircd/test/ircd-t2.conf     Mon May 30 17:26:19 2005
@@ -0,0 +1,95 @@
+General {
+        name = "test-2.example.net";
+        vhost = "127.0.0.1";
+        vhost = "::1";
+        description = "Test Server 2";
+        numeric = 2;
+};
+
+Admin {
+        location = "Somewhere";
+        contact = "Someone";
+};
+
+Class {
+        name = "Server";
+        pingfreq = 180 seconds;
+        connectfreq = 300 seconds;
+        maxlinks = 1;
+        sendq = 9000000;
+};
+
+Class {
+        name = "others";
+        pingfreq = 180 seconds;
+        sendq = 160000;
+        maxlinks = 100;
+        usermode = "+oiwx";
+};
+
+Class {
+        name = "Opers";
+        pingfreq = 180 seconds;
+        sendq = 160000;
+        maxlinks = 10;
+        local = no;
+};
+
+Connect {
+        name = "test-1.example.net";
+        host = "::1";
+        password = "bogus_example";
+        port = 7700;
+        class = "Server";
+        maxhops = 2;
+        hub = "*.example.net";
+        autoconnect = yes;
+};
+
+CRule {
+        server = "bogus.example.net";
+        all = yes;
+        rule = "connected(*)";
+};
+
+CRule {
+        server = "bogus.example.net";
+        all = no;
+        rule = "directcon(*)";
+};
+
+UWorld {
+        name = "uworld.example.net";
+        name = "uworld2.example.net";
+};
+
+Jupe {
+        nick = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q";
+        nick = "R,S,T,U,V,W,X,Y,Z,{,|,},~,-,_,`";
+};
+
+Operator { name = "oper1"; host = "[EMAIL PROTECTED]"; password = 
"$PLAIN$oper1"; class = "Opers"; };
+Operator { name = "oper2"; host = "[EMAIL PROTECTED]"; password = 
"$PLAIN$oper2"; class = "Opers"; local = yes; };
+
+Kill { realname = "Chloe"; reason = "drones"; };
+Kill { username = "sub7"; reason = "You are infected with a Trojan"; };
+
+Client { class = "others"; ip = "*"; };
+
+Port { server = yes; port = 7710; };
+Port { server = no;  port = 7711; mask = "127.0.0.0/8"; };
+
+Quarantine {
+        "#shells" = "Thou shalt not support the h4><0rz";
+};
+
+Pseudo "X" {
+        name = "X";
+        nick = "[EMAIL PROTECTED]";
+};
+
+Features {
+        "PPATH" = "ircd-t2.pid";
+        "LOG" = "SYSTEM" "FILE" "ircd-t2.log";
+        "LOG" = "SYSTEM" "LEVEL" "NOTICE";
+};
Index: ircu2.10/ircd/test/ircd_match_t.c
diff -u ircu2.10/ircd/test/ircd_match_t.c:1.1 
ircu2.10/ircd/test/ircd_match_t.c:1.2
--- ircu2.10/ircd/test/ircd_match_t.c:1.1       Mon May 30 08:11:39 2005
+++ ircu2.10/ircd/test/ircd_match_t.c   Mon May 30 17:26:19 2005
@@ -27,7 +27,7 @@
     "abc\0",
     "abcd\0cabc\0" },
   { "*abc",
-    "abc\0fooabc\0",
+    "abc\0fooabc\0ababc\0",
     "abra\0abcd\0" },
   { "\\?",
     "?\0",
Index: ircu2.10/ircd/test/jupe-1.cmd
diff -u /dev/null ircu2.10/ircd/test/jupe-1.cmd:1.1
--- /dev/null   Mon May 30 17:26:30 2005
+++ ircu2.10/ircd/test/jupe-1.cmd       Mon May 30 17:26:19 2005
@@ -0,0 +1,8 @@
+define srv localhost:7701
+
+connect cl1 Alex alex %srv% :Test client 1
+:cl1 oper oper1 oper1
+:cl1 raw :jupe +irc-3.example.net 3600 :Server 3 not welcome here.
+:cl1 raw :jupe -irc-3.example.net 3600 :Server 3 not welcome here.
+:cl1 raw :jupe +irc-3.example.net * 3600 :Server 3 not welcome here.
+:cl1 raw :jupe -irc-3.example.net * 3600 :Server 3 not welcome here.
Index: ircu2.10/ircd/test/kill-block-1.cmd
diff -u /dev/null ircu2.10/ircd/test/kill-block-1.cmd:1.1
--- /dev/null   Mon May 30 17:26:30 2005
+++ ircu2.10/ircd/test/kill-block-1.cmd Mon May 30 17:26:19 2005
@@ -0,0 +1,4 @@
+define srv localhost:7701
+
+connect cl1 Alex sub7 %srv% :s7server
+connect cl2 Chloe chloe %srv% :Chloe
Index: ircu2.10/ircd/test/run-tests.sh
diff -u ircu2.10/ircd/test/run-tests.sh:1.1 ircu2.10/ircd/test/run-tests.sh:1.2
--- ircu2.10/ircd/test/run-tests.sh:1.1 Tue May 10 21:15:04 2005
+++ ircu2.10/ircd/test/run-tests.sh     Mon May 30 17:26:19 2005
@@ -1,12 +1,27 @@
 #! /bin/sh
 set -e
 srcdir=$1
-for script in channel-1 client-1 stats-1 gline-1 ; do
+cp ${srcdir}/ircd-t1.conf ircd-t1.conf
+cp ${srcdir}/ircd-t2.conf ircd-t2.conf
+echo "Testing one-shot ircd invocations."
+../ircd -v
+../ircd -x 6 -k -d . -f ircd-t1.conf -c [EMAIL PROTECTED]
+echo "Starting ircd."
+../ircd -d . -f ircd-t1.conf
+../ircd -d . -f ircd-t2.conf
+sleep 10
+# stats-1 is out of alphabetical order to avoid triggering IPcheck.
+for script in channel-1 client-1 command-1 feature-1 gline-1 stats-1 jupe-1 
kill-block-1 ; do
   echo "Running test $script."
   ${srcdir}/test-driver.pl ${srcdir}/${script}.cmd
 done
-echo "Terminating server."
-${srcdir}/test-driver.pl ${srcdir}/die.cmd
-../ircd -?
-../ircd -v
-../ircd -x 6 -k -d ${srcdir} -f ircd-t1.conf -c [EMAIL PROTECTED]
+echo "Sending signals to server."
+cp ${srcdir}/ircd-t1-2.conf ircd-t1.conf
+kill -HUP `cat ircd-t1.pid`
+sleep 1
+kill -INT `cat ircd-t1.pid`
+# A long sleep is necessary to make the server flush its IPcheck entries.
+sleep 610
+kill -TERM `cat ircd-t1.pid` `cat ircd-t2.pid`
+sleep 1
+../ircd -? || true
Index: ircu2.10/ircd/test/stats-1.cmd
diff -u ircu2.10/ircd/test/stats-1.cmd:1.1 ircu2.10/ircd/test/stats-1.cmd:1.2
--- ircu2.10/ircd/test/stats-1.cmd:1.1  Mon May  9 20:43:09 2005
+++ ircu2.10/ircd/test/stats-1.cmd      Mon May 30 17:26:19 2005
@@ -33,6 +33,9 @@
 :cl1 raw :stats z
 :cl1 raw :stats *
 
+# Remote stats requests
+:cl1 raw :stats f test-2.*
+
 # Named stats commands
 :cl1 raw :stats nameservers
 :cl1 raw :stats connect
@@ -65,6 +68,9 @@
 :cl1 raw :stats memory
 :cl1 raw :stats help
 :cl1 raw :hash
+:cl1 raw :rehash m
+:cl1 raw :rehash l
+:cl1 raw :rehash q
 :cl1 raw :rehash
 :cl1 nick Alexey
 
Index: ircu2.10/ircd/test/test-driver.pl
diff -u ircu2.10/ircd/test/test-driver.pl:1.2 
ircu2.10/ircd/test/test-driver.pl:1.3
--- ircu2.10/ircd/test/test-driver.pl:1.2       Tue May 10 21:15:04 2005
+++ ircu2.10/ircd/test/test-driver.pl   Mon May 30 17:26:19 2005
@@ -4,7 +4,7 @@
 # collection isn't broken.  POE is sometimes too clever for our good
 # in finding references to sessions, and keeps running even after we
 # want to stop.
-# $Id: test-driver.pl,v 1.2 2005/05/11 04:15:04 entrope Exp $
+# $Id: test-driver.pl,v 1.3 2005/05/31 00:26:19 entrope Exp $
 
 # This interprets a simple scripting language.  Lines starting with a
 # hash mark (#, aka octothorpe, pound sign, etc) are ignored.  The
@@ -103,8 +103,11 @@
                       irc_nick => sub {},
                       irc_part => sub {},
                       irc_ping => sub {},
+                      irc_pong => sub {},
+                      irc_rpong => sub {},
                       irc_quit => sub {},
                       irc_topic => sub {},
+                      irc_plugin_add => sub {},
                       irc_error => \&irc_error,
                       irc_disconnected => \&irc_disconnected,
                       irc_socketerr => \&irc_socketerr,
@@ -316,7 +319,8 @@
     }
     return undef;
   }
-  print "ERROR: Unexpected event $state to test driver (from 
".$sender->ID.")\n";
+  print "ERROR: Unexpected event $state to test driver (from 
".$sender->ID.")\n"
+    unless $state eq '_signal';
   return undef;
 }
 
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to