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 4, 2020
1 parent cc5304c commit e4af0f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
7 changes: 1 addition & 6 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 All @@ -95,7 +90,7 @@ script:
travis_wait 30 valgrind --error-exitcode=42 ./exhaustive_tests;
fi
- if [ -n "$CTIMETEST" ]; then
libtool --mode=execute valgrind ./valgrind_ctime_test &> valgrind_ctime_test.log;
./libtool --mode=execute valgrind ./valgrind_ctime_test &> valgrind_ctime_test.log;
fi

after_script:
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 e4af0f4

Please sign in to comment.