malloca: Silence a warning from clang's memory sanitizer.
[gnulib.git] / tests / test-fprintf-posix2.sh
blob79d92af30d34e6febff4ee1e556a4d3c3329f66a
1 #!/bin/sh
3 # Test out-of-memory handling.
5 (./test-fprintf-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-fprintf-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