Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/ipf/ipftest/test First cut to make it work again.



details:   https://anonhg.NetBSD.org/src/rev/f53894196ea6
branches:  trunk
changeset: 481803:f53894196ea6
user:      veego <veego%NetBSD.org@localhost>
date:      Sun Feb 06 13:05:25 2000 +0000

description:
First cut to make it work again.
TODO: make it work with obj dirs.

diffstat:

 usr.sbin/ipf/ipftest/test/Makefile     |    26 +-
 usr.sbin/ipf/ipftest/test/dotest       |    32 +-
 usr.sbin/ipf/ipftest/test/expected/1   |    16 -
 usr.sbin/ipf/ipftest/test/expected/10  |   108 --
 usr.sbin/ipf/ipftest/test/expected/11  |    66 -
 usr.sbin/ipf/ipftest/test/expected/12  |    54 -
 usr.sbin/ipf/ipftest/test/expected/14  |    40 -
 usr.sbin/ipf/ipftest/test/expected/2   |    36 -
 usr.sbin/ipf/ipftest/test/expected/3   |    40 -
 usr.sbin/ipf/ipftest/test/expected/4   |    40 -
 usr.sbin/ipf/ipftest/test/expected/5   |  1344 --------------------------------
 usr.sbin/ipf/ipftest/test/expected/6   |  1344 --------------------------------
 usr.sbin/ipf/ipftest/test/expected/7   |    54 -
 usr.sbin/ipf/ipftest/test/expected/8   |    36 -
 usr.sbin/ipf/ipftest/test/expected/9   |   108 --
 usr.sbin/ipf/ipftest/test/expected/i1  |    13 -
 usr.sbin/ipf/ipftest/test/expected/i10 |     4 -
 usr.sbin/ipf/ipftest/test/expected/i11 |     4 -
 usr.sbin/ipf/ipftest/test/expected/i2  |     6 -
 usr.sbin/ipf/ipftest/test/expected/i3  |     8 -
 usr.sbin/ipf/ipftest/test/expected/i4  |     7 -
 usr.sbin/ipf/ipftest/test/expected/i5  |     5 -
 usr.sbin/ipf/ipftest/test/expected/i6  |     4 -
 usr.sbin/ipf/ipftest/test/expected/i7  |     3 -
 usr.sbin/ipf/ipftest/test/expected/i8  |     2 -
 usr.sbin/ipf/ipftest/test/expected/i9  |     5 -
 usr.sbin/ipf/ipftest/test/hextest      |    35 +-
 usr.sbin/ipf/ipftest/test/input/1      |     4 -
 usr.sbin/ipf/ipftest/test/input/10     |     6 -
 usr.sbin/ipf/ipftest/test/input/11     |    11 -
 usr.sbin/ipf/ipftest/test/input/12     |    35 -
 usr.sbin/ipf/ipftest/test/input/13     |    39 -
 usr.sbin/ipf/ipftest/test/input/14     |     5 -
 usr.sbin/ipf/ipftest/test/input/2      |     6 -
 usr.sbin/ipf/ipftest/test/input/3      |     5 -
 usr.sbin/ipf/ipftest/test/input/4      |     5 -
 usr.sbin/ipf/ipftest/test/input/5      |    28 -
 usr.sbin/ipf/ipftest/test/input/6      |    28 -
 usr.sbin/ipf/ipftest/test/input/7      |     9 -
 usr.sbin/ipf/ipftest/test/input/8      |     6 -
 usr.sbin/ipf/ipftest/test/input/9      |     6 -
 usr.sbin/ipf/ipftest/test/itest        |    29 +-
 usr.sbin/ipf/ipftest/test/nattest      |    20 +
 usr.sbin/ipf/ipftest/test/regress/1    |     4 -
 usr.sbin/ipf/ipftest/test/regress/10   |    18 -
 usr.sbin/ipf/ipftest/test/regress/11   |     6 -
 usr.sbin/ipf/ipftest/test/regress/12   |     6 -
 usr.sbin/ipf/ipftest/test/regress/13   |     6 -
 usr.sbin/ipf/ipftest/test/regress/14   |     8 -
 usr.sbin/ipf/ipftest/test/regress/2    |     6 -
 usr.sbin/ipf/ipftest/test/regress/3    |     8 -
 usr.sbin/ipf/ipftest/test/regress/4    |     8 -
 usr.sbin/ipf/ipftest/test/regress/5    |    48 -
 usr.sbin/ipf/ipftest/test/regress/6    |    48 -
 usr.sbin/ipf/ipftest/test/regress/7    |     6 -
 usr.sbin/ipf/ipftest/test/regress/8    |     6 -
 usr.sbin/ipf/ipftest/test/regress/9    |    18 -
 usr.sbin/ipf/ipftest/test/regress/i1   |    13 -
 usr.sbin/ipf/ipftest/test/regress/i10  |     4 -
 usr.sbin/ipf/ipftest/test/regress/i11  |     4 -
 usr.sbin/ipf/ipftest/test/regress/i2   |     6 -
 usr.sbin/ipf/ipftest/test/regress/i3   |     8 -
 usr.sbin/ipf/ipftest/test/regress/i4   |     7 -
 usr.sbin/ipf/ipftest/test/regress/i5   |     5 -
 usr.sbin/ipf/ipftest/test/regress/i6   |     4 -
 usr.sbin/ipf/ipftest/test/regress/i7   |     3 -
 usr.sbin/ipf/ipftest/test/regress/i8   |     2 -
 usr.sbin/ipf/ipftest/test/regress/i9   |     5 -
 68 files changed, 54 insertions(+), 3885 deletions(-)

diffs (truncated from 4274 to 300 lines):

diff -r ef2df29cb7b8 -r f53894196ea6 usr.sbin/ipf/ipftest/test/Makefile
--- a/usr.sbin/ipf/ipftest/test/Makefile        Sun Feb 06 12:49:37 2000 +0000
+++ b/usr.sbin/ipf/ipftest/test/Makefile        Sun Feb 06 13:05:25 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.3 1998/05/29 20:59:43 veego Exp $
+#      $NetBSD: Makefile,v 1.4 2000/02/06 13:05:25 veego Exp $
 #
 # (C)opyright 1993-1996 by Darren Reed.
 #
@@ -6,34 +6,38 @@
 # provided that this notice is preserved and due credit is given
 # to the original author and the contributors.
 #
-BINDEST=/usr/local/bin
-SBINDEST=/sbin
-MANDIR=/usr/share/man
+.include <bsd.prog.mk>
 
-tests: first 0 ftests ptests
+tests: first ftests ptests ntests
 
 first:
        -mkdir -p results
 
 # Filtering tests
-ftests: 1 2 3 4 5 6 7 8 9 10 11 12 14
+ftests: f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f14
 
 # Rule parsing tests
 ptests: i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11
 
+ntests: n1 n2 n3 n4
+
 0:
        @(cd ..; make ipftest; )
 
-1 2 3 4 5 6 7 8 9 10 11 14:
+f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f14:
        @/bin/sh ./dotest $@
 
-12:
+f12:
        @/bin/sh ./hextest $@
 
 i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11:
        @/bin/sh ./itest $@
 
-clean:
-       /bin/rm -f 1 2 3 4 5 6 7 8 9 10 11 12 14
+n1 n2 n3 n4:
+       @/bin/sh ./nattest $@
+
+clean cleandir:
+       /bin/rm -f f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f14
+       /bin/rm -f i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11
+       /bin/rm -f n1 n2 n3 n4
        /bin/rm -rf results
-       /bin/rm -f i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11
diff -r ef2df29cb7b8 -r f53894196ea6 usr.sbin/ipf/ipftest/test/dotest
--- a/usr.sbin/ipf/ipftest/test/dotest  Sun Feb 06 12:49:37 2000 +0000
+++ b/usr.sbin/ipf/ipftest/test/dotest  Sun Feb 06 13:05:25 2000 +0000
@@ -1,40 +1,20 @@
 #!/bin/sh
 #
-#      $NetBSD: dotest,v 1.4 1998/05/29 21:01:45 veego Exp $
+#      $NetBSD: dotest,v 1.5 2000/02/06 13:05:26 veego Exp $
 #
-if [ -f /usr/ucb/touch ] ; then
-       TOUCH=/usr/ucb/touch
-else
-       if [ -f /usr/bin/touch ] ; then
-               TOUCH=/usr/bin/touch
-       else
-               if [ -f /bin/touch ] ; then
-                       TOUCH=/bin/touch
-               fi
-       fi
-fi
-
-if [ -f ../ipftest ] ; then
-       IPFTEST=../ipftest
-else
-       if [ -f /usr/sbin/ipftest ] ; then
-               IPFTEST=/usr/sbin/ipftest
-       else
-               IPFTEST=ipftest
-       fi
-fi
 
 echo "$1...";
 /bin/cp /dev/null results/$1
 ( while read rule; do
-       echo "$rule" | $IPFTEST -br - -i input/$1 >> results/$1;
+       echo "$rule" | ipftest -br - -i ../../../../dist/ipf/test/input/$1 >> results/$1;
        if [ $? -ne 0 ] ; then
                exit 1;
        fi
-done ) < regress/$1
-cmp expected/$1 results/$1
+       echo "--------" >> results/$1
+done ) < ../../../../dist/ipf/test/regress/$1
+cmp ../../../../dist/ipf/test/expected/$1 results/$1
 status=$?
 if [ $status = 0 ] ; then
-       $TOUCH $1
+       touch $1
 fi
 exit $status
diff -r ef2df29cb7b8 -r f53894196ea6 usr.sbin/ipf/ipftest/test/expected/1
--- a/usr.sbin/ipf/ipftest/test/expected/1      Sun Feb 06 12:49:37 2000 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-block
-block
-nomatch
-nomatch
-pass
-pass
-nomatch
-nomatch
-nomatch
-nomatch
-block
-block
-nomatch
-nomatch
-pass
-pass
diff -r ef2df29cb7b8 -r f53894196ea6 usr.sbin/ipf/ipftest/test/expected/10
--- a/usr.sbin/ipf/ipftest/test/expected/10     Sun Feb 06 12:49:37 2000 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-nomatch
-block
-nomatch
-nomatch
-nomatch
-nomatch
-pass
-pass
-pass
-nomatch
-nomatch
-pass
-block
-block
-block
-nomatch
-nomatch
-block
-pass
-pass
-pass
-nomatch
-nomatch
-pass
-block
-block
-nomatch
-nomatch
-nomatch
-block
-pass
-pass
-nomatch
-nomatch
-nomatch
-pass
-block
-block
-block
-block
-block
-block
-pass
-pass
-pass
-pass
-pass
-pass
-nomatch
-block
-block
-block
-nomatch
-block
-nomatch
-pass
-pass
-pass
-nomatch
-pass
-nomatch
-pass
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-block
-block
-block
-block
-block
-nomatch
-pass
-pass
-pass
-pass
-pass
-block
-block
-nomatch
-block
-nomatch
-block
-pass
-pass
-nomatch
-pass
-nomatch
-pass
-block
-block
-block
-block
-block
-block
-pass
-pass
-pass
-pass
-pass
-pass
-block
-block
-block
-nomatch
-nomatch
-block
diff -r ef2df29cb7b8 -r f53894196ea6 usr.sbin/ipf/ipftest/test/expected/11
--- a/usr.sbin/ipf/ipftest/test/expected/11     Sun Feb 06 12:49:37 2000 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-pass
-pass
-pass
-pass
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-block
-block
-block
-block
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-pass
-pass
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-block
-block
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-nomatch
-pass
-pass
-pass
-nomatch
-nomatch
-nomatch



Home | Main Index | Thread Index | Old Index