Skip to content

Commit

Permalink
Use ThreadSanitizer CI setup that avoids false positives (#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiasko authored Jul 6, 2020
1 parent bc4a6d5 commit 90e7e65
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 28 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ jobs:
- uses: actions/checkout@v2
- name: Install Rust
run: rustup update nightly && rustup default nightly
- name: TSAN / MSAN
- name: Install rust-src
run: rustup component add rust-src
- name: ASAN / TSAN
run: . ci/tsan.sh

# Loom
Expand Down
24 changes: 0 additions & 24 deletions ci/tsan

This file was deleted.

4 changes: 1 addition & 3 deletions ci/tsan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

set -ex

export RUST_TEST_THREADS=1
export ASAN_OPTIONS="detect_odr_violation=0 detect_leaks=0"
export TSAN_OPTIONS="suppressions=$(pwd)/ci/tsan"

# Run address sanitizer
RUSTFLAGS="-Z sanitizer=address" \
cargo test --target x86_64-unknown-linux-gnu --test test_bytes --test test_buf --test test_buf_mut

# Run thread sanitizer
RUSTFLAGS="-Z sanitizer=thread" \
cargo test --target x86_64-unknown-linux-gnu --test test_bytes --test test_buf --test test_buf_mut
cargo -Zbuild-std test --target x86_64-unknown-linux-gnu --test test_bytes --test test_buf --test test_buf_mut

0 comments on commit 90e7e65

Please sign in to comment.