Mercurial > gnulib
comparison tests/test-fprintf-posix3.sh @ 40221:8c1a17df67e0
tests: Prepare for using valgrind.
tests/*.sh: Invoke all test programs through ${CHECKER}.
tests/*/*.sh: Likewise.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 10 Mar 2019 11:32:11 +0100 |
parents | c8f2d55830b2 |
children |
comparison
equal
deleted
inserted
replaced
40220:2796695e9216 | 40221:8c1a17df67e0 |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 # Test against a memory leak. | 3 # Test against a memory leak. |
4 | 4 |
5 (./test-fprintf-posix3${EXEEXT} 0 | 5 (${CHECKER} ./test-fprintf-posix3${EXEEXT} 0 |
6 result=$? | 6 result=$? |
7 if test $result != 77 && test $result != 78; then result=1; fi | 7 if test $result != 77 && test $result != 78; then result=1; fi |
8 exit $result | 8 exit $result |
9 ) 2>/dev/null | 9 ) 2>/dev/null |
10 malloc_result=$? | 10 malloc_result=$? |
11 if test $malloc_result = 77; then | 11 if test $malloc_result = 77; then |
12 echo "Skipping test: no way to determine address space size" | 12 echo "Skipping test: no way to determine address space size" |
13 exit 77 | 13 exit 77 |
14 fi | 14 fi |
15 | 15 |
16 ./test-fprintf-posix3${EXEEXT} 1 > /dev/null | 16 ${CHECKER} ./test-fprintf-posix3${EXEEXT} 1 > /dev/null |
17 result=$? | 17 result=$? |
18 if test $result = 77; then | 18 if test $result = 77; then |
19 echo "Skipping test: no way to determine address space size" | 19 echo "Skipping test: no way to determine address space size" |
20 exit 77 | 20 exit 77 |
21 fi | 21 fi |