Skip to content

Commit

Permalink
Fix tsan tests.
Browse files Browse the repository at this point in the history
from [this](https://doc.rust-lang.org/beta/unstable-book/compiler-flags/sanitizer.html#threadsanitizer)

> To work correctly ThreadSanitizer needs to be "aware" of all synchronization operations in a program. It generally achieves that through \[...\] and compile time instrumentation (e.g. atomic operations). Using it without instrumenting all the program code can lead to false positive reports.

and the example uses -Zbuild-std ... of course, std has to be instrumented. Adding -Zbuild-std fixes it, indeed.
  • Loading branch information
Dirbaio committed Oct 20, 2023
1 parent 199a8d8 commit a4e8f82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ jobs:
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
components: rust-src
override: true

- name: Export variables
Expand All @@ -295,7 +296,7 @@ jobs:
with:
use-cross: false
command: test
args: --test tsan --target=${{ matrix.target }} --features=${{ matrix.features }} ${{ matrix.buildtype }} -- --test-threads=1
args: -Zbuild-std --test tsan --target=${{ matrix.target }} --features=${{ matrix.features }} ${{ matrix.buildtype }} -- --test-threads=1

# Run cfail tests on MSRV
testcfail:
Expand Down

0 comments on commit a4e8f82

Please sign in to comment.