From afd95b7b0eab6e93abeb5478ece537d966361581 Mon Sep 17 00:00:00 2001 From: kowsisoundhar12 <57476670+kowsisoundhar12@users.noreply.github.com> Date: Wed, 15 Jun 2022 17:50:26 +0530 Subject: [PATCH] Added cluster Testscripts (#19580) * Added New scripts * Added Auto generated files * Restyled by whitespace * Restyled by clang-format * Restyled by prettier-yaml Co-authored-by: Restyled.io --- .../certification/Test_TC_DESC_1_1.yaml | 142 +- .../certification/Test_TC_DGGEN_1_1.yaml | 87 + .../certification/Test_TC_DGGEN_2_1.yaml | 168 ++ .../certification/Test_TC_GENDIAG_1_1.yaml | 466 ----- .../certification/Test_TC_GENDIAG_2_1.yaml | 42 - .../suites/certification/Test_TC_I_2_2.yaml | 321 +--- .../certification/Test_TC_ULABEL_2_3.yaml | 60 + src/app/tests/suites/tests.js | 18 +- .../chip-tool/zap-generated/test/Commands.h | 1440 ++++++++++---- .../zap-generated/test/Commands.h | 1711 +++++++++++++++-- 10 files changed, 3030 insertions(+), 1425 deletions(-) create mode 100644 src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_DGGEN_2_1.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_GENDIAG_1_1.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_GENDIAG_2_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_ULABEL_2_3.yaml diff --git a/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml index 360ad162dfe892..e3ec67815fc260 100644 --- a/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml @@ -13,101 +13,75 @@ # 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: 84.1.1. [ [TC-DESC-1.1]] Descriptor Cluster Attributes with DUT as Server +name: 84.1.1. [TC-DESC-1.1] Descriptor Cluster Attributes with DUT as Server config: nodeId: 0x12344321 - cluster: "Basic" + cluster: "Descriptor" endpoint: 0 tests: - - label: "TH reads DeviceTypeList attribute from DUT." - verification: | - sudo ./chip-tool descriptor read device-list 1 0 + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - [1641454498.809603][16120:16125] CHIP:TOO: Descriptor.DeviceList response: 1 entries - [1641454498.809737][16120:16125] CHIP:TOO: [1]: { - [1641454498.809780][16120:16125] CHIP:TOO: Type: 22 - [1641454498.809817][16120:16125] CHIP:TOO: Revision: 1 - [1641454498.809852][16120:16125] CHIP:TOO: } - [1641454498.809938][16120:16125] CHIP:EM: Sending Standalone Ack for MessageCounter:52943 on exchange 24061i - disabled: true + - label: "Read the global attribute: ClusterRevision" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: uint16 - - label: "TH reads 'ServerList' attribute." - verification: | - sudo ./chip-tool descriptor read server-list 1 0 + - label: "Read the global attribute: FeatureMap" + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: map32 - [1641454794.918507][16140:16146] CHIP:DMG: SuppressResponse = true, - [1641454794.918530][16140:16146] CHIP:DMG: } - [1641454794.920033][16140:16146] CHIP:TOO: Descriptor.ServerList response: 23 entries - [1641454794.920083][16140:16146] CHIP:TOO: [1]: 3 - [1641454794.920110][16140:16146] CHIP:TOO: [2]: 4 - [1641454794.920134][16140:16146] CHIP:TOO: [3]: 29 - [1641454794.920157][16140:16146] CHIP:TOO: [4]: 30 - [1641454794.920181][16140:16146] CHIP:TOO: [5]: 31 - [1641454794.920204][16140:16146] CHIP:TOO: [6]: 40 - [1641454794.920227][16140:16146] CHIP:TOO: [7]: 41 - [1641454794.920250][16140:16146] CHIP:TOO: [8]: 42 - [1641454794.920274][16140:16146] CHIP:TOO: [9]: 46 - [1641454794.920297][16140:16146] CHIP:TOO: [10]: 48 - [1641454794.920321][16140:16146] CHIP:TOO: [11]: 49 - [1641454794.920344][16140:16146] CHIP:TOO: [12]: 50 - [1641454794.920367][16140:16146] CHIP:TOO: [13]: 51 - [1641454794.920391][16140:16146] CHIP:TOO: [14]: 52 - [1641454794.920414][16140:16146] CHIP:TOO: [15]: 53 - [1641454794.920437][16140:16146] CHIP:TOO: [16]: 54 - [1641454794.920461][16140:16146] CHIP:TOO: [17]: 55 - [1641454794.920484][16140:16146] CHIP:TOO: [18]: 60 - [1641454794.920507][16140:16146] CHIP:TOO: [19]: 62 - [1641454794.920530][16140:16146] CHIP:TOO: [20]: 63 - [1641454794.920554][16140:16146] CHIP:TOO: [21]: 64 - [1641454794.920577][16140:16146] CHIP:TOO: [22]: 65 - [1641454794.920600][16140:16146] CHIP:TOO: [23]: 1029 - [1641454794.920687][16140:16146] CHIP:EM: Sending Standalone Ack for MessageCounter:8175897 on exchange 54373i - disabled: true + - label: "Read the global attribute: AttributeList" + command: "readAttribute" + attribute: "AttributeList" + response: + contains: [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533] + constraints: + type: list - - label: "TH reads 'ClientList' attribute" + #issue #11053 disabled steps below Global attributes missing from YAML framework + - label: + "Read EventList attribute from the DUT and Verify that the DUT + response provides a list of supported events." verification: | - sudo ./chip-tool descriptor read client-list 1 0 - - [1641456529.633047][16220:16225] CHIP:DMG: SuppressResponse = true, - [1641456529.633105][16220:16225] CHIP:DMG: } - [1641456529.633403][16220:16225] CHIP:TOO: Descriptor.ClientList response: 0 entries - [1641456529.633509][16220:16225] CHIP:EM: Sending Standalone Ack for MessageCounter:3437551 on exchange 887i + Not implemented in chip-tool disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - - label: "TH reads 'PartsList' attribute." - verification: | - sudo ./chip-tool descriptor read parts-list 1 0 - - [1641456769.777217][16238:16244] CHIP:DMG: SuppressResponse = true, - [1641456769.777267][16238:16244] CHIP:DMG: } - [1641456769.777839][16238:16244] CHIP:TOO: Descriptor.PartsList response: 2 entries - [1641456769.777925][16238:16244] CHIP:TOO: [1]: 1 - [1641456769.777978][16238:16244] CHIP:TOO: [2]: 2 - [1641456769.778080][16238:16244] CHIP:EM: Sending Standalone Ack for MessageCounter:2830202 on exchange 38042i - disabled: true + - label: "Read the global attribute: AcceptedCommandList" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list - - label: "TH1 reads the AttributeList attribute from the DUT" - verification: | - sudo ./chip-tool descriptor read attribute-list 1 0 - - [1641456932.082331][16256:16261] CHIP:TOO: Descriptor.AttributeList response: 6 entries - [1641456932.082382][16256:16261] CHIP:TOO: [1]: 0 - [1641456932.082409][16256:16261] CHIP:TOO: [2]: 1 - [1641456932.082435][16256:16261] CHIP:TOO: [3]: 2 - [1641456932.082461][16256:16261] CHIP:TOO: [4]: 3 - [1641456932.082487][16256:16261] CHIP:TOO: [5]: 65531 - [1641456932.082512][16256:16261] CHIP:TOO: [6]: 65533 - [1641456932.082570][16256:16261] CHIP:EM: Sending Standalone Ack for MessageCounter:9736412 on exchange 3286i - disabled: true - - - label: "TH1 reads the ClusterRevision attribute from the DUT" - verification: | - sudo ./chip-tool descriptor read cluster-revision 1 0 - - [1641456975.533390][16268:16274] CHIP:DMG: SuppressResponse = true, - [1641456975.533439][16268:16274] CHIP:DMG: } - [1641456975.533710][16268:16274] CHIP:TOO: Descriptor.ClusterRevision response: 1 - [1641456975.533831][16268:16274] CHIP:EM: Sending Standalone Ack for MessageCounter:14484175 on exchange 41618i - disabled: true + - label: "Read the global attribute: GeneratedCommandList" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml new file mode 100644 index 00000000000000..5531cd7ad39bf1 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml @@ -0,0 +1,87 @@ +# 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: 85.1.1. [TC-DGGEN-1.1] Global attributes with server as DUT + +config: + nodeId: 0x12344321 + cluster: "General Diagnostics" + endpoint: 0 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Read the global attribute: ClusterRevision" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: uint16 + + - label: "Read the global attribute: FeatureMap" + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: map32 + + - label: "Read the global attribute: AttributeList" + command: "readAttribute" + attribute: "AttributeList" + response: + contains: [0, 1, 8, 65528, 65529, 65531, 65533] + constraints: + type: list + + #issue #11053 disabled steps below Global attributes missing from YAML framework + - label: + "Read EventList attribute from the DUT and Verify that the DUT + response provides a list of supported events." + verification: | + Not implemented in chip-tool + disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "Read the global attribute: AcceptedCommandList" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [0] + constraints: + type: list + + - label: "Read the global attribute: GeneratedCommandList" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_DGGEN_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DGGEN_2_1.yaml new file mode 100644 index 00000000000000..b2c73e4c4f8e93 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DGGEN_2_1.yaml @@ -0,0 +1,168 @@ +# 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: 85.2.1. [TC-DGGEN-2.1] Attributes with server as DUT + +config: + nodeId: 0x12344321 + cluster: "General Diagnostics" + endpoint: 0 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH reads NetworkInterfaces structure attribute from DUT." + command: "readAttribute" + attribute: "NetworkInterfaces" + response: + constraints: + type: list + + - label: "TH reads a RebootCount attribute value from DUT." + command: "readAttribute" + attribute: "RebootCount" + response: + constraints: + type: uint16 + + - label: "Reboot DUT (node)" + cluster: "SystemCommands" + command: "Reboot" + + - label: "Reboot DUT (node)" + cluster: "SystemCommands" + command: "Reboot" + + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: + "DUT reboots and TH reads a UpTime attribute value of DUT since some + arbitrary start time of DUT rebooting." + command: "readAttribute" + attribute: "UpTime" + response: + constraints: + type: uint64 + + - label: "TH reads a TotalOperationalHours attribute value from DUT." + command: "readAttribute" + attribute: "TotalOperationalHours" + response: + constraints: + type: uint32 + + - label: "Reboot DUT (node)" + cluster: "SystemCommands" + command: "Reboot" + + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH reads BootReason attribute value from DUT." + command: "readAttribute" + attribute: "BootReasons" + response: + constraints: + minValue: 0 + maxValue: 6 + + #issue #13029 + - label: "TH reads ActiveHardwareFaults attribute value from DUT." + verification: | + ./chip-tool generaldiagnostics read active-hardware-faults 1 0 + [1654682785.894724][33006:33011] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_0005 DataVersion: 804003636 + [1654682785.894846][33006:33011] CHIP:TOO: ActiveHardwareFaults: 0 entries + [1654682785.894952][33006:33011] CHIP:EM: Sending Standalone Ack for MessageCounter:30803984 on exchange 62441i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "TH reads ActiveRadioFaults attribute value from DUT." + verification: | + ./chip-tool generaldiagnostics read active-radio-faults 1 0 + [1654682886.109092][33026:33031] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_0006 DataVersion: 804003636 + [1654682886.109197][33026:33031] CHIP:TOO: ActiveRadioFaults: 0 entries + [1654682886.109321][33026:33031] CHIP:EM: Sending Standalone Ack for MessageCounter:174138703 on exchange 49820i + + + ./chip-tool generaldiagnostics subscribe active-radio-faults 100 1000 1 0 + + [1654682933.931539][33037:33042] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_0006 DataVersion: 804003636 + [1654682933.931617][33037:33042] CHIP:TOO: ActiveRadioFaults: 0 entries + [1654682933.931659][33037:33042] CHIP:DMG: MoveToState ReadClient[0xffff7c0042e0]: Moving to [AwaitingSu] + [1654682933.931711][33037:33042] CHIP:EM: Piggybacking Ack for MessageCounter:4435222 on exchange: 32960i + [1654682933.931773][33037:33042] CHIP:IN: Prepared secure message 0xaaab093c04b8 to 0x0000000000000001 (1) of type 0x1 and protocolId (0, 1) on exchange 32960i with MessageCounter:3568188. + [1654682933.931813][33037:33042] CHIP:IN: Sending encrypted msg 0xaaab093c04b8 with MessageCounter:3568188 to 0x0000000000000001 (1) at monotonic time: 0000000000CD8AFA msec + [1654682933.933165][33037:33042] CHIP:EM: Received message of type 0x4 with protocolId (0, 1) and MessageCounter:4435223 on exchange 32960i + [1654682933.933260][33037:33042] CHIP:EM: Found matching exchange: 32960i, Delegate: 0xffff7c0042e0 + [1654682933.933312][33037:33042] CHIP:EM: Rxd Ack; Removing MessageCounter:3568188 from Retrans Table on exchange 32960i + [1654682933.933345][33037:33042] CHIP:EM: Removed CHIP MessageCounter:3568188 from RetransTable on exchange 32960i + [1654682933.933408][33037:33042] CHIP:DMG: SubscribeResponseMessage = + [1654682933.933445][33037:33042] CHIP:DMG: { + [1654682933.933478][33037:33042] CHIP:DMG: SubscriptionId = 0xc5357d7e, + [1654682933.933513][33037:33042] CHIP:DMG: MinIntervalFloorSeconds = 0x64, + [1654682933.933548][33037:33042] CHIP:DMG: MaxIntervalCeilingSeconds = 0x3e8, + [1654682933.933583][33037:33042] CHIP:DMG: InteractionModelRevision = 1 + [1654682933.933615][33037:33042] CHIP:DMG: } + [1654682933.933655][33037:33042] CHIP:DMG: Subscription established with SubscriptionID = 0xc5357d7e MinInterval = 100s MaxInterval = 1000s Peer = 01:0000000000000001 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "TH reads ActiveNetworkFaults attribute value from DUT." + verification: | + ./chip-tool generaldiagnostics read active-network-faults 1 0 + + [1654683004.591353][33044:33049] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0033 Attribute 0x0000_0007 DataVersion: 804003636 + [1654683004.591438][33044:33049] CHIP:TOO: ActiveNetworkFaults: 0 entries + [1654683004.591526][33044:33049] CHIP:EM: Sending Standalone Ack for MessageCounter:113863817 on exchange 44900i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_GENDIAG_1_1.yaml b/src/app/tests/suites/certification/Test_TC_GENDIAG_1_1.yaml deleted file mode 100644 index 9dbf5abbf005ec..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_GENDIAG_1_1.yaml +++ /dev/null @@ -1,466 +0,0 @@ -# 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: 87.1.1. [TC-GENDIAG-1.1] Attributes with server as DUT - -config: - nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 - -tests: - - label: "TH reads a attribute value from DUT." - verification: | - ./chip-tool generaldiagnostics read network-interfaces 1 0 - - [1636557398.652588][2921:2927] CHIP:EM: Flushed pending ack for MessageCounter:1532129280 on exchange 32260i - [1636557398.762984][2921:2927] CHIP:EM: Received message of type 0x5 with protocolId (0, 1) and MessageCounter:1 on exchange 32261i - [1636557398.763086][2921:2927] CHIP:EM: Rxd Ack; Removing MessageCounter:0 from Retrans Table on exchange 32261i - [1636557398.763136][2921:2927] CHIP:EM: Removed CHIP MessageCounter:0 from RetransTable on exchange 32261i - [1636557398.763218][2921:2927] CHIP:DMG: ReportDataMessage = - [1636557398.763272][2921:2927] CHIP:DMG: { - [1636557398.763313][2921:2927] CHIP:DMG: AttributeDataList = - [1636557398.763365][2921:2927] CHIP:DMG: [ - [1636557398.763413][2921:2927] CHIP:DMG: AttributeDataElement = - [1636557398.763475][2921:2927] CHIP:DMG: { - [1636557398.763526][2921:2927] CHIP:DMG: AttributePathIB = - [1636557398.763599][2921:2927] CHIP:DMG: { - [1636557398.763672][2921:2927] CHIP:DMG: Endpoint = 0x1, - [1636557398.763748][2921:2927] CHIP:DMG: Cluster = 0x33, - [1636557398.763824][2921:2927] CHIP:DMG: Attribute = 0x0000_0000, - [1636557398.763895][2921:2927] CHIP:DMG: } - [1636557398.763971][2921:2927] CHIP:DMG: - [1636557398.764041][2921:2927] CHIP:DMG: Data = [ - [1636557398.764111][2921:2927] CHIP:DMG: - [1636557398.764180][2921:2927] CHIP:DMG: { - [1636557398.764260][2921:2927] CHIP:DMG: 0x0 = "docker0", - [1636557398.764398][2921:2927] CHIP:DMG: 0x1 = false, - [1636557398.764477][2921:2927] CHIP:DMG: 0x2 = false, - [1636557398.764557][2921:2927] CHIP:DMG: 0x3 = false, - [1636557398.764633][2921:2927] CHIP:DMG: 0x4 = [ - [1636557398.764712][2921:2927] CHIP:DMG: 0x2, 0x42, 0xb1, 0xa, 0x8d, 0xbb, - [1636557398.764794][2921:2927] CHIP:DMG: ] - [1636557398.764872][2921:2927] CHIP:DMG: 0x5 = 0, - [1636557398.764950][2921:2927] CHIP:DMG: }, - [1636557398.765023][2921:2927] CHIP:DMG: { - [1636557398.765099][2921:2927] CHIP:DMG: 0x0 = "br-df4639020401", - [1636557398.765180][2921:2927] CHIP:DMG: 0x1 = false, - [1636557398.765257][2921:2927] CHIP:DMG: 0x2 = false, - [1636557398.765334][2921:2927] CHIP:DMG: 0x3 = false, - [1636557398.765410][2921:2927] CHIP:DMG: 0x4 = [ - [1636557398.765488][2921:2927] CHIP:DMG: 0x2, 0x42, 0x37, 0x57, 0x42, 0x53, - [1636557398.765569][2921:2927] CHIP:DMG: ] - [1636557398.765648][2921:2927] CHIP:DMG: 0x5 = 0, - [1636557398.765724][2921:2927] CHIP:DMG: }, - [1636557398.765797][2921:2927] CHIP:DMG: { - [1636557398.765873][2921:2927] CHIP:DMG: 0x0 = "br-9b548749a6f7", - [1636557398.765952][2921:2927] CHIP:DMG: 0x1 = false, - [1636557398.766031][2921:2927] CHIP:DMG: 0x2 = false, - [1636557398.766108][2921:2927] CHIP:DMG: 0x3 = false, - [1636557398.766185][2921:2927] CHIP:DMG: 0x4 = [ - [1636557398.766263][2921:2927] CHIP:DMG: 0x2, 0x42, 0xa8, 0x9e, 0xe9, 0x22, - [1636557398.766347][2921:2927] CHIP:DMG: ] - [1636557398.766424][2921:2927] CHIP:DMG: 0x5 = 0, - [1636557398.766503][2921:2927] CHIP:DMG: }, - [1636557398.766576][2921:2927] CHIP:DMG: { - [1636557398.766652][2921:2927] CHIP:DMG: 0x0 = "wlan0", - [1636557398.766731][2921:2927] CHIP:DMG: 0x1 = true, - [1636557398.766809][2921:2927] CHIP:DMG: 0x2 = false, - [1636557398.766886][2921:2927] CHIP:DMG: 0x3 = false, - [1636557398.766962][2921:2927] CHIP:DMG: 0x4 = [ - [1636557398.767180][2921:2927] CHIP:DMG: 0xe4, 0x5f, 0x1, 0x2f, 0x5, 0xf9, - [1636557398.767277][2921:2927] CHIP:DMG: ] - [1636557398.767358][2921:2927] CHIP:DMG: 0x5 = 1, - [1636557398.767435][2921:2927] CHIP:DMG: }, - [1636557398.767507][2921:2927] CHIP:DMG: { - [1636557398.767583][2921:2927] CHIP:DMG: 0x0 = "eth0", - [1636557398.767661][2921:2927] CHIP:DMG: 0x1 = false, - [1636557398.767740][2921:2927] CHIP:DMG: 0x2 = false, - [1636557398.767818][2921:2927] CHIP:DMG: 0x3 = false, - [1636557398.767893][2921:2927] CHIP:DMG: 0x4 = [ - [1636557398.767972][2921:2927] CHIP:DMG: 0xe4, 0x5f, 0x1, 0x2f, 0x5, 0xf8, - [1636557398.768058][2921:2927] CHIP:DMG: ] - [1636557398.768136][2921:2927] CHIP:DMG: 0x5 = 2, - [1636557398.768212][2921:2927] CHIP:DMG: }, - [1636557398.768310][2921:2927] CHIP:DMG: { - [1636557398.768389][2921:2927] CHIP:DMG: 0x0 = "lo", - [1636557398.768468][2921:2927] CHIP:DMG: 0x1 = true, - [1636557398.768545][2921:2927] CHIP:DMG: 0x2 = false, - [1636557398.768623][2921:2927] CHIP:DMG: 0x3 = false, - [1636557398.768699][2921:2927] CHIP:DMG: 0x4 = [ - [1636557398.768777][2921:2927] CHIP:DMG: 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - [1636557398.768860][2921:2927] CHIP:DMG: ] - [1636557398.768907][2921:2927] CHIP:DMG: 0x5 = 0, - [1636557398.768953][2921:2927] CHIP:DMG: }, - [1636557398.769050][2921:2927] CHIP:DMG: ], - [1636557398.769094][2921:2927] CHIP:DMG: DataElementVersion = 0x0, - [1636557398.769134][2921:2927] CHIP:DMG: }, - [1636557398.769199][2921:2927] CHIP:DMG: - [1636557398.769227][2921:2927] CHIP:DMG: ], - [1636557398.769286][2921:2927] CHIP:DMG: - [1636557398.769313][2921:2927] CHIP:DMG: } - [1636557398.769502][2921:2927] CHIP:ZCL: ReadAttributesResponse: - [1636557398.769528][2921:2927] CHIP:ZCL: ClusterId: 0x0000_0033 - [1636557398.769557][2921:2927] CHIP:ZCL: attributeId: 0x0000_0000 - [1636557398.769582][2921:2927] CHIP:ZCL: status: Success (0x0000) - [1636557398.769606][2921:2927] CHIP:ZCL: attribute TLV Type: 0x16 - [1636557398.769690][2921:2927] CHIP:TOO: OnGeneralDiagnosticsNetworkInterfacesListAttributeResponse: 6 entries - [1636557398.769823][2921:2927] CHIP:TOO: [1]: { - [1636557398.769851][2921:2927] CHIP:TOO: Name: docker0 - [1636557398.769879][2921:2927] CHIP:TOO: FabricConnected: FALSE - [1636557398.769904][2921:2927] CHIP:TOO: OffPremiseServicesReachableIPv4: FALSE - [1636557398.769929][2921:2927] CHIP:TOO: OffPremiseServicesReachableIPv6: FALSE - [1636557398.769955][2921:2927] CHIP:TOO: HardwareAddress: 6 - [1636557398.769984][2921:2927] CHIP:TOO: Type: 0 - [1636557398.770009][2921:2927] CHIP:TOO: } - [1636557398.770048][2921:2927] CHIP:TOO: [2]: { - [1636557398.770074][2921:2927] CHIP:TOO: Name: br-df4639020401 - [1636557398.770099][2921:2927] CHIP:TOO: FabricConnected: FALSE - [1636557398.770123][2921:2927] CHIP:TOO: OffPremiseServicesReachableIPv4: FALSE - [1636557398.770148][2921:2927] CHIP:TOO: OffPremiseServicesReachableIPv6: FALSE - [1636557398.770173][2921:2927] CHIP:TOO: HardwareAddress: 6 - [1636557398.770199][2921:2927] CHIP:TOO: Type: 0 - [1636557398.770224][2921:2927] CHIP:TOO: } - [1636557398.770261][2921:2927] CHIP:TOO: [3]: { - [1636557398.770288][2921:2927] CHIP:TOO: Name: br-9b548749a6f7 - [1636557398.770313][2921:2927] CHIP:TOO: FabricConnected: FALSE - [1636557398.770338][2921:2927] CHIP:TOO: OffPremiseServicesReachableIPv4: FALSE - [1636557398.770363][2921:2927] CHIP:TOO: OffPremiseServicesReachableIPv6: FALSE - [1636557398.770387][2921:2927] CHIP:TOO: HardwareAddress: 6 - [1636557398.770414][2921:2927] CHIP:TOO: Type: 0 - [1636557398.770438][2921:2927] CHIP:TOO: } - [1636557398.770476][2921:2927] CHIP:TOO: [4]: { - [1636557398.770502][2921:2927] CHIP:TOO: Name: wlan0 - [1636557398.770526][2921:2927] CHIP:TOO: FabricConnected: TRUE - [1636557398.770551][2921:2927] CHIP:TOO: OffPremiseServicesReachableIPv4: FALSE - [1636557398.770576][2921:2927] CHIP:TOO: OffPremiseServicesReachableIPv6: FALSE - [1636557398.770601][2921:2927] CHIP:TOO: HardwareAddress: 6 - [1636557398.770627][2921:2927] CHIP:TOO: Type: 1 - [1636557398.770651][2921:2927] CHIP:TOO: } - [1636557398.770689][2921:2927] CHIP:TOO: [5]: { - [1636557398.770715][2921:2927] CHIP:TOO: Name: eth0 - [1636557398.770740][2921:2927] CHIP:TOO: FabricConnected: FALSE - [1636557398.770764][2921:2927] CHIP:TOO: OffPremiseServicesReachableIPv4: FALSE - [1636557398.770789][2921:2927] CHIP:TOO: OffPremiseServicesReachableIPv6: FALSE - [1636557398.770814][2921:2927] CHIP:TOO: HardwareAddress: 6 - [1636557398.770840][2921:2927] CHIP:TOO: Type: 2 - [1636557398.770864][2921:2927] CHIP:TOO: } - [1636557398.770901][2921:2927] CHIP:TOO: [6]: { - [1636557398.770927][2921:2927] CHIP:TOO: Name: lo - [1636557398.770952][2921:2927] CHIP:TOO: FabricConnected: TRUE - [1636557398.770977][2921:2927] CHIP:TOO: OffPremiseServicesReachableIPv4: FALSE - [1636557398.771001][2921:2927] CHIP:TOO: OffPremiseServicesReachableIPv6: FALSE - [1636557398.771026][2921:2927] CHIP:TOO: HardwareAddress: 6 - [1636557398.771052][2921:2927] CHIP:TOO: Type: 0 - [1636557398.771077][2921:2927] CHIP:TOO: } - [1636557398.771188][2921:2927] CHIP:EM: Piggybacking Ack for MessageCounter:1 on exchange: 32261i - [1636557398.771266][2921:2927] CHIP:IN: Prepared encrypted message 0xaaaaeca5bf00 to 0x0000000000000001 of type 0x1 and protocolId (0, 1) on exchange 32261i with MessageC - ounter:1. - [1636557398.771312][2921:2927] CHIP:IN: Sending encrypted msg 0xaaaaeca5bf00 with MessageCounter:1 to 0x0000000000000001 at monotonic time: 3104047 msec - disabled: true - - - label: "TH reads a attribute value from DUT." - verification: | - ./chip-tool generaldiagnostics read reboot-count 1 0 - - [1636557429.678822][2935:2941] CHIP:EM: Flushed pending ack for MessageCounter:1532129282 on exchange 22621i - [1636557429.719202][2935:2941] CHIP:EM: Received message of type 0x10 with protocolId (0, 0) and MessageCounter:1 on exchange 22622i - [1636557429.719259][2935:2941] CHIP:EM: Rxd Ack; Removing MessageCounter:0 from Retrans Table on exchange 22622i - [1636557429.719289][2935:2941] CHIP:EM: Removed CHIP MessageCounter:0 from RetransTable on exchange 22622i - [1636557429.752586][2935:2941] CHIP:EM: Received message of type 0x5 with protocolId (0, 1) and MessageCounter:2 on exchange 22622i - [1636557429.752653][2935:2941] CHIP:EM: CHIP MessageCounter:0 not in RetransTable on exchange 22622i - [1636557429.752737][2935:2941] CHIP:DMG: ReportDataMessage = - [1636557429.752792][2935:2941] CHIP:DMG: { - [1636557429.752835][2935:2941] CHIP:DMG: AttributeDataList = - [1636557429.752889][2935:2941] CHIP:DMG: [ - [1636557429.752938][2935:2941] CHIP:DMG: AttributeDataElement = - [1636557429.753004][2935:2941] CHIP:DMG: { - [1636557429.753062][2935:2941] CHIP:DMG: AttributePathIB = - [1636557429.753136][2935:2941] CHIP:DMG: { - [1636557429.753209][2935:2941] CHIP:DMG: Endpoint = 0x1, - [1636557429.753287][2935:2941] CHIP:DMG: Cluster = 0x33, - [1636557429.753364][2935:2941] CHIP:DMG: Attribute = 0x0000_0001, - [1636557429.753435][2935:2941] CHIP:DMG: } - [1636557429.753513][2935:2941] CHIP:DMG: - [1636557429.753588][2935:2941] CHIP:DMG: Data = 2, - [1636557429.753659][2935:2941] CHIP:DMG: DataElementVersion = 0x0, - [1636557429.753726][2935:2941] CHIP:DMG: }, - [1636557429.753793][2935:2941] CHIP:DMG: - [1636557429.753840][2935:2941] CHIP:DMG: ], - [1636557429.753900][2935:2941] CHIP:DMG: - [1636557429.753943][2935:2941] CHIP:DMG: } - [1636557429.754095][2935:2941] CHIP:ZCL: ReadAttributesResponse: - [1636557429.754139][2935:2941] CHIP:ZCL: ClusterId: 0x0000_0033 - [1636557429.754185][2935:2941] CHIP:ZCL: attributeId: 0x0000_0001 - [1636557429.754227][2935:2941] CHIP:ZCL: status: Success (0x0000) - [1636557429.754268][2935:2941] CHIP:ZCL: attribute TLV Type: 0x04 - [1636557429.754310][2935:2941] CHIP:TOO: Int16u attribute Response: 2 - [1636557429.754424][2935:2941] CHIP:EM: Piggybacking Ack for MessageCounter:2 on exchange: 22622i - [1636557429.754523][2935:2941] CHIP:IN: Prepared encrypted message 0xaaaae0f4ef00 to 0x0000000000000001 of type 0x1 and protocolId (0, 1) on exchange 22622i with MessageCounter:1. - [1636557429.754594][2935:2941] CHIP:IN: Sending encrypted msg 0xaaaae0f4ef00 with MessageCounter:1 to 0x0000000000000001 at monotonic time: 3135030 msec - disabled: true - - - label: "TH reads a attribute value from DUT." - verification: | - ./chip-tool generaldiagnostics read up-time 1 0 - - [1636557446.573304][2944:2949] CHIP:EM: Flushed pending ack for MessageCounter:1532129284 on exchange 58848i - [1636557446.611807][2944:2949] CHIP:EM: Received message of type 0x10 with protocolId (0, 0) and MessageCounter:1 on exchange 58849i - [1636557446.611854][2944:2949] CHIP:EM: Rxd Ack; Removing MessageCounter:0 from Retrans Table on exchange 58849i - [1636557446.611875][2944:2949] CHIP:EM: Removed CHIP MessageCounter:0 from RetransTable on exchange 58849i - [1636557446.646357][2944:2949] CHIP:EM: Received message of type 0x5 with protocolId (0, 1) and MessageCounter:2 on exchange 58849i - [1636557446.646428][2944:2949] CHIP:EM: CHIP MessageCounter:0 not in RetransTable on exchange 58849i - [1636557446.646532][2944:2949] CHIP:DMG: ReportDataMessage = - [1636557446.646588][2944:2949] CHIP:DMG: { - [1636557446.646632][2944:2949] CHIP:DMG: AttributeDataList = - [1636557446.646685][2944:2949] CHIP:DMG: [ - [1636557446.646734][2944:2949] CHIP:DMG: AttributeDataElement = - [1636557446.646798][2944:2949] CHIP:DMG: { - [1636557446.646855][2944:2949] CHIP:DMG: AttributePathIB = - [1636557446.646928][2944:2949] CHIP:DMG: { - [1636557446.647004][2944:2949] CHIP:DMG: Endpoint = 0x1, - [1636557446.647081][2944:2949] CHIP:DMG: Cluster = 0x33, - [1636557446.647160][2944:2949] CHIP:DMG: Attribute = 0x0000_0002, - [1636557446.647231][2944:2949] CHIP:DMG: } - [1636557446.647309][2944:2949] CHIP:DMG: - [1636557446.647387][2944:2949] CHIP:DMG: Data = 1132, - [1636557446.647453][2944:2949] CHIP:DMG: DataElementVersion = 0x0, - [1636557446.647520][2944:2949] CHIP:DMG: }, - [1636557446.647588][2944:2949] CHIP:DMG: - [1636557446.647638][2944:2949] CHIP:DMG: ], - [1636557446.647698][2944:2949] CHIP:DMG: - [1636557446.647743][2944:2949] CHIP:DMG: } - [1636557446.647894][2944:2949] CHIP:ZCL: ReadAttributesResponse: - [1636557446.647938][2944:2949] CHIP:ZCL: ClusterId: 0x0000_0033 - [1636557446.647985][2944:2949] CHIP:ZCL: attributeId: 0x0000_0002 - [1636557446.648028][2944:2949] CHIP:ZCL: status: Success (0x0000) - [1636557446.648069][2944:2949] CHIP:ZCL: attribute TLV Type: 0x04 - [1636557446.648112][2944:2949] CHIP:TOO: Int64u attribute Response: 1132 - [1636557446.648231][2944:2949] CHIP:EM: Piggybacking Ack for MessageCounter:2 on exchange: 58849i - [1636557446.648389][2944:2949] CHIP:IN: Prepared encrypted message 0xaaaad4f6df00 to 0x0000000000000001 of type 0x1 and protocolId (0, 1) on exchange 58849i with MessageC - ounter:1. - [1636557446.648459][2944:2949] CHIP:IN: Sending encrypted msg 0xaaaad4f6df00 with MessageCounter:1 to 0x0000000000000001 at monotonic time: 3151924 msec - disabled: true - - - label: "TH reads a attribute value from DUT." - verification: | - ./chip-tool generaldiagnostics read total-operational-hours 1 0 - - [1641964558.888877][42874:42879] CHIP:IN: Sending unauthenticated msg 0x7f3214b1a000 with MessageCounter:2008198488 to 0x0000000000000000 at monotonic time: 37232446 msec - [1641964558.888942][42874:42879] CHIP:EM: Flushed pending ack for MessageCounter:232282341 on exchange 38751i - [1641964558.931625][42874:42879] CHIP:EM: Received message of type 0x5 with protocolId (0, 1) and MessageCounter:13392059 on exchange 38752i - [1641964558.931677][42874:42879] CHIP:EM: Found matching exchange: 38752i, Delegate: 0x7f3200001980 - [1641964558.931706][42874:42879] CHIP:EM: Rxd Ack; Removing MessageCounter:12235477 from Retrans Table on exchange 38752i - [1641964558.931723][42874:42879] CHIP:EM: Removed CHIP MessageCounter:12235477 from RetransTable on exchange 38752i - [1641964558.931771][42874:42879] CHIP:DMG: ReportDataMessage = - [1641964558.931791][42874:42879] CHIP:DMG: { - [1641964558.931804][42874:42879] CHIP:DMG: AttributeReportIBs = - [1641964558.931829][42874:42879] CHIP:DMG: [ - [1641964558.931845][42874:42879] CHIP:DMG: AttributeReportIB = - [1641964558.931871][42874:42879] CHIP:DMG: { - [1641964558.931887][42874:42879] CHIP:DMG: AttributeDataIB = - [1641964558.931906][42874:42879] CHIP:DMG: { - [1641964558.931926][42874:42879] CHIP:DMG: DataVersion = 0x0, - [1641964558.931948][42874:42879] CHIP:DMG: AttributePathIB = - [1641964558.931967][42874:42879] CHIP:DMG: { - [1641964558.931986][42874:42879] CHIP:DMG: Endpoint = 0x0, - [1641964558.932009][42874:42879] CHIP:DMG: Cluster = 0x33, - [1641964558.932032][42874:42879] CHIP:DMG: Attribute = 0x0000_0003, - [1641964558.932054][42874:42879] CHIP:DMG: } - [1641964558.932104][42874:42879] CHIP:DMG: - [1641964558.932126][42874:42879] CHIP:DMG: Data = 0, - [1641964558.932144][42874:42879] CHIP:DMG: }, - [1641964558.932167][42874:42879] CHIP:DMG: - [1641964558.932184][42874:42879] CHIP:DMG: }, - [1641964558.932216][42874:42879] CHIP:DMG: - [1641964558.932239][42874:42879] CHIP:DMG: ], - [1641964558.932274][42874:42879] CHIP:DMG: - [1641964558.932297][42874:42879] CHIP:DMG: SuppressResponse = true, - [1641964558.932319][42874:42879] CHIP:DMG: } - [1641964558.932502][42874:42879] CHIP:TOO: GeneralDiagnostics.TotalOperationalHours response: 0 - [1641964558.932584][42874:42879] CHIP:EM: Sending Standalone Ack for MessageCounter:13392059 on exchange 38752i - [1641964558.932652][42874:42879] CHIP:IN: Prepared secure message 0x7f3214b19fe0 to 0x0000000000000002 (1) of type 0x10 and protocolId (0, 0) on exchange 38752i with MessageCounter:12235478. - [1641964558.932687][42874:42879] CHIP:IN: Sending encrypted msg 0x7f3214b19fe0 with MessageCounter:12235478 to 0x0000000000000002 (1) at monotonic time: 37232490 msec - [1641964558.932795][42874:42879] CHIP:EM: Flushed pending ack for MessageCounter:13392059 on exchange 38752i - disabled: true - - - label: "TH reads a attribute value from DUT." - verification: | - ./chip-tool generaldiagnostics read boot-reasons 1 0 - - [1636557536.267635][2963:2968] CHIP:EM: Flushed pending ack for MessageCounter:1532129288 on exchange 40103i - [1636557536.334504][2963:2968] CHIP:EM: Received message of type 0x5 with protocolId (0, 1) and MessageCounter:1 on exchange 40104i - [1636557536.334549][2963:2968] CHIP:EM: Rxd Ack; Removing MessageCounter:0 from Retrans Table on exchange 40104i - [1636557536.334570][2963:2968] CHIP:EM: Removed CHIP MessageCounter:0 from RetransTable on exchange 40104i - [1636557536.334609][2963:2968] CHIP:DMG: ReportDataMessage = - [1636557536.334635][2963:2968] CHIP:DMG: { - [1636557536.334653][2963:2968] CHIP:DMG: AttributeDataList = - [1636557536.334676][2963:2968] CHIP:DMG: [ - [1636557536.334697][2963:2968] CHIP:DMG: AttributeDataElement = - [1636557536.334724][2963:2968] CHIP:DMG: { - [1636557536.334746][2963:2968] CHIP:DMG: AttributePathIB = - [1636557536.334778][2963:2968] CHIP:DMG: { - [1636557536.334811][2963:2968] CHIP:DMG: Endpoint = 0x1, - [1636557536.334842][2963:2968] CHIP:DMG: Cluster = 0x33, - [1636557536.334874][2963:2968] CHIP:DMG: Attribute = 0x0000_0004, - [1636557536.334904][2963:2968] CHIP:DMG: } - [1636557536.334938][2963:2968] CHIP:DMG: - [1636557536.334970][2963:2968] CHIP:DMG: Data = 6, - [1636557536.334999][2963:2968] CHIP:DMG: DataElementVersion = 0x0, - [1636557536.335024][2963:2968] CHIP:DMG: }, - [1636557536.335053][2963:2968] CHIP:DMG: - [1636557536.335072][2963:2968] CHIP:DMG: ], - [1636557536.335098][2963:2968] CHIP:DMG: - [1636557536.335116][2963:2968] CHIP:DMG: } - [1636557536.335198][2963:2968] CHIP:ZCL: ReadAttributesResponse: - [1636557536.335217][2963:2968] CHIP:ZCL: ClusterId: 0x0000_0033 - [1636557536.335238][2963:2968] CHIP:ZCL: attributeId: 0x0000_0004 - [1636557536.335256][2963:2968] CHIP:ZCL: status: Success (0x0000) - [1636557536.335274][2963:2968] CHIP:ZCL: attribute TLV Type: 0x04 - [1636557536.335293][2963:2968] CHIP:TOO: Int8u attribute Response: 6 - [1636557536.335361][2963:2968] CHIP:EM: Piggybacking Ack for MessageCounter:1 on exchange: 40104i - [1636557536.335414][2963:2968] CHIP:IN: Prepared encrypted message 0xaaaaf45d5f00 to 0x0000000000000001 of type 0x1 and protocolId (0, 1) on exchange 40104i with MessageCounter:1. - [1636557536.335445][2963:2968] CHIP:IN: Sending encrypted msg 0xaaaaf45d5f00 with MessageCounter:1 to 0x0000000000000001 at monotonic time: 3241611 msec - disabled: true - - - label: "TH reads a attribute value from DUT." - verification: | - ./chip-tool generaldiagnostics read active-hardware-faults 1 0 - - [1641965190.317466][43496:43501] CHIP:IN: Sending unauthenticated msg 0x7fa9a09e4000 with MessageCounter:2890688003 to 0x0000000000000000 at monotonic time: 37863874 msec - [1641965190.317561][43496:43501] CHIP:EM: Flushed pending ack for MessageCounter:232282345 on exchange 8364i - [1641965190.363021][43496:43501] CHIP:EM: Received message of type 0x5 with protocolId (0, 1) and MessageCounter:7831593 on exchange 8365i - [1641965190.363074][43496:43501] CHIP:EM: Found matching exchange: 8365i, Delegate: 0x7fa98c001980 - [1641965190.363105][43496:43501] CHIP:EM: Rxd Ack; Removing MessageCounter:4919296 from Retrans Table on exchange 8365i - [1641965190.363125][43496:43501] CHIP:EM: Removed CHIP MessageCounter:4919296 from RetransTable on exchange 8365i - [1641965190.363196][43496:43501] CHIP:DMG: ReportDataMessage = - [1641965190.363226][43496:43501] CHIP:DMG: { - [1641965190.363247][43496:43501] CHIP:DMG: AttributeReportIBs = - [1641965190.363272][43496:43501] CHIP:DMG: [ - [1641965190.363292][43496:43501] CHIP:DMG: AttributeReportIB = - [1641965190.363329][43496:43501] CHIP:DMG: { - [1641965190.363355][43496:43501] CHIP:DMG: AttributeDataIB = - [1641965190.363379][43496:43501] CHIP:DMG: { - [1641965190.363408][43496:43501] CHIP:DMG: DataVersion = 0x0, - [1641965190.363435][43496:43501] CHIP:DMG: AttributePathIB = - [1641965190.363462][43496:43501] CHIP:DMG: { - [1641965190.363490][43496:43501] CHIP:DMG: Endpoint = 0x0, - [1641965190.363520][43496:43501] CHIP:DMG: Cluster = 0x33, - [1641965190.363549][43496:43501] CHIP:DMG: Attribute = 0x0000_0005, - [1641965190.363578][43496:43501] CHIP:DMG: } - [1641965190.363611][43496:43501] CHIP:DMG: - [1641965190.363637][43496:43501] CHIP:DMG: Data = [ - [1641965190.363668][43496:43501] CHIP:DMG: - [1641965190.363707][43496:43501] CHIP:DMG: ], - [1641965190.363740][43496:43501] CHIP:DMG: }, - [1641965190.363790][43496:43501] CHIP:DMG: - [1641965190.363817][43496:43501] CHIP:DMG: }, - [1641965190.363857][43496:43501] CHIP:DMG: - [1641965190.363881][43496:43501] CHIP:DMG: ], - [1641965190.363918][43496:43501] CHIP:DMG: - [1641965190.363943][43496:43501] CHIP:DMG: SuppressResponse = true, - [1641965190.363967][43496:43501] CHIP:DMG: } - [1641965190.364192][43496:43501] CHIP:TOO: GeneralDiagnostics.ActiveHardwareFaults response: 0 entries - [1641965190.364261][43496:43501] CHIP:EM: Sending Standalone Ack for MessageCounter:7831593 on exchange 8365i - [1641965190.364327][43496:43501] CHIP:IN: Prepared secure message 0x7fa9a09e3fe0 to 0x0000000000000002 (1) of type 0x10 and protocolId (0, 0) on exchange 8365i with MessageCounter:4919297. - [1641965190.364375][43496:43501] CHIP:IN: Sending encrypted msg 0x7fa9a09e3fe0 with MessageCounter:4919297 to 0x0000000000000002 (1) at monotonic time: 37863921 msec - [1641965190.364491][43496:43501] CHIP:EM: Flushed pending ack for MessageCounter:7831593 on exchange 8365i - disabled: true - - - label: "TH reads a attribute value from DUT." - verification: | - ./chip-tool generaldiagnostics read active-radio-faults 1 0 - - [1641965451.619831][43603:43608] CHIP:IN: Sending unauthenticated msg 0x7f6ceeffc000 with MessageCounter:1905359789 to 0x0000000000000000 at monotonic time: 38125177 msec - [1641965451.619898][43603:43608] CHIP:EM: Flushed pending ack for MessageCounter:232282347 on exchange 51439i - [1641965451.666375][43603:43608] CHIP:EM: Received message of type 0x5 with protocolId (0, 1) and MessageCounter:14540530 on exchange 51440i - [1641965451.666436][43603:43608] CHIP:EM: Found matching exchange: 51440i, Delegate: 0x7f6cdc001980 - [1641965451.666472][43603:43608] CHIP:EM: Rxd Ack; Removing MessageCounter:15284140 from Retrans Table on exchange 51440i - [1641965451.666486][43603:43608] CHIP:EM: Removed CHIP MessageCounter:15284140 from RetransTable on exchange 51440i - [1641965451.666541][43603:43608] CHIP:DMG: ReportDataMessage = - [1641965451.666570][43603:43608] CHIP:DMG: { - [1641965451.666586][43603:43608] CHIP:DMG: AttributeReportIBs = - [1641965451.666620][43603:43608] CHIP:DMG: [ - [1641965451.666638][43603:43608] CHIP:DMG: AttributeReportIB = - [1641965451.666672][43603:43608] CHIP:DMG: { - [1641965451.666699][43603:43608] CHIP:DMG: AttributeDataIB = - [1641965451.666723][43603:43608] CHIP:DMG: { - [1641965451.666748][43603:43608] CHIP:DMG: DataVersion = 0x0, - [1641965451.666773][43603:43608] CHIP:DMG: AttributePathIB = - [1641965451.666804][43603:43608] CHIP:DMG: { - [1641965451.666828][43603:43608] CHIP:DMG: Endpoint = 0x0, - [1641965451.666866][43603:43608] CHIP:DMG: Cluster = 0x33, - [1641965451.666905][43603:43608] CHIP:DMG: Attribute = 0x0000_0006, - [1641965451.666933][43603:43608] CHIP:DMG: } - [1641965451.666966][43603:43608] CHIP:DMG: - [1641965451.666988][43603:43608] CHIP:DMG: Data = [ - [1641965451.667032][43603:43608] CHIP:DMG: - [1641965451.667076][43603:43608] CHIP:DMG: ], - [1641965451.667106][43603:43608] CHIP:DMG: }, - [1641965451.667138][43603:43608] CHIP:DMG: - [1641965451.667153][43603:43608] CHIP:DMG: }, - [1641965451.667176][43603:43608] CHIP:DMG: - [1641965451.667189][43603:43608] CHIP:DMG: ], - [1641965451.667210][43603:43608] CHIP:DMG: - [1641965451.667227][43603:43608] CHIP:DMG: SuppressResponse = true, - [1641965451.667242][43603:43608] CHIP:DMG: } - [1641965451.667395][43603:43608] CHIP:TOO: GeneralDiagnostics.ActiveRadioFaults response: 0 entries - [1641965451.667448][43603:43608] CHIP:EM: Sending Standalone Ack for MessageCounter:14540530 on exchange 51440i - [1641965451.667495][43603:43608] CHIP:IN: Prepared secure message 0x7f6ceeffbfe0 to 0x0000000000000002 (1) of type 0x10 and protocolId (0, 0) on exchange 51440i with MessageCounter:15284141. - disabled: true - - - label: "TH reads a attribute value from DUT." - verification: | - ./chip-tool generaldiagnostics read active-network-faults 1 0 - - [1641965685.705750][43655:43660] CHIP:IN: Sending unauthenticated msg 0x7f90a77fd000 with MessageCounter:1562631730 to 0x0000000000000000 at monotonic time: 38359263 msec - [1641965685.705812][43655:43660] CHIP:EM: Flushed pending ack for MessageCounter:232282349 on exchange 18037i - [1641965685.799740][43655:43660] CHIP:EM: Received message of type 0x5 with protocolId (0, 1) and MessageCounter:15321486 on exchange 18038i - [1641965685.799801][43655:43660] CHIP:EM: Found matching exchange: 18038i, Delegate: 0x7f9094001980 - [1641965685.799846][43655:43660] CHIP:EM: Rxd Ack; Removing MessageCounter:12660801 from Retrans Table on exchange 18038i - [1641965685.799871][43655:43660] CHIP:EM: Removed CHIP MessageCounter:12660801 from RetransTable on exchange 18038i - [1641965685.799940][43655:43660] CHIP:DMG: ReportDataMessage = - [1641965685.799974][43655:43660] CHIP:DMG: { - [1641965685.799997][43655:43660] CHIP:DMG: AttributeReportIBs = - [1641965685.800035][43655:43660] CHIP:DMG: [ - [1641965685.800058][43655:43660] CHIP:DMG: AttributeReportIB = - [1641965685.800124][43655:43660] CHIP:DMG: { - [1641965685.800149][43655:43660] CHIP:DMG: AttributeDataIB = - [1641965685.800174][43655:43660] CHIP:DMG: { - [1641965685.800199][43655:43660] CHIP:DMG: DataVersion = 0x0, - [1641965685.800232][43655:43660] CHIP:DMG: AttributePathIB = - [1641965685.800259][43655:43660] CHIP:DMG: { - [1641965685.800279][43655:43660] CHIP:DMG: Endpoint = 0x0, - [1641965685.800301][43655:43660] CHIP:DMG: Cluster = 0x33, - [1641965685.800323][43655:43660] CHIP:DMG: Attribute = 0x0000_0007, - [1641965685.800345][43655:43660] CHIP:DMG: } - [1641965685.800367][43655:43660] CHIP:DMG: - [1641965685.800386][43655:43660] CHIP:DMG: Data = [ - [1641965685.800410][43655:43660] CHIP:DMG: - [1641965685.800437][43655:43660] CHIP:DMG: ], - [1641965685.800458][43655:43660] CHIP:DMG: }, - [1641965685.800483][43655:43660] CHIP:DMG: - [1641965685.800499][43655:43660] CHIP:DMG: }, - [1641965685.800525][43655:43660] CHIP:DMG: - [1641965685.800541][43655:43660] CHIP:DMG: ], - [1641965685.800567][43655:43660] CHIP:DMG: - [1641965685.800584][43655:43660] CHIP:DMG: SuppressResponse = true, - [1641965685.800600][43655:43660] CHIP:DMG: } - [1641965685.800755][43655:43660] CHIP:TOO: GeneralDiagnostics.ActiveNetworkFaults response: 0 entries - [1641965685.800812][43655:43660] CHIP:EM: Sending Standalone Ack for MessageCounter:15321486 on exchange 18038i - [1641965685.800868][43655:43660] CHIP:IN: Prepared secure message 0x7f90a77fcfe0 to 0x0000000000000002 (1) of type 0x10 and protocolId (0, 0) on exchange 18038i with MessageCounter:12660802. - [1641965685.800900][43655:43660] CHIP:IN: Sending encrypted msg 0x7f90a77fcfe0 with MessageCounter:12660802 to 0x0000000000000002 (1) at monotonic time: 38359358 msec - [1641965685.801006][43655:43660] CHIP:EM: Flushed pending ack for MessageCounter:15321486 on exchange 18038i - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_GENDIAG_2_1.yaml b/src/app/tests/suites/certification/Test_TC_GENDIAG_2_1.yaml deleted file mode 100644 index 53b94da65153f7..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_GENDIAG_2_1.yaml +++ /dev/null @@ -1,42 +0,0 @@ -# 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: 3.1.3. [TC-GENDIAG-2.1] Event functionality test with server as DUT - -config: - nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 - -tests: - - label: "TH use chip-tool event read to get server event report" - verification: | - ./chip-tool generaldiagnostics read-event hardware-fault-change 1 0 - disabled: true - - - label: "TH use chip-tool event read to get server event report" - verification: | - ./chip-tool generaldiagnostics read-event radio-fault-change 1 0 - disabled: true - - - label: "TH use chip-tool event read to get server event report" - verification: | - ./chip-tool generaldiagnostics read-event network-fault-change 1 0 - disabled: true - - - label: "TH use chip-tool event read to get server event report" - verification: | - ./chip-tool generaldiagnostics read-event boot-reason 1 0 - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_I_2_2.yaml b/src/app/tests/suites/certification/Test_TC_I_2_2.yaml index 2b9da5cc1b6a9e..a2fffff9a09379 100644 --- a/src/app/tests/suites/certification/Test_TC_I_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_I_2_2.yaml @@ -13,252 +13,119 @@ # 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: 57.2.2. [TC-I-2.2] Primary functionality with server as DUT +name: 58.2.2. [TC-I-2.2] Primary functionality with server as DUT config: nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 + cluster: "Identify" + endpoint: 1 tests: - - label: "Commission DUT to TH" - verification: | - - disabled: true + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "TH sends Identify command to DUT, with the identify time field set to 0x003c (60s)." - verification: | - ./chip-tool identify identify 60 1 1 - - CHIP:EM: Flushed pending ack for MessageCounter:1080338627 on exchange 34601i - [1635607335.469159][3437:3442] CHIP:EM: Received message of type 0x9 with protocolId (0, 1) and MessageCounter:1 on exchange 34602i - [1635607335.469222][3437:3442] CHIP:EM: Rxd Ack; Removing MessageCounter:0 from Retrans Table on exchange 34602i - [1635607335.469259][3437:3442] CHIP:EM: Removed CHIP MessageCounter:0 from RetransTable on exchange 34602i - [1635607335.469311][3437:3442] CHIP:DMG: InvokeCommand = - [1635607335.469349][3437:3442] CHIP:DMG: { - [1635607335.469381][3437:3442] CHIP:DMG: CommandList = - [1635607335.469420][3437:3442] CHIP:DMG: [ - [1635607335.469456][3437:3442] CHIP:DMG: CommandDataIB = - [1635607335.469496][3437:3442] CHIP:DMG: { - [1635607335.469529][3437:3442] CHIP:DMG: CommandPathIB = - [1635607335.469576][3437:3442] CHIP:DMG: { - [1635607335.469622][3437:3442] CHIP:DMG: EndpointId = 0x1, - [1635607335.469671][3437:3442] CHIP:DMG: ClusterId = 0x0, - [1635607335.469727][3437:3442] CHIP:DMG: CommandId = 0x0, - [1635607335.469774][3437:3442] CHIP:DMG: }, - [1635607335.469826][3437:3442] CHIP:DMG: - [1635607335.469868][3437:3442] CHIP:DMG: StatusIB = - [1635607335.469911][3437:3442] CHIP:DMG: { - [1635607335.469953][3437:3442] CHIP:DMG: status = 0x85, - [1635607335.469999][3437:3442] CHIP:DMG: }, - [1635607335.470045][3437:3442] CHIP:DMG: - [1635607335.470092][3437:3442] CHIP:DMG: }, - [1635607335.470137][3437:3442] CHIP:DMG: - [1635607335.470172][3437:3442] CHIP:DMG: ], - [1635607335.470215][3437:3442] CHIP:DMG: - [1635607335.470248][3437:3442] CHIP:DMG: } - [1635607335.470309][3437:3442] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0000 Command=0x0000_0000 Status=0x85 - [1635607335.470349][3437:3442] CHIP:TOO: Default Failure Response: 0x85 - [1635607335.470424][3437:3442] CHIP:DMG: ICR moving to [AwaitingDe] - [1635607335.470469][3437:3442] CHIP:EM: Sending Standalone Ack for MessageCounter:1 on exchange 34602i - disabled: true - - - label: "TH reads immediately IdentifyTime attribute from DUT" - verification: | - ./chip-tool identify read identify-time 1 1 - disabled: true + command: "Identify" + arguments: + values: + - name: "IdentifyTime" + value: 60 + + - label: "TH reads immediately IdentifyTime attribute from DUT1" + command: "readAttribute" + attribute: "identify time" + response: + constraints: + minValue: 55 + maxValue: 65 + + - label: "Wait 10000ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 - label: "After 10 seconds, the TH reads IdentifyTime attribute from DUT" - verification: | - ./chip-tool identify read identify-time 1 1 + command: "readAttribute" + attribute: "identify time" + response: + constraints: + minValue: 45 + maxValue: 55 - CHIP:EM: Flushed pending ack for MessageCounter:1227491739 on exchange 44726i - [1635609851.059963][3612:3617] CHIP:EM: Received message of type 0x5 with protocolId (0, 1) and MessageCounter:1 on exchange 44727i - [1635609851.060032][3612:3617] CHIP:EM: Rxd Ack; Removing MessageCounter:0 from Retrans Table on exchange 44727i - [1635609851.060073][3612:3617] CHIP:EM: Removed CHIP MessageCounter:0 from RetransTable on exchange 44727i - [1635609851.060161][3612:3617] CHIP:DMG: ReportData = - [1635609851.060205][3612:3617] CHIP:DMG: { - [1635609851.060235][3612:3617] CHIP:DMG: AttributeDataList = - [1635609851.060270][3612:3617] CHIP:DMG: [ - [1635609851.060304][3612:3617] CHIP:DMG: AttributeDataElement = - [1635609851.060342][3612:3617] CHIP:DMG: { - [1635609851.060377][3612:3617] CHIP:DMG: AttributePath = - [1635609851.060416][3612:3617] CHIP:DMG: { - [1635609851.060457][3612:3617] CHIP:DMG: NodeId = 0x1, - [1635609851.060500][3612:3617] CHIP:DMG: EndpointId = 0x1, - [1635609851.060544][3612:3617] CHIP:DMG: ClusterId = 0x3, - [1635609851.060586][3612:3617] CHIP:DMG: FieldTag = 0x0000_0000, - [1635609851.060626][3612:3617] CHIP:DMG: } - [1635609851.060679][3612:3617] CHIP:DMG: - [1635609851.060731][3612:3617] CHIP:DMG: Data = 0, - [1635609851.060783][3612:3617] CHIP:DMG: DataElementVersion = 0x0, - [1635609851.060830][3612:3617] CHIP:DMG: }, - [1635609851.060881][3612:3617] CHIP:DMG: - [1635609851.060920][3612:3617] CHIP:DMG: ], - [1635609851.060967][3612:3617] CHIP:DMG: - [1635609851.061004][3612:3617] CHIP:DMG: } - [1635609851.061115][3612:3617] CHIP:ZCL: ReadAttributesResponse: - [1635609851.061152][3612:3617] CHIP:ZCL: ClusterId: 0x0000_0003 - [1635609851.061189][3612:3617] CHIP:ZCL: attributeId: 0x0000_0000 - [1635609851.061223][3612:3617] CHIP:ZCL: status: Success (0x0000) - [1635609851.061258][3612:3617] CHIP:ZCL: attribute TLV Type: 0x04 - [1635609851.061293][3612:3617] CHIP:TOO: Int16u attribute Response: 0 - [1635609851.061388][3612:3617] CHIP:EM: Piggybacking Ack for MessageCounter:1 on exchange: 44727i - disabled: true + - label: + "TH sends IdentifyQuery command to DUT and Verify + IdentifyQueryResponse command to TH,with the Timeout field set to a + value in the range 0x0000 to 0x0032" + verification: | + IdentifyQuery is not supported by Matter + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "TH sends Identify command to DUT, with the identify time field set to 0x0000 (stop identifying)." + command: "Identify" + arguments: + values: + - name: "IdentifyTime" + value: 0 + + - label: "TH reads immediately IdentifyTime attribute from DUT2" + command: "readAttribute" + attribute: "identify time" + response: + value: 0 + + # disabled due to IdentifyQuery not supported + - label: "TH sends IdentifyQuery command to DUT " verification: | - ./chip-tool identify identify 0 1 1 - - CHIP:EM: Flushed pending ack for MessageCounter:1227491743 on exchange 35105i - [1635610133.027930][3638:3643] CHIP:EM: Received message of type 0x9 with protocolId (0, 1) and MessageCounter:1 on exchange 35106i - [1635610133.027998][3638:3643] CHIP:EM: Rxd Ack; Removing MessageCounter:0 from Retrans Table on exchange 35106i - [1635610133.028038][3638:3643] CHIP:EM: Removed CHIP MessageCounter:0 from RetransTable on exchange 35106i - [1635610133.028094][3638:3643] CHIP:DMG: InvokeCommand = - [1635610133.028170][3638:3643] CHIP:DMG: { - [1635610133.028223][3638:3643] CHIP:DMG: CommandList = - [1635610133.028266][3638:3643] CHIP:DMG: [ - [1635610133.028322][3638:3643] CHIP:DMG: CommandDataIB = - [1635610133.028378][3638:3643] CHIP:DMG: { - [1635610133.028424][3638:3643] CHIP:DMG: CommandPathIB = - [1635610133.028488][3638:3643] CHIP:DMG: { - [1635610133.028540][3638:3643] CHIP:DMG: EndpointId = 0x1, - [1635610133.028606][3638:3643] CHIP:DMG: ClusterId = 0x0, - [1635610133.028667][3638:3643] CHIP:DMG: CommandId = 0x0, - [1635610133.028722][3638:3643] CHIP:DMG: }, - [1635610133.028797][3638:3643] CHIP:DMG: - [1635610133.028844][3638:3643] CHIP:DMG: StatusIB = - [1635610133.028913][3638:3643] CHIP:DMG: { - [1635610133.028964][3638:3643] CHIP:DMG: status = 0x85, - [1635610133.029018][3638:3643] CHIP:DMG: }, - [1635610133.029083][3638:3643] CHIP:DMG: - [1635610133.029141][3638:3643] CHIP:DMG: }, - [1635610133.029195][3638:3643] CHIP:DMG: - [1635610133.029233][3638:3643] CHIP:DMG: ], - [1635610133.029279][3638:3643] CHIP:DMG: - [1635610133.029331][3638:3643] CHIP:DMG: } - [1635610133.029399][3638:3643] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0000 Command=0x0000_0000 Status=0x85 - [1635610133.029457][3638:3643] CHIP:TOO: Default Failure Response: 0x85 - [1635610133.029531][3638:3643] CHIP:DMG: ICR moving to [AwaitingDe] - [1635610133.029595][3638:3643] CHIP:EM: Sending Standalone Ack for MessageCounter:1 on exchange 35106i - disabled: true - - - label: "TH reads immediately IdentifyTime attribute from DUT" - verification: | - ./chip-tool identify read identify-time 1 1 - - CHIP:EM: Flushed pending ack for MessageCounter:1227491745 on exchange 43955i - [1635610358.362798][3651:3656] CHIP:EM: Received message of type 0x5 with protocolId (0, 1) and MessageCounter:1 on exchange 43956i - [1635610358.362866][3651:3656] CHIP:EM: Rxd Ack; Removing MessageCounter:0 from Retrans Table on exchange 43956i - [1635610358.362908][3651:3656] CHIP:EM: Removed CHIP MessageCounter:0 from RetransTable on exchange 43956i - [1635610358.362964][3651:3656] CHIP:DMG: ReportData = - [1635610358.363006][3651:3656] CHIP:DMG: { - [1635610358.363042][3651:3656] CHIP:DMG: AttributeDataList = - [1635610358.363085][3651:3656] CHIP:DMG: [ - [1635610358.363124][3651:3656] CHIP:DMG: AttributeDataElement = - [1635610358.363179][3651:3656] CHIP:DMG: { - [1635610358.363225][3651:3656] CHIP:DMG: AttributePath = - [1635610358.363282][3651:3656] CHIP:DMG: { - [1635610358.363335][3651:3656] CHIP:DMG: NodeId = 0x1, - [1635610358.363391][3651:3656] CHIP:DMG: EndpointId = 0x1, - [1635610358.363450][3651:3656] CHIP:DMG: ClusterId = 0x3, - [1635610358.363510][3651:3656] CHIP:DMG: FieldTag = 0x0000_0000, - [1635610358.363562][3651:3656] CHIP:DMG: } - [1635610358.363617][3651:3656] CHIP:DMG: - [1635610358.363672][3651:3656] CHIP:DMG: Data = 0, - [1635610358.363727][3651:3656] CHIP:DMG: DataElementVersion = 0x0, - [1635610358.363780][3651:3656] CHIP:DMG: }, - [1635610358.363833][3651:3656] CHIP:DMG: - [1635610358.363872][3651:3656] CHIP:DMG: ], - [1635610358.363920][3651:3656] CHIP:DMG: - [1635610358.363957][3651:3656] CHIP:DMG: } - [1635610358.364068][3651:3656] CHIP:ZCL: ReadAttributesResponse: - [1635610358.364106][3651:3656] CHIP:ZCL: ClusterId: 0x0000_0003 - [1635610358.364180][3651:3656] CHIP:ZCL: attributeId: 0x0000_0000 - [1635610358.364212][3651:3656] CHIP:ZCL: status: Success (0x0000) - [1635610358.364247][3651:3656] CHIP:ZCL: attribute TLV Type: 0x04 - [1635610358.364283][3651:3656] CHIP:TOO: Int16u attribute Response: 0 - [1635610358.364380][3651:3656] CHIP:EM: Piggybacking Ack for MessageCounter:1 on exchange: 43956i - disabled: true + IdentifyQuery is not supported by Matter + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "TH writes a value of 0x000f (15s) to IdentifyTime attribute of DUT" - verification: | - ./chip-tool identify write identify-time 15 1 0 - - CHIP:EM: Flushed pending ack for MessageCounter:1227491749 on exchange 15428i - [1635610454.188449][3668:3673] CHIP:EM: Received message of type 0x7 with protocolId (0, 1) and MessageCounter:1 on exchange 15429i - [1635610454.188517][3668:3673] CHIP:EM: Rxd Ack; Removing MessageCounter:0 from Retrans Table on exchange 15429i - [1635610454.188558][3668:3673] CHIP:EM: Removed CHIP MessageCounter:0 from RetransTable on exchange 15429i - [1635610454.188615][3668:3673] CHIP:DMG: WriteResponse = - [1635610454.188657][3668:3673] CHIP:DMG: { - [1635610454.188692][3668:3673] CHIP:DMG: AttributeStatusList = - [1635610454.188734][3668:3673] CHIP:DMG: [ - [1635610454.188774][3668:3673] CHIP:DMG: AttributeStatusIB = - [1635610454.188823][3668:3673] CHIP:DMG: { - [1635610454.188868][3668:3673] CHIP:DMG: AttributePath = - [1635610454.188919][3668:3673] CHIP:DMG: { - [1635610454.188973][3668:3673] CHIP:DMG: FieldTag = 0x0000_0000, - [1635610454.189030][3668:3673] CHIP:DMG: NodeId = 0x0, - [1635610454.189091][3668:3673] CHIP:DMG: ClusterId = 0x3, - [1635610454.189145][3668:3673] CHIP:DMG: EndpointId = 0x0, - [1635610454.189201][3668:3673] CHIP:DMG: } - [1635610454.189258][3668:3673] CHIP:DMG: - [1635610454.189303][3668:3673] CHIP:DMG: StatusIB = - [1635610454.189358][3668:3673] CHIP:DMG: { - [1635610454.189407][3668:3673] CHIP:DMG: status = 0x0, - [1635610454.189458][3668:3673] CHIP:DMG: }, - [1635610454.189510][3668:3673] CHIP:DMG: - [1635610454.189552][3668:3673] CHIP:DMG: }, - [1635610454.189601][3668:3673] CHIP:DMG: - [1635610454.189640][3668:3673] CHIP:DMG: ], - [1635610454.189696][3668:3673] CHIP:DMG: - [1635610454.189732][3668:3673] CHIP:DMG: } - [1635610454.189813][3668:3673] CHIP:ZCL: WriteResponse: - [1635610454.189849][3668:3673] CHIP:ZCL: status: Success (0x0000) - [1635610454.189889][3668:3673] CHIP:TOO: Default Success Response - [1635610454.189964][3668:3673] CHIP:DMG: WriteClient moving to [Uninitiali] - [1635610454.190006][3668:3673] CHIP:EM: Sending Standalone Ack for MessageCounter:1 on exchange 15429i - disabled: true + command: "writeAttribute" + attribute: "identify time" + arguments: + value: 15 + + - label: "Wait 5000ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 - label: "After 5 seconds, the TH reads IdentifyTime attribute from DUT" - verification: | - ./chip-tool identify read identify-time 1 1 - - CHIP:EM: Flushed pending ack for MessageCounter:1227491751 on exchange 51588i - [1635610554.173050][3677:3682] CHIP:EM: Received message of type 0x5 with protocolId (0, 1) and MessageCounter:1 on exchange 51589i - [1635610554.173120][3677:3682] CHIP:EM: Rxd Ack; Removing MessageCounter:0 from Retrans Table on exchange 51589i - [1635610554.173157][3677:3682] CHIP:EM: Removed CHIP MessageCounter:0 from RetransTable on exchange 51589i - [1635610554.173209][3677:3682] CHIP:DMG: ReportData = - [1635610554.173249][3677:3682] CHIP:DMG: { - [1635610554.173281][3677:3682] CHIP:DMG: AttributeDataList = - [1635610554.173320][3677:3682] CHIP:DMG: [ - [1635610554.173355][3677:3682] CHIP:DMG: AttributeDataElement = - [1635610554.173399][3677:3682] CHIP:DMG: { - [1635610554.173440][3677:3682] CHIP:DMG: AttributePath = - [1635610554.173530][3677:3682] CHIP:DMG: { - [1635610554.173613][3677:3682] CHIP:DMG: NodeId = 0x1, - [1635610554.173664][3677:3682] CHIP:DMG: EndpointId = 0x1, - [1635610554.173754][3677:3682] CHIP:DMG: ClusterId = 0x3, - [1635610554.173843][3677:3682] CHIP:DMG: FieldTag = 0x0000_0000, - [1635610554.173887][3677:3682] CHIP:DMG: } - [1635610554.173971][3677:3682] CHIP:DMG: - [1635610554.174054][3677:3682] CHIP:DMG: Data = 0, - [1635610554.174128][3677:3682] CHIP:DMG: DataElementVersion = 0x0, - [1635610554.174208][3677:3682] CHIP:DMG: }, - [1635610554.174291][3677:3682] CHIP:DMG: - [1635610554.174530][3677:3682] CHIP:DMG: ], - [1635610554.174612][3677:3682] CHIP:DMG: - [1635610554.174680][3677:3682] CHIP:DMG: } - [1635610554.174846][3677:3682] CHIP:ZCL: ReadAttributesResponse: - [1635610554.174917][3677:3682] CHIP:ZCL: ClusterId: 0x0000_0003 - [1635610554.174956][3677:3682] CHIP:ZCL: attributeId: 0x0000_0000 - [1635610554.175022][3677:3682] CHIP:ZCL: status: Success (0x0000) - [1635610554.175055][3677:3682] CHIP:ZCL: attribute TLV Type: 0x04 - [1635610554.175088][3677:3682] CHIP:TOO: Int16u attribute Response: 0 - [1635610554.175215][3677:3682] CHIP:EM: Piggybacking Ack for MessageCounter:1 on exchange: 51589i - disabled: true + command: "readAttribute" + attribute: "identify time" + response: + constraints: + minValue: 5 + maxValue: 15 diff --git a/src/app/tests/suites/certification/Test_TC_ULABEL_2_3.yaml b/src/app/tests/suites/certification/Test_TC_ULABEL_2_3.yaml new file mode 100644 index 00000000000000..cafb690be19a20 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_ULABEL_2_3.yaml @@ -0,0 +1,60 @@ +# 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: + 92.4. [TC-ULABEL-2.3] User Label cluster constraint_error verification + [DUT-server] + +config: + nodeId: 0x12344321 + cluster: "User Label" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH writes LabelList attribute of the DUT" + command: "writeAttribute" + attribute: "label list" + arguments: + value: + [ + { + label: "room", + value: "17_bytesIsTooLongforuserlabelnotexpected", + }, + ] + response: + error: FAILURE + + - label: "TH reads LabelList attribute of the DUT" + command: "writeAttribute" + attribute: "label list" + arguments: + value: + [ + { + label: "17_bytesIsTooLongforuserlabelnotexpected", + value: "foobar", + }, + ] + response: + error: FAILURE diff --git a/src/app/tests/suites/tests.js b/src/app/tests/suites/tests.js index 0601716cc8e728..4362d67f73d49a 100644 --- a/src/app/tests/suites/tests.js +++ b/src/app/tests/suites/tests.js @@ -140,7 +140,6 @@ function getManualTests() { ]; const Descriptor = [ - 'Test_TC_DESC_1_1', 'Test_TC_DESC_2_1', 'Test_TC_DESC_2_2', ]; @@ -158,13 +157,10 @@ function getManualTests() { ]; const GeneralDiagnostics = [ - 'Test_TC_GENDIAG_1_1', 'Test_TC_GENDIAG_1_2', - 'Test_TC_GENDIAG_2_1', ]; const Identify = [ - 'Test_TC_I_2_2', 'Test_TC_I_3_1', 'Test_TC_I_3_2', ]; @@ -545,6 +541,11 @@ function getTests() { 'Test_TC_DM_2_1', ]; + const Descriptor = [ + 'Test_TC_DESC_1_1', + ]; + + const ElectricalMeasurement = [ 'Test_TC_EMR_1_1', ]; @@ -564,9 +565,15 @@ function getTests() { 'Test_TC_CGEN_2_1', ]; + const GeneralDiagnostics = [ + 'Test_TC_DGGEN_1_1', + 'Test_TC_DGGEN_2_1', + ]; + const Identify = [ 'Test_TC_I_1_1', 'Test_TC_I_2_1', + 'Test_TC_I_2_2', 'Test_TC_I_2_3', ]; @@ -593,6 +600,7 @@ function getTests() { const UserLabel = [ 'Test_TC_ULABEL_1_1', 'Test_TC_ULABEL_2_2', + 'Test_TC_ULABEL_2_3', ]; const MediaControl = [ @@ -818,10 +826,12 @@ function getTests() { BridgedActions, ColorControl, DeviceManagement, + Descriptor, ElectricalMeasurement, EthernetNetworkDiagnostics, FlowMeasurement, GeneralCommissioning, + GeneralDiagnostics, Identify, IlluminanceMeasurement, LevelControl, diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index d641bfcb2ed17c..c4653358d4cd55 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -65,6 +65,7 @@ class TestList : public Command printf("Test_TC_CC_9_2\n"); printf("Test_TC_CC_9_3\n"); printf("Test_TC_DM_2_1\n"); + printf("Test_TC_DESC_1_1\n"); printf("Test_TC_EMR_1_1\n"); printf("Test_TC_DGETH_2_1\n"); printf("Test_TC_DGETH_2_2\n"); @@ -72,8 +73,11 @@ class TestList : public Command printf("Test_TC_FLW_2_1\n"); printf("Test_TC_CGEN_1_1\n"); printf("Test_TC_CGEN_2_1\n"); + printf("Test_TC_DGGEN_1_1\n"); + printf("Test_TC_DGGEN_2_1\n"); printf("Test_TC_I_1_1\n"); printf("Test_TC_I_2_1\n"); + printf("Test_TC_I_2_2\n"); printf("Test_TC_I_2_3\n"); printf("Test_TC_ILL_1_1\n"); printf("Test_TC_ILL_2_1\n"); @@ -161,6 +165,7 @@ class TestList : public Command printf("Test_TC_DIAG_TH_NW_2_3\n"); printf("Test_TC_ULABEL_1_1\n"); printf("Test_TC_ULABEL_2_2\n"); + printf("Test_TC_ULABEL_2_3\n"); printf("Test_TC_DGWIFI_2_1\n"); printf("Test_TC_DGWIFI_2_3\n"); printf("Test_TC_WNCV_1_1\n"); @@ -326,7 +331,6 @@ class ManualTestList : public Command printf("Test_TC_DLOG_2_1\n"); printf("Test_TC_DLOG_2_2\n"); printf("Test_TC_DLOG_3_1\n"); - printf("Test_TC_DESC_1_1\n"); printf("Test_TC_DESC_2_1\n"); printf("Test_TC_DESC_2_2\n"); printf("Test_TC_DGETH_1_1\n"); @@ -335,10 +339,7 @@ class ManualTestList : public Command printf("Test_TC_CGEN_2_2\n"); printf("Test_TC_CGEN_2_3\n"); printf("Test_TC_CGEN_2_4\n"); - printf("Test_TC_GENDIAG_1_1\n"); printf("Test_TC_GENDIAG_1_2\n"); - printf("Test_TC_GENDIAG_2_1\n"); - printf("Test_TC_I_2_2\n"); printf("Test_TC_I_3_1\n"); printf("Test_TC_I_3_2\n"); printf("Test_TC_ILL_2_2\n"); @@ -12003,6 +12004,148 @@ class Test_TC_DM_2_1Suite : public TestCommand } }; +class Test_TC_DESC_1_1Suite : public TestCommand +{ +public: + Test_TC_DESC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_1_1", 6, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DESC_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read the global attribute: ClusterRevision"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::ClusterRevision::Id, true, + chip::NullOptional); + } + case 2: { + LogStep(2, "Read the global attribute: FeatureMap"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "Read the global attribute: AttributeList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 4: { + LogStep(4, "Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::AcceptedCommandList::Id, + true, chip::NullOptional); + } + case 5: { + LogStep(5, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::GeneratedCommandList::Id, + true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_EMR_1_1Suite : public TestCommand { public: @@ -13321,10 +13464,10 @@ class Test_TC_CGEN_2_1Suite : public TestCommand } }; -class Test_TC_I_1_1Suite : public TestCommand +class Test_TC_DGGEN_1_1Suite : public TestCommand { public: - Test_TC_I_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_1_1", 8, credsIssuerConfig) + Test_TC_DGGEN_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_1_1", 6, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -13332,7 +13475,7 @@ class Test_TC_I_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_I_1_1Suite() {} + ~Test_TC_DGGEN_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -13366,15 +13509,17 @@ class Test_TC_I_1_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 4U)); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); } break; case 3: @@ -13382,24 +13527,6 @@ class Test_TC_I_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); - VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); - VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); - VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 65528UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); - VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65529UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); - VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65531UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); - VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65532UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); - VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 7)); - } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; @@ -13412,9 +13539,7 @@ class Test_TC_I_1_1Suite : public TestCommand auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 0)); VerifyOrReturn(CheckValue("acceptedCommandList[0]", iter_0.GetValue(), 0UL)); - VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 1)); - VerifyOrReturn(CheckValue("acceptedCommandList[1]", iter_0.GetValue(), 64UL)); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 2)); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 1)); } VerifyOrReturn(CheckConstraintType("value", "", "list")); } @@ -13431,14 +13556,6 @@ class Test_TC_I_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -13462,62 +13579,39 @@ class Test_TC_I_1_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH reads the ClusterRevision attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::ClusterRevision::Id, true, - chip::NullOptional); + LogStep(1, "Read the global attribute: ClusterRevision"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, + GeneralDiagnostics::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute constraints : ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::ClusterRevision::Id, true, - chip::NullOptional); + LogStep(2, "Read the global attribute: FeatureMap"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, + GeneralDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { LogStep(3, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::AttributeList::Id, true, - chip::NullOptional); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, + GeneralDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { LogStep(4, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, + GeneralDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 5: { LogStep(5, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, - "Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap attribute has " - "the value 0"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, + GeneralDiagnostics::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_I_2_1Suite : public TestCommand +class Test_TC_DGGEN_2_1Suite : public TestCommand { public: - Test_TC_I_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_2_1", 3, credsIssuerConfig) + Test_TC_DGGEN_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_2_1", 14, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -13525,7 +13619,7 @@ class Test_TC_I_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_I_2_1Suite() {} + ~Test_TC_DGGEN_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -13555,6 +13649,16 @@ class Test_TC_I_2_1Suite : public TestCommand shouldContinue = true; break; case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterfaceType::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -13562,14 +13666,427 @@ class Test_TC_I_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; - case 2: + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint64_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "uint64")); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "uint32")); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 5)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 6)); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads NetworkInterfaces structure attribute from DUT."); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, + GeneralDiagnostics::Attributes::NetworkInterfaces::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads a RebootCount attribute value from DUT."); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, + GeneralDiagnostics::Attributes::RebootCount::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "Reboot DUT (node)"); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); + } + case 4: { + LogStep(4, "Reboot DUT (node)"); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); + } + case 5: { + LogStep(5, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 6: { + LogStep(6, + "DUT reboots and TH reads a UpTime attribute value of DUT since some arbitrary start time of DUT rebooting."); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, GeneralDiagnostics::Attributes::UpTime::Id, + true, chip::NullOptional); + } + case 7: { + LogStep(7, "TH reads a TotalOperationalHours attribute value from DUT."); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, + GeneralDiagnostics::Attributes::TotalOperationalHours::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "Reboot DUT (node)"); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); + } + case 9: { + LogStep(9, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 10: { + LogStep(10, "TH reads BootReason attribute value from DUT."); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, + GeneralDiagnostics::Attributes::BootReasons::Id, true, chip::NullOptional); + } + case 11: { + LogStep(11, "TH reads ActiveHardwareFaults attribute value from DUT."); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 12: { + LogStep(12, "TH reads ActiveRadioFaults attribute value from DUT."); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 13: { + LogStep(13, "TH reads ActiveNetworkFaults attribute value from DUT."); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_I_1_1Suite : public TestCommand +{ +public: + Test_TC_I_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_1_1", 8, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_I_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 4U)); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); + VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); + VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 7)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 0)); + VerifyOrReturn(CheckValue("acceptedCommandList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 1)); + VerifyOrReturn(CheckValue("acceptedCommandList[1]", iter_0.GetValue(), 64UL)); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 2)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads the ClusterRevision attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::ClusterRevision::Id, true, + chip::NullOptional); + } + case 2: { + LogStep(2, "Read the global attribute constraints : ClusterRevision"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::ClusterRevision::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "Read the global attribute: AttributeList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 4: { + LogStep(4, "Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::AcceptedCommandList::Id, true, + chip::NullOptional); + } + case 5: { + LogStep(5, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::GeneratedCommandList::Id, true, + chip::NullOptional); + } + case 6: { + LogStep(6, + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 7: { + LogStep(7, + "Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap attribute has " + "the value 0"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_I_2_1Suite : public TestCommand +{ +public: + Test_TC_I_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_2_1", 3, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_I_2_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 5)); } break; default: @@ -13609,6 +14126,217 @@ class Test_TC_I_2_1Suite : public TestCommand } }; +class Test_TC_I_2_2Suite : public TestCommand +{ +public: + Test_TC_I_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_2_2", 12, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_I_2_2Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 55U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65U)); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 45U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 55U)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("identifyTime", value, 0U)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 5U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 15U)); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH sends Identify command to DUT, with the identify time field set to 0x003c (60s)."); + ListFreer listFreer; + chip::app::Clusters::Identify::Commands::Identify::Type value; + value.identifyTime = 60U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::Identify::Id, value, + chip::NullOptional + + ); + } + case 2: { + LogStep(2, "TH reads immediately IdentifyTime attribute from DUT1"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "Wait 10000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 4: { + LogStep(4, "After 10 seconds, the TH reads IdentifyTime attribute from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id, true, + chip::NullOptional); + } + case 5: { + LogStep(5, + "TH sends IdentifyQuery command to DUT and Verify IdentifyQueryResponse command to TH,with the Timeout field " + "set to a value in the range 0x0000 to 0x0032"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 6: { + LogStep(6, "TH sends Identify command to DUT, with the identify time field set to 0x0000 (stop identifying)."); + ListFreer listFreer; + chip::app::Clusters::Identify::Commands::Identify::Type value; + value.identifyTime = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Commands::Identify::Id, value, + chip::NullOptional + + ); + } + case 7: { + LogStep(7, "TH reads immediately IdentifyTime attribute from DUT2"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id, true, + chip::NullOptional); + } + case 8: { + LogStep(8, "TH sends IdentifyQuery command to DUT "); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 9: { + LogStep(9, "TH writes a value of 0x000f (15s) to IdentifyTime attribute of DUT"); + ListFreer listFreer; + uint16_t value; + value = 15U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 10: { + LogStep(10, "Wait 5000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 11: { + LogStep(11, "After 5 seconds, the TH reads IdentifyTime attribute from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id, true, + chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_I_2_3Suite : public TestCommand { public: @@ -35271,6 +35999,117 @@ class Test_TC_ULABEL_2_2Suite : public TestCommand } }; +class Test_TC_ULABEL_2_3Suite : public TestCommand +{ +public: + Test_TC_ULABEL_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_2_3", 3, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_ULABEL_2_3Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH writes LabelList attribute of the DUT"); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].label = chip::Span("roomgarbage: not in length on purpose", 4); + listHolder_0->mList[0].value = + chip::Span("17_bytesIsTooLongforuserlabelnotexpectedgarbage: not in length on purpose", 40); + + value = + chip::app::DataModel::List(listHolder_0->mList, 1); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads LabelList attribute of the DUT"); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].label = + chip::Span("17_bytesIsTooLongforuserlabelnotexpectedgarbage: not in length on purpose", 40); + listHolder_0->mList[0].value = chip::Span("foobargarbage: not in length on purpose", 6); + + value = + chip::app::DataModel::List(listHolder_0->mList, 1); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, value, + chip::NullOptional, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_DGWIFI_2_1Suite : public TestCommand { public: @@ -70176,234 +71015,10 @@ class Test_TC_DM_3_4Suite : public TestCommand } }; -class Test_TC_DM_4_1Suite : public TestCommand -{ -public: - Test_TC_DM_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DM_4_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DM_4_2Suite : public TestCommand -{ -public: - Test_TC_DM_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DM_4_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DM_4_3Suite : public TestCommand -{ -public: - Test_TC_DM_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DM_4_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DM_4_4Suite : public TestCommand -{ -public: - Test_TC_DM_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DM_4_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DM_4_5Suite : public TestCommand +class Test_TC_DM_4_1Suite : public TestCommand { public: - Test_TC_DM_4_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_5", 0, credsIssuerConfig) + Test_TC_DM_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70411,7 +71026,7 @@ class Test_TC_DM_4_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_5Suite() {} + ~Test_TC_DM_4_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70456,10 +71071,10 @@ class Test_TC_DM_4_5Suite : public TestCommand } }; -class Test_TC_DM_4_6Suite : public TestCommand +class Test_TC_DM_4_2Suite : public TestCommand { public: - Test_TC_DM_4_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_6", 0, credsIssuerConfig) + Test_TC_DM_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70467,7 +71082,7 @@ class Test_TC_DM_4_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_6Suite() {} + ~Test_TC_DM_4_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70512,10 +71127,10 @@ class Test_TC_DM_4_6Suite : public TestCommand } }; -class Test_TC_DM_4_7Suite : public TestCommand +class Test_TC_DM_4_3Suite : public TestCommand { public: - Test_TC_DM_4_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_7", 0, credsIssuerConfig) + Test_TC_DM_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70523,7 +71138,7 @@ class Test_TC_DM_4_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_7Suite() {} + ~Test_TC_DM_4_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70568,10 +71183,10 @@ class Test_TC_DM_4_7Suite : public TestCommand } }; -class Test_TC_DM_4_8Suite : public TestCommand +class Test_TC_DM_4_4Suite : public TestCommand { public: - Test_TC_DM_4_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_8", 0, credsIssuerConfig) + Test_TC_DM_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70579,7 +71194,7 @@ class Test_TC_DM_4_8Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_8Suite() {} + ~Test_TC_DM_4_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70624,10 +71239,10 @@ class Test_TC_DM_4_8Suite : public TestCommand } }; -class Test_TC_DM_4_9Suite : public TestCommand +class Test_TC_DM_4_5Suite : public TestCommand { public: - Test_TC_DM_4_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_9", 0, credsIssuerConfig) + Test_TC_DM_4_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70635,7 +71250,7 @@ class Test_TC_DM_4_9Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_9Suite() {} + ~Test_TC_DM_4_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70680,10 +71295,10 @@ class Test_TC_DM_4_9Suite : public TestCommand } }; -class Test_TC_DM_4_10Suite : public TestCommand +class Test_TC_DM_4_6Suite : public TestCommand { public: - Test_TC_DM_4_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_10", 0, credsIssuerConfig) + Test_TC_DM_4_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70691,7 +71306,7 @@ class Test_TC_DM_4_10Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_10Suite() {} + ~Test_TC_DM_4_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70736,10 +71351,10 @@ class Test_TC_DM_4_10Suite : public TestCommand } }; -class Test_TC_DM_4_11Suite : public TestCommand +class Test_TC_DM_4_7Suite : public TestCommand { public: - Test_TC_DM_4_11Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_11", 0, credsIssuerConfig) + Test_TC_DM_4_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_7", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70747,7 +71362,7 @@ class Test_TC_DM_4_11Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_11Suite() {} + ~Test_TC_DM_4_7Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70792,10 +71407,10 @@ class Test_TC_DM_4_11Suite : public TestCommand } }; -class Test_TC_DM_4_12Suite : public TestCommand +class Test_TC_DM_4_8Suite : public TestCommand { public: - Test_TC_DM_4_12Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_12", 0, credsIssuerConfig) + Test_TC_DM_4_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_8", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70803,7 +71418,7 @@ class Test_TC_DM_4_12Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_12Suite() {} + ~Test_TC_DM_4_8Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70848,10 +71463,10 @@ class Test_TC_DM_4_12Suite : public TestCommand } }; -class Test_TC_DM_4_13Suite : public TestCommand +class Test_TC_DM_4_9Suite : public TestCommand { public: - Test_TC_DM_4_13Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_13", 0, credsIssuerConfig) + Test_TC_DM_4_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_9", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70859,7 +71474,7 @@ class Test_TC_DM_4_13Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_13Suite() {} + ~Test_TC_DM_4_9Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70904,10 +71519,10 @@ class Test_TC_DM_4_13Suite : public TestCommand } }; -class Test_TC_DM_4_14Suite : public TestCommand +class Test_TC_DM_4_10Suite : public TestCommand { public: - Test_TC_DM_4_14Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_14", 0, credsIssuerConfig) + Test_TC_DM_4_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_10", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70915,7 +71530,7 @@ class Test_TC_DM_4_14Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_14Suite() {} + ~Test_TC_DM_4_10Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -70960,10 +71575,10 @@ class Test_TC_DM_4_14Suite : public TestCommand } }; -class Test_TC_DM_4_15Suite : public TestCommand +class Test_TC_DM_4_11Suite : public TestCommand { public: - Test_TC_DM_4_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_15", 0, credsIssuerConfig) + Test_TC_DM_4_11Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_11", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -70971,7 +71586,7 @@ class Test_TC_DM_4_15Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_15Suite() {} + ~Test_TC_DM_4_11Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71016,10 +71631,10 @@ class Test_TC_DM_4_15Suite : public TestCommand } }; -class Test_TC_DM_4_16Suite : public TestCommand +class Test_TC_DM_4_12Suite : public TestCommand { public: - Test_TC_DM_4_16Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_16", 0, credsIssuerConfig) + Test_TC_DM_4_12Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_12", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71027,7 +71642,7 @@ class Test_TC_DM_4_16Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_16Suite() {} + ~Test_TC_DM_4_12Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71072,10 +71687,10 @@ class Test_TC_DM_4_16Suite : public TestCommand } }; -class Test_TC_DM_4_17Suite : public TestCommand +class Test_TC_DM_4_13Suite : public TestCommand { public: - Test_TC_DM_4_17Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_17", 0, credsIssuerConfig) + Test_TC_DM_4_13Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_13", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71083,7 +71698,7 @@ class Test_TC_DM_4_17Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_17Suite() {} + ~Test_TC_DM_4_13Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71128,10 +71743,10 @@ class Test_TC_DM_4_17Suite : public TestCommand } }; -class Test_TC_DM_4_18Suite : public TestCommand +class Test_TC_DM_4_14Suite : public TestCommand { public: - Test_TC_DM_4_18Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_18", 0, credsIssuerConfig) + Test_TC_DM_4_14Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_14", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71139,7 +71754,7 @@ class Test_TC_DM_4_18Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_18Suite() {} + ~Test_TC_DM_4_14Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71184,10 +71799,10 @@ class Test_TC_DM_4_18Suite : public TestCommand } }; -class Test_TC_DM_4_19Suite : public TestCommand +class Test_TC_DM_4_15Suite : public TestCommand { public: - Test_TC_DM_4_19Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_19", 0, credsIssuerConfig) + Test_TC_DM_4_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_15", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71195,7 +71810,7 @@ class Test_TC_DM_4_19Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_19Suite() {} + ~Test_TC_DM_4_15Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71240,10 +71855,10 @@ class Test_TC_DM_4_19Suite : public TestCommand } }; -class Test_TC_DM_4_20Suite : public TestCommand +class Test_TC_DM_4_16Suite : public TestCommand { public: - Test_TC_DM_4_20Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_20", 0, credsIssuerConfig) + Test_TC_DM_4_16Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_16", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71251,7 +71866,7 @@ class Test_TC_DM_4_20Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_20Suite() {} + ~Test_TC_DM_4_16Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71296,10 +71911,10 @@ class Test_TC_DM_4_20Suite : public TestCommand } }; -class Test_TC_DM_4_21Suite : public TestCommand +class Test_TC_DM_4_17Suite : public TestCommand { public: - Test_TC_DM_4_21Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_21", 0, credsIssuerConfig) + Test_TC_DM_4_17Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_17", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71307,7 +71922,7 @@ class Test_TC_DM_4_21Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_4_21Suite() {} + ~Test_TC_DM_4_17Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71352,10 +71967,10 @@ class Test_TC_DM_4_21Suite : public TestCommand } }; -class Test_TC_DLOG_1_1Suite : public TestCommand +class Test_TC_DM_4_18Suite : public TestCommand { public: - Test_TC_DLOG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_1_1", 0, credsIssuerConfig) + Test_TC_DM_4_18Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_18", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71363,7 +71978,7 @@ class Test_TC_DLOG_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_1_1Suite() {} + ~Test_TC_DM_4_18Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71408,10 +72023,10 @@ class Test_TC_DLOG_1_1Suite : public TestCommand } }; -class Test_TC_DLOG_2_1Suite : public TestCommand +class Test_TC_DM_4_19Suite : public TestCommand { public: - Test_TC_DLOG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_1", 0, credsIssuerConfig) + Test_TC_DM_4_19Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_19", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71419,7 +72034,7 @@ class Test_TC_DLOG_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_2_1Suite() {} + ~Test_TC_DM_4_19Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71464,10 +72079,10 @@ class Test_TC_DLOG_2_1Suite : public TestCommand } }; -class Test_TC_DLOG_2_2Suite : public TestCommand +class Test_TC_DM_4_20Suite : public TestCommand { public: - Test_TC_DLOG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_2", 0, credsIssuerConfig) + Test_TC_DM_4_20Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_20", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71475,7 +72090,7 @@ class Test_TC_DLOG_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_2_2Suite() {} + ~Test_TC_DM_4_20Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71520,10 +72135,10 @@ class Test_TC_DLOG_2_2Suite : public TestCommand } }; -class Test_TC_DLOG_3_1Suite : public TestCommand +class Test_TC_DM_4_21Suite : public TestCommand { public: - Test_TC_DLOG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_3_1", 0, credsIssuerConfig) + Test_TC_DM_4_21Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DM_4_21", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71531,7 +72146,7 @@ class Test_TC_DLOG_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_3_1Suite() {} + ~Test_TC_DM_4_21Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71576,10 +72191,10 @@ class Test_TC_DLOG_3_1Suite : public TestCommand } }; -class Test_TC_DESC_1_1Suite : public TestCommand +class Test_TC_DLOG_1_1Suite : public TestCommand { public: - Test_TC_DESC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_1_1", 0, credsIssuerConfig) + Test_TC_DLOG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71587,7 +72202,7 @@ class Test_TC_DESC_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DESC_1_1Suite() {} + ~Test_TC_DLOG_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71632,10 +72247,10 @@ class Test_TC_DESC_1_1Suite : public TestCommand } }; -class Test_TC_DESC_2_1Suite : public TestCommand +class Test_TC_DLOG_2_1Suite : public TestCommand { public: - Test_TC_DESC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_1", 0, credsIssuerConfig) + Test_TC_DLOG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71643,7 +72258,7 @@ class Test_TC_DESC_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DESC_2_1Suite() {} + ~Test_TC_DLOG_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71688,10 +72303,10 @@ class Test_TC_DESC_2_1Suite : public TestCommand } }; -class Test_TC_DESC_2_2Suite : public TestCommand +class Test_TC_DLOG_2_2Suite : public TestCommand { public: - Test_TC_DESC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_2", 0, credsIssuerConfig) + Test_TC_DLOG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71699,7 +72314,7 @@ class Test_TC_DESC_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DESC_2_2Suite() {} + ~Test_TC_DLOG_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71744,10 +72359,10 @@ class Test_TC_DESC_2_2Suite : public TestCommand } }; -class Test_TC_DGETH_1_1Suite : public TestCommand +class Test_TC_DLOG_3_1Suite : public TestCommand { public: - Test_TC_DGETH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_1_1", 0, credsIssuerConfig) + Test_TC_DLOG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71755,7 +72370,7 @@ class Test_TC_DGETH_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGETH_1_1Suite() {} + ~Test_TC_DLOG_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71800,10 +72415,10 @@ class Test_TC_DGETH_1_1Suite : public TestCommand } }; -class Test_TC_DGETH_3_1Suite : public TestCommand +class Test_TC_DESC_2_1Suite : public TestCommand { public: - Test_TC_DGETH_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_3_1", 0, credsIssuerConfig) + Test_TC_DESC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71811,7 +72426,7 @@ class Test_TC_DGETH_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGETH_3_1Suite() {} + ~Test_TC_DESC_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71856,10 +72471,10 @@ class Test_TC_DGETH_3_1Suite : public TestCommand } }; -class Test_TC_DGETH_3_2Suite : public TestCommand +class Test_TC_DESC_2_2Suite : public TestCommand { public: - Test_TC_DGETH_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_3_2", 0, credsIssuerConfig) + Test_TC_DESC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71867,7 +72482,7 @@ class Test_TC_DGETH_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGETH_3_2Suite() {} + ~Test_TC_DESC_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71912,10 +72527,10 @@ class Test_TC_DGETH_3_2Suite : public TestCommand } }; -class Test_TC_CGEN_2_2Suite : public TestCommand +class Test_TC_DGETH_1_1Suite : public TestCommand { public: - Test_TC_CGEN_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_2", 0, credsIssuerConfig) + Test_TC_DGETH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71923,7 +72538,7 @@ class Test_TC_CGEN_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CGEN_2_2Suite() {} + ~Test_TC_DGETH_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71968,10 +72583,10 @@ class Test_TC_CGEN_2_2Suite : public TestCommand } }; -class Test_TC_CGEN_2_3Suite : public TestCommand +class Test_TC_DGETH_3_1Suite : public TestCommand { public: - Test_TC_CGEN_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_3", 0, credsIssuerConfig) + Test_TC_DGETH_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71979,7 +72594,7 @@ class Test_TC_CGEN_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CGEN_2_3Suite() {} + ~Test_TC_DGETH_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72024,10 +72639,10 @@ class Test_TC_CGEN_2_3Suite : public TestCommand } }; -class Test_TC_CGEN_2_4Suite : public TestCommand +class Test_TC_DGETH_3_2Suite : public TestCommand { public: - Test_TC_CGEN_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_4", 0, credsIssuerConfig) + Test_TC_DGETH_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72035,7 +72650,7 @@ class Test_TC_CGEN_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CGEN_2_4Suite() {} + ~Test_TC_DGETH_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72080,11 +72695,10 @@ class Test_TC_CGEN_2_4Suite : public TestCommand } }; -class Test_TC_GENDIAG_1_1Suite : public TestCommand +class Test_TC_CGEN_2_2Suite : public TestCommand { public: - Test_TC_GENDIAG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_GENDIAG_1_1", 0, credsIssuerConfig) + Test_TC_CGEN_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72092,7 +72706,7 @@ class Test_TC_GENDIAG_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_GENDIAG_1_1Suite() {} + ~Test_TC_CGEN_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72137,11 +72751,10 @@ class Test_TC_GENDIAG_1_1Suite : public TestCommand } }; -class Test_TC_GENDIAG_1_2Suite : public TestCommand +class Test_TC_CGEN_2_3Suite : public TestCommand { public: - Test_TC_GENDIAG_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_GENDIAG_1_2", 0, credsIssuerConfig) + Test_TC_CGEN_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72149,7 +72762,7 @@ class Test_TC_GENDIAG_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_GENDIAG_1_2Suite() {} + ~Test_TC_CGEN_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72194,11 +72807,10 @@ class Test_TC_GENDIAG_1_2Suite : public TestCommand } }; -class Test_TC_GENDIAG_2_1Suite : public TestCommand +class Test_TC_CGEN_2_4Suite : public TestCommand { public: - Test_TC_GENDIAG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_GENDIAG_2_1", 0, credsIssuerConfig) + Test_TC_CGEN_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72206,7 +72818,7 @@ class Test_TC_GENDIAG_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_GENDIAG_2_1Suite() {} + ~Test_TC_CGEN_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72251,10 +72863,11 @@ class Test_TC_GENDIAG_2_1Suite : public TestCommand } }; -class Test_TC_I_2_2Suite : public TestCommand +class Test_TC_GENDIAG_1_2Suite : public TestCommand { public: - Test_TC_I_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_2_2", 0, credsIssuerConfig) + Test_TC_GENDIAG_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_GENDIAG_1_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72262,7 +72875,7 @@ class Test_TC_I_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_I_2_2Suite() {} + ~Test_TC_GENDIAG_1_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -83548,6 +84161,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -83555,8 +84169,11 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -83644,6 +84261,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -83798,7 +84416,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -83807,10 +84424,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 40014b616daf36..6dcad1e170e5db 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -64,6 +64,7 @@ class TestList : public Command { printf("Test_TC_CC_9_2\n"); printf("Test_TC_CC_9_3\n"); printf("Test_TC_DM_2_1\n"); + printf("Test_TC_DESC_1_1\n"); printf("Test_TC_EMR_1_1\n"); printf("Test_TC_DGETH_2_1\n"); printf("Test_TC_DGETH_2_2\n"); @@ -71,8 +72,11 @@ class TestList : public Command { printf("Test_TC_FLW_2_1\n"); printf("Test_TC_CGEN_1_1\n"); printf("Test_TC_CGEN_2_1\n"); + printf("Test_TC_DGGEN_1_1\n"); + printf("Test_TC_DGGEN_2_1\n"); printf("Test_TC_I_1_1\n"); printf("Test_TC_I_2_1\n"); + printf("Test_TC_I_2_2\n"); printf("Test_TC_I_2_3\n"); printf("Test_TC_ILL_1_1\n"); printf("Test_TC_ILL_2_1\n"); @@ -155,6 +159,7 @@ class TestList : public Command { printf("Test_TC_TSUIC_2_2\n"); printf("Test_TC_ULABEL_1_1\n"); printf("Test_TC_ULABEL_2_2\n"); + printf("Test_TC_ULABEL_2_3\n"); printf("Test_TC_DGWIFI_2_1\n"); printf("Test_TC_DGWIFI_2_3\n"); printf("Test_TC_WNCV_1_1\n"); @@ -20169,6 +20174,235 @@ class Test_TC_DM_2_1 : public TestCommandBridge { } }; +class Test_TC_DESC_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_DESC_1_1() + : TestCommandBridge("Test_TC_DESC_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_DESC_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DESC_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DESC_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + err = TestReadTheGlobalAttributeFeatureMap_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 6; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + class Test_TC_EMR_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -22453,11 +22687,11 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { } }; -class Test_TC_I_1_1 : public TestCommandBridge { +class Test_TC_DGGEN_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_I_1_1() - : TestCommandBridge("Test_TC_I_1_1") + Test_TC_DGGEN_1_1() + : TestCommandBridge("Test_TC_DGGEN_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -22467,7 +22701,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_I_1_1() {} + ~Test_TC_DGGEN_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -22475,11 +22709,11 @@ class Test_TC_I_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_I_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGGEN_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGGEN_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -22496,12 +22730,12 @@ class Test_TC_I_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision attribute from the DUT\n"); - err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints : ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); @@ -22515,25 +22749,1052 @@ class Test_TC_I_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 6; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DGGEN_2_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_DGGEN_2_1() + : TestCommandBridge("Test_TC_DGGEN_2_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_DGGEN_2_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGGEN_2_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGGEN_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads NetworkInterfaces structure attribute from DUT.\n"); + err = TestThReadsNetworkInterfacesStructureAttributeFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads a RebootCount attribute value from DUT.\n"); + err = TestThReadsARebootCountAttributeValueFromDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Reboot DUT (node)\n"); + err = TestRebootDutNode_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Reboot DUT (node)\n"); + err = TestRebootDutNode_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_5(); + break; case 6: ChipLogProgress(chipTool, - " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); + " ***** Test Step 6 : DUT reboots and TH reads a UpTime attribute value of DUT since some arbitrary start time of " + "DUT rebooting.\n"); + err = TestDutRebootsAndThReadsAUpTimeAttributeValueOfDutSinceSomeArbitraryStartTimeOfDutRebooting_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads a TotalOperationalHours attribute value from DUT.\n"); + err = TestThReadsATotalOperationalHoursAttributeValueFromDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Reboot DUT (node)\n"); + err = TestRebootDutNode_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads BootReason attribute value from DUT.\n"); + err = TestThReadsBootReasonAttributeValueFromDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads ActiveHardwareFaults attribute value from DUT.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); + err = TestThReadsActiveHardwareFaultsAttributeValueFromDut_11(); break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap " - "attribute has the value 0\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads ActiveRadioFaults attribute value from DUT.\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_7(); + err = TestThReadsActiveRadioFaultsAttributeValueFromDut_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads ActiveNetworkFaults attribute value from DUT.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsActiveNetworkFaultsAttributeValueFromDut_13(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 14; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsNetworkInterfacesStructureAttributeFromDut_1() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeNetworkInterfacesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads NetworkInterfaces structure attribute from DUT. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("networkInterfaces", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsARebootCountAttributeValueFromDut_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeRebootCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads a RebootCount attribute value from DUT. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("rebootCount", "", "uint16")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestRebootDutNode_3() + { + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); + } + + CHIP_ERROR TestRebootDutNode_4() + { + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); + } + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_5() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestDutRebootsAndThReadsAUpTimeAttributeValueOfDutSinceSomeArbitraryStartTimeOfDutRebooting_6() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeUpTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"DUT reboots and TH reads a UpTime attribute value of DUT since some arbitrary start time of DUT rebooting. " + @"Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("upTime", "", "uint64")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsATotalOperationalHoursAttributeValueFromDut_7() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeTotalOperationalHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads a TotalOperationalHours attribute value from DUT. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("totalOperationalHours", "", "uint32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestRebootDutNode_8() + { + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); + } + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_9() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsBootReasonAttributeValueFromDut_10() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBootReasonsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads BootReason attribute value from DUT. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("bootReasons", [value unsignedCharValue], 0)); + VerifyOrReturn(CheckConstraintMaxValue("bootReasons", [value unsignedCharValue], 6)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsActiveHardwareFaultsAttributeValueFromDut_11() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThReadsActiveRadioFaultsAttributeValueFromDut_12() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThReadsActiveNetworkFaultsAttributeValueFromDut_13() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } +}; + +class Test_TC_I_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_I_1_1() + : TestCommandBridge("Test_TC_I_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_I_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_I_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision attribute from the DUT\n"); + err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints : ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + break; + case 6: + ChipLogProgress(chipTool, + " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + "supported events.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); + break; + case 7: + ChipLogProgress(chipTool, + " ***** Test Step 7 : Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap " + "attribute has the value 0\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_7(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 8; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute constraints : ClusterRevision Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(7))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65533UL)); + } + + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(2))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 64UL)); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_7() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } +}; + +class Test_TC_I_2_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_I_2_1() + : TestCommandBridge("Test_TC_I_2_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_I_2_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_I_2_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the IdentifyTime attribute from the DUT\n"); + err = TestThReadsTheIdentifyTimeAttributeFromTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the IdentifyType attribute from the DUT\n"); + err = TestThReadsTheIdentifyTypeAttributeFromTheDut_2(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 3; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsTheIdentifyTimeAttributeFromTheDut_1() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the IdentifyTime attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("identifyTime", "", "uint16")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTheIdentifyTypeAttributeFromTheDut_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeIdentifyTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the IdentifyType attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("identifyType", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("identifyType", [value unsignedCharValue], 0)); + VerifyOrReturn(CheckConstraintMaxValue("identifyType", [value unsignedCharValue], 5)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_I_2_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_I_2_2() + : TestCommandBridge("Test_TC_I_2_2") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_I_2_2() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_I_2_2\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, + " ***** Test Step 1 : TH sends Identify command to DUT, with the identify time field set to 0x003c (60s).\n"); + err = TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x003c60s_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads immediately IdentifyTime attribute from DUT1\n"); + err = TestThReadsImmediatelyIdentifyTimeAttributeFromDut1_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 10000ms\n"); + err = TestWait10000ms_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : After 10 seconds, the TH reads IdentifyTime attribute from DUT\n"); + err = TestAfter10SecondsTheThReadsIdentifyTimeAttributeFromDut_4(); + break; + case 5: + ChipLogProgress(chipTool, + " ***** Test Step 5 : TH sends IdentifyQuery command to DUT and Verify IdentifyQueryResponse command to TH,with " + "the Timeout field set to a value in the range 0x0000 to 0x0032\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThSendsIdentifyQueryCommandToDutAndVerifyIdentifyQueryResponseCommandToTHwithTheTimeoutFieldSetToAValueInTheRange0x0000To0x0032_5(); + break; + case 6: + ChipLogProgress(chipTool, + " ***** Test Step 6 : TH sends Identify command to DUT, with the identify time field set to 0x0000 (stop " + "identifying).\n"); + err = TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x0000StopIdentifying_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads immediately IdentifyTime attribute from DUT2\n"); + err = TestThReadsImmediatelyIdentifyTimeAttributeFromDut2_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends IdentifyQuery command to DUT \n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThSendsIdentifyQueryCommandToDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH writes a value of 0x000f (15s) to IdentifyTime attribute of DUT\n"); + err = TestThWritesAValueOf0x000f15sToIdentifyTimeAttributeOfDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 5000ms\n"); + err = TestWait5000ms_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : After 5 seconds, the TH reads IdentifyTime attribute from DUT\n"); + err = TestAfter5SecondsTheThReadsIdentifyTimeAttributeFromDut_11(); break; } @@ -22570,6 +23831,18 @@ class Test_TC_I_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -22583,7 +23856,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; @@ -22597,125 +23870,129 @@ class Test_TC_I_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() + CHIP_ERROR TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x003c60s_1() { CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ClusterRevision attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[CHIPIdentifyClusterIdentifyParams alloc] init]; + params.identifyTime = [NSNumber numberWithUnsignedShort:60U]; + [cluster identifyWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends Identify command to DUT, with the identify time field set to 0x003c (60s). Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestThReadsImmediatelyIdentifyTimeAttributeFromDut1_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute constraints : ClusterRevision Error: %@", err); + [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads immediately IdentifyTime attribute from DUT1 Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 55U)); + VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 65U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestWait10000ms_3() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestAfter10SecondsTheThReadsIdentifyTimeAttributeFromDut_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"After 10 seconds, the TH reads IdentifyTime attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(7))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 65533UL)); - } + VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 45U)); + VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 55U)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + CHIP_ERROR + TestThSendsIdentifyQueryCommandToDutAndVerifyIdentifyQueryResponseCommandToTHwithTheTimeoutFieldSetToAValueInTheRange0x0000To0x0032_5() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x0000StopIdentifying_6() { CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[CHIPIdentifyClusterIdentifyParams alloc] init]; + params.identifyTime = [NSNumber numberWithUnsignedShort:0U]; + [cluster + identifyWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog( + @"TH sends Identify command to DUT, with the identify time field set to 0x0000 (stop identifying). Error: %@", + err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(2))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 64UL)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + CHIP_ERROR TestThReadsImmediatelyIdentifyTimeAttributeFromDut2_7() { CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads immediately IdentifyTime attribute from DUT2 Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("identify time", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() + CHIP_ERROR TestThSendsIdentifyQueryCommandToDut_8() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -22724,145 +24001,46 @@ class Test_TC_I_1_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_7() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } -}; - -class Test_TC_I_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_I_2_1() - : TestCommandBridge("Test_TC_I_2_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_I_2_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_I_2_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the IdentifyTime attribute from the DUT\n"); - err = TestThReadsTheIdentifyTimeAttributeFromTheDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the IdentifyType attribute from the DUT\n"); - err = TestThReadsTheIdentifyTypeAttributeFromTheDut_2(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThReadsTheIdentifyTimeAttributeFromTheDut_1() + CHIP_ERROR TestThWritesAValueOf0x000f15sToIdentifyTimeAttributeOfDut_9() { CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the IdentifyTime attribute from the DUT Error: %@", err); + id identifyTimeArgument; + identifyTimeArgument = [NSNumber numberWithUnsignedShort:15U]; + [cluster writeAttributeIdentifyTimeWithValue:identifyTimeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes a value of 0x000f (15s) to IdentifyTime attribute of DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("identifyTime", "", "uint16")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheIdentifyTypeAttributeFromTheDut_2() + CHIP_ERROR TestWait5000ms_10() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestAfter5SecondsTheThReadsIdentifyTimeAttributeFromDut_11() { CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the IdentifyType attribute from the DUT Error: %@", err); + [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"After 5 seconds, the TH reads IdentifyTime attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("identifyType", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("identifyType", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("identifyType", [value unsignedCharValue], 5)); + VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 5U)); + VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 15U)); NextTest(); }]; @@ -55541,6 +56719,156 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { } }; +class Test_TC_ULABEL_2_3 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_ULABEL_2_3() + : TestCommandBridge("Test_TC_ULABEL_2_3") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_ULABEL_2_3() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_3\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH writes LabelList attribute of the DUT\n"); + err = TestThWritesLabelListAttributeOfTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads LabelList attribute of the DUT\n"); + err = TestThReadsLabelListAttributeOfTheDut_2(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 3; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThWritesLabelListAttributeOfTheDut_1() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestUserLabel * cluster = [[CHIPTestUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id labelListArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[CHIPUserLabelClusterLabelStruct alloc] init]; + ((CHIPUserLabelClusterLabelStruct *) temp_0[0]).label = @"room"; + ((CHIPUserLabelClusterLabelStruct *) temp_0[0]).value = @"17_bytesIsTooLongforuserlabelnotexpected"; + + labelListArgument = temp_0; + } + [cluster writeAttributeLabelListWithValue:labelListArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsLabelListAttributeOfTheDut_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestUserLabel * cluster = [[CHIPTestUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id labelListArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[CHIPUserLabelClusterLabelStruct alloc] init]; + ((CHIPUserLabelClusterLabelStruct *) temp_0[0]).label = @"17_bytesIsTooLongforuserlabelnotexpected"; + ((CHIPUserLabelClusterLabelStruct *) temp_0[0]).value = @"foobar"; + + labelListArgument = temp_0; + } + [cluster writeAttributeLabelListWithValue:labelListArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH reads LabelList attribute of the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + class Test_TC_DGWIFI_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -109275,6 +110603,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -109282,8 +110611,11 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), + make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -109366,6 +110698,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(),