| 1 | #!/bin/sh |
| 2 | |
| 3 | # Test out-of-memory handling. |
| 4 | |
| 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 |
| 14 | fi |
| 15 | |
| 16 | for arg in 1 2 3 4 5 6 |
| 17 | do |
| 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 |
| 23 | fi |
| 24 | if test $result != 0; then |
| 25 | exit 1 |
| 26 | fi |
| 27 | done |
| 28 | |
| 29 | if test $malloc_result = 78; then |
| 30 | echo "Skipping test: getrlimit and setrlimit don't work" |
| 31 | exit 77 |
| 32 | fi |
| 33 | |
| 34 | exit 0 |