openat: don’t close (-1)
[gnulib.git] / tests / test-fprintf-posix2.sh
blob37ebe7d17cc95755bc98134b1f757641174b2bf8
1 #!/bin/sh
3 # Test out-of-memory handling.
5 (${CHECKER} ./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 ${CHECKER} ./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