[BACK]Return to t_nat_exec.sh CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / tests / ipf

Annotation of src/tests/ipf/t_nat_exec.sh, Revision 1.18

1.18    ! martin      1: # $NetBSD: t_nat_exec.sh,v 1.17 2013/05/16 07:20:29 martin Exp $
1.1       jmmv        2: #
                      3: # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
                      4: # All rights reserved.
                      5: #
                      6: # Redistribution and use in source and binary forms, with or without
                      7: # modification, are permitted provided that the following conditions
                      8: # are met:
                      9: # 1. Redistributions of source code must retain the above copyright
                     10: #    notice, this list of conditions and the following disclaimer.
                     11: # 2. Redistributions in binary form must reproduce the above copyright
                     12: #    notice, this list of conditions and the following disclaimer in the
                     13: #    documentation and/or other materials provided with the distribution.
                     14: #
                     15: # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
                     16: # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
                     17: # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
                     18: # PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
                     19: # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
                     20: # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
                     21: # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
                     22: # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
                     23: # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
                     24: # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
                     25: # POSSIBILITY OF SUCH DAMAGE.
                     26: #
                     27: #
                     28: # (C)opyright 1993-1996 by Darren Reed.
                     29: #
                     30: # See the IPFILTER.LICENCE file for details on licencing.
                     31: #
                     32:
1.2       jmmv       33: nattest()
1.1       jmmv       34: {
                     35:        h_copydata $1
1.8       pgoyette   36:        infmt=$2
                     37:        outfmt=$3
                     38:        shift
                     39:        shift
                     40:        shift
                     41:        args=$@
1.1       jmmv       42:
1.8       pgoyette   43:        if [ $outfmt = hex ] ; then
                     44:                format="-xF $infmt"
1.1       jmmv       45:        else
1.8       pgoyette   46:                format="-F $infmt"
1.1       jmmv       47:        fi
                     48:
1.8       pgoyette   49:        format="$format"
1.1       jmmv       50:
1.12      pgoyette   51:        test -f in  && test -f reg || atf_fail "Test input file missing"
                     52:
1.1       jmmv       53:        { while read rule; do
                     54:                atf_check -o save:save -x \
1.10      pgoyette   55:                    "echo \"$rule\" | ipftest $format -RDbN - -i in $args"
1.1       jmmv       56:                cat save >>out
                     57:                echo "-------------------------------" >>out
                     58:        done; } <reg
                     59:
                     60:        diff -u exp out || atf_fail "results differ"
                     61: }
                     62:
1.10      pgoyette   63: test_case n1 nattest text text
                     64: test_case n2 nattest text text
                     65: test_case n3 nattest text text
                     66: test_case n4 nattest text text
                     67: test_case n5 nattest text text
                     68: test_case n6 nattest text text
                     69: test_case n7 nattest text text
1.17      martin     70: failing_test_case_be n8 nattest "See PR kern/47665" hex hex -T update_ipid=0
                     71: failing_test_case_be n9 nattest "See PR kern/47665" hex hex -T update_ipid=0
1.10      pgoyette   72: test_case n10 nattest hex hex -T update_ipid=0
                     73: test_case n11 nattest text text
1.14      jmmv       74: failing_test_case n12 nattest "Known to be broken" hex hex -T update_ipid=0 -v
1.10      pgoyette   75: test_case n13 nattest text text
1.17      martin     76: failing_test_case_be n14 nattest "See PR kern/47665" text text
1.10      pgoyette   77: test_case n15 nattest text text -T update_ipid=0
1.1       jmmv       78: test_case n16 nattest hex hex -D
                     79: test_case n17 nattest hex hex -D
1.10      pgoyette   80: test_case n100 nattest text text
                     81: test_case n101 nattest text text
                     82: test_case n102 nattest text text
                     83: test_case n103 nattest text text
                     84: test_case n104 nattest hex hex -T update_ipid=0
                     85: test_case n105 nattest hex hex -T update_ipid=0
                     86: test_case n106 nattest hex hex -T update_ipid=0
                     87: test_case n200 nattest hex hex -T update_ipid=0
                     88: test_case n1_6 nattest text text -6
                     89: test_case n2_6 nattest text text -6
1.13      pgoyette   90: #test_case n3_6 nattest text text -6
1.10      pgoyette   91: test_case n4_6 nattest text text -6
                     92: test_case n5_6 nattest text text -6
                     93: test_case n6_6 nattest text text -6
                     94: test_case n7_6 nattest text text -6
1.18    ! martin     95: failing_test_case_be n8_6 nattest "See PR kern/47665" hex hex -6
        !            96: failing_test_case_be n9_6 nattest "See PR kern/47665" hex hex -6
1.10      pgoyette   97: test_case n11_6 nattest text text -6
                     98: test_case n12_6 nattest hex hex -6
                     99: test_case n15_6 nattest text text -6
1.12      pgoyette  100: failing_test_case n17_6 nattest "Test golden output file missing" hex hex -6
1.1       jmmv      101:
                    102: atf_init_test_cases()
                    103: {
1.8       pgoyette  104:        atf_add_test_case n1
                    105:        atf_add_test_case n2
1.1       jmmv      106:        atf_add_test_case n3
1.8       pgoyette  107:        atf_add_test_case n4
                    108:        atf_add_test_case n5
                    109:        atf_add_test_case n6
1.1       jmmv      110:        atf_add_test_case n7
                    111:        atf_add_test_case n8
                    112:        atf_add_test_case n9
                    113:        atf_add_test_case n10
1.8       pgoyette  114:        atf_add_test_case n11
1.1       jmmv      115:        atf_add_test_case n12
                    116:        atf_add_test_case n13
                    117:        atf_add_test_case n14
                    118:        atf_add_test_case n16
                    119:        atf_add_test_case n17
1.8       pgoyette  120:        atf_add_test_case n100
                    121:        atf_add_test_case n101
                    122:        atf_add_test_case n102
                    123:        atf_add_test_case n103
                    124:        atf_add_test_case n104
                    125:        atf_add_test_case n105
                    126:        atf_add_test_case n106
                    127:        atf_add_test_case n200
                    128:
                    129:        atf_add_test_case n1_6
                    130:        atf_add_test_case n2_6
1.13      pgoyette  131: #      atf_add_test_case n3_6
1.8       pgoyette  132:        atf_add_test_case n4_6
                    133:        atf_add_test_case n5_6
                    134:        atf_add_test_case n6_6
                    135:        atf_add_test_case n7_6
                    136:        atf_add_test_case n8_6
                    137:        atf_add_test_case n9_6
                    138:        atf_add_test_case n11_6
                    139:        atf_add_test_case n12_6
                    140:        atf_add_test_case n15_6
                    141:        atf_add_test_case n17_6
1.3       pooka     142:
1.1       jmmv      143: }

CVSweb <webmaster@jp.NetBSD.org>