annotate tests/test-dprintf-posix2.sh @ 40186:8964917f9574

autoupdate
author Karl Berry <karl@freefriends.org>
date Mon, 18 Feb 2019 08:02:49 -0800
parents c8f2d55830b2
children 8c1a17df67e0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12464
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 #!/bin/sh
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 # Test against a memory leak.
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 (./test-dprintf-posix2${EXEEXT} 0
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 result=$?
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 if test $result != 77 && test $result != 78; then result=1; fi
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 exit $result
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 ) 2>/dev/null
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 malloc_result=$?
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 if test $malloc_result = 77; then
14179
c8f2d55830b2 *printf-posix: Avoid test failures. Make tests work on MacOS X, Cygwin.
Bruno Haible <bruno@clisp.org>
parents: 12464
diff changeset
12 echo "Skipping test: no way to determine address space size"
12464
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 exit 77
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 fi
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 ./test-dprintf-posix2${EXEEXT} 1 > /dev/null
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 result=$?
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 if test $result = 77; then
14179
c8f2d55830b2 *printf-posix: Avoid test failures. Make tests work on MacOS X, Cygwin.
Bruno Haible <bruno@clisp.org>
parents: 12464
diff changeset
19 echo "Skipping test: no way to determine address space size"
12464
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20 exit 77
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 fi
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22 if test $result != 0; then
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 exit 1
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 fi
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 if test $malloc_result = 78; then
14179
c8f2d55830b2 *printf-posix: Avoid test failures. Make tests work on MacOS X, Cygwin.
Bruno Haible <bruno@clisp.org>
parents: 12464
diff changeset
27 echo "Skipping test: get_rusage_as() doesn't work"
12464
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28 exit 77
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 fi
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30
5bd91471b957 dprintf-posix: Check against memory leak fixed on 2009-12-15.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 exit 0