From 59369eaf66d20b7235bcc416b216aba38e99c1ed Mon Sep 17 00:00:00 2001 From: James Munns Date: Sun, 13 Jan 2019 02:19:22 +0100 Subject: [PATCH] Always run tsan on nightly --- ci/test.sh | 7 +++++++ tsan-blacklist.txt | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 tsan-blacklist.txt diff --git a/ci/test.sh b/ci/test.sh index 9cfb8e5..bf6adad 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -13,6 +13,13 @@ cargo test --manifest-path core/Cargo.toml cargo test --features="travisci" --manifest-path bbqtest/Cargo.toml -- --nocapture cargo test --features="travisci" --release --manifest-path bbqtest/Cargo.toml -- --nocapture +if [ $TRAVIS_RUST_VERSION = nightly ]; then + export RUSTFLAGS="-Z sanitizer=thread" + export RUST_TEST_THREADS=1 + export TSAN_OPTIONS="suppressions=$(pwd)/tsan-blacklist.txt" +fi + # Test using a full std crate, long test with a single thread (it's faster) cargo test --manifest-path bbqtest/Cargo.toml -- --nocapture --test-threads=1 cargo test --release --manifest-path bbqtest/Cargo.toml -- --nocapture --test-threads=1 + diff --git a/tsan-blacklist.txt b/tsan-blacklist.txt new file mode 100644 index 0000000..bf051e5 --- /dev/null +++ b/tsan-blacklist.txt @@ -0,0 +1,7 @@ +# false positives in thread::spawn (?) +race:*dealloc +race:*drop_slow* +race:__call_tls_dtors + +# false positives in scoped_threadpool (?) +race:*drop*