malloca: Silence a warning from clang's memory sanitizer.
[gnulib.git] / tests / test-printf-posix2.sh
blob893c3c9a0c4327415b1c6e0953e205ab4920669b
1 #!/bin/sh
3 # Test out-of-memory handling.
5 (./test-printf-posix2${EXEEXT} 0
6 result=$?
7 if test $result != 77 && test $result != 78; then result=1; fi
8 exit $result
9 ) 2>/dev/null
10 malloc_result=$?
11 if test $malloc_result = 77; then
12 echo "Skipping test: getrlimit and setrlimit don't work"
13 exit 77
16 for arg in 1 2 3 4 5 6
18 ./test-printf-posix2${EXEEXT} $arg > /dev/null
19 result=$?
20 if test $result = 77; then
21 echo "Skipping test: getrlimit and setrlimit don't work"
22 exit 77
24 if test $result != 0; then
25 exit 1
27 done
29 if test $malloc_result = 78; then
30 echo "Skipping test: getrlimit and setrlimit don't work"
31 exit 77
34 exit 0