Skip to content

Commit

Permalink
Make TSan failures in CI fatal. (#14732)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Jul 21, 2023
1 parent ad20bdb commit 4361646
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
env:
BUILD_VARIANT: ${{matrix.build_variant}}
CHIP_TOOL_VARIANT: ${{matrix.chip_tool}}
TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt"

if: github.actor != 'restyled-io[bot]'
runs-on: ubuntu-latest
Expand Down Expand Up @@ -124,6 +125,7 @@ jobs:
env:
BUILD_VARIANT: ${{matrix.build_variant}}
CHIP_TOOL_VARIANT: ${{matrix.chip_tool}}
TSAN_OPTIONS: "halt_on_error=1"

if: github.actor != 'restyled-io[bot]'
runs-on: macos-latest
Expand Down
10 changes: 10 additions & 0 deletions scripts/tests/chiptest/tsan-linux-suppressions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# The Linux server app ends up with a data race in libglib. A race_top
# suppression does not work, since the actual race is inside a memset, so the
# thing on top of the stack is memset. called_from_lib is a narrower
# suppression than a "race" suppression (which would be "libglib anywhere on the
# stack", as opposed to "inside a function TSan intercepts, which was called
# from libglib).
#
# See https://github.com/project-chip/connectedhomeip/issues/14710 for
# addressing this.
called_from_lib:libglib

0 comments on commit 4361646

Please sign in to comment.