Skip to content

Commit ab754fb

Browse files
Merge branch 'master' into TC-SC-4.3-python-test
2 parents 1ba1294 + b742587 commit ab754fb

File tree

851 files changed

+38733
-7828
lines changed

Some content is hidden

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

851 files changed

+38733
-7828
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

+8-31
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,19 @@ abfb
1414
ABI
1515
ABIs
1616
ables
17-
AccessControl
18-
AccessControlEntry
17+
accesscontrol
1918
accessor
2019
Accessors
21-
AccountLogin
2220
acdbc
2321
ack
2422
ACKed
2523
ACL
2624
ACLs
2725
actdiag
28-
AdapterAddress
29-
AdapterName
3026
adb
3127
AddNOC
32-
AddOrUpdateThreadNetwork
33-
AddOrUpdateWiFiNetwork
3428
addr
35-
AddResponse
36-
AddThreadNetwork
37-
AddStatus
3829
adk
39-
AdministratorCommissioning
4030
adoc
4131
adr
4232
AdvAutonomous
@@ -48,7 +38,6 @@ AE
4838
aef
4939
AES
5040
AIDL
51-
AlarmCode
5241
algs
5342
alloc
5443
Ameba
@@ -61,15 +50,12 @@ AnnounceOTAProvider
6150
AnnounceOTAProviderRequest
6251
APIs
6352
apk
64-
AppConfig
6553
AppImpl
6654
AppleTV
6755
appliable
68-
ApplianceControl
6956
applianceeventsandalert
7057
ApplianceIdentification
7158
appliancestatistics
72-
ApplicationBasic
7359
ApplicationId
7460
ApplicationIdentifier
7561
ApplicationLauncher
@@ -171,7 +157,6 @@ BRD
171157
breakpoint
172158
bredr
173159
BridgedDeviceBasicInformation
174-
bridgedLightEndpoint
175160
bringup
176161
BroadcastReceiver
177162
BromateConcentrationMeasurement
@@ -259,9 +244,6 @@ CLIs
259244
cloudbuild
260245
CLRF
261246
clusterAttrs
262-
clusterId
263-
clusterList
264-
clusterListName
265247
ClusterName
266248
ClusterObjectTests
267249
ClusterRevision
@@ -315,7 +297,6 @@ ContentApp's
315297
ContentAppPlatform
316298
ContentLaunch
317299
ContentLauncher
318-
continuousHinting
319300
contrib
320301
controllee
321302
conv
@@ -382,7 +363,6 @@ DefaultOTARequestor
382363
DefaultOTARequestorDriver
383364
DefaultOTARequestorStorage
384365
DefaultSuccess
385-
defaultValue
386366
definedValue
387367
DehumidificationControl
388368
DelayedActionTime
@@ -415,9 +395,7 @@ DeviceLayer
415395
DeviceNetworkProvisioningDelegate
416396
DeviceNetworkProvisioningDelegateImpl
417397
DevicePairingDelegate
418-
deviceSoftwareVersionModel
419398
DeviceTemperatureConfiguration
420-
deviceType
421399
DevKitC
422400
DevKitM
423401
devtype
@@ -487,6 +465,7 @@ EchoMessage
487465
EchoRequests
488466
EchoResponse
489467
EchoService
468+
ECW
490469
edaf
491470
edc
492471
EDR
@@ -511,8 +490,6 @@ EnableNetwork
511490
EnableWiFiNetwork
512491
endian
513492
EndpointId
514-
endpointName
515-
endsWith
516493
eno
517494
entrypoint
518495
enum
@@ -580,7 +557,6 @@ FlowMeasurement
580557
FluorideConcentrationMeasurement
581558
focusable
582559
forkpty
583-
formatOnSave
584560
FOTA
585561
FreeRTOS
586562
FreeRTOSConfig
@@ -614,7 +590,6 @@ GetIP
614590
getManualTests
615591
GetSafeAttributePersistenceProvider
616592
getstarted
617-
getTests
618593
GH
619594
ghcr
620595
ghp
@@ -639,8 +614,6 @@ graphviz
639614
Groupcast
640615
GroupId
641616
GroupKeyManagement
642-
groupKeySecurityPolicy
643-
groupKeySetID
644617
groupsettings
645618
gsdk
646619
gtk
@@ -694,8 +667,6 @@ ifconfig
694667
ifdef
695668
ifdefs
696669
IGMP
697-
ignoreApplyUpdate
698-
ignoreQueryImage
699670
ihex
700671
IlluminanceMeasurement
701672
IM
@@ -768,6 +739,7 @@ kCase
768739
Kconfig
769740
kDacPublicKey
770741
KeypadInput
742+
keypair
771743
keyset
772744
kGroup
773745
kInvalidCommandId
@@ -914,6 +886,7 @@ mlan
914886
MLD
915887
mmevk
916888
moal
889+
Mobly
917890
ModeSelect
918891
modprobe
919892
Modustoolbox
@@ -978,6 +951,7 @@ nrfdks
978951
nrfutil
979952
nrfxlib
980953
NTAG
954+
NTP
981955
nullable
982956
nullptr
983957
NUM
@@ -1043,6 +1017,7 @@ OTBR
10431017
otcli
10441018
outform
10451019
outgoingCommands
1020+
overridable
10461021
OxygenConcentrationMeasurement
10471022
OzoneConcentrationMeasurement
10481023
PAA
@@ -1081,6 +1056,7 @@ perfetto
10811056
periodicQueryTimeout
10821057
pexpect
10831058
pickString
1059+
PICSCODE
10841060
PID
10851061
Pigweed
10861062
PinCode
@@ -1396,6 +1372,7 @@ TestGenExample
13961372
TestGroupDemoConfig
13971373
TestMultiRead
13981374
TestName
1375+
TestOnlySendCommandTimedRequestFlagWithNoTimedInvoke
13991376
TESTPASSWD
14001377
TestPICS
14011378
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 }}

0 commit comments

Comments
 (0)