1272343Sngie# $NetBSD: t_pools.sh,v 1.8 2012/12/03 23:39:30 pgoyette Exp $ 2272343Sngie# 3272343Sngie# Copyright (c) 2008, 2010 The NetBSD Foundation, Inc. 4272343Sngie# All rights reserved. 5272343Sngie# 6272343Sngie# Redistribution and use in source and binary forms, with or without 7272343Sngie# modification, are permitted provided that the following conditions 8272343Sngie# are met: 9272343Sngie# 1. Redistributions of source code must retain the above copyright 10272343Sngie# notice, this list of conditions and the following disclaimer. 11272343Sngie# 2. Redistributions in binary form must reproduce the above copyright 12272343Sngie# notice, this list of conditions and the following disclaimer in the 13272343Sngie# documentation and/or other materials provided with the distribution. 14272343Sngie# 15272343Sngie# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 16272343Sngie# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17272343Sngie# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 18272343Sngie# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 19272343Sngie# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20272343Sngie# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21272343Sngie# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22272343Sngie# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23272343Sngie# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24272343Sngie# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25272343Sngie# POSSIBILITY OF SUCH DAMAGE. 26272343Sngie# 27272343Sngie# 28272343Sngie# (C)opyright 1993-1996 by Darren Reed. 29272343Sngie# 30272343Sngie# See the IPFILTER.LICENCE file for details on licencing. 31272343Sngie# 32272343Sngie 33272343Sngieiptest() 34272343Sngie{ 35272343Sngie h_copydata $1 36272343Sngie mkdir input 37272343Sngie cp $(atf_get_srcdir)/input/ip2.data input/ 38272343Sngie 39272343Sngie atf_check -o file:exp -e ignore ippool -f reg -nRv 40272343Sngie} 41272343Sngie 42272343Sngieptest() 43272343Sngie{ 44272343Sngie h_copydata $1 45272343Sngie cp $(atf_get_srcdir)/regress/$1.pool pool 2>/dev/null 46272343Sngie if [ -f $(atf_get_srcdir)/regress/$1.nat ] ; then 47272343Sngie cp $(atf_get_srcdir)/regress/$1.nat nat 48272343Sngie else 49272343Sngie cp $(atf_get_srcdir)/regress/$1.ipf ipf 50272343Sngie fi 51272343Sngie 52272343Sngie if [ -f pool ] ; then 53272343Sngie if [ -f nat ] ; then 54272343Sngie atf_check -o save:out ipftest -RD -b -P pool -N nat -i in 55272343Sngie else 56272343Sngie atf_check -o save:out ipftest -RD -b -P pool -r ipf -i in 57272343Sngie fi 58272343Sngie else 59272343Sngie atf_check -o save:out ipftest -RD -b -r ipf -i in 60272343Sngie fi 61272343Sngie 62272343Sngie echo "-------------------------------" >>out 63272343Sngie 64272343Sngie} 65272343Sngie 66272343Sngietest_case f28 ptest text text 67272343Sngietest_case f29 ptest text text 68272343Sngietest_case p1 ptest text text 69272343Sngietest_case p2 ptest text text 70272343Sngietest_case p3 ptest text text 71272343Sngietest_case p4 ptest text text 72272343Sngietest_case p5 ptest text text 73272343Sngietest_case p6 ptest text text 74272343Sngietest_case p7 ptest text text 75272343Sngietest_case p9 ptest text text 76272343Sngietest_case p10 ptest text text 77272343Sngietest_case p11 ptest text text 78272343Sngietest_case p12 ptest text text 79272343Sngietest_case p13 ptest text text 80272343Sngietest_case ip1 iptest text text 81272343Sngietest_case ip2 iptest text text 82272343Sngietest_case ip3 iptest text text 83272343Sngie 84272343Sngieatf_init_test_cases() 85272343Sngie{ 86272343Sngie atf_add_test_case f28 87272343Sngie atf_add_test_case f29 88272343Sngie atf_add_test_case p1 89272343Sngie atf_add_test_case p2 90272343Sngie atf_add_test_case p3 91272343Sngie atf_add_test_case p4 92272343Sngie atf_add_test_case p5 93272343Sngie atf_add_test_case p6 94272343Sngie atf_add_test_case p7 95272343Sngie atf_add_test_case p9 96272343Sngie atf_add_test_case p10 97272343Sngie atf_add_test_case p11 98272343Sngie atf_add_test_case p12 99272343Sngie atf_add_test_case p13 100272343Sngie atf_add_test_case ip1 101272343Sngie atf_add_test_case ip2 102272343Sngie atf_add_test_case ip3 103272343Sngie} 104