Fix tsan tests.

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.
This commit is contained in:
Dario Nieuwenhuis 2023-10-20 23:32:49 +02:00
parent 199a8d8819
commit a4e8f82160

View File

@ -283,6 +283,7 @@ jobs:
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
components: rust-src
override: true
- name: Export variables
@ -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: