blob: 6735b493d920fbc00e11b721925d207bdba8fe15 [file] [log] [blame]
# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default
name:
31.15.1. [TC-SU-4.2] Tests for verifying cluster attributes from Admin(DUT)
PICS:
- MCORE.ACL.Administrator
config:
nodeId: 0x12344321
cluster: "Basic"
endpoint: 0
tests:
- label:
"DUT sends a write request for the DefaultOTAProviders Attribute to
the TH."
verification: |
Verify that the OTA Requestor App receives the write command and does not reject the value as invalid.
./chip-tool otasoftwareupdaterequestor write default-ota-providers "[{"fabricIndex": 1, "providerNodeID": 123, "endpoint": 0}]" 321 0
verify on TH [OTA-REQ] Logs:
[1662651310.444641][30167:30167] CHIP:IM: Received Write request
[1662651310.444820][30167:30167] CHIP:DMG: IM WH moving to [Initialized]
[1662651310.444952][30167:30167] CHIP:DMG: WriteRequestMessage =
[1662651310.445036][30167:30167] CHIP:DMG: {
[1662651310.445112][30167:30167] CHIP:DMG: suppressResponse = false,
[1662651310.445225][30167:30167] CHIP:DMG: timedRequest = false,
[1662651310.445335][30167:30167] CHIP:DMG: AttributeDataIBs =
[1662651310.445455][30167:30167] CHIP:DMG: [
[1662651310.445565][30167:30167] CHIP:DMG: AttributeDataIB =
[1662651310.445698][30167:30167] CHIP:DMG: {
[1662651310.445826][30167:30167] CHIP:DMG: AttributePathIB =
[1662651310.445974][30167:30167] CHIP:DMG: {
[1662651310.446124][30167:30167] CHIP:DMG: Endpoint = 0x0,
[1662651310.446289][30167:30167] CHIP:DMG: Cluster = 0x2a,
[1662651310.446457][30167:30167] CHIP:DMG: Attribute = 0x0000_0000,
[1662651310.446620][30167:30167] CHIP:DMG: }
[1662651310.446772][30167:30167] CHIP:DMG:
[1662651310.446905][30167:30167] CHIP:DMG: Data = [
[1662651310.447049][30167:30167] CHIP:DMG:
[1662651310.447158][30167:30167] CHIP:DMG: ],
[1662651310.447246][30167:30167] CHIP:DMG: },
[1662651310.447338][30167:30167] CHIP:DMG:
[1662651310.447410][30167:30167] CHIP:DMG: AttributeDataIB =
[1662651310.447490][30167:30167] CHIP:DMG: {
[1662651310.447570][30167:30167] CHIP:DMG: AttributePathIB =
[1662651310.447661][30167:30167] CHIP:DMG: {
[1662651310.447754][30167:30167] CHIP:DMG: Endpoint = 0x0,
[1662651310.447854][30167:30167] CHIP:DMG: Cluster = 0x2a,
[1662651310.447955][30167:30167] CHIP:DMG: Attribute = 0x0000_0000,
[1662651310.448054][30167:30167] CHIP:DMG: ListIndex = Null,
[1662651310.448171][30167:30167] CHIP:DMG: }
[1662651310.448270][30167:30167] CHIP:DMG:
[1662651310.448360][30167:30167] CHIP:DMG: Data =
[1662651310.448449][30167:30167] CHIP:DMG: {
[1662651310.448540][30167:30167] CHIP:DMG: 0x1 = 123,
[1662651310.448641][30167:30167] CHIP:DMG: 0x2 = 0,
[1662651310.448742][30167:30167] CHIP:DMG: },
[1662651310.448831][30167:30167] CHIP:DMG: },
[1662651310.448913][30167:30167] CHIP:DMG:
[1662651310.448979][30167:30167] CHIP:DMG: ],
[1662651310.449053][30167:30167] CHIP:DMG:
[1662651310.449111][30167:30167] CHIP:DMG: moreChunkedMessages = false,
[1662651310.449178][30167:30167] CHIP:DMG: InteractionModelRevision = 1
[1662651310.449244][30167:30167] CHIP:DMG: },
[1662651310.449361][30167:30167] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_002A e=0 p=o
[1662651310.449426][30167:30167] CHIP:DMG: AccessControl: allowed
disabled: true
- label:
"DUT sends a read request to read the DefaultOTAProviders Attribute to
the TH."
verification: |
Verify that the OTA Requestor App responds to the read command
./chip-tool otasoftwareupdaterequestor read default-ota-providers 321 0
verify on TH [OTA-REQ] Logs:
[1662651381.708529][30167:30167] CHIP:IM: Received Read request
[1662651381.708619][30167:30167] CHIP:DMG: ReadRequestMessage =
[1662651381.708648][30167:30167] CHIP:DMG: {
[1662651381.708671][30167:30167] CHIP:DMG: AttributePathIBs =
[1662651381.708733][30167:30167] CHIP:DMG: [
[1662651381.708762][30167:30167] CHIP:DMG: AttributePathIB =
[1662651381.708813][30167:30167] CHIP:DMG: {
[1662651381.708865][30167:30167] CHIP:DMG: Endpoint = 0x0,
[1662651381.708920][30167:30167] CHIP:DMG: Cluster = 0x2a,
[1662651381.708975][30167:30167] CHIP:DMG: Attribute = 0x0000_0000,
[1662651381.709027][30167:30167] CHIP:DMG: }
[1662651381.709079][30167:30167] CHIP:DMG:
[1662651381.709127][30167:30167] CHIP:DMG: ],
[1662651381.709159][30167:30167] CHIP:DMG:
[1662651381.709189][30167:30167] CHIP:DMG: isFabricFiltered = true,
[1662651381.709216][30167:30167] CHIP:DMG: InteractionModelRevision = 1
[1662651381.709240][30167:30167] CHIP:DMG: },
[1662651381.709323][30167:30167] CHIP:DMG: IM RH moving to [GeneratingReports]
[1662651381.709451][30167:30167] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0
[1662651381.709485][30167:30167] CHIP:DMG: <RE:Run> Cluster 2a, Attribute 0 is dirty
[1662651381.709507][30167:30167] CHIP:DMG: Reading attribute: Cluster=0x0000_002A Endpoint=0 AttributeId=0x0000_0000 (expanded=0)
[1662651381.709537][30167:30167] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_002A e=0 p=v
[1662651381.709572][30167:30167] CHIP:DMG: AccessControl: allowed
disabled: true
- label:
"DUT sends a read request to read the UpdatePossible attribute from
the TH."
verification: |
Verify that the OTA Requestor App responds to the read command
./chip-tool otasoftwareupdaterequestor read update-possible 321 0
verify on TH [OTA-REQ] Logs:
[1662651426.055059][30167:30167] CHIP:IM: Received Read request
[1662651426.055180][30167:30167] CHIP:DMG: ReadRequestMessage =
[1662651426.055225][30167:30167] CHIP:DMG: {
[1662651426.055264][30167:30167] CHIP:DMG: AttributePathIBs =
[1662651426.055308][30167:30167] CHIP:DMG: [
[1662651426.055349][30167:30167] CHIP:DMG: AttributePathIB =
[1662651426.055397][30167:30167] CHIP:DMG: {
[1662651426.055444][30167:30167] CHIP:DMG: Endpoint = 0x0,
[1662651426.055500][30167:30167] CHIP:DMG: Cluster = 0x2a,
[1662651426.055553][30167:30167] CHIP:DMG: Attribute = 0x0000_0001,
[1662651426.055603][30167:30167] CHIP:DMG: }
[1662651426.055654][30167:30167] CHIP:DMG:
[1662651426.055701][30167:30167] CHIP:DMG: ],
[1662651426.055747][30167:30167] CHIP:DMG:
[1662651426.055828][30167:30167] CHIP:DMG: isFabricFiltered = true,
[1662651426.055877][30167:30167] CHIP:DMG: InteractionModelRevision = 1
[1662651426.055918][30167:30167] CHIP:DMG: },
[1662651426.056030][30167:30167] CHIP:DMG: IM RH moving to [GeneratingReports]
[1662651426.056216][30167:30167] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0
[1662651426.056270][30167:30167] CHIP:DMG: <RE:Run> Cluster 2a, Attribute 1 is dirty
[1662651426.056307][30167:30167] CHIP:DMG: Reading attribute: Cluster=0x0000_002A Endpoint=0 AttributeId=0x0000_0001 (expanded=0)
disabled: true
- label:
"DUT sends a read request to read the UpdateState attribute from the
TH."
verification: |
Verify that the OTA Requestor App responds to the read command
./chip-tool otasoftwareupdaterequestor read update-state 321 0
verify on TH [OTA-REQ] Logs:
[1662651459.324406][30167:30167] CHIP:IM: Received Read request
[1662651459.324545][30167:30167] CHIP:DMG: ReadRequestMessage =
[1662651459.324597][30167:30167] CHIP:DMG: {
[1662651459.324641][30167:30167] CHIP:DMG: AttributePathIBs =
[1662651459.324692][30167:30167] CHIP:DMG: [
[1662651459.324739][30167:30167] CHIP:DMG: AttributePathIB =
[1662651459.324847][30167:30167] CHIP:DMG: {
[1662651459.324914][30167:30167] CHIP:DMG: Endpoint = 0x0,
[1662651459.324973][30167:30167] CHIP:DMG: Cluster = 0x2a,
[1662651459.325030][30167:30167] CHIP:DMG: Attribute = 0x0000_0002,
[1662651459.325083][30167:30167] CHIP:DMG: }
[1662651459.325138][30167:30167] CHIP:DMG:
[1662651459.325188][30167:30167] CHIP:DMG: ],
[1662651459.325240][30167:30167] CHIP:DMG:
[1662651459.325292][30167:30167] CHIP:DMG: isFabricFiltered = true,
[1662651459.325341][30167:30167] CHIP:DMG: InteractionModelRevision = 1
[1662651459.325386][30167:30167] CHIP:DMG: },
[1662651459.325513][30167:30167] CHIP:DMG: IM RH moving to [GeneratingReports]
[1662651459.325681][30167:30167] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0
[1662651459.325737][30167:30167] CHIP:DMG: <RE:Run> Cluster 2a, Attribute 2 is dirty
[1662651459.325778][30167:30167] CHIP:DMG: Reading attribute: Cluster=0x0000_002A Endpoint=0 AttributeId=0x0000_0002 (expanded=0)
[1662651459.325829][30167:30167] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_002A e=0 p=v
disabled: true
- label:
"TH should start initiating the Software update process. While the TH
is downloading the image, DUT sends a read request to read the
UpdateStateProgress attribute from the TH."
verification: |
Write the acl entry to allow the software update:
./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [321], "targets": null}]" 123 0
Run the announce ota provider command to start the software update and check the UpdateStateProgress
./chip-tool otasoftwareupdaterequestor announce-ota-provider 123 0 0 0 321 0
where 321 is OTA Requestor node ID and 123 is OTA Provider node ID
Verify that the OTA Requestor App responds to the read command
./chip-tool otasoftwareupdaterequestor read update-state-progress 321 0
verify on TH [OTA-REQ] Logs:
[1662651648.244248][30167:30167] CHIP:IM: Received Read request
[1662651648.244329][30167:30167] CHIP:DMG: ReadRequestMessage =
[1662651648.244353][30167:30167] CHIP:DMG: {
[1662651648.244372][30167:30167] CHIP:DMG: AttributePathIBs =
[1662651648.244399][30167:30167] CHIP:DMG: [
[1662651648.244430][30167:30167] CHIP:DMG: AttributePathIB =
[1662651648.244457][30167:30167] CHIP:DMG: {
[1662651648.244492][30167:30167] CHIP:DMG: Endpoint = 0x0,
[1662651648.244523][30167:30167] CHIP:DMG: Cluster = 0x2a,
[1662651648.244558][30167:30167] CHIP:DMG: Attribute = 0x0000_0003,
[1662651648.244584][30167:30167] CHIP:DMG: }
[1662651648.244618][30167:30167] CHIP:DMG:
[1662651648.244643][30167:30167] CHIP:DMG: ],
[1662651648.244676][30167:30167] CHIP:DMG:
[1662651648.244700][30167:30167] CHIP:DMG: isFabricFiltered = true,
[1662651648.244721][30167:30167] CHIP:DMG: InteractionModelRevision = 1
[1662651648.244749][30167:30167] CHIP:DMG: },
[1662651648.244822][30167:30167] CHIP:DMG: IM RH moving to [GeneratingReports]
disabled: true