Skip to content

Commit

Permalink
Merge branch 'master' into feature/enable_uart_logging
Browse files Browse the repository at this point in the history
  • Loading branch information
arun-silabs authored Feb 23, 2024
2 parents 9b75837 + ef8ee32 commit b509597
Show file tree
Hide file tree
Showing 195 changed files with 7,712 additions and 876 deletions.
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Checks: >
-clang-analyzer-cplusplus.Move,
-clang-analyzer-deadcode.DeadStores,
-clang-analyzer-nullability.NullablePassedToNonnull,
-clang-analyzer-optin.core.EnumCastOutOfRange,
-clang-analyzer-optin.cplusplus.UninitializedObject,
-clang-analyzer-optin.cplusplus.VirtualCall,
-clang-analyzer-optin.osx.cocoa.localizability.EmptyLocalizationContextChecker,
Expand Down
32 changes: 1 addition & 31 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,19 @@ abfb
ABI
ABIs
ables
AccessControl
AccessControlEntry
accesscontrol
accessor
Accessors
AccountLogin
acdbc
ack
ACKed
ACL
ACLs
actdiag
AdapterAddress
AdapterName
adb
AddNOC
AddOrUpdateThreadNetwork
AddOrUpdateWiFiNetwork
addr
AddResponse
AddThreadNetwork
AddStatus
adk
AdministratorCommissioning
adoc
adr
AdvAutonomous
Expand All @@ -48,7 +38,6 @@ AE
aef
AES
AIDL
AlarmCode
algs
alloc
Ameba
Expand All @@ -61,15 +50,12 @@ AnnounceOTAProvider
AnnounceOTAProviderRequest
APIs
apk
AppConfig
AppImpl
AppleTV
appliable
ApplianceControl
applianceeventsandalert
ApplianceIdentification
appliancestatistics
ApplicationBasic
ApplicationId
ApplicationIdentifier
ApplicationLauncher
Expand Down Expand Up @@ -171,7 +157,6 @@ BRD
breakpoint
bredr
BridgedDeviceBasicInformation
bridgedLightEndpoint
bringup
BroadcastReceiver
BromateConcentrationMeasurement
Expand Down Expand Up @@ -259,9 +244,6 @@ CLIs
cloudbuild
CLRF
clusterAttrs
clusterId
clusterList
clusterListName
ClusterName
ClusterObjectTests
ClusterRevision
Expand Down Expand Up @@ -315,7 +297,6 @@ ContentApp's
ContentAppPlatform
ContentLaunch
ContentLauncher
continuousHinting
contrib
controllee
conv
Expand Down Expand Up @@ -382,7 +363,6 @@ DefaultOTARequestor
DefaultOTARequestorDriver
DefaultOTARequestorStorage
DefaultSuccess
defaultValue
definedValue
DehumidificationControl
DelayedActionTime
Expand Down Expand Up @@ -415,9 +395,7 @@ DeviceLayer
DeviceNetworkProvisioningDelegate
DeviceNetworkProvisioningDelegateImpl
DevicePairingDelegate
deviceSoftwareVersionModel
DeviceTemperatureConfiguration
deviceType
DevKitC
DevKitM
devtype
Expand Down Expand Up @@ -511,8 +489,6 @@ EnableNetwork
EnableWiFiNetwork
endian
EndpointId
endpointName
endsWith
eno
entrypoint
enum
Expand Down Expand Up @@ -580,7 +556,6 @@ FlowMeasurement
FluorideConcentrationMeasurement
focusable
forkpty
formatOnSave
FOTA
FreeRTOS
FreeRTOSConfig
Expand Down Expand Up @@ -614,7 +589,6 @@ GetIP
getManualTests
GetSafeAttributePersistenceProvider
getstarted
getTests
GH
ghcr
ghp
Expand All @@ -639,8 +613,6 @@ graphviz
Groupcast
GroupId
GroupKeyManagement
groupKeySecurityPolicy
groupKeySetID
groupsettings
gsdk
gtk
Expand Down Expand Up @@ -694,8 +666,6 @@ ifconfig
ifdef
ifdefs
IGMP
ignoreApplyUpdate
ignoreQueryImage
ihex
IlluminanceMeasurement
IM
Expand Down
18 changes: 7 additions & 11 deletions .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,15 @@ jobs:
mkdir -p /tmp/darwin/framework-tests
../../../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) &
../../../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) &
# Disable BLE because the app does not have the permission to use
# it and that may crash the CI.
#
# -enableUndefinedBehaviorSanitizer instruments the code in Matter.framework,
# but to instrument the code in the underlying libCHIP we need to pass CHIP_IS_UBSAN=YES
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)
# Disable BLE (CHIP_IS_BLE=NO) because the app does not have the permission to use it and that may crash the CI.
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)
# And the same thing, but with MTR_PER_CONTROLLER_STORAGE_ENABLED turned off, so we test that it does not break for now.
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)
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)
# And the same thing, but with MTR_NO_AVAILABILITY not turned on. This requires -Wno-unguarded-availability-new to avoid availability errors.
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)
# -enableThreadSanitizer instruments the code in Matter.framework,
# but to instrument the code in the underlying libCHIP we need to pass CHIP_IS_TSAN=YES
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)
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)
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)
working-directory: src/darwin/Framework
- name: Build Matter TV Casting Bridge
run: |
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,11 @@ jobs:
--known-failure app/att-storage.h \
--known-failure app/CommandHandler.h \
--known-failure app/CommandHandlerInterface.h \
--known-failure app/CommandSender.h \
--known-failure app/CommandSenderLegacyCallback.h \
--known-failure app/CompatEnumNames.h \
--known-failure app/data-model/ListLargeSystemExtensions.h \
--known-failure app/EventHeader.h \
--known-failure app/EventLoggingDelegate.h \
--known-failure app/EventLogging.h \
--known-failure app/EventLoggingTypes.h \
--known-failure app/InteractionModelHelper.h \
--known-failure app/ReadClient.h \
--known-failure app/ReadHandler.h \
--known-failure app/ReadPrepareParams.h \
--known-failure app/reporting/tests/MockReportScheduler.cpp \
Expand Down Expand Up @@ -134,7 +129,6 @@ jobs:
--known-failure app/util/odd-sized-integers.h \
--known-failure app/util/util.cpp \
--known-failure app/util/util.h \
--known-failure app/WriteClient.h \
--known-failure app/WriteHandler.h \
--known-failure lib/core/CHIPVendorIdentifiers.hpp \
--known-failure platform/DeviceSafeQueue.cpp \
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/spell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,20 @@ on:
- ".github/.wordlist.txt"

jobs:
check-reviewdog:
name: Check Spelling - reviewdog
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: reviewdog/action-misspell@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Seems redundant; removed as pyspelling is customized while this is not
# check-reviewdog:
# name: Check Spelling - reviewdog
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - uses: reviewdog/action-misspell@v1
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
check-spellcheck:
name: Check Spelling - pyspelling
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: igsekor/[email protected]
- uses: rojopolis/[email protected]
1 change: 1 addition & 0 deletions .spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,4 @@ matrix:
- '**/*.md|!third_party/**|!examples/common/**/repo/**|!docs/ERROR_CODES.md|!docs/clusters.md|!docs/testing/yaml_schema.md|!docs/testing/yaml_pseudocluster.md'
aspell:
ignore-case: true
camel-case: true
2 changes: 2 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
deps += [
"${chip_root}/src/app/server/java",
"${chip_root}/src/controller/java",
"${chip_root}/src/controller/java:jsontlv",
"${chip_root}/src/controller/java:onboarding_payload",
"${chip_root}/src/controller/java:tlv",
"${chip_root}/src/platform/android:java",
]
}
Expand Down
4 changes: 3 additions & 1 deletion build/config/BUILDCONFIG.gn
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ if (_chip_defaults.custom_toolchain != "") {
"Unsupported target_cpu: ${current_cpu}. Shall be arm for webOS")
}
} else {
assert(false, "No toolchain specified, please specify custom_toolchain")
assert(
false,
"No toolchain specified, please specify custom_toolchain for host_os='${host_os}', target_os='${target_os}', host_cpu='${host_cpu}', target_cpu='${target_cpu}'")
}

set_default_toolchain(_default_toolchain)
Expand Down
5 changes: 5 additions & 0 deletions build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -395,11 +395,16 @@ declare_args() {
}

config("sanitize_address") {
defines = []
cflags = [
"-fsanitize=address",
"-fno-omit-frame-pointer",
]
ldflags = cflags

if (target_os == "mac" || target_os == "ios") {
defines += [ "_LIBCPP_HAS_NO_ASAN" ]
}
}

config("sanitize_thread") {
Expand Down
3 changes: 0 additions & 3 deletions examples/air-purifier-app/air-purifier-common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,5 @@ import("${chip_root}/src/app/chip_data_model.gni")

chip_data_model("air-purifier-common") {
zap_file = "air-purifier-app.zap"

zap_pregenerated_dir =
"${chip_root}/zzz_generated/air-purifier-app/zap-generated"
is_server = true
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,5 @@ import("${chip_root}/src/app/chip_data_model.gni")

chip_data_model("air-quality-sensor-common") {
zap_file = "air-quality-sensor-app.zap"

zap_pregenerated_dir =
"${chip_root}/zzz_generated/air-quality-sensor-app/zap-generated"
is_server = true
}
3 changes: 0 additions & 3 deletions examples/all-clusters-app/all-clusters-common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,5 @@ import("${chip_root}/src/app/chip_data_model.gni")

chip_data_model("all-clusters-common") {
zap_file = "all-clusters-app.zap"

zap_pregenerated_dir =
"${chip_root}/zzz_generated/all-clusters-app/zap-generated"
is_server = true
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,5 @@ import("${chip_root}/src/app/chip_data_model.gni")

chip_data_model("all-clusters-common") {
zap_file = "all-clusters-minimal-app.zap"

zap_pregenerated_dir =
"${chip_root}/zzz_generated/all-clusters-minimal-app/zap-generated"
is_server = true
}
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,13 @@ class BasicClientFragment : Fragment() {
val attributeId = BasicInformation.Attribute.valueOf(attributeName).id

val devicePtr =
ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId)
try {
ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId)
} catch (e: IllegalStateException) {
Log.d(TAG, "getConnectedDevicePointer exception", e)
showMessage("Get DevicePointer fail!")
return
}

ChipClient.getDeviceController(requireContext())
.readPath(
Expand Down Expand Up @@ -182,7 +188,13 @@ class BasicClientFragment : Fragment() {
private suspend fun sendWriteAttribute(attribute: BasicInformation.Attribute, tlv: ByteArray) {
val clusterId = BasicInformation.ID
val devicePtr =
ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId)
try {
ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId)
} catch (e: IllegalStateException) {
Log.d(TAG, "getConnectedDevicePointer exception", e)
showMessage("Get DevicePointer fail!")
return
}

ChipClient.getDeviceController(requireContext())
.write(
Expand Down
Loading

0 comments on commit b509597

Please sign in to comment.