Skip to content

Commit ac410fb

Browse files
Make TSan failures in CI fatal. (project-chip#14732)
Right now warnings are logged and exiting the app would do so with a failure status, but for the server app we never exit it, so never discover that warnings happened. The fix is to just fail on the very first warning. The suppression added on Linux is to enable us to do this without immediately failing tests.
1 parent 73e3c83 commit ac410fb

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.github/workflows/tests.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
env:
3939
BUILD_VARIANT: ${{matrix.build_variant}}
4040
CHIP_TOOL_VARIANT: ${{matrix.chip_tool}}
41+
TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt"
4142

4243
if: github.actor != 'restyled-io[bot]'
4344
runs-on: ubuntu-latest
@@ -124,6 +125,7 @@ jobs:
124125
env:
125126
BUILD_VARIANT: ${{matrix.build_variant}}
126127
CHIP_TOOL_VARIANT: ${{matrix.chip_tool}}
128+
TSAN_OPTIONS: "halt_on_error=1"
127129

128130
if: github.actor != 'restyled-io[bot]'
129131
runs-on: macos-latest
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# The Linux server app ends up with a data race in libglib. A race_top
2+
# suppression does not work, since the actual race is inside a memset, so the
3+
# thing on top of the stack is memset. called_from_lib is a narrower
4+
# suppression than a "race" suppression (which would be "libglib anywhere on the
5+
# stack", as opposed to "inside a function TSan intercepts, which was called
6+
# from libglib).
7+
#
8+
# See https://github.com/project-chip/connectedhomeip/issues/14710 for
9+
# addressing this.
10+
called_from_lib:libglib

0 commit comments

Comments
 (0)