Skip to content

Commit f4fa9dd

Browse files
Merge branch 'master' into idm-4.2-troubleshoot
2 parents 1d09862 + b742587 commit f4fa9dd

File tree

733 files changed

+30440
-7434
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

733 files changed

+30440
-7434
lines changed

.clang-tidy

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Checks: >
3535
-clang-analyzer-cplusplus.Move,
3636
-clang-analyzer-deadcode.DeadStores,
3737
-clang-analyzer-nullability.NullablePassedToNonnull,
38+
-clang-analyzer-optin.core.EnumCastOutOfRange,
3839
-clang-analyzer-optin.cplusplus.UninitializedObject,
3940
-clang-analyzer-optin.cplusplus.VirtualCall,
4041
-clang-analyzer-optin.osx.cocoa.localizability.EmptyLocalizationContextChecker,

.github/.wordlist.txt

+7
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,7 @@ EchoMessage
465465
EchoRequests
466466
EchoResponse
467467
EchoService
468+
ECW
468469
edaf
469470
edc
470471
EDR
@@ -738,6 +739,7 @@ kCase
738739
Kconfig
739740
kDacPublicKey
740741
KeypadInput
742+
keypair
741743
keyset
742744
kGroup
743745
kInvalidCommandId
@@ -884,6 +886,7 @@ mlan
884886
MLD
885887
mmevk
886888
moal
889+
Mobly
887890
ModeSelect
888891
modprobe
889892
Modustoolbox
@@ -948,6 +951,7 @@ nrfdks
948951
nrfutil
949952
nrfxlib
950953
NTAG
954+
NTP
951955
nullable
952956
nullptr
953957
NUM
@@ -1013,6 +1017,7 @@ OTBR
10131017
otcli
10141018
outform
10151019
outgoingCommands
1020+
overridable
10161021
OxygenConcentrationMeasurement
10171022
OzoneConcentrationMeasurement
10181023
PAA
@@ -1051,6 +1056,7 @@ perfetto
10511056
periodicQueryTimeout
10521057
pexpect
10531058
pickString
1059+
PICSCODE
10541060
PID
10551061
Pigweed
10561062
PinCode
@@ -1366,6 +1372,7 @@ TestGenExample
13661372
TestGroupDemoConfig
13671373
TestMultiRead
13681374
TestName
1375+
TestOnlySendCommandTimedRequestFlagWithNoTimedInvoke
13691376
TESTPASSWD
13701377
TestPICS
13711378
TESTSSID

.github/actions/checkout-submodules-and-bootstrap/action.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ inputs:
1515
runs:
1616
using: "composite"
1717
steps:
18+
- name: Maximize runner disk
19+
uses: ./.github/actions/maximize-runner-disk
1820
- name: Dump disk info
1921
uses: ./.github/actions/dump-disk-info
2022
- name: Set git safe directory for local act runs
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Maximize runner disk
2+
description: Free up disk space on the github runner
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Free up disk space on the github runner
7+
if: ${{ !env.ACT }}
8+
shell: bash
9+
run: |
10+
# maximize-runner-disk
11+
if [[ "$RUNNER_OS" == Linux ]]; then
12+
# Directories to prune to free up space. Candidates:
13+
# 1.6G /usr/share/dotnet
14+
# 1.1G /usr/local/lib/android/sdk/platforms
15+
# 1000M /usr/local/lib/android/sdk/build-tools
16+
# 8.9G /usr/local/lib/android/sdk
17+
# This list can be amended later to change the trade-off between the amount of
18+
# disk space freed up, and how long it takes to do so (deleting many files is slow).
19+
prune=(/usr/share/dotnet /usr/local/lib/android/sdk/platforms /usr/local/lib/android/sdk/build-tools)
20+
21+
if [[ "$UID" -eq 0 && -d /__w ]]; then
22+
root=/runner-root-volume
23+
if [[ ! -d "$root" ]]; then
24+
echo "Unable to maximize disk space, job is running inside a container and $root is not mounted"
25+
exit 0
26+
fi
27+
function sudo() { "$@"; } # we're already root (and sudo is probably unavailable)
28+
elif [[ "$UID" -ne 0 && "$RUNNER_ENVIRONMENT" == github-hosted ]]; then
29+
root=
30+
else
31+
echo "Unable to maximize disk space, unknown runner environment"
32+
exit 0
33+
fi
34+
35+
echo "Freeing up runner disk space on ${root:-/}"
36+
function avail() { df -k --output=avail "${root:-/}" | grep '^[0-9]*$'; }
37+
function now() { date '+%s'; }
38+
before="$(avail)" start="$(now)"
39+
for dir in "${prune[@]}"; do
40+
if [[ -d "${root}${dir}" ]]; then
41+
echo "- $dir"
42+
# du -sh -- "${root}${dir}"
43+
sudo rm -rf -- "${root}${dir}"
44+
else
45+
echo "- $dir (not found)"
46+
fi
47+
done
48+
after="$(avail)" end="$(now)"
49+
echo "Done, freed up $(( (after - before) / 1024 ))M of disk space in $(( end - start )) seconds."
50+
fi

.github/workflows/build.yaml

+7-8
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
container:
4343
image: ghcr.io/project-chip/chip-build:35
4444
volumes:
45+
- "/:/runner-root-volume"
4546
- "/tmp/log_output:/tmp/test_logs"
4647
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
4748
net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"
@@ -137,6 +138,7 @@ jobs:
137138
container:
138139
image: ghcr.io/project-chip/chip-build:35
139140
volumes:
141+
- "/:/runner-root-volume"
140142
- "/tmp/log_output:/tmp/test_logs"
141143
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
142144
net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"
@@ -221,6 +223,7 @@ jobs:
221223
run: |
222224
./scripts/run_in_build_env.sh "./scripts/codepregen.py ./zzz_pregenerated"
223225
mv scripts/codegen.py scripts/codegen.py.renamed
226+
mv scripts/tools/zap/generate.py scripts/tools/zap/generate.py.renamed
224227
- name: Clean output
225228
run: rm -rf ./out
226229
- name: Build using build_examples.py (pregen)
@@ -232,18 +235,11 @@ jobs:
232235
--pregen-dir ./zzz_pregenerated \
233236
build \
234237
"
235-
- name: Check no code generation in output
236-
run: |
237-
CNT=$(find out -name "CHIPClusters.h" | wc -l)
238-
if [ "${CNT}" != "0" ]; then
239-
echo "ERROR: found unexpected generated files:"
240-
find out -name "CHIPClusters.h"
241-
exit 1
242-
fi
243238
- name: Undo code pre-generation changes (make compile time codegen work again)
244239
run: |
245240
rm -rf ./zzz_pregenerated
246241
mv scripts/codegen.py.renamed scripts/codegen.py
242+
mv scripts/tools/zap/generate.py.renamed scripts/tools/zap/generate.py
247243
- name: Run fake linux tests with build_examples
248244
run: |
249245
./scripts/run_in_build_env.sh \
@@ -285,6 +281,7 @@ jobs:
285281
container:
286282
image: ghcr.io/project-chip/chip-build:35
287283
volumes:
284+
- "/:/runner-root-volume"
288285
- "/tmp/log_output:/tmp/test_logs"
289286
options: --sysctl "net.ipv6.conf.all.disable_ipv6=0
290287
net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"
@@ -345,6 +342,7 @@ jobs:
345342
container:
346343
image: ghcr.io/project-chip/chip-build:35
347344
volumes:
345+
- "/:/runner-root-volume"
348346
- "/tmp/log_output:/tmp/test_logs"
349347
options: --sysctl "net.ipv6.conf.all.disable_ipv6=0
350348
net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"
@@ -453,6 +451,7 @@ jobs:
453451
container:
454452
image: ghcr.io/project-chip/chip-build:35
455453
volumes:
454+
- "/:/runner-root-volume"
456455
- "/tmp/log_output:/tmp/test_logs"
457456
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
458457
net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"

.github/workflows/cirque.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
- name: Get Cirque Bootstrap cache key
7272
id: cirque-bootstrap-cache-key
7373
run: echo "val=$(scripts/tests/cirque_tests.sh cachekeyhash)" >> $GITHUB_OUTPUT
74-
- uses: Wandalen/wretry.action@v1.4.4
74+
- uses: Wandalen/wretry.action@v1.4.5
7575
name: Cirque Bootstrap cache
7676
if: ${{ !env.ACT }}
7777
continue-on-error: true

.github/workflows/darwin.yaml

+16-18
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ jobs:
4949
- name: Validate zap-cli is NOT available
5050
# run_in_build_env.sh is used to ensure PATH is set to something that would otherwise find zap-cli
5151
run: scripts/run_in_build_env.sh '(zap-cli --version && exit 1) || exit 0'
52+
- name: Run watchOS Build Debug
53+
working-directory: src/darwin/Framework
54+
# Disable availability annotations, since we are not building a system
55+
# Matter.framework.
56+
run: xcodebuild -target "Matter" -sdk watchos -configuration Debug GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
5257
- name: Run iOS Build Debug
5358
working-directory: src/darwin/Framework
5459
# Disable availability annotations, since we are not building a system
@@ -105,31 +110,24 @@ jobs:
105110
mkdir -p /tmp/darwin/framework-tests
106111
../../../out/debug/chip-all-clusters-app --interface-id -1 > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) &
107112
../../../out/debug/chip-all-clusters-app --interface-id -1 --dac_provider ../../../credentials/development/commissioner_dut/struct_cd_origin_pid_vid_correct/test_case_vector.json --product-id 32768 --discriminator 3839 --secured-device-port 5539 --KVS /tmp/chip-all-clusters-app-kvs2 > >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid-err.log >&2) &
108-
# Disable BLE because the app does not have the permission to use
109-
# it and that may crash the CI.
110-
#
111-
# -enableUndefinedBehaviorSanitizer instruments the code in Matter.framework,
112-
# but to instrument the code in the underlying libCHIP we need to pass CHIP_IS_UBSAN=YES
113-
TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1 xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion' CHIP_IS_UBSAN=YES CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'> >(tee /tmp/darwin/framework-tests/darwin-tests-asan.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-asan-err.log >&2)
113+
# Disable BLE (CHIP_IS_BLE=NO) because the app does not have the permission to use it and that may crash the CI.
114+
115+
TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1 xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion' CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'> >(tee /tmp/darwin/framework-tests/darwin-tests-asan.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-asan-err.log >&2)
114116
# And the same thing, but with MTR_PER_CONTROLLER_STORAGE_ENABLED turned off, so we test that it does not break for now.
115-
TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1 xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion' CHIP_IS_UBSAN=YES CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1 MTR_PER_CONTROLLER_STORAGE_ENABLED=0' > >(tee /tmp/darwin/framework-tests/darwin-tests-asan-controller-storage.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-asan-controller-storage-err.log >&2)
117+
TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1 xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion' CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1 MTR_PER_CONTROLLER_STORAGE_ENABLED=0' > >(tee /tmp/darwin/framework-tests/darwin-tests-asan-controller-storage.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-asan-controller-storage-err.log >&2)
116118
# And the same thing, but with MTR_NO_AVAILABILITY not turned on. This requires -Wno-unguarded-availability-new to avoid availability errors.
117-
TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1 xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-unguarded-availability-new' CHIP_IS_UBSAN=YES CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited}' > >(tee /tmp/darwin/framework-tests/darwin-tests-asan-with-availability-annotations.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-asan-with-availability-annotations-err.log >&2)
118-
# -enableThreadSanitizer instruments the code in Matter.framework,
119-
# but to instrument the code in the underlying libCHIP we need to pass CHIP_IS_TSAN=YES
120-
xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableThreadSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion' CHIP_IS_TSAN=YES CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1' > >(tee /tmp/darwin/framework-tests/darwin-tests-tsan.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-tsan-err.log >&2)
119+
TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1 xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-unguarded-availability-new' CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited}' > >(tee /tmp/darwin/framework-tests/darwin-tests-asan-with-availability-annotations.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-asan-with-availability-annotations-err.log >&2)
120+
121+
xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableThreadSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion' CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1' > >(tee /tmp/darwin/framework-tests/darwin-tests-tsan.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-tsan-err.log >&2)
121122
working-directory: src/darwin/Framework
122123
- name: Build Matter TV Casting Bridge
123124
run: |
124125
xcodebuild -target "MatterTvCastingBridge" -sdk iphoneos
125126
working-directory: examples/tv-casting-app/darwin/MatterTvCastingBridge
126-
- name: Uploading .ips files in Xcode derived data to debug the failure
127-
uses: actions/upload-artifact@v4
128-
if: ${{ failure() && !env.ACT }}
129-
with:
130-
name: darwin-framework-derived-data
131-
path: ~/Library/Developer/Xcode/DerivedData/**/*.ips
132-
retention-days: 5
127+
- name: Collect crash logs
128+
run: |
129+
mkdir -p /tmp/darwin/framework-tests
130+
find ~/Library/Developer/Xcode/DerivedData /Library/Logs/DiagnosticReports -name '*.ips' -print0 | xargs -0 -J % cp % /tmp/darwin/framework-tests
133131
- name: Uploading log files
134132
uses: actions/upload-artifact@v4
135133
if: ${{ failure() && !env.ACT }}

.github/workflows/examples-esp32.yaml

+2-8
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
run: |
7272
./scripts/run_in_build_env.sh "./scripts/codepregen.py ./zzz_pregenerated"
7373
mv scripts/codegen.py scripts/codegen.py.renamed
74+
mv scripts/tools/zap/generate.py scripts/tools/zap/generate.py.renamed
7475
- name: Clean output
7576
run: rm -rf ./out
7677
- name: Build some M5Stack variations with pregen
@@ -84,18 +85,11 @@ jobs:
8485
build \
8586
--copy-artifacts-to out/artifacts \
8687
"
87-
- name: Check no code generation in output
88-
run: |
89-
CNT=$(find out -name "CHIPClusters.h" | wc -l)
90-
if [ "${CNT}" != "0" ]; then
91-
echo "ERROR: found unexpected generated files:"
92-
find out -name "CHIPClusters.h"
93-
exit 1
94-
fi
9588
- name: Undo code pregeneration changes
9689
run: |
9790
rm -rf ./zzz_pregenerated
9891
mv scripts/codegen.py.renamed scripts/codegen.py
92+
mv scripts/tools/zap/generate.py.renamed scripts/tools/zap/generate.py
9993
- name: Build example All Clusters App C3
10094
run: scripts/examples/esp_example.sh all-clusters-app sdkconfig_c3devkit.defaults
10195
- name: Copy aside build products

.github/workflows/gradle-wrapper-validation.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v4
10-
- uses: Wandalen/wretry.action@v1.4.4
10+
- uses: Wandalen/wretry.action@v1.4.5
1111
name: Gradle Validation
1212
continue-on-error: true
1313
with:

.github/workflows/java-tests.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,17 @@ jobs:
132132
--tool-cluster "im" \
133133
--tool-args "onnetwork-long-im-invoke --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 1000" \
134134
--factoryreset \
135+
'
136+
- name: Run IM Extendable Invoke Test
137+
run: |
138+
scripts/run_in_python_env.sh out/venv \
139+
'./scripts/tests/run_java_test.py \
140+
--app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \
141+
--app-args "--discriminator 3840 --interface-id -1" \
142+
--tool-path out/linux-x64-java-matter-controller \
143+
--tool-cluster "im" \
144+
--tool-args "onnetwork-long-im-extendable-invoke --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 1000" \
145+
--factoryreset \
135146
'
136147
- name: Run IM Read Test
137148
run: |

0 commit comments

Comments
 (0)