Skip to content

Commit

Permalink
Run Linux TSAN tests with TSAN-enabled glib-2.0 libs
Browse files Browse the repository at this point in the history
  • Loading branch information
arkq committed Nov 14, 2022
1 parent 67ad95d commit 3a7d271
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 27 deletions.
83 changes: 66 additions & 17 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,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"
TSAN_OPTIONS: halt_on_error=1
LSAN_OPTIONS: detect_leaks=1

if: github.actor != 'restyled-io[bot]'
Expand Down Expand Up @@ -196,6 +196,7 @@ jobs:
- name: Run Tests
timeout-minutes: 65
run: |
test -z ${BUILD_VARIANT##*tsan*} && export LD_LIBRARY_PATH=$LD_LIBRARY_PATH_TSAN
./scripts/run_in_build_env.sh \
"./scripts/tests/run_test_suite.py \
--chip-tool ./out/linux-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \
Expand Down Expand Up @@ -225,6 +226,7 @@ jobs:
path: objdir-clone/
# objdirs are big; don't hold on to them too long.
retention-days: 5

test_suites_darwin:
name: Test Suites - Darwin
timeout-minutes: 150
Expand All @@ -236,7 +238,7 @@ jobs:
env:
BUILD_VARIANT: ${{matrix.build_variant}}
CHIP_TOOL_VARIANT: ${{matrix.chip_tool}}
TSAN_OPTIONS: "halt_on_error=1"
TSAN_OPTIONS: halt_on_error=1
LSAN_OPTIONS: detect_leaks=1 suppressions=scripts/tests/chiptest/lsan-mac-suppressions.txt

if: github.actor != 'restyled-io[bot]'
Expand Down Expand Up @@ -336,12 +338,19 @@ jobs:
path: objdir-clone/
# objdirs are big; don't hold on to them too long.
retention-days: 5

repl_tests_linux:
name: REPL Tests - Linux
timeout-minutes: 130

strategy:
matrix:
build_variant: [ipv6only-no-ble-no-wifi-tsan-clang]
chip_tool: [""]
env:
TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt"
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: ubuntu-latest
Expand Down Expand Up @@ -376,22 +385,56 @@ jobs:
- name: Build Python REPL and example apps
timeout-minutes: 50
run: |
scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env'
./scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env'
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test \
--target linux-x64-python-bindings \
build \
--copy-artifacts-to objdir-clone \
"
"./scripts/build/build_examples.py \
--target linux-x64-all-${BUILD_VARIANT}-test \
--target linux-x64-python-bindings \
build \
--copy-artifacts-to objdir-clone \
"
- name: Run Tests
timeout-minutes: 10
run: |
scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --script-args "--log-level INFO -t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"'
scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_RR_1_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"'
scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_SC_3_6.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"'
scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_DA_1_7.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --bool-arg allow_sdk_dac:true"'
scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1 --enable-key 000102030405060708090a0b0c0d0e0f" --script "src/python_testing/TC_TestEventTrigger.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --bool-arg allow_sdk_dac:true"'
test -z ${BUILD_VARIANT##*tsan*} && export LD_LIBRARY_PATH=$LD_LIBRARY_PATH_TSAN
./scripts/run_in_build_env.sh \
"./scripts/tests/run_python_test.py \
--app out/linux-x64-all-clusters-${BUILD_VARIANT}-test/chip-all-clusters-app \
--factoryreset \
--script-args '--log-level INFO -t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout' \
"
./scripts/run_in_build_env.sh \
"./scripts/tests/run_python_test.py \
--app out/linux-x64-all-clusters-${BUILD_VARIANT}-test/chip-all-clusters-app \
--factoryreset \
--app-args '--discriminator 1234 --KVS kvs1 --trace_decode 1' \
--script 'src/python_testing/TC_RR_1_1.py' \
--script-args '--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021' \
"
./scripts/run_in_build_env.sh \
"./scripts/tests/run_python_test.py \
--app out/linux-x64-all-clusters-${BUILD_VARIANT}-test/chip-all-clusters-app\
--factoryreset \
--app-args '--discriminator 1234 --KVS kvs1 --trace_decode 1' \
--script 'src/python_testing/TC_SC_3_6.py' \
--script-args '--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021' \
"
./scripts/run_in_build_env.sh \
"./scripts/tests/run_python_test.py \
--app out/linux-x64-all-clusters-${BUILD_VARIANT}-test/chip-all-clusters-app \
--factoryreset \
--app-args '--discriminator 1234 --KVS kvs1 --trace_decode 1' \
--script 'src/python_testing/TC_DA_1_7.py' \
--script-args '--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --bool-arg allow_sdk_dac:true' \
"
./scripts/run_in_build_env.sh \
"./scripts/tests/run_python_test.py \
--app out/linux-x64-all-clusters-${BUILD_VARIANT}-test/chip-all-clusters-app \
--factoryreset \
--app-args '--discriminator 1234 --KVS kvs1 --trace_decode 1 --enable-key 000102030405060708090a0b0c0d0e0f' \
--script 'src/python_testing/TC_TestEventTrigger.py' \
--script-args '--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --bool-arg allow_sdk_dac:true' \
"
- name: Uploading core files
uses: actions/upload-artifact@v3
if: ${{ failure() && !env.ACT }}
Expand Down Expand Up @@ -460,7 +503,7 @@ jobs:
- name: Build Python REPL and example apps
timeout-minutes: 50
run: |
scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env'
./scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env'
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target darwin-x64-all-clusters-${BUILD_VARIANT}-test \
Expand All @@ -470,7 +513,13 @@ jobs:
- name: Run Tests
timeout-minutes: 30
run: |
scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/darwin-x64-all-clusters-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 3840 --interface-id -1" --script-args "-t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"'
./scripts/run_in_build_env.sh \
"./scripts/tests/run_python_test.py \
--app out/darwin-x64-all-clusters-${BUILD_VARIANT}-test/chip-all-clusters-app \
--factoryreset \
--app-args '--discriminator 3840 --interface-id -1' \
--script-args '-t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout' \
"
- name: Uploading core files
uses: actions/upload-artifact@v3
if: ${{ failure() && !env.ACT }}
Expand Down
10 changes: 0 additions & 10 deletions scripts/tests/chiptest/tsan-linux-suppressions.txt

This file was deleted.

0 comments on commit 3a7d271

Please sign in to comment.