1*374d5969Spgoyette# $NetBSD: t_nsdispatch.sh,v 1.1 2011/01/13 01:56:44 pgoyette Exp $ 2*374d5969Spgoyette# 3*374d5969Spgoyette# Copyright (c) 2008 The NetBSD Foundation, Inc. 4*374d5969Spgoyette# All rights reserved. 5*374d5969Spgoyette# 6*374d5969Spgoyette# Redistribution and use in source and binary forms, with or without 7*374d5969Spgoyette# modification, are permitted provided that the following conditions 8*374d5969Spgoyette# are met: 9*374d5969Spgoyette# 1. Redistributions of source code must retain the above copyright 10*374d5969Spgoyette# notice, this list of conditions and the following disclaimer. 11*374d5969Spgoyette# 2. Redistributions in binary form must reproduce the above copyright 12*374d5969Spgoyette# notice, this list of conditions and the following disclaimer in the 13*374d5969Spgoyette# documentation and/or other materials provided with the distribution. 14*374d5969Spgoyette# 15*374d5969Spgoyette# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 16*374d5969Spgoyette# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17*374d5969Spgoyette# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 18*374d5969Spgoyette# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 19*374d5969Spgoyette# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20*374d5969Spgoyette# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21*374d5969Spgoyette# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22*374d5969Spgoyette# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23*374d5969Spgoyette# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24*374d5969Spgoyette# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25*374d5969Spgoyette# POSSIBILITY OF SUCH DAMAGE. 26*374d5969Spgoyette# 27*374d5969Spgoyette 28*374d5969Spgoyetteatf_test_case recurse 29*374d5969Spgoyetterecurse_head() 30*374d5969Spgoyette{ 31*374d5969Spgoyette atf_set "descr" "Checks recursive calls to nsdispatch()" \ 32*374d5969Spgoyette "within threaded program" 33*374d5969Spgoyette} 34*374d5969Spgoyetterecurse_body() 35*374d5969Spgoyette{ 36*374d5969Spgoyette cat >exp <<EOF 37*374d5969Spgoyettefunc1: enter 38*374d5969Spgoyettefunc2: enter 39*374d5969Spgoyettefunc3: enter 40*374d5969Spgoyettefunc3: exit 41*374d5969Spgoyettefunc2: exit 42*374d5969Spgoyettefunc1: exit 43*374d5969SpgoyetteEOF 44*374d5969Spgoyette 45*374d5969Spgoyette atf_check -o file:exp "$(atf_get_srcdir)/h_nsd_recurse" 46*374d5969Spgoyette} 47*374d5969Spgoyette 48*374d5969Spgoyetteatf_init_test_cases() 49*374d5969Spgoyette{ 50*374d5969Spgoyette atf_add_test_case recurse 51*374d5969Spgoyette} 52