From 811832a8f2f9dbd6461d1bbaa1aeb85c2b87f1f9 Mon Sep 17 00:00:00 2001 From: Al Liu Date: Sat, 14 Sep 2024 22:19:29 +0800 Subject: [PATCH] Update tsan CI --- ci/sanitizer.sh | 14 ++++++++------ ci/tsan | 4 ++++ 2 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 ci/tsan diff --git a/ci/sanitizer.sh b/ci/sanitizer.sh index eed854ea..2b196c4c 100755 --- a/ci/sanitizer.sh +++ b/ci/sanitizer.sh @@ -6,12 +6,14 @@ export ASAN_OPTIONS="detect_odr_violation=0 detect_leaks=0" # Run address sanitizer RUSTFLAGS="-Z sanitizer=address" \ -cargo test --tests --target x86_64-unknown-linux-gnu --all-features +cargo test -Z build-std --all --release --tests --target x86_64-unknown-linux-gnu --all-features --exclude benchmarks -- --test-threads=1 -# Run leak sanitizer -RUSTFLAGS="-Z sanitizer=leak" \ -cargo test --tests --target x86_64-unknown-linux-gnu --all-features +# Run memory sanitizer +RUSTFLAGS="-Z sanitizer=memory" \ +cargo test -Z build-std --all --release --tests --target x86_64-unknown-linux-gnu --all-features --exclude benchmarks -- --test-threads=1 # Run thread sanitizer -RUSTFLAGS="-Z sanitizer=thread" \ -cargo -Zbuild-std test --tests --target x86_64-unknown-linux-gnu --all-features +cargo clean +TSAN_OPTIONS="suppressions=$(pwd)/ci/tsan" \ +RUSTFLAGS="${RUSTFLAGS:-} -Z sanitizer=thread" \ + cargo test -Z build-std --all --release --target x86_64-unknown-linux-gnu --all-features --tests --exclude benchmarks -- --test-threads=1 \ No newline at end of file diff --git a/ci/tsan b/ci/tsan new file mode 100644 index 00000000..f7ce5d5a --- /dev/null +++ b/ci/tsan @@ -0,0 +1,4 @@ +# TSAN suppressions file for orderwal + +# The epoch-based GC uses fences. +race:crossbeam_epoch