Mercurial > gnulib
annotate tests/test-lseek.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 | 175d7ed26b82 |
children |
rev | line source |
---|---|
8872 | 1 #!/bin/sh |
2 | |
8877 | 3 tmpfiles= |
4 trap 'rm -fr $tmpfiles' 1 2 3 15 | |
5 | |
6 tmpfiles=t-lseek.tmp | |
7 # seekable files | |
40221
8c1a17df67e0
tests: Prepare for using valgrind.
Bruno Haible <bruno@clisp.org>
parents:
13291
diff
changeset
|
8 ${CHECKER} ./test-lseek${EXEEXT} 0 < "$srcdir/test-lseek.sh" > t-lseek.tmp || exit 1 |
8877 | 9 |
10 # pipes | |
40221
8c1a17df67e0
tests: Prepare for using valgrind.
Bruno Haible <bruno@clisp.org>
parents:
13291
diff
changeset
|
11 echo hi | { ${CHECKER} ./test-lseek${EXEEXT} 1; echo $? > t-lseek.tmp; cat > /dev/null; } | cat |
13291
175d7ed26b82
lseek test: Fix failure on Solaris.
Bruno Haible <bruno@clisp.org>
parents:
13251
diff
changeset
|
12 test "`cat t-lseek.tmp`" = "0" || exit 1 |
8877 | 13 |
14 # closed descriptors | |
40221
8c1a17df67e0
tests: Prepare for using valgrind.
Bruno Haible <bruno@clisp.org>
parents:
13291
diff
changeset
|
15 ${CHECKER} ./test-lseek${EXEEXT} 2 <&- >&- || exit 1 |
8877 | 16 |
17 rm -rf $tmpfiles | |
8872 | 18 exit 0 |