Skip to content

Commit

Permalink
Run valgrind constant-time tests with locally generated ./libtool
Browse files Browse the repository at this point in the history
  • Loading branch information
real-or-random committed Mar 5, 2020
1 parent 72a3327 commit 110bc4f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ addons:
packages:
- libgmp-dev
- valgrind
- libtool-bin
compiler:
- clang
- gcc
Expand Down Expand Up @@ -41,7 +40,6 @@ matrix:
- gcc-multilib
- libgmp-dev:i386
- valgrind
- libtool-bin
- libc6-dbg:i386
- compiler: clang
env: HOST=i686-linux-gnu
Expand All @@ -50,7 +48,6 @@ matrix:
packages:
- gcc-multilib
- valgrind
- libtool-bin
- libc6-dbg:i386
- compiler: gcc
env: HOST=i686-linux-gnu ENDOMORPHISM=yes
Expand All @@ -59,7 +56,6 @@ matrix:
packages:
- gcc-multilib
- valgrind
- libtool-bin
- libc6-dbg:i386
- compiler: gcc
env: HOST=i686-linux-gnu
Expand All @@ -69,7 +65,6 @@ matrix:
- gcc-multilib
- libgmp-dev:i386
- valgrind
- libtool-bin
- libc6-dbg:i386
- compiler: gcc
env:
Expand Down
2 changes: 1 addition & 1 deletion src/valgrind_ctime_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ int main(void) {

if (!RUNNING_ON_VALGRIND) {
fprintf(stderr, "This test can only usefully be run inside valgrind.\n");
fprintf(stderr, "Usage: libtool --mode=execute valgrind ./valgrind_ctime_test\n");
fprintf(stderr, "Usage: ./libtool --mode=execute valgrind ./valgrind_ctime_test\n");
exit(99); /* indicates "ERROR" in make check */
}

Expand Down
4 changes: 2 additions & 2 deletions valgrind_ctime_test.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/sh

libtool --mode=execute valgrind --error-exitcode=1 ./valgrind_ctime_test "$@"
./libtool --mode=execute valgrind --error-exitcode=1 ./valgrind_ctime_test "$@"

case $? in
127) # "command not found", i.e., either libtool or valgrind not installed
127) # "command not found", i.e., valgrind not installed
exit 77 # map this to "SKIP" (=77) for make check
;;
*)
Expand Down

0 comments on commit 110bc4f

Please sign in to comment.