Skip to content

Commit b509597

Browse files
authored
Merge branch 'master' into feature/enable_uart_logging
2 parents 9b75837 + ef8ee32 commit b509597

File tree

195 files changed

+7712
-876
lines changed

Some content is hidden

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

195 files changed

+7712
-876
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

+1-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
@@ -511,8 +489,6 @@ EnableNetwork
511489
EnableWiFiNetwork
512490
endian
513491
EndpointId
514-
endpointName
515-
endsWith
516492
eno
517493
entrypoint
518494
enum
@@ -580,7 +556,6 @@ FlowMeasurement
580556
FluorideConcentrationMeasurement
581557
focusable
582558
forkpty
583-
formatOnSave
584559
FOTA
585560
FreeRTOS
586561
FreeRTOSConfig
@@ -614,7 +589,6 @@ GetIP
614589
getManualTests
615590
GetSafeAttributePersistenceProvider
616591
getstarted
617-
getTests
618592
GH
619593
ghcr
620594
ghp
@@ -639,8 +613,6 @@ graphviz
639613
Groupcast
640614
GroupId
641615
GroupKeyManagement
642-
groupKeySecurityPolicy
643-
groupKeySetID
644616
groupsettings
645617
gsdk
646618
gtk
@@ -694,8 +666,6 @@ ifconfig
694666
ifdef
695667
ifdefs
696668
IGMP
697-
ignoreApplyUpdate
698-
ignoreQueryImage
699669
ihex
700670
IlluminanceMeasurement
701671
IM

.github/workflows/darwin.yaml

+7-11
Original file line numberDiff line numberDiff line change
@@ -105,19 +105,15 @@ jobs:
105105
mkdir -p /tmp/darwin/framework-tests
106106
../../../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) &
107107
../../../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)
108+
# Disable BLE (CHIP_IS_BLE=NO) because the app does not have the permission to use it and that may crash the CI.
109+
110+
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)
114111
# 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)
112+
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)
116113
# 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)
114+
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)
115+
116+
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)
121117
working-directory: src/darwin/Framework
122118
- name: Build Matter TV Casting Bridge
123119
run: |

.github/workflows/lint.yml

-6
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,11 @@ jobs:
9595
--known-failure app/att-storage.h \
9696
--known-failure app/CommandHandler.h \
9797
--known-failure app/CommandHandlerInterface.h \
98-
--known-failure app/CommandSender.h \
9998
--known-failure app/CommandSenderLegacyCallback.h \
10099
--known-failure app/CompatEnumNames.h \
101100
--known-failure app/data-model/ListLargeSystemExtensions.h \
102101
--known-failure app/EventHeader.h \
103-
--known-failure app/EventLoggingDelegate.h \
104-
--known-failure app/EventLogging.h \
105102
--known-failure app/EventLoggingTypes.h \
106-
--known-failure app/InteractionModelHelper.h \
107-
--known-failure app/ReadClient.h \
108103
--known-failure app/ReadHandler.h \
109104
--known-failure app/ReadPrepareParams.h \
110105
--known-failure app/reporting/tests/MockReportScheduler.cpp \
@@ -134,7 +129,6 @@ jobs:
134129
--known-failure app/util/odd-sized-integers.h \
135130
--known-failure app/util/util.cpp \
136131
--known-failure app/util/util.h \
137-
--known-failure app/WriteClient.h \
138132
--known-failure app/WriteHandler.h \
139133
--known-failure lib/core/CHIPVendorIdentifiers.hpp \
140134
--known-failure platform/DeviceSafeQueue.cpp \

.github/workflows/spell.yml

+11-10
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,20 @@ on:
2525
- ".github/.wordlist.txt"
2626

2727
jobs:
28-
check-reviewdog:
29-
name: Check Spelling - reviewdog
30-
runs-on: ubuntu-latest
31-
steps:
32-
- name: Checkout
33-
uses: actions/checkout@v4
34-
- uses: reviewdog/action-misspell@v1
35-
with:
36-
github_token: ${{ secrets.GITHUB_TOKEN }}
28+
# Seems redundant; removed as pyspelling is customized while this is not
29+
# check-reviewdog:
30+
# name: Check Spelling - reviewdog
31+
# runs-on: ubuntu-latest
32+
# steps:
33+
# - name: Checkout
34+
# uses: actions/checkout@v4
35+
# - uses: reviewdog/action-misspell@v1
36+
# with:
37+
# github_token: ${{ secrets.GITHUB_TOKEN }}
3738
check-spellcheck:
3839
name: Check Spelling - pyspelling
3940
runs-on: ubuntu-latest
4041
steps:
4142
- name: Checkout
4243
uses: actions/checkout@v4
43-
- uses: igsekor/pyspelling-any@v1.0.4
44+
- uses: rojopolis/spellcheck-github-actions@0.36.0

.spellcheck.yml

+1
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,4 @@ matrix:
6868
- '**/*.md|!third_party/**|!examples/common/**/repo/**|!docs/ERROR_CODES.md|!docs/clusters.md|!docs/testing/yaml_schema.md|!docs/testing/yaml_pseudocluster.md'
6969
aspell:
7070
ignore-case: true
71+
camel-case: true

BUILD.gn

+2
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
182182
deps += [
183183
"${chip_root}/src/app/server/java",
184184
"${chip_root}/src/controller/java",
185+
"${chip_root}/src/controller/java:jsontlv",
185186
"${chip_root}/src/controller/java:onboarding_payload",
187+
"${chip_root}/src/controller/java:tlv",
186188
"${chip_root}/src/platform/android:java",
187189
]
188190
}

build/config/BUILDCONFIG.gn

+3-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ if (_chip_defaults.custom_toolchain != "") {
127127
"Unsupported target_cpu: ${current_cpu}. Shall be arm for webOS")
128128
}
129129
} else {
130-
assert(false, "No toolchain specified, please specify custom_toolchain")
130+
assert(
131+
false,
132+
"No toolchain specified, please specify custom_toolchain for host_os='${host_os}', target_os='${target_os}', host_cpu='${host_cpu}', target_cpu='${target_cpu}'")
131133
}
132134

133135
set_default_toolchain(_default_toolchain)

build/config/compiler/BUILD.gn

+5
Original file line numberDiff line numberDiff line change
@@ -395,11 +395,16 @@ declare_args() {
395395
}
396396

397397
config("sanitize_address") {
398+
defines = []
398399
cflags = [
399400
"-fsanitize=address",
400401
"-fno-omit-frame-pointer",
401402
]
402403
ldflags = cflags
404+
405+
if (target_os == "mac" || target_os == "ios") {
406+
defines += [ "_LIBCPP_HAS_NO_ASAN" ]
407+
}
403408
}
404409

405410
config("sanitize_thread") {

examples/air-purifier-app/air-purifier-common/BUILD.gn

-3
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,5 @@ import("${chip_root}/src/app/chip_data_model.gni")
1717

1818
chip_data_model("air-purifier-common") {
1919
zap_file = "air-purifier-app.zap"
20-
21-
zap_pregenerated_dir =
22-
"${chip_root}/zzz_generated/air-purifier-app/zap-generated"
2320
is_server = true
2421
}

examples/air-quality-sensor-app/air-quality-sensor-common/BUILD.gn

-3
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,5 @@ import("${chip_root}/src/app/chip_data_model.gni")
1717

1818
chip_data_model("air-quality-sensor-common") {
1919
zap_file = "air-quality-sensor-app.zap"
20-
21-
zap_pregenerated_dir =
22-
"${chip_root}/zzz_generated/air-quality-sensor-app/zap-generated"
2320
is_server = true
2421
}

examples/all-clusters-app/all-clusters-common/BUILD.gn

-3
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,5 @@ import("${chip_root}/src/app/chip_data_model.gni")
1818

1919
chip_data_model("all-clusters-common") {
2020
zap_file = "all-clusters-app.zap"
21-
22-
zap_pregenerated_dir =
23-
"${chip_root}/zzz_generated/all-clusters-app/zap-generated"
2421
is_server = true
2522
}

examples/all-clusters-minimal-app/all-clusters-common/BUILD.gn

-3
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,5 @@ import("${chip_root}/src/app/chip_data_model.gni")
1818

1919
chip_data_model("all-clusters-common") {
2020
zap_file = "all-clusters-minimal-app.zap"
21-
22-
zap_pregenerated_dir =
23-
"${chip_root}/zzz_generated/all-clusters-minimal-app/zap-generated"
2421
is_server = true
2522
}

examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/BasicClientFragment.kt

+14-2
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,13 @@ class BasicClientFragment : Fragment() {
139139
val attributeId = BasicInformation.Attribute.valueOf(attributeName).id
140140

141141
val devicePtr =
142-
ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId)
142+
try {
143+
ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId)
144+
} catch (e: IllegalStateException) {
145+
Log.d(TAG, "getConnectedDevicePointer exception", e)
146+
showMessage("Get DevicePointer fail!")
147+
return
148+
}
143149

144150
ChipClient.getDeviceController(requireContext())
145151
.readPath(
@@ -182,7 +188,13 @@ class BasicClientFragment : Fragment() {
182188
private suspend fun sendWriteAttribute(attribute: BasicInformation.Attribute, tlv: ByteArray) {
183189
val clusterId = BasicInformation.ID
184190
val devicePtr =
185-
ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId)
191+
try {
192+
ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId)
193+
} catch (e: IllegalStateException) {
194+
Log.d(TAG, "getConnectedDevicePointer exception", e)
195+
showMessage("Get DevicePointer fail!")
196+
return
197+
}
186198

187199
ChipClient.getDeviceController(requireContext())
188200
.write(

0 commit comments

Comments
 (0)