1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2026-10-24 00:48:56 +03:00
Files
gnulib/tests/test-printf-posix2.sh
Bruno Haible 4c0df5be84 tests: Prepare for using valgrind.
tests/*.sh: Invoke all test programs through ${CHECKER}.
tests/*/*.sh: Likewise.
2019-03-10 11:32:11 +01:00

35 lines
684 B
Bash
Executable File

#!/bin/sh
# Test out-of-memory handling.
(${CHECKER} ./test-printf-posix2${EXEEXT} 0
result=$?
if test $result != 77 && test $result != 78; then result=1; fi
exit $result
) 2>/dev/null
malloc_result=$?
if test $malloc_result = 77; then
echo "Skipping test: getrlimit and setrlimit don't work"
exit 77
fi
for arg in 1 2 3 4 5 6
do
${CHECKER} ./test-printf-posix2${EXEEXT} $arg > /dev/null
result=$?
if test $result = 77; then
echo "Skipping test: getrlimit and setrlimit don't work"
exit 77
fi
if test $result != 0; then
exit 1
fi
done
if test $malloc_result = 78; then
echo "Skipping test: getrlimit and setrlimit don't work"
exit 77
fi
exit 0