Skip to content

Commit

Permalink
If tests are ran with (ASan + LSan), Docker needs access to ptrace
Browse files Browse the repository at this point in the history
See google/sanitizers#764 for details
  • Loading branch information
gkrizek committed Dec 28, 2018
1 parent a3b8b43 commit aa9aca8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .travis/test_04_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export UBSAN_OPTIONS="suppressions=${TRAVIS_BUILD_DIR}/test/sanitizer_suppressio
env | grep -E '^(BITCOIN_CONFIG|CCACHE_|WINEDEBUG|LC_ALL|BOOST_TEST_RANDOM|CONFIG_SHELL|(ASAN|LSAN|TSAN|UBSAN)_OPTIONS)' | tee /tmp/env
if [[ $HOST = *-mingw32 ]]; then
DOCKER_ADMIN="--cap-add SYS_ADMIN"
elif [[ $BITCOIN_CONFIG = *--with-sanitizers=*address* ]]; then # If ran with (ASan + LSan), Docker needs access to ptrace (https://github.com/google/sanitizers/issues/764)
DOCKER_ADMIN="--cap-add SYS_PTRACE"
fi
DOCKER_ID=$(docker run $DOCKER_ADMIN -idt --mount type=bind,src=$TRAVIS_BUILD_DIR,dst=$TRAVIS_BUILD_DIR --mount type=bind,src=$CCACHE_DIR,dst=$CCACHE_DIR -w $TRAVIS_BUILD_DIR --env-file /tmp/env $DOCKER_NAME_TAG)

Expand Down

0 comments on commit aa9aca8

Please sign in to comment.