chiark / gitweb /
debugging for thing that crashed
[inn-innduct.git] / tests / lib / setenv.t
1 #! /bin/sh
2 # $Id: setenv.t 7492 2006-03-19 23:07:34Z eagle $
3 #
4 # Wrapper around the setenv test suite to set a resource limit low enough
5 # that two strings over 100KB can't both be allocated, allowing the memory
6 # allocation failure code in setenv to be exercised.  Done with this
7 # wrapper because ulimit is more easily portable than the corresponding C
8 # code.
9
10 # Find where the test suite is.
11 setenv=setenv.tr
12 for file in ./setenv.tr lib/setenv.tr tests/lib/setenv.tr ; do
13     [ -x $file ] && setenv=$file
14 done
15
16 ulimit -d 150
17 exec $setenv