From 1dbc57f25afe462d3698b033da9644a8d2670a1d Mon Sep 17 00:00:00 2001 From: abpoth Date: Wed, 5 Jul 2023 16:32:18 -0400 Subject: [PATCH 01/46] Initial dishwasher mode select test case scripts --- .../certification/Test_TC_DISHM_1_1.yaml | 143 ++++++++++++++++++ .../certification/Test_TC_DISHM_1_2.yaml | 77 ++++++++++ .../certification/Test_TC_DISHM_2_1.yaml | 86 +++++++++++ .../certification/Test_TC_DISHM_3_1.yaml | 91 +++++++++++ .../certification/Test_TC_DISHM_3_2.yaml | 77 ++++++++++ .../certification/Test_TC_DISHM_3_3.yaml | 93 ++++++++++++ 6 files changed, 567 insertions(+) create mode 100644 src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml new file mode 100644 index 00000000000000..8c6ed0214912ca --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml @@ -0,0 +1,143 @@ +# Copyright (c) 2023 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: 263.1.1. [TC-DISHM-1.1] Global Attributes [DUT-Server] + +PICS: + - DISHM.S + +config: + nodeId: 0x12344321 + cluster: "Dishwasher Mode Select" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH reads the ClusterRevision from DUT" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: int16u + + - label: "TH reads the FeatureMap from DUT" + PICS: " !DISHM.S.F00 && !DISHM.S.F01 && !DISHM.S.F02 " + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 + + - label: "Given DISHM.S.F00(DEPONOFF) ensure featuremap has the correct bit set" + PICS: DISHM.S.F00 + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 1 + constraints: + type: bitmap32 + + - label: "Given DISHM.S.F01(EXT) ensure featuremap has the correct bit set" + PICS: DISHM.S.F01 + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 1 + constraints: + type: bitmap32 + + - label: "Given DISHM.S.F02(DEPCTM) ensure featuremap has the correct bit set" + PICS: DISHM.S.F02 + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 1 + constraints: + type: bitmap32 + + - label: "TH reads AttributeList from DUT" + PICS: DISHM.S.Afffb + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: + [ + 0, + 1, + 2, + 3, + 65528, + 65529, + 65530, + 65531, + 65532, + 65533, + ] + + - label: "TH reads optional attribute (DISHM.S.A0004(StartUpMode)) in AttributeList" + PICS: DISHM.S.A0004 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [4] + + - label: "TH reads optional attribute (DISHM.S.F00(DEPONOFF)) in AttributeList" + PICS: DISHM.S.F00 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [5] + + - label: "TH reads AcceptedCommandList from DUT" + PICS: " !DISHM.S.F02" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [0, 1] + + - label: "TH reads AcceptedCommandList from DUT" + PICS: DISHM.S.F01 + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [1] + + - label: "Read the global attribute: GeneratedCommandList" + PICS: DISHM.S.F01 + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [2] + constraints: + type: list \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml new file mode 100644 index 00000000000000..3d768484f489e5 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml @@ -0,0 +1,77 @@ +# Copyright (c) 2023 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: 263.1.2. [TC-DISHM-1.2] Cluster attributes with server as DUT + +PICS: + - DISHM.S + +config: + nodeId: 0x12344321 + cluster: "Dishwasher Mode Select" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH reads the SupportedModes attribute from DUT" + PICS: DISHM.S.A0002 && DISHM.S.ST4000 + command: "readAttribute" + attribute: "SupportedModes" + response: + saveAs: "supported_modes_dut" + constraints: + type: list + + - label: "TH reads the CurrentMode attribute from the DUT" + PICS: DISHM.S.A0003 + command: "readAttribute" + attribute: "CurrentMode" + response: + constraints: + type: int16u + value: supported_modes_dut + + - label: "TH reads the OnMode attribute from the DUT" + PICS: DISHM.S.A0005 + command: "readAttribute" + attribute: "OnMode" + response: + constraints: + type: int16u + value: supported_modes_dut + + - label: "TH reads the StartUpMode attribute from the DUT" + PICS: DISHM.S.A0004 + command: "readAttribute" + attribute: "StartUpMode" + response: + constraints: + type: int16u + value: supported_modes_dut + + - label: "TH reads the Description attribute from the DUT" + PICS: DISHM.S.A0000 + command: "readAttribute" + attribute: "Description" + response: + constraints: + type: string \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml new file mode 100644 index 00000000000000..5f3cdd4902eab3 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml @@ -0,0 +1,86 @@ +# Copyright (c) 2023 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: 263.1.3. [TC-DISHM-2.1] ChangeToModeWithStatus Verification with DUT as Server + +PICS: + - DISHM.S + +config: + nodeId: 0x12344321 + cluster: "Dishwasher Mode Select" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH reads the SupportedModes attribute from DUT" + PICS: DISHM.S.A0002 + command: "readAttribute" + attribute: "SupportedModes" + response: + saveAs: "supported_modes_dut" + constraints: + type: list + + - label: "TH reads the CurrentMode attribute from the DUT" + PICS: DISHM.S.A0003 + command: "readAttribute" + attribute: "CurrentMode" + response: + saveAs: "old_current_mode_dut" + constraints: + type: int16u + new_mode_th: 16385 + invalid_mode_th: 16387 + + - label: "TH send a ChangeToMode command to the DUT with NewMode set to old_current_mode_dut" + PICS: DISHM.S.C01.Rsp + command: "changeToMode" + attribute: old_current_mode_dut + response: + constraints: + type: string + value: 2 + + - label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" + PICS: DISHM.S.C01.Rsp + command: "changeToMode" + attribute: new_mode_th + + - label: "TH reads the CurrentMode attribute from the DUT" + PICS: DISHM.S.A0003 + command: "readAttribute" + attribute: "CurrentMode" + response: + constraints: + type: int16u + value: new_mode_th + + + - label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" + PICS: DISHM.S.C01.Rsp + command: "changeToMode" + attribute: invalid_mode_th + response: + constraints: + type: int16u + value: 1 \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml new file mode 100644 index 00000000000000..701acb2a08a729 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml @@ -0,0 +1,91 @@ +# +# 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: 263.1.4. [TC-DISHM-3.1] OnMode Verification with DUT as Server + +PICS: + - DISHM.S + +config: + nodeId: 0x12344321 + cluster: "Dishwasher Mode Select" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH reads from the OnMode attribute from DUT" + PICS: DISHM.S.A0005 && DISHM.S.F00 + command: "readAttribute" + attribute: "OnMode" + response: + saveAs: "on_mode_dut" + constraints: + type: int16u + + - label: "TH reads the CurrentMode attribute from the DUT" + PICS: DISHM.S.A0003 && DISHM.S.F00 + command: "readAttribute" + attribute: "CurrentMode" + response: + saveAs: "old_current_mode_dut" + constraints: + type: int16u + + - label: "TH reads the SupportedModes attribute from DUT" + PICS: DISHM.S.A0002 && DISHM.S.F00 + command: "readAttribute" + attribute: "SupportedModes" + response: + saveAs: "supported_modes_dut" + new_mode_th: 16385 + constraints: + type: list + + + - label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" + PICS: DISHM.S.C00.Rsp && DISHM.S.F00 + command: "changeToMode" + attribute: new_mode_th + response: + constraints: + type: int16u + value: 0 + + - label: "TH sends Off Command to DUT" + PICS: OO.S.C00.Rsp && DISHM.S.F00 + command: "Off" + response: + constraints: + type: int16u + value: 0 + + - label: "TH sends On Command to DUT" + PICS: OO.S.C01.Rsp && DISHM.S.F00 + command: "On" + response: + constraints: + type: int16u + value: 0 + + - label: "TH reads the CurrentMode attribute from the DUT" + PICS: DISHM.S.A0003 && DISHM.S.F00 + command: "readAttribute" + attribute: "CurrentMode" + response: + constraints: + type: int16u + value: old_current_mode_dut \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml new file mode 100644 index 00000000000000..ce5ca847478c34 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml @@ -0,0 +1,77 @@ +# +# 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: 263.1.5. [TC-DISHM-3.2] OnMode Verification with DUT as Server + +PICS: + - DISHM.S + +config: + nodeId: 0x12344321 + cluster: "Dishwasher Mode Select" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH reads from the StartUpMode attribute from DUT" + PICS: DISHM.S.A0004 + command: "readAttribute" + attribute: "StartUpMode" + response: + saveAs: "startup_mode_dut" + constraints: + type: int16u + + - label: "TH reads the CurrentMode attribute from the DUT" + PICS: DISHM.S.A0003 + command: "readAttribute" + attribute: "CurrentMode" + response: + saveAs: "old_current_mode_dut" + constraints: + type: int16u + + - label: "TH reads the SupportedModes attribute from DUT" + PICS: DISHM.S.A0002 + command: "readAttribute" + attribute: "SupportedModes" + response: + saveAs: "supported_modes_dut" + new_mode_th: 16385 + constraints: + type: list + + + - label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" + PICS: DISHM.S.C00.Rsp && DISHM.S.F00 + command: "changeToMode" + attribute: new_mode_th + response: + constraints: + type: int16u + value: 0 + +# Physically power cycle the device + + - label: "TH reads the CurrentMode attribute from the DUT" + PICS: DISHM.S.A0003 + command: "readAttribute" + attribute: "CurrentMode" + response: + constraints: + type: int16u + value: startup_mode_dut \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml new file mode 100644 index 00000000000000..8c74bc7f2217b3 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml @@ -0,0 +1,93 @@ +# +# 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: 263.1.6. [TC-DISHM-3.3] OnMode Verification with DUT as Server + +PICS: + - DISHM.S + +config: + nodeId: 0x12344321 + cluster: "Dishwasher Mode Select" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH reads from the StartUpMode attribute from DUT" + PICS: DISHM.S.A0004 + command: "readAttribute" + attribute: "StartUpMode" + response: + saveAs: "startup_mode_dut" + constraints: + type: int16u + + - label: "TH reads from the OnMode attribute from DUT" + PICS: DISHM.S.A0005 && DISHM.S.A0004 + command: "readAttribute" + attribute: "OnMode" + response: + saveAs: "old_on_mode_dut" + constraints: + type: int16u + + - label: "TH reads the SupportedModes attribute from DUT" + PICS: DISHM.S.A0002 && DISHM.S.A0004 + command: "readAttribute" + attribute: "SupportedModes" + response: + saveAs: "supported_modes_dut" + new_mode_th: 16385 + constraints: + type: list + + - label: "TH reads from the OnMode attribute from DUT" + PICS: DISHM.S.A0002 && DISHM.S.A0004 + command: "writeAttribute" + attribute: new_mode_th + response: + saveAs: "old_on_mode_dut" + constraints: + type: int16u + + - label: "TH reads from the OnMode attribute from DUT" + PICS: DISHM.S.A0005 && DISHM.S.F00 + command: "readAttribute" + attribute: "OnMode" + response: + saveAs: "new_on_mode_dut" + constraints: + type: int16u + + - label: "TH reads from the OnMode attribute from DUT" + PICS: OO.S.A4003 + command: "writeAttribute" + attribute: "StartUpOnOff" + response: + saveAs: "old_on_mode_dut" + constraints: + type: int16u + value: 0 + + - label: "TH reads the CurrentMode attribute from the DUT" + PICS: DISHM.S.A0003 + command: "readAttribute" + attribute: "CurrentMode" + response: + constraints: + type: int16u + value: new_on_mode_dut \ No newline at end of file From b9906e7874cb34fe2eada3043f3b15536f1f6cf0 Mon Sep 17 00:00:00 2001 From: abpoth Date: Thu, 6 Jul 2023 15:10:06 -0400 Subject: [PATCH 02/46] Edits to follow better syntax provided in https://github.com/abpoth/connectedhomeip/blob/master/src/app/tests/suites/README.md#automatic-conversion-process --- .../certification/Test_TC_DISHM_1_1.yaml | 15 +---- .../certification/Test_TC_DISHM_1_2.yaml | 21 ++++--- .../certification/Test_TC_DISHM_2_1.yaml | 61 +++++++++++++------ .../certification/Test_TC_DISHM_3_1.yaml | 48 ++++++++------- .../certification/Test_TC_DISHM_3_2.yaml | 49 ++++++++++----- .../certification/Test_TC_DISHM_3_3.yaml | 58 ++++++++++++------ 6 files changed, 161 insertions(+), 91 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml index 8c6ed0214912ca..de93ae25bf975f 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml @@ -116,28 +116,17 @@ tests: contains: [5] - label: "TH reads AcceptedCommandList from DUT" - PICS: " !DISHM.S.F02" command: "readAttribute" attribute: "AcceptedCommandList" response: constraints: type: list - contains: [0, 1] - - - label: "TH reads AcceptedCommandList from DUT" - PICS: DISHM.S.F01 - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - constraints: - type: list - contains: [1] + contains: [0] - label: "Read the global attribute: GeneratedCommandList" - PICS: DISHM.S.F01 command: "readAttribute" attribute: "GeneratedCommandList" response: - value: [2] + value: [] constraints: type: list \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml index 3d768484f489e5..e6e1c2bcca404a 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml @@ -19,8 +19,8 @@ PICS: - DISHM.S config: - nodeId: 0x12344321 - cluster: "Dishwasher Mode Select" + nodeId: 0x0059 + cluster: "Dishwasher Mode" endpoint: 1 tests: @@ -37,7 +37,10 @@ tests: command: "readAttribute" attribute: "SupportedModes" response: - saveAs: "supported_modes_dut" + values: + - name: "Mode" + saveAs: supported_modes_dut + value: [0, 1, 2] constraints: type: list @@ -46,32 +49,36 @@ tests: command: "readAttribute" attribute: "CurrentMode" response: + value: 0 constraints: type: int16u - value: supported_modes_dut + - label: "TH reads the OnMode attribute from the DUT" PICS: DISHM.S.A0005 command: "readAttribute" attribute: "OnMode" response: + value: supported_modes_dut constraints: type: int16u - value: supported_modes_dut + - label: "TH reads the StartUpMode attribute from the DUT" PICS: DISHM.S.A0004 command: "readAttribute" attribute: "StartUpMode" response: + value: supported_modes_dut constraints: type: int16u - value: supported_modes_dut + - label: "TH reads the Description attribute from the DUT" PICS: DISHM.S.A0000 command: "readAttribute" attribute: "Description" response: + value: "" constraints: - type: string \ No newline at end of file + type: char_string \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml index 5f3cdd4902eab3..793d1e793f7638 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml @@ -19,9 +19,15 @@ PICS: - DISHM.S config: - nodeId: 0x12344321 - cluster: "Dishwasher Mode Select" + nodeId: 0x0059 + cluster: "Dishwasher Mode" endpoint: 1 + new_mode_th: + type: INT16U + defaultValue: 1 + invalid_mode_th: + type: INT16U + defaultValue: 3 tests: - label: "Wait for the commissioned device to be retrieved" @@ -37,7 +43,10 @@ tests: command: "readAttribute" attribute: "SupportedModes" response: - saveAs: "supported_modes_dut" + values: + - name: "Mode" + saveAs: supported_modes_dut + value: [0, 1, 2] constraints: type: list @@ -46,41 +55,59 @@ tests: command: "readAttribute" attribute: "CurrentMode" response: - saveAs: "old_current_mode_dut" + values: + - name: "old_current_mode_dut" + saveAs: old_current_mode_dut + value: 0 constraints: type: int16u - new_mode_th: 16385 - invalid_mode_th: 16387 - label: "TH send a ChangeToMode command to the DUT with NewMode set to old_current_mode_dut" PICS: DISHM.S.C01.Rsp - command: "changeToMode" - attribute: old_current_mode_dut + command: "writeAttribute" + attribute: "ChangeToMode" + arguments: + values: + - name: "arg1" + value: old_current_mode_dut response: - constraints: - type: string - value: 2 + value: "" + constraints: + type: char_string + - label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" PICS: DISHM.S.C01.Rsp - command: "changeToMode" - attribute: new_mode_th + command: "writeAttribute" + attribute: "ChangeToMode" + arguments: + values: + - name: "arg1" + value: new_mode_th - label: "TH reads the CurrentMode attribute from the DUT" PICS: DISHM.S.A0003 command: "readAttribute" attribute: "CurrentMode" response: + values: + - name: "new_mode_th" + value: new_mode_th constraints: type: int16u - value: new_mode_th + - label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" PICS: DISHM.S.C01.Rsp - command: "changeToMode" - attribute: invalid_mode_th + command: "writeAttribute" + attribute: "ChangeToMode" + arguments: + values: + - name: "arg1" + value: invalid_mode_th response: + value: 1 constraints: type: int16u - value: 1 \ No newline at end of file + \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml index 701acb2a08a729..36fccf4d6a708e 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml @@ -14,9 +14,12 @@ PICS: - DISHM.S config: - nodeId: 0x12344321 - cluster: "Dishwasher Mode Select" + nodeId: 0x0059 + cluster: "Dishwasher Mode" endpoint: 1 + new_mode_th: + type: INT16U + defaultValue: 2 tests: - label: "Wait for the commissioned device to be retrieved" @@ -32,7 +35,10 @@ tests: command: "readAttribute" attribute: "OnMode" response: - saveAs: "on_mode_dut" + values: + - name: "on_mode_dut" + saveAs: on_mode_dut + value: 0 constraints: type: int16u @@ -41,7 +47,10 @@ tests: command: "readAttribute" attribute: "CurrentMode" response: - saveAs: "old_current_mode_dut" + values: + - name: "old_current_mode_dut" + saveAs: old_current_mode_dut + value: 1 constraints: type: int16u @@ -50,42 +59,37 @@ tests: command: "readAttribute" attribute: "SupportedModes" response: - saveAs: "supported_modes_dut" - new_mode_th: 16385 + values: + - name: "Mode" + saveAs: supported_modes_dut + value: [0, 1, 2] constraints: type: list - label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" PICS: DISHM.S.C00.Rsp && DISHM.S.F00 - command: "changeToMode" - attribute: new_mode_th - response: - constraints: - type: int16u - value: 0 + command: "writeAttribute" + attribute: "ChangeToMode" + arguments: + values: + - name: "arg1" + value: new_mode_th - label: "TH sends Off Command to DUT" PICS: OO.S.C00.Rsp && DISHM.S.F00 command: "Off" - response: - constraints: - type: int16u - value: 0 - label: "TH sends On Command to DUT" PICS: OO.S.C01.Rsp && DISHM.S.F00 command: "On" - response: - constraints: - type: int16u - value: 0 - label: "TH reads the CurrentMode attribute from the DUT" PICS: DISHM.S.A0003 && DISHM.S.F00 command: "readAttribute" attribute: "CurrentMode" response: - constraints: + value: new_mode_th + constraints: type: int16u - value: old_current_mode_dut \ No newline at end of file + \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml index ce5ca847478c34..8b040c7362f2f0 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml @@ -14,9 +14,12 @@ PICS: - DISHM.S config: - nodeId: 0x12344321 - cluster: "Dishwasher Mode Select" + nodeId: 0x0059 + cluster: "Dishwasher Mode" endpoint: 1 + new_mode_th: + type: INT16U + defaultValue: 0 tests: - label: "Wait for the commissioned device to be retrieved" @@ -32,7 +35,10 @@ tests: command: "readAttribute" attribute: "StartUpMode" response: - saveAs: "startup_mode_dut" + values: + - name: "startup_mode_dut" + saveAs: startup_mode_dut + value: 0 constraints: type: int16u @@ -41,7 +47,10 @@ tests: command: "readAttribute" attribute: "CurrentMode" response: - saveAs: "old_current_mode_dut" + values: + - name: "old_current_mode_dut" + saveAs: old_current_mode_dut + value: 2 constraints: type: int16u @@ -50,28 +59,40 @@ tests: command: "readAttribute" attribute: "SupportedModes" response: - saveAs: "supported_modes_dut" - new_mode_th: 16385 + values: + - name: "Mode" + saveAs: supported_modes_dut + value: [0, 1, 2] constraints: type: list - label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" PICS: DISHM.S.C00.Rsp && DISHM.S.F00 - command: "changeToMode" - attribute: new_mode_th - response: - constraints: - type: int16u - value: 0 + command: "writeAttribute" + attribute: "ChangeToMode" + arguments: + values: + - name: "arg1" + value: new_mode_th -# Physically power cycle the device + - label: "Powercycle on device to set OnOff attribute manually to on" + 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 the CurrentMode attribute from the DUT" PICS: DISHM.S.A0003 command: "readAttribute" attribute: "CurrentMode" response: + value: startup_mode_dut constraints: type: int16u - value: startup_mode_dut \ No newline at end of file + \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml index 8c74bc7f2217b3..919a4168574c2c 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml @@ -14,9 +14,12 @@ PICS: - DISHM.S config: - nodeId: 0x12344321 - cluster: "Dishwasher Mode Select" + nodeId: 0x0059 + cluster: "Dishwasher Mode" endpoint: 1 + new_mode_th: + type: INT16U + defaultValue: 1 tests: - label: "Wait for the commissioned device to be retrieved" @@ -32,7 +35,10 @@ tests: command: "readAttribute" attribute: "StartUpMode" response: - saveAs: "startup_mode_dut" + values: + - name: "startup_mode_dut" + saveAs: startup_mode_dut + value: 0 constraints: type: int16u @@ -41,7 +47,10 @@ tests: command: "readAttribute" attribute: "OnMode" response: - saveAs: "old_on_mode_dut" + values: + - name: "on_mode_dut" + saveAs: on_mode_dut + value: 0 constraints: type: int16u @@ -50,26 +59,28 @@ tests: command: "readAttribute" attribute: "SupportedModes" response: - saveAs: "supported_modes_dut" - new_mode_th: 16385 + values: + - name: "Mode" + saveAs: supported_modes_dut + value: [0, 1, 2] constraints: type: list - label: "TH reads from the OnMode attribute from DUT" PICS: DISHM.S.A0002 && DISHM.S.A0004 command: "writeAttribute" - attribute: new_mode_th - response: - saveAs: "old_on_mode_dut" - constraints: - type: int16u + attribute: "OnMode" + arguments: + values: + - name: "new_mode_th" + value: new_mode_th - label: "TH reads from the OnMode attribute from DUT" PICS: DISHM.S.A0005 && DISHM.S.F00 command: "readAttribute" attribute: "OnMode" response: - saveAs: "new_on_mode_dut" + value: new_mode_th constraints: type: int16u @@ -77,17 +88,28 @@ tests: PICS: OO.S.A4003 command: "writeAttribute" attribute: "StartUpOnOff" - response: - saveAs: "old_on_mode_dut" - constraints: - type: int16u - value: 0 + arguments: + values: + - name: "arg1" + value: 1 + + - label: "Powercycle on device to set OnOff attribute manually to on" + 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 the CurrentMode attribute from the DUT" PICS: DISHM.S.A0003 command: "readAttribute" attribute: "CurrentMode" response: + value: new_mode_th constraints: type: int16u - value: new_on_mode_dut \ No newline at end of file + \ No newline at end of file From 47b1e840458926163b72a528e0a7df77b2035242 Mon Sep 17 00:00:00 2001 From: abpoth Date: Thu, 13 Jul 2023 13:52:44 -0400 Subject: [PATCH 03/46] updated yaml test files for dishwashermodeselect and added user prompts for test verification --- .../certification/Test_TC_DISHM_1_1.yaml | 26 +- .../certification/Test_TC_DISHM_1_2.yaml | 163 ++++++++--- .../certification/Test_TC_DISHM_2_1.yaml | 209 +++++++++---- .../certification/Test_TC_DISHM_3_1.yaml | 209 +++++++++---- .../certification/Test_TC_DISHM_3_2.yaml | 186 +++++++++--- .../certification/Test_TC_DISHM_3_3.yaml | 115 -------- .../certification/Test_TC_DISHM_3_4.yaml | 277 ++++++++++++++++++ 7 files changed, 874 insertions(+), 311 deletions(-) delete mode 100644 src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_DISHM_3_4.yaml diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml index de93ae25bf975f..ac39a53a244cb4 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml @@ -13,14 +13,14 @@ # 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: 263.1.1. [TC-DISHM-1.1] Global Attributes [DUT-Server] +name: 267.1.1. [TC-DISHM-1.1] Global Attributes [DUT-Server] PICS: - DISHM.S config: nodeId: 0x12344321 - cluster: "Dishwasher Mode Select" + cluster: "Dishwasher Mode" endpoint: 1 tests: @@ -116,6 +116,7 @@ tests: contains: [5] - label: "TH reads AcceptedCommandList from DUT" + PICS: "!DISHM.S.F02" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -123,10 +124,29 @@ tests: type: list contains: [0] + - label: "TH reads AcceptedCommandList from DUT" + PICS: DISHM.S.F01 + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [1] + - label: "Read the global attribute: GeneratedCommandList" + PICS: "!DISHM.S.F01" command: "readAttribute" attribute: "GeneratedCommandList" response: value: [] constraints: - type: list \ No newline at end of file + type: list + + - label: "Read the global attribute: GeneratedCommandList" + PICS: DISHM.S.F01 + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + constraints: + type: list + contains: [2] \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml index e6e1c2bcca404a..af108101edb615 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml @@ -13,13 +13,13 @@ # 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: 263.1.2. [TC-DISHM-1.2] Cluster attributes with server as DUT +name: 267.1.2. [TC-DISHM-1.2] Cluster attributes with server as DUT PICS: - DISHM.S config: - nodeId: 0x0059 + nodeId: 0x12344321 cluster: "Dishwasher Mode" endpoint: 1 @@ -33,52 +33,135 @@ tests: value: nodeId - label: "TH reads the SupportedModes attribute from DUT" - PICS: DISHM.S.A0002 && DISHM.S.ST4000 - command: "readAttribute" - attribute: "SupportedModes" - response: + verification: | + ./chip-tool dishwashermodeselect read supported-modes 1 1 + + On TH(chip-tool) log, Verify SupportedModes attribute should contains atleast two ModeOptionsStruct entries with unique mode field value and label field value below is the sample log provided for the raspi platform: + + [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 + [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries + [1687687925.444452][18054:18056] CHIP:TOO: [1]: { + [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal + [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 + [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries + [1687687925.444575][18054:18056] CHIP:TOO: [1]: { + [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 + [1687687925.444654][18054:18056] CHIP:TOO: } + [1687687925.444674][18054:18056] CHIP:TOO: } + [1687687925.444702][18054:18056] CHIP:TOO: [2]: { + [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy + [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 + [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries + [1687687925.444787][18054:18056] CHIP:TOO: [1]: { + [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 + [1687687925.444847][18054:18056] CHIP:TOO: } + [1687687925.444869][18054:18056] CHIP:TOO: [2]: { + [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 + [1687687925.444971][18054:18056] CHIP:TOO: } + [1687687925.444991][18054:18056] CHIP:TOO: } + [1687687925.445016][18054:18056] CHIP:TOO: [3]: { + [1687687925.445036][18054:18056] CHIP:TOO: Label: Light + [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 + [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries + [1687687925.445133][18054:18056] CHIP:TOO: [1]: { + [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 + [1687687925.445194][18054:18056] CHIP:TOO: } + [1687687925.445216][18054:18056] CHIP:TOO: [2]: { + [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 + [1687687925.445275][18054:18056] CHIP:TOO: } + [1687687925.445297][18054:18056] CHIP:TOO: [3]: { + [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 + [1687687925.445385][18054:18056] CHIP:TOO: } + [1687687925.445405][18054:18056] CHIP:TOO: } + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: values: - - name: "Mode" - saveAs: supported_modes_dut - value: [0, 1, 2] - constraints: - type: list + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "TH reads the CurrentMode attribute from the DUT" - PICS: DISHM.S.A0003 - command: "readAttribute" - attribute: "CurrentMode" - response: - value: 0 - constraints: - type: int16u + verification: | + ./chip-tool dishwashermodeselect read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut, below is the sample log provided for the raspi platform: + + [1645776767.611140][4667:4672] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469718 + + [1645776767.611214][4667:4672] CHIP:TOO: CurrentMode: 0 + 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 the OnMode attribute from the DUT" - PICS: DISHM.S.A0005 - command: "readAttribute" - attribute: "OnMode" - response: - value: supported_modes_dut - constraints: - type: int16u - + verification: | + ./chip-tool dishwashermodeselect read on-mode 1 1 + + Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut (As per spec default value is null) , below is the sample log provided for the raspi platform: + + + [1649676072.465968][10754:10759] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065072 + + [1649676072.466094][10754:10759] CHIP:TOO: OnMode: null + 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 the StartUpMode attribute from the DUT" - PICS: DISHM.S.A0004 - command: "readAttribute" - attribute: "StartUpMode" - response: - value: supported_modes_dut - constraints: - type: int16u + verification: | + ./chip-tool dishwashermodeselect read start-up-mode 1 1 + + Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer and value is from supported_modes_dut, below is the sample log provided for the raspi platform: + + [1649677014.496348][10778:10784] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 4277065072 + [1649677014.496469][10778:10784] CHIP:TOO: StartUpMode: 0 + 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 the Description attribute from the DUT" - PICS: DISHM.S.A0000 - command: "readAttribute" - attribute: "Description" - response: - value: "" - constraints: - type: char_string \ No newline at end of file + verification: | + ./chip-tool dishwashermodeselect read description 1 1 + + Verify on TH(chip-tool) logs , Description value is human readable text string and below is the sample log provided for the raspi platform: + + [1649677114.614974][10787:10792] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000 DataVersion: 4277065072 + [1649677114.615110][10787:10792] CHIP:TOO: Description: Dishwasher + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml index 793d1e793f7638..5fd1b6e89d91ff 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml @@ -13,21 +13,15 @@ # 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: 263.1.3. [TC-DISHM-2.1] ChangeToModeWithStatus Verification with DUT as Server +name: 267.2.1. [TC-DISHM-2.1] ChangeToMode Verification with DUT as Server PICS: - DISHM.S config: - nodeId: 0x0059 + nodeId: 0x12344321 cluster: "Dishwasher Mode" endpoint: 1 - new_mode_th: - type: INT16U - defaultValue: 1 - invalid_mode_th: - type: INT16U - defaultValue: 3 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,75 +33,172 @@ tests: value: nodeId - label: "TH reads the SupportedModes attribute from DUT" - PICS: DISHM.S.A0002 - command: "readAttribute" - attribute: "SupportedModes" - response: + verification: | + ./chip-tool dishwashermodeselect read supported-modes 1 1 + + On TH(chip-tool) log, Verify SupportedModes attribute should contains two or more ModeOptionsStruct entries and + Save the Mode field values as supported_modes_dut, below is the sample log provided for the raspi platform: + + [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 + [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries + [1687687925.444452][18054:18056] CHIP:TOO: [1]: { + [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal + [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 + [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries + [1687687925.444575][18054:18056] CHIP:TOO: [1]: { + [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 + [1687687925.444654][18054:18056] CHIP:TOO: } + [1687687925.444674][18054:18056] CHIP:TOO: } + [1687687925.444702][18054:18056] CHIP:TOO: [2]: { + [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy + [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 + [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries + [1687687925.444787][18054:18056] CHIP:TOO: [1]: { + [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 + [1687687925.444847][18054:18056] CHIP:TOO: } + [1687687925.444869][18054:18056] CHIP:TOO: [2]: { + [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 + [1687687925.444971][18054:18056] CHIP:TOO: } + [1687687925.444991][18054:18056] CHIP:TOO: } + [1687687925.445016][18054:18056] CHIP:TOO: [3]: { + [1687687925.445036][18054:18056] CHIP:TOO: Label: Light + [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 + [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries + [1687687925.445133][18054:18056] CHIP:TOO: [1]: { + [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 + [1687687925.445194][18054:18056] CHIP:TOO: } + [1687687925.445216][18054:18056] CHIP:TOO: [2]: { + [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 + [1687687925.445275][18054:18056] CHIP:TOO: } + [1687687925.445297][18054:18056] CHIP:TOO: [3]: { + [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 + [1687687925.445385][18054:18056] CHIP:TOO: } + [1687687925.445405][18054:18056] CHIP:TOO: } + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: values: - - name: "Mode" - saveAs: supported_modes_dut - value: [0, 1, 2] - constraints: - type: list + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "TH reads the CurrentMode attribute from the DUT" - PICS: DISHM.S.A0003 - command: "readAttribute" - attribute: "CurrentMode" - response: + verification: | + ./chip-tool dishwashermodeselect read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value + - Save the value as old_current_mode_dut + - Select a value from supported_modes_dut, different from old_current_mode_dut, and which corresponds to a mode the device can switch to, given its current state and save this value as new_mode_th + - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, + below is the sample log provided for the raspi platform: + + [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, + [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 + [1685018283.726589][16418:16420] CHIP:DMG: } + [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 + [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: values: - - name: "old_current_mode_dut" - saveAs: old_current_mode_dut - value: 0 - constraints: - type: int16u + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "TH send a ChangeToMode command to the DUT with NewMode set to old_current_mode_dut" - PICS: DISHM.S.C01.Rsp - command: "writeAttribute" - attribute: "ChangeToMode" + verification: | + ./chip-tool dishwashermodeselect change-to-mode 0 1 1 + + Verify on TH(chip-tool) log,shows successful status response and below is the sample log provided for the raspi platform: + + + [1649677293.280207][10810:10815] CHIP:DMG: StatusIB = + [1649677293.280283][10810:10815] CHIP:DMG: { + [1649677293.280358][10810:10815] CHIP:DMG: status = 0x01 (FAILURE), + [1649677293.280421][10810:10815] CHIP:DMG: }, + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - - name: "arg1" - value: old_current_mode_dut - response: - value: "" - constraints: - type: char_string + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" - PICS: DISHM.S.C01.Rsp - command: "writeAttribute" - attribute: "ChangeToMode" + verification: | + ./chip-tool dishwashermodeselect change-to-mode 3 1 1 + + Verify on TH(chip-tool) log,shows successful status response and below is the sample log provided for the raspi platform: + + + [1649677293.280207][10810:10815] CHIP:DMG: StatusIB = + [1649677293.280283][10810:10815] CHIP:DMG: { + [1649677293.280358][10810:10815] CHIP:DMG: status = 0x00 (SUCCESS), + [1649677293.280421][10810:10815] CHIP:DMG: }, + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - - name: "arg1" - value: new_mode_th + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "TH reads the CurrentMode attribute from the DUT" - PICS: DISHM.S.A0003 - command: "readAttribute" - attribute: "CurrentMode" - response: - values: - - name: "new_mode_th" - value: new_mode_th - constraints: - type: int16u + verification: | + ./chip-tool dishwashermodeselect read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and equal to the new_mode_th, below is the sample log provided for the raspi platform: + + [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, + [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 + [1685018283.726589][16418:16420] CHIP:DMG: } + [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 + [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 3 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - - label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" - PICS: DISHM.S.C01.Rsp - command: "writeAttribute" - attribute: "ChangeToMode" + - label: "TH send a ChangeToMode command to the DUT with NewMode set to invalid_mode_th" + verification: | + ./chip-tool dishwashermodeselect change-to-mode 4 1 1 + + Verify on TH(chip-tool) log,shows successful status response and below is the sample log provided for the raspi platform: + + + [1649677293.280207][10810:10815] CHIP:DMG: StatusIB = + [1649677293.280283][10810:10815] CHIP:DMG: { + [1649677293.280358][10810:10815] CHIP:DMG: status = 0x01 (FAILURE), + [1649677293.280421][10810:10815] CHIP:DMG: }, + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - - name: "arg1" - value: invalid_mode_th - response: - value: 1 - constraints: - type: int16u + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml index 36fccf4d6a708e..9c2518ebfbba03 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml @@ -8,18 +8,15 @@ # 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: 263.1.4. [TC-DISHM-3.1] OnMode Verification with DUT as Server +name: 267.4.1. [TC-DISHM-3.1] OnMode Verification with DUT as Server PICS: - DISHM.S config: - nodeId: 0x0059 + nodeId: 0x12344321 cluster: "Dishwasher Mode" endpoint: 1 - new_mode_th: - type: INT16U - defaultValue: 2 tests: - label: "Wait for the commissioned device to be retrieved" @@ -31,65 +28,179 @@ tests: value: nodeId - label: "TH reads from the OnMode attribute from DUT" - PICS: DISHM.S.A0005 && DISHM.S.F00 - command: "readAttribute" - attribute: "OnMode" - response: + verification: | + ./chip-tool dishwashermodeselect read on-mode 1 1 + + On TH(chip-tool), Verify OnMode attribute value is an integer. save the value as on_mode_dut and below is the sample log provided for the raspi platform: + + [1649678983.679893][10871:10876] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065073 + [1649678983.680002][10871:10876] CHIP:TOO: OnMode: 0 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: values: - - name: "on_mode_dut" - saveAs: on_mode_dut - value: 0 - constraints: - type: int16u + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "TH reads the CurrentMode attribute from the DUT" - PICS: DISHM.S.A0003 && DISHM.S.F00 - command: "readAttribute" - attribute: "CurrentMode" - response: + verification: | + ./chip-tool dishwashermodeselect read current-mode 1 1 + + On TH(chip-tool), Verify CurrentMode attribute is an integer. save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: + + NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + + [1649679034.895848][10879:10884] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 + [1649679034.895972][10879:10884] CHIP:TOO: CurrentMode: 0 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: values: - - name: "old_current_mode_dut" - saveAs: old_current_mode_dut - value: 1 - constraints: - type: int16u + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "TH reads the SupportedModes attribute from DUT" - PICS: DISHM.S.A0002 && DISHM.S.F00 - command: "readAttribute" - attribute: "SupportedModes" - response: + verification: | + ./chip-tool dishwashermodeselect read supported-modes 1 1 + + On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. + Save the Mode field values as supported_modes_dut. + Select a value from supported_modes_dut different from on_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 + [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries + [1687687925.444452][18054:18056] CHIP:TOO: [1]: { + [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal + [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 + [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries + [1687687925.444575][18054:18056] CHIP:TOO: [1]: { + [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 + [1687687925.444654][18054:18056] CHIP:TOO: } + [1687687925.444674][18054:18056] CHIP:TOO: } + [1687687925.444702][18054:18056] CHIP:TOO: [2]: { + [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy + [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 + [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries + [1687687925.444787][18054:18056] CHIP:TOO: [1]: { + [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 + [1687687925.444847][18054:18056] CHIP:TOO: } + [1687687925.444869][18054:18056] CHIP:TOO: [2]: { + [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 + [1687687925.444971][18054:18056] CHIP:TOO: } + [1687687925.444991][18054:18056] CHIP:TOO: } + [1687687925.445016][18054:18056] CHIP:TOO: [3]: { + [1687687925.445036][18054:18056] CHIP:TOO: Label: Light + [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 + [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries + [1687687925.445133][18054:18056] CHIP:TOO: [1]: { + [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 + [1687687925.445194][18054:18056] CHIP:TOO: } + [1687687925.445216][18054:18056] CHIP:TOO: [2]: { + [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 + [1687687925.445275][18054:18056] CHIP:TOO: } + [1687687925.445297][18054:18056] CHIP:TOO: [3]: { + [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 + [1687687925.445385][18054:18056] CHIP:TOO: } + [1687687925.445405][18054:18056] CHIP:TOO: } + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: values: - - name: "Mode" - saveAs: supported_modes_dut - value: [0, 1, 2] - constraints: - type: list + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - - label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" - PICS: DISHM.S.C00.Rsp && DISHM.S.F00 - command: "writeAttribute" - attribute: "ChangeToMode" + verification: | + ./chip-tool dishwashermodeselect change-to-mode 2 1 1 + + On TH(chip-tool) log, verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1684931013.571019][20667:20669] CHIP:DMG: + [1684931013.571021][20667:20669] CHIP:DMG: StatusIB = + [1684931013.571024][20667:20669] CHIP:DMG: { + [1684931013.571027][20667:20669] CHIP:DMG: status = 0x00 (SUCCESS), + [1684931013.571030][20667:20669] CHIP:DMG: }, + [1684931013.571034][20667:20669] CHIP:DMG: + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - - name: "arg1" - value: new_mode_th + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "TH sends Off Command to DUT" - PICS: OO.S.C00.Rsp && DISHM.S.F00 - command: "Off" + verification: | + ./chip-tool onoff off 1 1 + + On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1684931101.118656][20709:20711] CHIP:DMG: StatusIB = + [1684931101.118659][20709:20711] CHIP:DMG: { + [1684931101.118663][20709:20711] CHIP:DMG: status = 0x00 (SUCCESS), + [1684931101.118665][20709:20711] CHIP:DMG: }, + 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 On Command to DUT" - PICS: OO.S.C01.Rsp && DISHM.S.F00 - command: "On" + verification: | + ./chip-tool onoff on 1 1 + + On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1684931217.055514][20729:20731] CHIP:DMG: StatusIB = + [1684931217.055517][20729:20731] CHIP:DMG: { + [1684931217.055520][20729:20731] CHIP:DMG: status = 0x00 (SUCCESS), + [1684931217.055523][20729:20731] CHIP:DMG: }, + 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 the CurrentMode attribute from the DUT" - PICS: DISHM.S.A0003 && DISHM.S.F00 - command: "readAttribute" - attribute: "CurrentMode" - response: - value: new_mode_th - constraints: - type: int16u + verification: | + ./chip-tool dishwashermodeselect read current-mode 1 1 + + On TH(chip-tool), Verify that CurrentMode attribute value is an integer and value is equal to on_mode_dut. below is the sample log provided for the raspi platform: + + [1649679202.069163][10899:10904] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 + [1649679202.069278][10899:10904] CHIP:TOO: CurrentMode: 0 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml index 8b040c7362f2f0..08974c5dfd1176 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml @@ -8,20 +8,31 @@ # 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: 263.1.5. [TC-DISHM-3.2] OnMode Verification with DUT as Server +name: 267.4.2. [TC-DISHM-3.2] OnMode Verification with DUT as Server PICS: - DISHM.S config: - nodeId: 0x0059 + nodeId: 0x12344321 cluster: "Dishwasher Mode" endpoint: 1 - new_mode_th: - type: INT16U - defaultValue: 0 tests: + - label: "Note" + verification: | + To Execute the TC-DISHM-3.2 test case using reboot in raspi device we followed the below suggested way: + + To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps + + + step-1: create a file using touch command , something like touch mytest.txt + step-2: chmod 777 mytest.txt + step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt + + if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. + disabled: true + - label: "Wait for the commissioned device to be retrieved" cluster: "DelayCommands" command: "WaitForCommissionee" @@ -31,52 +42,128 @@ tests: value: nodeId - label: "TH reads from the StartUpMode attribute from DUT" - PICS: DISHM.S.A0004 - command: "readAttribute" - attribute: "StartUpMode" - response: + verification: | + ./chip-tool dishwashermodeselect read start-up-mode 1 1 + + On TH(chip-tool), Verify StartUpMode attribute value is an integer. save the value as startup_mode_dut and below is the sample log provided for the raspi platform: + + [1645777708.406864][4841:4846] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003DataVersion: 3781469721 + [1645777708.406933][4841:4846] CHIP:TOO: StartUpMode: 0 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: values: - - name: "startup_mode_dut" - saveAs: startup_mode_dut - value: 0 - constraints: - type: int16u + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "TH reads the CurrentMode attribute from the DUT" - PICS: DISHM.S.A0003 - command: "readAttribute" - attribute: "CurrentMode" - response: + verification: | + ./chip-tool dishwashermodeselect read current-mode 1 1 + + On TH(chip-tool), Verify CurrentMode attribute value is an integer, + save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: + + NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + + [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 + [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: values: - - name: "old_current_mode_dut" - saveAs: old_current_mode_dut - value: 2 - constraints: - type: int16u + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "TH reads the SupportedModes attribute from DUT" - PICS: DISHM.S.A0002 - command: "readAttribute" - attribute: "SupportedModes" - response: + verification: | + ./chip-tool dishwashermodeselect read supported-modes 1 1 + + On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. + Save the Mode field values as supported_modes_dut. + Select a value from supported_modes_dut different from on_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 + [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries + [1687687925.444452][18054:18056] CHIP:TOO: [1]: { + [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal + [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 + [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries + [1687687925.444575][18054:18056] CHIP:TOO: [1]: { + [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 + [1687687925.444654][18054:18056] CHIP:TOO: } + [1687687925.444674][18054:18056] CHIP:TOO: } + [1687687925.444702][18054:18056] CHIP:TOO: [2]: { + [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy + [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 + [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries + [1687687925.444787][18054:18056] CHIP:TOO: [1]: { + [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 + [1687687925.444847][18054:18056] CHIP:TOO: } + [1687687925.444869][18054:18056] CHIP:TOO: [2]: { + [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 + [1687687925.444971][18054:18056] CHIP:TOO: } + [1687687925.444991][18054:18056] CHIP:TOO: } + [1687687925.445016][18054:18056] CHIP:TOO: [3]: { + [1687687925.445036][18054:18056] CHIP:TOO: Label: Light + [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 + [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries + [1687687925.445133][18054:18056] CHIP:TOO: [1]: { + [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 + [1687687925.445194][18054:18056] CHIP:TOO: } + [1687687925.445216][18054:18056] CHIP:TOO: [2]: { + [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 + [1687687925.445275][18054:18056] CHIP:TOO: } + [1687687925.445297][18054:18056] CHIP:TOO: [3]: { + [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 + [1687687925.445385][18054:18056] CHIP:TOO: } + [1687687925.445405][18054:18056] CHIP:TOO: } + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: values: - - name: "Mode" - saveAs: supported_modes_dut - value: [0, 1, 2] - constraints: - type: list + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" - PICS: DISHM.S.C00.Rsp && DISHM.S.F00 - command: "writeAttribute" - attribute: "ChangeToMode" + verification: | + ./chip-tool dishwashermodeselect change-to-mode 2 1 1 + + + On TH(chip-tool) , Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1684931419.768138][20792:20794] CHIP:DMG: StatusIB = + [1684931419.768143][20792:20794] CHIP:DMG: { + [1684931419.768148][20792:20794] CHIP:DMG: status = 0x00 (SUCCESS), + [1684931419.768152][20792:20794] CHIP:DMG: }, + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - - name: "arg1" - value: new_mode_th + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - - label: "Powercycle on device to set OnOff attribute manually to on" + - label: "Physically power cycle the device" + verification: | + Physically power cycle the device. cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -88,11 +175,20 @@ tests: value: "y" - label: "TH reads the CurrentMode attribute from the DUT" - PICS: DISHM.S.A0003 - command: "readAttribute" - attribute: "CurrentMode" - response: - value: startup_mode_dut - constraints: - type: int16u + verification: | + ./chip-tool dishwashermodeselect read current-mode 1 1 + + on TH(chip-tool), Verify that CurrentMode attribute value is same as value recorded in step 1 and below is the sample log provided for the raspi platform: + + [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 + [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml deleted file mode 100644 index 919a4168574c2c..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml +++ /dev/null @@ -1,115 +0,0 @@ -# -# 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: 263.1.6. [TC-DISHM-3.3] OnMode Verification with DUT as Server - -PICS: - - DISHM.S - -config: - nodeId: 0x0059 - cluster: "Dishwasher Mode" - endpoint: 1 - new_mode_th: - type: INT16U - defaultValue: 1 - -tests: - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "TH reads from the StartUpMode attribute from DUT" - PICS: DISHM.S.A0004 - command: "readAttribute" - attribute: "StartUpMode" - response: - values: - - name: "startup_mode_dut" - saveAs: startup_mode_dut - value: 0 - constraints: - type: int16u - - - label: "TH reads from the OnMode attribute from DUT" - PICS: DISHM.S.A0005 && DISHM.S.A0004 - command: "readAttribute" - attribute: "OnMode" - response: - values: - - name: "on_mode_dut" - saveAs: on_mode_dut - value: 0 - constraints: - type: int16u - - - label: "TH reads the SupportedModes attribute from DUT" - PICS: DISHM.S.A0002 && DISHM.S.A0004 - command: "readAttribute" - attribute: "SupportedModes" - response: - values: - - name: "Mode" - saveAs: supported_modes_dut - value: [0, 1, 2] - constraints: - type: list - - - label: "TH reads from the OnMode attribute from DUT" - PICS: DISHM.S.A0002 && DISHM.S.A0004 - command: "writeAttribute" - attribute: "OnMode" - arguments: - values: - - name: "new_mode_th" - value: new_mode_th - - - label: "TH reads from the OnMode attribute from DUT" - PICS: DISHM.S.A0005 && DISHM.S.F00 - command: "readAttribute" - attribute: "OnMode" - response: - value: new_mode_th - constraints: - type: int16u - - - label: "TH reads from the OnMode attribute from DUT" - PICS: OO.S.A4003 - command: "writeAttribute" - attribute: "StartUpOnOff" - arguments: - values: - - name: "arg1" - value: 1 - - - label: "Powercycle on device to set OnOff attribute manually to on" - 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 the CurrentMode attribute from the DUT" - PICS: DISHM.S.A0003 - command: "readAttribute" - attribute: "CurrentMode" - response: - value: new_mode_th - constraints: - type: int16u - \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_4.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_4.yaml new file mode 100644 index 00000000000000..a913147d34ceaf --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_4.yaml @@ -0,0 +1,277 @@ +# +# 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: 267.4.3. [TC-DISHM-3.4] OnMode Verification with DUT as Server + +PICS: + - DISHM.S + +config: + nodeId: 0x0059 + cluster: "Dishwasher Mode" + endpoint: 1 + new_mode_th: + type: INT16U + defaultValue: 1 + +tests: + - label: "Note" + verification: | + To Execute the TC-MOD-3.4 test case using reboot in raspi device we followed the below suggested way: + + To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps + + + step-1: create a file using touch command , something like touch mytest.txt + step-2: chmod 777 mytest.txt + step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt + + if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. + + To execute this test case set onmode to any integer value because as default it value has null. + + ./chip-tool dishwashermodeselect write on-mode 4 1 1 + disabled: true + + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH reads from the StartUpMode attribute from DUT" + verification: | + ./chip-tool dishwashermodeselect read start-up-mode 1 1 + + On TH(chip-tool) log, Verify StartUpMode attribute value is an integer. save this value as startup_mode_dut and below is the sample log provided for the raspi platform: + + + [1651099663211] [82177:7560652] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 2609052118 + [1651099663212] [82177:7560652] CHIP: [TOO] StartUpMode: 0 + 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 from the OnMode attribute from DUT" + verification: | + ./chip-tool dishwashermodeselect read on-mode 1 1 + + On TH(chip-tool) log, Verify OnMode attribute value is an integer. save the value as old_on_mode_dut and below is the sample log provided for the raspi platform: + + + [1654780979.979743][61542:61547] CHIP:DMG: } + [1654780979.980040][61542:61547] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 235764160 + [1654780979.980202][61542:61547] CHIP:TOO: OnMode: 4 + 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 the SupportedModes attribute from DUT" + verification: | + ./chip-tool dishwashermodeselect read supported-modes 1 1 + + On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. + Save the Mode field values as supported_modes_dut. + Select a value from supported_modes_dut different from on_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: + + [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 + [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries + [1687687925.444452][18054:18056] CHIP:TOO: [1]: { + [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal + [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 + [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries + [1687687925.444575][18054:18056] CHIP:TOO: [1]: { + [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 + [1687687925.444654][18054:18056] CHIP:TOO: } + [1687687925.444674][18054:18056] CHIP:TOO: } + [1687687925.444702][18054:18056] CHIP:TOO: [2]: { + [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy + [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 + [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries + [1687687925.444787][18054:18056] CHIP:TOO: [1]: { + [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 + [1687687925.444847][18054:18056] CHIP:TOO: } + [1687687925.444869][18054:18056] CHIP:TOO: [2]: { + [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 + [1687687925.444971][18054:18056] CHIP:TOO: } + [1687687925.444991][18054:18056] CHIP:TOO: } + [1687687925.445016][18054:18056] CHIP:TOO: [3]: { + [1687687925.445036][18054:18056] CHIP:TOO: Label: Light + [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 + [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries + [1687687925.445133][18054:18056] CHIP:TOO: [1]: { + [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 + [1687687925.445194][18054:18056] CHIP:TOO: } + [1687687925.445216][18054:18056] CHIP:TOO: [2]: { + [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 + [1687687925.445275][18054:18056] CHIP:TOO: } + [1687687925.445297][18054:18056] CHIP:TOO: [3]: { + [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 + [1687687925.445385][18054:18056] CHIP:TOO: } + [1687687925.445405][18054:18056] CHIP:TOO: } + 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 from the OnMode attribute from DUT" + verification: | + ./chip-tool dishwashermodeselect write on-mode 7 1 1 + + On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1651099941884] [84269:7567211] CHIP: [DMG] WriteResponseMessage = + [1651099941884] [84269:7567211] CHIP: [DMG] { + [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIBs = + [1651099941884] [84269:7567211] CHIP: [DMG] [ + [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIB = + [1651099941884] [84269:7567211] CHIP: [DMG] { + [1651099941887] [84269:7567211] CHIP: [DMG] AttributePathIB = + [1651099941887] [84269:7567211] CHIP: [DMG] { + [1651099941887] [84269:7567211] CHIP: [DMG] Endpoint = 0x1, + [1651099941887] [84269:7567211] CHIP: [DMG] Cluster = 0x50, + [1651099941887] [84269:7567211] CHIP: [DMG] Attribute = 0x0000_0005, + [1651099941887] [84269:7567211] CHIP: [DMG] } + [1651099941887] [84269:7567211] CHIP: [DMG] + [1651099941887] [84269:7567211] CHIP: [DMG] StatusIB = + [1651099941887] [84269:7567211] CHIP: [DMG] { + [1651099941887] [84269:7567211] CHIP: [DMG] status = 0x00 (SUCCESS), + [1651099941887] [84269:7567211] CHIP: [DMG] }, + [1651099941887] [84269:7567211] CHIP: [DMG] + [1651099941887] [84269:7567211] CHIP: [DMG] }, + [1651099941887] [84269:7567211] CHIP: [DMG] + [1651099941887] [84269:7567211] CHIP: [DMG] ], + [1651099941887] [84269:7567211] CHIP: [DMG] + [1651099941887] [84269:7567211] CHIP: [DMG] InteractionModelRevision = 1 + [1651099941887] [84269:7567211] CHIP: [DMG] } + 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 from the OnMode attribute from DUT" + verification: | + ./chip-tool dishwashermodeselect read on-mode 1 1 + + On TH(chip-tool) log, Verify OnMode attribute value is an integer. save the value as new_on_mode_dut and below is the sample log provided for the raspi platform: + + [1669190858.739158][4187:4189] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4107771634 + [1669190858.739222][4187:4189] CHIP:TOO: OnMode: 7 + 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 to the OnMode attribute from DUT" + verification: | + ./chip-tool onoff write start-up-on-off 1 1 1 + + On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1651101661959] [90832:7598169] CHIP: [DMG] WriteResponseMessage = + [1651101661959] [90832:7598169] CHIP: [DMG] { + [1651101661959] [90832:7598169] CHIP: [DMG] AttributeStatusIBs = + [1651101661959] [90832:7598169] CHIP: [DMG] [ + [1651101661959] [90832:7598169] CHIP: [DMG] AttributeStatusIB = + [1651101661959] [90832:7598169] CHIP: [DMG] { + [1651101661960] [90832:7598169] CHIP: [DMG] AttributePathIB = + [1651101661960] [90832:7598169] CHIP: [DMG] { + [1651101661960] [90832:7598169] CHIP: [DMG] Endpoint = 0x1, + [1651101661960] [90832:7598169] CHIP: [DMG] Cluster = 0x6, + [1651101661960] [90832:7598169] CHIP: [DMG] Attribute = 0x0000_4003, + [1651101661960] [90832:7598169] CHIP: [DMG] } + [1651101661960] [90832:7598169] CHIP: [DMG] + [1651101661960] [90832:7598169] CHIP: [DMG] StatusIB = + [1651101661960] [90832:7598169] CHIP: [DMG] { + [1651101661960] [90832:7598169] CHIP: [DMG] status = 0x00 (SUCCESS), + [1651101661960] [90832:7598169] CHIP: [DMG] }, + [1651101661960] [90832:7598169] CHIP: [DMG] + [1651101661960] [90832:7598169] CHIP: [DMG] }, + [1651101661960] [90832:7598169] CHIP: [DMG] + [1651101661960] [90832:7598169] CHIP: [DMG] ], + [1651101661960] [90832:7598169] CHIP: [DMG] + [1651101661960] [90832:7598169] CHIP: [DMG] InteractionModelRevision = 1 + [1651101661960] [90832:7598169] CHIP: [DMG] } + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "Physically power cycle the device" + verification: | + Physically power cycle the device. + 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 the CurrentMode attribute from the DUT" + verification: | + ./chip-tool dishwashermodeselect read current-mode 1 1 + + On TH(chip-tool), Verify CurrentMode attribute value is same as the value recorded in step 3 and below is the sample log provided for the raspi platform: + + [1669190936.869804][4194:4196] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3908583538 + [1669190936.869875][4194:4196] CHIP:TOO: CurrentMode: 7 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + \ No newline at end of file From ac07388bc757a00ae8b16213cd97ac9aa3dd5543 Mon Sep 17 00:00:00 2001 From: abpoth Date: Thu, 13 Jul 2023 14:23:05 -0400 Subject: [PATCH 04/46] removed variable declaration from config section --- src/app/tests/suites/certification/Test_TC_DISHM_3_4.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_4.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_4.yaml index a913147d34ceaf..c60270509b77c9 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_4.yaml @@ -17,9 +17,6 @@ config: nodeId: 0x0059 cluster: "Dishwasher Mode" endpoint: 1 - new_mode_th: - type: INT16U - defaultValue: 1 tests: - label: "Note" From 8e82567659cd59920a47faeddbd74b066a45aaec Mon Sep 17 00:00:00 2001 From: abpoth Date: Thu, 13 Jul 2023 15:24:29 -0400 Subject: [PATCH 05/46] adding updates to run restyled --- .../certification/Test_TC_DISHM_2_1.yaml | 202 +++++------------- third_party/asr/asr582x/asr_sdk | 2 +- third_party/asr/asr595x/asr_sdk | 2 +- third_party/bouffalolab/repo | 2 +- third_party/mbedtls/repo | 2 +- third_party/openthread/repo | 2 +- third_party/pigweed/repo | 2 +- third_party/silabs/gecko_sdk | 2 +- third_party/silabs/matter_support | 2 +- third_party/simw-top-mini/repo | 2 +- 10 files changed, 62 insertions(+), 158 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml index 5fd1b6e89d91ff..a4b0305722e9d0 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml @@ -13,7 +13,7 @@ # 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: 267.2.1. [TC-DISHM-2.1] ChangeToMode Verification with DUT as Server +name: 263.3.1. [TC-DISHM-2.1] ChangeToModeWithStatus Verification with DUT as Server PICS: - DISHM.S @@ -32,173 +32,77 @@ tests: - name: "nodeId" value: nodeId +# TODO: find better way to access SupportedModes structs - label: "TH reads the SupportedModes attribute from DUT" - verification: | - ./chip-tool dishwashermodeselect read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute should contains two or more ModeOptionsStruct entries and - Save the Mode field values as supported_modes_dut, below is the sample log provided for the raspi platform: - - [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 - [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries - [1687687925.444452][18054:18056] CHIP:TOO: [1]: { - [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal - [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 - [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries - [1687687925.444575][18054:18056] CHIP:TOO: [1]: { - [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 - [1687687925.444654][18054:18056] CHIP:TOO: } - [1687687925.444674][18054:18056] CHIP:TOO: } - [1687687925.444702][18054:18056] CHIP:TOO: [2]: { - [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy - [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 - [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries - [1687687925.444787][18054:18056] CHIP:TOO: [1]: { - [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 - [1687687925.444847][18054:18056] CHIP:TOO: } - [1687687925.444869][18054:18056] CHIP:TOO: [2]: { - [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 - [1687687925.444971][18054:18056] CHIP:TOO: } - [1687687925.444991][18054:18056] CHIP:TOO: } - [1687687925.445016][18054:18056] CHIP:TOO: [3]: { - [1687687925.445036][18054:18056] CHIP:TOO: Label: Light - [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 - [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries - [1687687925.445133][18054:18056] CHIP:TOO: [1]: { - [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 - [1687687925.445194][18054:18056] CHIP:TOO: } - [1687687925.445216][18054:18056] CHIP:TOO: [2]: { - [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 - [1687687925.445275][18054:18056] CHIP:TOO: } - [1687687925.445297][18054:18056] CHIP:TOO: [3]: { - [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 - [1687687925.445385][18054:18056] CHIP:TOO: } - [1687687925.445405][18054:18056] CHIP:TOO: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: + PICS: DISHM.S.A0002 + command: "readAttribute" + attribute: "SupportedModes" + response: values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - name: "Mode" + saveAs: supported_modes_dut + value: [0, 1, 2] + constraints: + type: list - label: "TH reads the CurrentMode attribute from the DUT" - verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - - Save the value as old_current_mode_dut - - Select a value from supported_modes_dut, different from old_current_mode_dut, and which corresponds to a mode the device can switch to, given its current state and save this value as new_mode_th - - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, - below is the sample log provided for the raspi platform: - - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: + PICS: DISHM.S.A0003 + command: "readAttribute" + attribute: "CurrentMode" + response: values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - name: "old_current_mode_dut" + saveAs: old_current_mode_dut + value: 0 + constraints: + type: int16u - label: "TH send a ChangeToMode command to the DUT with NewMode set to old_current_mode_dut" - verification: | - ./chip-tool dishwashermodeselect change-to-mode 0 1 1 - - Verify on TH(chip-tool) log,shows successful status response and below is the sample log provided for the raspi platform: - - - [1649677293.280207][10810:10815] CHIP:DMG: StatusIB = - [1649677293.280283][10810:10815] CHIP:DMG: { - [1649677293.280358][10810:10815] CHIP:DMG: status = 0x01 (FAILURE), - [1649677293.280421][10810:10815] CHIP:DMG: }, - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: DISHM.S.C01.Rsp + command: "writeAttribute" + attribute: "ChangeToMode" arguments: values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - name: "arg1" + value: old_current_mode_dut + response: + value: "" + constraints: + type: char_string - label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" - verification: | - ./chip-tool dishwashermodeselect change-to-mode 3 1 1 - - Verify on TH(chip-tool) log,shows successful status response and below is the sample log provided for the raspi platform: - - - [1649677293.280207][10810:10815] CHIP:DMG: StatusIB = - [1649677293.280283][10810:10815] CHIP:DMG: { - [1649677293.280358][10810:10815] CHIP:DMG: status = 0x00 (SUCCESS), - [1649677293.280421][10810:10815] CHIP:DMG: }, - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT + PICS: DISHM.S.C01.Rsp + command: "writeAttribute" + attribute: "ChangeToMode" arguments: values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - name: "arg1" + value: new_mode_th - label: "TH reads the CurrentMode attribute from the DUT" - verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and equal to the new_mode_th, below is the sample log provided for the raspi platform: - - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 3 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + PICS: DISHM.S.A0003 + command: "readAttribute" + attribute: "CurrentMode" + response: + values: + - name: "new_mode_th" + value: new_mode_th + constraints: + type: int16u - - label: "TH send a ChangeToMode command to the DUT with NewMode set to invalid_mode_th" - verification: | - ./chip-tool dishwashermodeselect change-to-mode 4 1 1 - - Verify on TH(chip-tool) log,shows successful status response and below is the sample log provided for the raspi platform: - - - [1649677293.280207][10810:10815] CHIP:DMG: StatusIB = - [1649677293.280283][10810:10815] CHIP:DMG: { - [1649677293.280358][10810:10815] CHIP:DMG: status = 0x01 (FAILURE), - [1649677293.280421][10810:10815] CHIP:DMG: }, - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT + - label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" + PICS: DISHM.S.C01.Rsp + command: "writeAttribute" + attribute: "ChangeToMode" arguments: values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + - name: "arg1" + value: invalid_mode_th + response: + value: 1 + constraints: + type: int16u \ No newline at end of file diff --git a/third_party/asr/asr582x/asr_sdk b/third_party/asr/asr582x/asr_sdk index 5942c485ce3a75..66ab48a1ab851f 160000 --- a/third_party/asr/asr582x/asr_sdk +++ b/third_party/asr/asr582x/asr_sdk @@ -1 +1 @@ -Subproject commit 5942c485ce3a75585883abba389a4336c190a86b +Subproject commit 66ab48a1ab851f77117307ac410aca8f175bc4b1 diff --git a/third_party/asr/asr595x/asr_sdk b/third_party/asr/asr595x/asr_sdk index 9161981339b656..d85ca3cb552e8e 160000 --- a/third_party/asr/asr595x/asr_sdk +++ b/third_party/asr/asr595x/asr_sdk @@ -1 +1 @@ -Subproject commit 9161981339b656ba6ea39eed13b7e0b78950bbe9 +Subproject commit d85ca3cb552e8e7a72b2f8b04bf62e12c9a58835 diff --git a/third_party/bouffalolab/repo b/third_party/bouffalolab/repo index 31489e4c11dbe3..125a1237081749 160000 --- a/third_party/bouffalolab/repo +++ b/third_party/bouffalolab/repo @@ -1 +1 @@ -Subproject commit 31489e4c11dbe341f7a38792efc6d7a95d1d48ea +Subproject commit 125a1237081749d5cc3ab5c1dc2017465960bba4 diff --git a/third_party/mbedtls/repo b/third_party/mbedtls/repo index b18d45f042555d..8eaf2d2ac93c43 160000 --- a/third_party/mbedtls/repo +++ b/third_party/mbedtls/repo @@ -1 +1 @@ -Subproject commit b18d45f042555dc79e5c0e2e0f8f73eb3a61677e +Subproject commit 8eaf2d2ac93c432399a7c580496a45ad16519a17 diff --git a/third_party/openthread/repo b/third_party/openthread/repo index 8bc25042ba5cde..9b99fbfd092380 160000 --- a/third_party/openthread/repo +++ b/third_party/openthread/repo @@ -1 +1 @@ -Subproject commit 8bc25042ba5cde20605eec2a329c0dff575303f4 +Subproject commit 9b99fbfd092380b0b8760bcb4863ea7c5f46e476 diff --git a/third_party/pigweed/repo b/third_party/pigweed/repo index b5cec17a34cb41..d8e4b80c79540b 160000 --- a/third_party/pigweed/repo +++ b/third_party/pigweed/repo @@ -1 +1 @@ -Subproject commit b5cec17a34cb4115537141d06c7726392857f678 +Subproject commit d8e4b80c79540b12d367e4581250d133c8415596 diff --git a/third_party/silabs/gecko_sdk b/third_party/silabs/gecko_sdk index ef05eb60565ce3..d4854d2ff06a82 160000 --- a/third_party/silabs/gecko_sdk +++ b/third_party/silabs/gecko_sdk @@ -1 +1 @@ -Subproject commit ef05eb60565ce3be035b79b8fac1f9d12c7e706b +Subproject commit d4854d2ff06a828161d7032efb1736d0deda40b1 diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support index 433ccfc014ffe3..2bc3f28d778850 160000 --- a/third_party/silabs/matter_support +++ b/third_party/silabs/matter_support @@ -1 +1 @@ -Subproject commit 433ccfc014ffe313bf5cbc848478701778040ef2 +Subproject commit 2bc3f28d778850417f34c7201cbe78bd72e3ee78 diff --git a/third_party/simw-top-mini/repo b/third_party/simw-top-mini/repo index 2e9189d97010b5..be0dfb64b28dea 160000 --- a/third_party/simw-top-mini/repo +++ b/third_party/simw-top-mini/repo @@ -1 +1 @@ -Subproject commit 2e9189d97010b5d9d380d975ee09b7277221f890 +Subproject commit be0dfb64b28dea3509425755e3b4b5b35c38d327 From cda209b3592d0a873c22e2c4f4704ce0ac6ddbc1 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Thu, 13 Jul 2023 19:28:49 +0000 Subject: [PATCH 06/46] Restyled by whitespace --- .../tests/suites/certification/Test_TC_DISHM_1_1.yaml | 2 +- .../tests/suites/certification/Test_TC_DISHM_1_2.yaml | 10 +++++----- .../tests/suites/certification/Test_TC_DISHM_2_1.yaml | 11 +++++------ .../tests/suites/certification/Test_TC_DISHM_3_1.yaml | 5 ++--- .../tests/suites/certification/Test_TC_DISHM_3_2.yaml | 3 +-- .../tests/suites/certification/Test_TC_DISHM_3_4.yaml | 3 +-- 6 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml index ac39a53a244cb4..3b3a894a59d686 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml @@ -149,4 +149,4 @@ tests: response: constraints: type: list - contains: [2] \ No newline at end of file + contains: [2] diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml index af108101edb615..13fa4e7229bd13 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml @@ -106,8 +106,8 @@ tests: - name: "message" value: "Please enter 'y' for success" - name: "expectedValue" - value: "y" - + value: "y" + - label: "TH reads the OnMode attribute from the DUT" verification: | @@ -127,7 +127,7 @@ tests: - name: "message" value: "Please enter 'y' for success" - name: "expectedValue" - value: "y" + value: "y" - label: "TH reads the StartUpMode attribute from the DUT" verification: | @@ -146,7 +146,7 @@ tests: value: "Please enter 'y' for success" - name: "expectedValue" value: "y" - + - label: "TH reads the Description attribute from the DUT" verification: | @@ -164,4 +164,4 @@ tests: - name: "message" value: "Please enter 'y' for success" - name: "expectedValue" - value: "y" \ No newline at end of file + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml index a4b0305722e9d0..3d1b55b9227946 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml @@ -67,9 +67,9 @@ tests: value: old_current_mode_dut response: value: "" - constraints: + constraints: type: char_string - + - label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" PICS: DISHM.S.C01.Rsp @@ -85,14 +85,14 @@ tests: command: "readAttribute" attribute: "CurrentMode" response: - values: + values: - name: "new_mode_th" value: new_mode_th constraints: type: int16u - - + + - label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" PICS: DISHM.S.C01.Rsp command: "writeAttribute" @@ -105,4 +105,3 @@ tests: value: 1 constraints: type: int16u - \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml index 9c2518ebfbba03..cd79d5c48abdad 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml @@ -123,14 +123,14 @@ tests: value: "Please enter 'y' for success" - name: "expectedValue" value: "y" - + - label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" verification: | ./chip-tool dishwashermodeselect change-to-mode 2 1 1 On TH(chip-tool) log, verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - [1684931013.571019][20667:20669] CHIP:DMG: + [1684931013.571019][20667:20669] CHIP:DMG: [1684931013.571021][20667:20669] CHIP:DMG: StatusIB = [1684931013.571024][20667:20669] CHIP:DMG: { [1684931013.571027][20667:20669] CHIP:DMG: status = 0x00 (SUCCESS), @@ -203,4 +203,3 @@ tests: value: "Please enter 'y' for success" - name: "expectedValue" value: "y" - \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml index 08974c5dfd1176..e44f4782688728 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml @@ -138,7 +138,7 @@ tests: value: "Please enter 'y' for success" - name: "expectedValue" value: "y" - + - label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" verification: | @@ -191,4 +191,3 @@ tests: value: "Please enter 'y' for success" - name: "expectedValue" value: "y" - \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_4.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_4.yaml index c60270509b77c9..974cd079750403 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_4.yaml @@ -36,7 +36,7 @@ tests: ./chip-tool dishwashermodeselect write on-mode 4 1 1 disabled: true - + - label: "Wait for the commissioned device to be retrieved" cluster: "DelayCommands" command: "WaitForCommissionee" @@ -271,4 +271,3 @@ tests: value: "Please enter 'y' for success" - name: "expectedValue" value: "y" - \ No newline at end of file From 43f96d81fc001f31f28639c9a6b34d54c71abb98 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Thu, 13 Jul 2023 19:29:03 +0000 Subject: [PATCH 07/46] Restyled by prettier-yaml --- .../certification/Test_TC_DISHM_1_1.yaml | 29 +++--- .../certification/Test_TC_DISHM_1_2.yaml | 92 +++++++++---------- .../certification/Test_TC_DISHM_2_1.yaml | 31 ++++--- .../certification/Test_TC_DISHM_3_1.yaml | 4 +- .../certification/Test_TC_DISHM_3_2.yaml | 17 ++-- 5 files changed, 86 insertions(+), 87 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml index 3b3a894a59d686..886185b129f2bb 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml @@ -49,7 +49,8 @@ tests: constraints: type: bitmap32 - - label: "Given DISHM.S.F00(DEPONOFF) ensure featuremap has the correct bit set" + - label: + "Given DISHM.S.F00(DEPONOFF) ensure featuremap has the correct bit set" PICS: DISHM.S.F00 command: "readAttribute" attribute: "FeatureMap" @@ -67,7 +68,8 @@ tests: constraints: type: bitmap32 - - label: "Given DISHM.S.F02(DEPCTM) ensure featuremap has the correct bit set" + - label: + "Given DISHM.S.F02(DEPCTM) ensure featuremap has the correct bit set" PICS: DISHM.S.F02 command: "readAttribute" attribute: "FeatureMap" @@ -83,21 +85,11 @@ tests: response: constraints: type: list - contains: - [ - 0, - 1, - 2, - 3, - 65528, - 65529, - 65530, - 65531, - 65532, - 65533, - ] - - - label: "TH reads optional attribute (DISHM.S.A0004(StartUpMode)) in AttributeList" + contains: [0, 1, 2, 3, 65528, 65529, 65530, 65531, 65532, 65533] + + - label: + "TH reads optional attribute (DISHM.S.A0004(StartUpMode)) in + AttributeList" PICS: DISHM.S.A0004 command: "readAttribute" attribute: "AttributeList" @@ -106,7 +98,8 @@ tests: type: list contains: [4] - - label: "TH reads optional attribute (DISHM.S.F00(DEPONOFF)) in AttributeList" + - label: + "TH reads optional attribute (DISHM.S.F00(DEPONOFF)) in AttributeList" PICS: DISHM.S.F00 command: "readAttribute" attribute: "AttributeList" diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml index 13fa4e7229bd13..d1f218de146d1e 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml @@ -34,51 +34,51 @@ tests: - label: "TH reads the SupportedModes attribute from DUT" verification: | - ./chip-tool dishwashermodeselect read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute should contains atleast two ModeOptionsStruct entries with unique mode field value and label field value below is the sample log provided for the raspi platform: - - [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 - [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries - [1687687925.444452][18054:18056] CHIP:TOO: [1]: { - [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal - [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 - [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries - [1687687925.444575][18054:18056] CHIP:TOO: [1]: { - [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 - [1687687925.444654][18054:18056] CHIP:TOO: } - [1687687925.444674][18054:18056] CHIP:TOO: } - [1687687925.444702][18054:18056] CHIP:TOO: [2]: { - [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy - [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 - [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries - [1687687925.444787][18054:18056] CHIP:TOO: [1]: { - [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 - [1687687925.444847][18054:18056] CHIP:TOO: } - [1687687925.444869][18054:18056] CHIP:TOO: [2]: { - [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 - [1687687925.444971][18054:18056] CHIP:TOO: } - [1687687925.444991][18054:18056] CHIP:TOO: } - [1687687925.445016][18054:18056] CHIP:TOO: [3]: { - [1687687925.445036][18054:18056] CHIP:TOO: Label: Light - [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 - [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries - [1687687925.445133][18054:18056] CHIP:TOO: [1]: { - [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 - [1687687925.445194][18054:18056] CHIP:TOO: } - [1687687925.445216][18054:18056] CHIP:TOO: [2]: { - [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 - [1687687925.445275][18054:18056] CHIP:TOO: } - [1687687925.445297][18054:18056] CHIP:TOO: [3]: { - [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 - [1687687925.445385][18054:18056] CHIP:TOO: } - [1687687925.445405][18054:18056] CHIP:TOO: } + ./chip-tool dishwashermodeselect read supported-modes 1 1 + + On TH(chip-tool) log, Verify SupportedModes attribute should contains atleast two ModeOptionsStruct entries with unique mode field value and label field value below is the sample log provided for the raspi platform: + + [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 + [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries + [1687687925.444452][18054:18056] CHIP:TOO: [1]: { + [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal + [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 + [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries + [1687687925.444575][18054:18056] CHIP:TOO: [1]: { + [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 + [1687687925.444654][18054:18056] CHIP:TOO: } + [1687687925.444674][18054:18056] CHIP:TOO: } + [1687687925.444702][18054:18056] CHIP:TOO: [2]: { + [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy + [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 + [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries + [1687687925.444787][18054:18056] CHIP:TOO: [1]: { + [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 + [1687687925.444847][18054:18056] CHIP:TOO: } + [1687687925.444869][18054:18056] CHIP:TOO: [2]: { + [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 + [1687687925.444971][18054:18056] CHIP:TOO: } + [1687687925.444991][18054:18056] CHIP:TOO: } + [1687687925.445016][18054:18056] CHIP:TOO: [3]: { + [1687687925.445036][18054:18056] CHIP:TOO: Label: Light + [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 + [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries + [1687687925.445133][18054:18056] CHIP:TOO: [1]: { + [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 + [1687687925.445194][18054:18056] CHIP:TOO: } + [1687687925.445216][18054:18056] CHIP:TOO: [2]: { + [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 + [1687687925.445275][18054:18056] CHIP:TOO: } + [1687687925.445297][18054:18056] CHIP:TOO: [3]: { + [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 + [1687687925.445385][18054:18056] CHIP:TOO: } + [1687687925.445405][18054:18056] CHIP:TOO: } cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -108,7 +108,6 @@ tests: - name: "expectedValue" value: "y" - - label: "TH reads the OnMode attribute from the DUT" verification: | ./chip-tool dishwashermodeselect read on-mode 1 1 @@ -147,7 +146,6 @@ tests: - name: "expectedValue" value: "y" - - label: "TH reads the Description attribute from the DUT" verification: | ./chip-tool dishwashermodeselect read description 1 1 diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml index 3d1b55b9227946..2534f5cbee39ad 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml @@ -13,7 +13,9 @@ # 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: 263.3.1. [TC-DISHM-2.1] ChangeToModeWithStatus Verification with DUT as Server +name: + 263.3.1. [TC-DISHM-2.1] ChangeToModeWithStatus Verification with DUT as + Server PICS: - DISHM.S @@ -32,16 +34,16 @@ tests: - name: "nodeId" value: nodeId -# TODO: find better way to access SupportedModes structs + # TODO: find better way to access SupportedModes structs - label: "TH reads the SupportedModes attribute from DUT" PICS: DISHM.S.A0002 command: "readAttribute" attribute: "SupportedModes" response: values: - - name: "Mode" - saveAs: supported_modes_dut - value: [0, 1, 2] + - name: "Mode" + saveAs: supported_modes_dut + value: [0, 1, 2] constraints: type: list @@ -57,7 +59,9 @@ tests: constraints: type: int16u - - label: "TH send a ChangeToMode command to the DUT with NewMode set to old_current_mode_dut" + - label: + "TH send a ChangeToMode command to the DUT with NewMode set to + old_current_mode_dut" PICS: DISHM.S.C01.Rsp command: "writeAttribute" attribute: "ChangeToMode" @@ -70,8 +74,9 @@ tests: constraints: type: char_string - - - label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" + - label: + "TH send a ChangeToMode command to the DUT with NewMode set to + new_mode_th" PICS: DISHM.S.C01.Rsp command: "writeAttribute" attribute: "ChangeToMode" @@ -86,14 +91,14 @@ tests: attribute: "CurrentMode" response: values: - - name: "new_mode_th" - value: new_mode_th + - name: "new_mode_th" + value: new_mode_th constraints: type: int16u - - - - label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" + - label: + "TH send a ChangeToMode command to the DUT with NewMode set to + new_mode_th" PICS: DISHM.S.C01.Rsp command: "writeAttribute" attribute: "ChangeToMode" diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml index cd79d5c48abdad..55f268441cd8ed 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml @@ -124,7 +124,9 @@ tests: - name: "expectedValue" value: "y" - - label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" + - label: + "TH send a ChangeToMode command to the DUT with NewMode set to + new_mode_th" verification: | ./chip-tool dishwashermodeselect change-to-mode 2 1 1 diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml index e44f4782688728..56182e10214f1a 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml @@ -21,16 +21,16 @@ config: tests: - label: "Note" verification: | - To Execute the TC-DISHM-3.2 test case using reboot in raspi device we followed the below suggested way: + To Execute the TC-DISHM-3.2 test case using reboot in raspi device we followed the below suggested way: - To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps + To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps - step-1: create a file using touch command , something like touch mytest.txt - step-2: chmod 777 mytest.txt - step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt + step-1: create a file using touch command , something like touch mytest.txt + step-2: chmod 777 mytest.txt + step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt - if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. + if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. disabled: true - label: "Wait for the commissioned device to be retrieved" @@ -139,8 +139,9 @@ tests: - name: "expectedValue" value: "y" - - - label: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" + - label: + "TH send a ChangeToMode command to the DUT with NewMode set to + new_mode_th" verification: | ./chip-tool dishwashermodeselect change-to-mode 2 1 1 From 0f0539ca6f304466e10d202620a1b56e8be004b4 Mon Sep 17 00:00:00 2001 From: abpoth Date: Fri, 14 Jul 2023 13:41:31 -0400 Subject: [PATCH 08/46] Updated files per chip-test-plans allclusters document --- .../certification/Test_TC_DISHM_1_1.yaml | 51 +-- .../certification/Test_TC_DISHM_1_2.yaml | 22 +- .../certification/Test_TC_DISHM_2_1.yaml | 352 +++++++++++++++--- .../certification/Test_TC_DISHM_3_1.yaml | 12 +- .../certification/Test_TC_DISHM_3_2.yaml | 6 +- ..._DISHM_3_4.yaml => Test_TC_DISHM_3_3.yaml} | 79 ++-- 6 files changed, 353 insertions(+), 169 deletions(-) rename src/app/tests/suites/certification/{Test_TC_DISHM_3_4.yaml => Test_TC_DISHM_3_3.yaml} (79%) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml index 886185b129f2bb..3194d8459af35f 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml @@ -41,7 +41,7 @@ tests: type: int16u - label: "TH reads the FeatureMap from DUT" - PICS: " !DISHM.S.F00 && !DISHM.S.F01 && !DISHM.S.F02 " + PICS: " !DISHM.S.F00 " command: "readAttribute" attribute: "FeatureMap" response: @@ -59,24 +59,6 @@ tests: constraints: type: bitmap32 - - label: "Given DISHM.S.F01(EXT) ensure featuremap has the correct bit set" - PICS: DISHM.S.F01 - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 1 - constraints: - type: bitmap32 - - - label: - "Given DISHM.S.F02(DEPCTM) ensure featuremap has the correct bit set" - PICS: DISHM.S.F02 - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 1 - constraints: - type: bitmap32 - label: "TH reads AttributeList from DUT" PICS: DISHM.S.Afffb @@ -85,18 +67,18 @@ tests: response: constraints: type: list - contains: [0, 1, 2, 3, 65528, 65529, 65530, 65531, 65532, 65533] + contains: [0, 1, 65528, 65529, 65530, 65531, 65532, 65533] - label: "TH reads optional attribute (DISHM.S.A0004(StartUpMode)) in AttributeList" - PICS: DISHM.S.A0004 + PICS: DISHM.S.A0002 command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [4] + contains: [2] - label: "TH reads optional attribute (DISHM.S.F00(DEPONOFF)) in AttributeList" @@ -106,40 +88,19 @@ tests: response: constraints: type: list - contains: [5] + contains: [3] - label: "TH reads AcceptedCommandList from DUT" - PICS: "!DISHM.S.F02" - command: "readAttribute" attribute: "AcceptedCommandList" response: constraints: type: list contains: [0] - - label: "TH reads AcceptedCommandList from DUT" - PICS: DISHM.S.F01 - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - constraints: - type: list - contains: [1] - - - label: "Read the global attribute: GeneratedCommandList" - PICS: "!DISHM.S.F01" - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [] - constraints: - type: list - - label: "Read the global attribute: GeneratedCommandList" - PICS: DISHM.S.F01 command: "readAttribute" attribute: "GeneratedCommandList" response: constraints: type: list - contains: [2] + contains: [1] diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml index d1f218de146d1e..f5b305a7cf40af 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml @@ -13,7 +13,7 @@ # 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: 267.1.2. [TC-DISHM-1.2] Cluster attributes with server as DUT +name: 193.1.2. [TC-DISHM-1.2] Cluster attributes with DUT as Server PICS: - DISHM.S @@ -36,7 +36,7 @@ tests: verification: | ./chip-tool dishwashermodeselect read supported-modes 1 1 - On TH(chip-tool) log, Verify SupportedModes attribute should contains atleast two ModeOptionsStruct entries with unique mode field value and label field value below is the sample log provided for the raspi platform: + On TH(chip-tool) log, Verify SupportedModes attribute should contains atleast one ModeOptionsStruct entries with unique mode field value and label field value below is the sample log provided for the raspi platform: [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries @@ -145,21 +145,3 @@ tests: value: "Please enter 'y' for success" - name: "expectedValue" value: "y" - - - label: "TH reads the Description attribute from the DUT" - verification: | - ./chip-tool dishwashermodeselect read description 1 1 - - Verify on TH(chip-tool) logs , Description value is human readable text string and below is the sample log provided for the raspi platform: - - [1649677114.614974][10787:10792] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000 DataVersion: 4277065072 - [1649677114.615110][10787:10792] CHIP:TOO: Description: Dishwasher - 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_DISHM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml index 2534f5cbee39ad..fa7ac44c77fa22 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml @@ -14,7 +14,7 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 263.3.1. [TC-DISHM-2.1] ChangeToModeWithStatus Verification with DUT as + 193.2.1. [TC-DISHM-2.1] ChangeToMode Verification with DUT as Server PICS: @@ -34,79 +34,319 @@ tests: - name: "nodeId" value: nodeId - # TODO: find better way to access SupportedModes structs - label: "TH reads the SupportedModes attribute from DUT" - PICS: DISHM.S.A0002 - command: "readAttribute" - attribute: "SupportedModes" - response: + verification: | + ./chip-tool dishwashermodeselect read supported-modes 1 1 + + On TH(chip-tool) log, Verify SupportedModes attribute should contains two or more ModeOptionsStruct entries and + Save the Mode field values as supported_modes_dut, below is the sample log provided for the raspi platform: + + [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 + [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries + [1687687925.444452][18054:18056] CHIP:TOO: [1]: { + [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal + [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 + [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries + [1687687925.444575][18054:18056] CHIP:TOO: [1]: { + [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 + [1687687925.444654][18054:18056] CHIP:TOO: } + [1687687925.444674][18054:18056] CHIP:TOO: } + [1687687925.444702][18054:18056] CHIP:TOO: [2]: { + [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy + [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 + [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries + [1687687925.444787][18054:18056] CHIP:TOO: [1]: { + [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 + [1687687925.444847][18054:18056] CHIP:TOO: } + [1687687925.444869][18054:18056] CHIP:TOO: [2]: { + [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 + [1687687925.444971][18054:18056] CHIP:TOO: } + [1687687925.444991][18054:18056] CHIP:TOO: } + [1687687925.445016][18054:18056] CHIP:TOO: [3]: { + [1687687925.445036][18054:18056] CHIP:TOO: Label: Light + [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 + [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries + [1687687925.445133][18054:18056] CHIP:TOO: [1]: { + [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 + [1687687925.445194][18054:18056] CHIP:TOO: } + [1687687925.445216][18054:18056] CHIP:TOO: [2]: { + [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 + [1687687925.445275][18054:18056] CHIP:TOO: } + [1687687925.445297][18054:18056] CHIP:TOO: [3]: { + [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 + [1687687925.445385][18054:18056] CHIP:TOO: } + [1687687925.445405][18054:18056] CHIP:TOO: } + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: values: - - name: "Mode" - saveAs: supported_modes_dut - value: [0, 1, 2] - constraints: - type: list + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "TH reads the CurrentMode attribute from the DUT" - PICS: DISHM.S.A0003 - command: "readAttribute" - attribute: "CurrentMode" - response: + verification: | + ./chip-tool dishwashermodeselect read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value + - Save the value as old_current_mode_dut + - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, + below is the sample log provided for the raspi platform: + + [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, + [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 + [1685018283.726589][16418:16420] CHIP:DMG: } + [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 + [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: values: - - name: "old_current_mode_dut" - saveAs: old_current_mode_dut - value: 0 - constraints: - type: int16u + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: - "TH send a ChangeToMode command to the DUT with NewMode set to + "TH sends a ChangeToMode command to the DUT with NewMode set to old_current_mode_dut" - PICS: DISHM.S.C01.Rsp - command: "writeAttribute" - attribute: "ChangeToMode" + verification: | + ./chip-tool dishwashermodeselect change-to-mode 1 1 1 + + On TH(chip-tool) log, verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1684931013.571019][20667:20669] CHIP:DMG: + [1684931013.571021][20667:20669] CHIP:DMG: StatusIB = + [1684931013.571024][20667:20669] CHIP:DMG: { + [1684931013.571027][20667:20669] CHIP:DMG: status = 0x00 (SUCCESS), + [1684931013.571030][20667:20669] CHIP:DMG: }, + [1684931013.571034][20667:20669] CHIP:DMG: + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "Manually put the device in a state from which it will FAIL to transition to PIXIT.DISHM.MODE_CHANGE_FAIL" + 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 the CurrentMode attribute from the DUT" + verification: | + ./chip-tool dishwashermodeselect read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value + - Save the value as old_current_mode_dut, + below is the sample log provided for the raspi platform: + + [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, + [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 + [1685018283.726589][16418:16420] CHIP:DMG: } + [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 + [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 2 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - - name: "arg1" - value: old_current_mode_dut - response: - value: "" - constraints: - type: char_string + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: - "TH send a ChangeToMode command to the DUT with NewMode set to - new_mode_th" - PICS: DISHM.S.C01.Rsp - command: "writeAttribute" - attribute: "ChangeToMode" + "TH sends a ChangeToMode command to the DUT with NewMode set to + PIXIT.DISHM.MODE_CHANGE_FAIL" + verification: | + ./chip-tool dishwashermodeselect change-to-mode 2 1 1 + + On TH(chip-tool) log, verify DUT responds with a GenericFailure (value 0x02) or MfgCodes (0x80 to 0xBF range) status response and below is the sample log provided for the raspi platform: + + [1684931013.571019][20667:20669] CHIP:DMG: + [1684931013.571021][20667:20669] CHIP:DMG: StatusIB = + [1684931013.571024][20667:20669] CHIP:DMG: { + [1684931013.571027][20667:20669] CHIP:DMG: status = 0x02 (GENERICFAILURE), + [1684931013.571030][20667:20669] CHIP:DMG: }, + [1684931013.571034][20667:20669] CHIP:DMG: + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - - name: "arg1" - value: new_mode_th + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "TH reads the CurrentMode attribute from the DUT" - PICS: DISHM.S.A0003 - command: "readAttribute" - attribute: "CurrentMode" - response: + verification: | + ./chip-tool dishwashermodeselect read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value + - Save the value as old_current_mode_dut, + below is the sample log provided for the raspi platform: + + [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, + [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 + [1685018283.726589][16418:16420] CHIP:DMG: } + [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 + [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 2 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: values: - - name: "new_mode_th" - value: new_mode_th - constraints: - type: int16u + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: - "TH send a ChangeToMode command to the DUT with NewMode set to - new_mode_th" - PICS: DISHM.S.C01.Rsp - command: "writeAttribute" - attribute: "ChangeToMode" + "Manually put the device in a state from which it will SUCCESSFULLY transition to PIXIT.DISHM.MODE_CHANGE_OK" + 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 the CurrentMode attribute from the DUT" + verification: | + ./chip-tool dishwashermodeselect read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value + - Save the value as old_current_mode_dut, + below is the sample log provided for the raspi platform: + + [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, + [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 + [1685018283.726589][16418:16420] CHIP:DMG: } + [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 + [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 1 + 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 a ChangeToMode command to the DUT with NewMode set to + PIXIT.DISHM.MODE_CHANGE_OK" + verification: | + ./chip-tool dishwashermodeselect change-to-mode 2 1 1 + + On TH(chip-tool) log, verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + + [1684931013.571019][20667:20669] CHIP:DMG: + [1684931013.571021][20667:20669] CHIP:DMG: StatusIB = + [1684931013.571024][20667:20669] CHIP:DMG: { + [1684931013.571027][20667:20669] CHIP:DMG: status = 0x00 (SUCCESS), + [1684931013.571030][20667:20669] CHIP:DMG: }, + [1684931013.571034][20667:20669] CHIP:DMG: + 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 the CurrentMode attribute from the DUT" + verification: | + ./chip-tool dishwashermodeselect read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value equal to PIXIT.DISHM.MODE_CHANGE_OK + + below is the sample log provided for the raspi platform: + + [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, + [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 + [1685018283.726589][16418:16420] CHIP:DMG: } + [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 + [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 2 + 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 a ChangeToMode command to the DUT with NewMode set to + invalid_mode_th" + verification: | + ./chip-tool dishwashermodeselect change-to-mode 10 1 1 + + On TH(chip-tool) log, verify DUT responds with a UnsupportedMode (value 0x01) status response and below is the sample log provided for the raspi platform: + + [1684931013.571019][20667:20669] CHIP:DMG: + [1684931013.571021][20667:20669] CHIP:DMG: StatusIB = + [1684931013.571024][20667:20669] CHIP:DMG: { + [1684931013.571027][20667:20669] CHIP:DMG: status = 0x01 (UNSUPPORTEDMODE), + [1684931013.571030][20667:20669] CHIP:DMG: }, + [1684931013.571034][20667:20669] CHIP:DMG: + 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 the CurrentMode attribute from the DUT" + verification: | + ./chip-tool dishwashermodeselect read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value equal to PIXIT.DISHM.MODE_CHANGE_OK + + below is the sample log provided for the raspi platform: + + [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, + [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 + [1685018283.726589][16418:16420] CHIP:DMG: } + [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 + [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 2 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT arguments: values: - - name: "arg1" - value: invalid_mode_th - response: - value: 1 - constraints: - type: int16u + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml index 55f268441cd8ed..b5bc1b391880cf 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml @@ -8,7 +8,7 @@ # 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: 267.4.1. [TC-DISHM-3.1] OnMode Verification with DUT as Server +name: 193.3.1. [TC-DISHM-3.1] OnMode Verification with DUT as Server PICS: - DISHM.S @@ -31,7 +31,7 @@ tests: verification: | ./chip-tool dishwashermodeselect read on-mode 1 1 - On TH(chip-tool), Verify OnMode attribute value is an integer. save the value as on_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify OnMode attribute value is an integer. Save the value as on_mode_dut and below is the sample log provided for the raspi platform: [1649678983.679893][10871:10876] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065073 [1649678983.680002][10871:10876] CHIP:TOO: OnMode: 0 @@ -49,9 +49,9 @@ tests: verification: | ./chip-tool dishwashermodeselect read current-mode 1 1 - On TH(chip-tool), Verify CurrentMode attribute is an integer. save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify CurrentMode attribute is an integer. Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: - NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + NOTE: If on_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. [1649679034.895848][10879:10884] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 [1649679034.895972][10879:10884] CHIP:TOO: CurrentMode: 0 @@ -125,7 +125,7 @@ tests: value: "y" - label: - "TH send a ChangeToMode command to the DUT with NewMode set to + "TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th" verification: | ./chip-tool dishwashermodeselect change-to-mode 2 1 1 @@ -192,7 +192,7 @@ tests: verification: | ./chip-tool dishwashermodeselect read current-mode 1 1 - On TH(chip-tool), Verify that CurrentMode attribute value is an integer and value is equal to on_mode_dut. below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute value is an integer and value is equal to on_mode_dut. Below is the sample log provided for the raspi platform: [1649679202.069163][10899:10904] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 [1649679202.069278][10899:10904] CHIP:TOO: CurrentMode: 0 diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml index 56182e10214f1a..437793b8e81265 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml @@ -8,7 +8,7 @@ # 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: 267.4.2. [TC-DISHM-3.2] OnMode Verification with DUT as Server +name: 193.3.2. [TC-DISHM-3.2] StartUpMode Verification with DUT as Server PICS: - DISHM.S @@ -45,7 +45,7 @@ tests: verification: | ./chip-tool dishwashermodeselect read start-up-mode 1 1 - On TH(chip-tool), Verify StartUpMode attribute value is an integer. save the value as startup_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify StartUpMode attribute value is an integer. Save the value as startup_mode_dut and below is the sample log provided for the raspi platform: [1645777708.406864][4841:4846] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003DataVersion: 3781469721 [1645777708.406933][4841:4846] CHIP:TOO: StartUpMode: 0 @@ -86,7 +86,7 @@ tests: On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. Save the Mode field values as supported_modes_dut. - Select a value from supported_modes_dut different from on_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: + Select a value from supported_modes_dut different from startup_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_4.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml similarity index 79% rename from src/app/tests/suites/certification/Test_TC_DISHM_3_4.yaml rename to src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml index 974cd079750403..87cb95bb32a5f3 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml @@ -8,20 +8,20 @@ # 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: 267.4.3. [TC-DISHM-3.4] OnMode Verification with DUT as Server +name: 193.3.3. [TC-DISHM-3.3] OnMode overwriting StartUpMode with DUT as Server PICS: - DISHM.S config: - nodeId: 0x0059 + nodeId: 0x12344321 cluster: "Dishwasher Mode" endpoint: 1 tests: - label: "Note" verification: | - To Execute the TC-MOD-3.4 test case using reboot in raspi device we followed the below suggested way: + To Execute the TC-DISHM-3.3 test case using reboot in raspi device we followed the below suggested way: To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps @@ -49,7 +49,7 @@ tests: verification: | ./chip-tool dishwashermodeselect read start-up-mode 1 1 - On TH(chip-tool) log, Verify StartUpMode attribute value is an integer. save this value as startup_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool) log, Verify StartUpMode attribute value is an integer. Save this value as startup_mode_dut and below is the sample log provided for the raspi platform: [1651099663211] [82177:7560652] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 2609052118 @@ -68,12 +68,13 @@ tests: verification: | ./chip-tool dishwashermodeselect read on-mode 1 1 - On TH(chip-tool) log, Verify OnMode attribute value is an integer. save the value as old_on_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool) log, Verify OnMode attribute value is an integer. Save the value as old_on_mode_dut and below is the sample log provided for the raspi platform: + NOTE: If startup_mode_dut is equal to old_on_mode_dut proceed to step 4. Else proceed to step 6. [1654780979.979743][61542:61547] CHIP:DMG: } [1654780979.980040][61542:61547] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 235764160 - [1654780979.980202][61542:61547] CHIP:TOO: OnMode: 4 + [1654780979.980202][61542:61547] CHIP:TOO: OnMode: 1 cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -90,7 +91,7 @@ tests: On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. Save the Mode field values as supported_modes_dut. - Select a value from supported_modes_dut different from on_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: + Select a value from supported_modes_dut different from startup_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries @@ -143,36 +144,36 @@ tests: - name: "expectedValue" value: "y" - - label: "TH reads from the OnMode attribute from DUT" + - label: "TH writes to the DUT the OnMode attribute with the new_mode_th value" verification: | - ./chip-tool dishwashermodeselect write on-mode 7 1 1 + ./chip-tool dishwashermodeselect write on-mode 2 1 1 - On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + On TH(chip-tool) log, verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - [1651099941884] [84269:7567211] CHIP: [DMG] WriteResponseMessage = - [1651099941884] [84269:7567211] CHIP: [DMG] { - [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIBs = - [1651099941884] [84269:7567211] CHIP: [DMG] [ - [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIB = - [1651099941884] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] AttributePathIB = - [1651099941887] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] Endpoint = 0x1, - [1651099941887] [84269:7567211] CHIP: [DMG] Cluster = 0x50, - [1651099941887] [84269:7567211] CHIP: [DMG] Attribute = 0x0000_0005, - [1651099941887] [84269:7567211] CHIP: [DMG] } - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] StatusIB = - [1651099941887] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651099941887] [84269:7567211] CHIP: [DMG] }, - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] }, - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] ], - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] InteractionModelRevision = 1 - [1651099941887] [84269:7567211] CHIP: [DMG] } + [1651101661959] [90832:7598169] CHIP: [DMG] WriteResponseMessage = + [1651101661959] [90832:7598169] CHIP: [DMG] { + [1651101661959] [90832:7598169] CHIP: [DMG] AttributeStatusIBs = + [1651101661959] [90832:7598169] CHIP: [DMG] [ + [1651101661959] [90832:7598169] CHIP: [DMG] AttributeStatusIB = + [1651101661959] [90832:7598169] CHIP: [DMG] { + [1651101661960] [90832:7598169] CHIP: [DMG] AttributePathIB = + [1651101661960] [90832:7598169] CHIP: [DMG] { + [1651101661960] [90832:7598169] CHIP: [DMG] Endpoint = 0x1, + [1651101661960] [90832:7598169] CHIP: [DMG] Cluster = 0x6, + [1651101661960] [90832:7598169] CHIP: [DMG] Attribute = 0x0000_4003, + [1651101661960] [90832:7598169] CHIP: [DMG] } + [1651101661960] [90832:7598169] CHIP: [DMG] + [1651101661960] [90832:7598169] CHIP: [DMG] StatusIB = + [1651101661960] [90832:7598169] CHIP: [DMG] { + [1651101661960] [90832:7598169] CHIP: [DMG] status = 0x00 (SUCCESS), + [1651101661960] [90832:7598169] CHIP: [DMG] }, + [1651101661960] [90832:7598169] CHIP: [DMG] + [1651101661960] [90832:7598169] CHIP: [DMG] }, + [1651101661960] [90832:7598169] CHIP: [DMG] + [1651101661960] [90832:7598169] CHIP: [DMG] ], + [1651101661960] [90832:7598169] CHIP: [DMG] + [1651101661960] [90832:7598169] CHIP: [DMG] InteractionModelRevision = 1 + [1651101661960] [90832:7598169] CHIP: [DMG] } cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -187,10 +188,10 @@ tests: verification: | ./chip-tool dishwashermodeselect read on-mode 1 1 - On TH(chip-tool) log, Verify OnMode attribute value is an integer. save the value as new_on_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool) log, Verify OnMode attribute value is an integer and that it is equal to new_mode_th. Save the value as new_on_mode_dut and below is the sample log provided for the raspi platform: [1669190858.739158][4187:4189] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4107771634 - [1669190858.739222][4187:4189] CHIP:TOO: OnMode: 7 + [1669190858.739222][4187:4189] CHIP:TOO: OnMode: 2 cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -201,7 +202,7 @@ tests: - name: "expectedValue" value: "y" - - label: "TH writes to the OnMode attribute from DUT" + - label: "TH writes to the DUT the StartUpOnOff attribute with the value 1." verification: | ./chip-tool onoff write start-up-on-off 1 1 1 @@ -258,10 +259,10 @@ tests: verification: | ./chip-tool dishwashermodeselect read current-mode 1 1 - On TH(chip-tool), Verify CurrentMode attribute value is same as the value recorded in step 3 and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify CurrentMode attribute value is an integer and that it is equal to new_on_mode_th. Below is the sample log provided for the raspi platform: [1669190936.869804][4194:4196] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3908583538 - [1669190936.869875][4194:4196] CHIP:TOO: CurrentMode: 7 + [1669190936.869875][4194:4196] CHIP:TOO: CurrentMode: 2 cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT From 826a96217c0056a3a8fa61fd3def114161ab4aba Mon Sep 17 00:00:00 2001 From: abpoth Date: Fri, 14 Jul 2023 13:51:45 -0400 Subject: [PATCH 09/46] resolving https://github.com/project-chip/connectedhomeip/pull/27946#discussion_r1263091462 --- src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml index 3194d8459af35f..0ca7b03b639fe3 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml @@ -13,7 +13,7 @@ # 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: 267.1.1. [TC-DISHM-1.1] Global Attributes [DUT-Server] +name: 193.1.1. [TC-DISHM-1.1] Global Attributes with DUT as Server PICS: - DISHM.S @@ -81,8 +81,8 @@ tests: contains: [2] - label: - "TH reads optional attribute (DISHM.S.F00(DEPONOFF)) in AttributeList" - PICS: DISHM.S.F00 + "TH reads optional attribute (DISHM.S.A0003(OnMode)) in AttributeList" + PICS: DISHM.S.A0003 command: "readAttribute" attribute: "AttributeList" response: From d2dc41d1bd8a0b0217d875a302ae46a490901658 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Fri, 14 Jul 2023 17:52:33 +0000 Subject: [PATCH 10/46] Restyled by whitespace --- .../certification/Test_TC_DISHM_2_1.yaml | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml index fa7ac44c77fa22..43dcc7241f6982 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml @@ -96,12 +96,12 @@ tests: verification: | ./chip-tool dishwashermodeselect read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - - Save the value as old_current_mode_dut + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value + - Save the value as old_current_mode_dut - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, below is the sample log provided for the raspi platform: - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, + [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 [1685018283.726589][16418:16420] CHIP:DMG: } [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 @@ -156,11 +156,11 @@ tests: verification: | ./chip-tool dishwashermodeselect read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform: - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, + [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 [1685018283.726589][16418:16420] CHIP:DMG: } [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 @@ -203,11 +203,11 @@ tests: verification: | ./chip-tool dishwashermodeselect read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform: - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, + [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 [1685018283.726589][16418:16420] CHIP:DMG: } [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 @@ -238,11 +238,11 @@ tests: verification: | ./chip-tool dishwashermodeselect read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform: - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, + [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 [1685018283.726589][16418:16420] CHIP:DMG: } [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 @@ -289,7 +289,7 @@ tests: below is the sample log provided for the raspi platform: - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, + [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 [1685018283.726589][16418:16420] CHIP:DMG: } [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 @@ -336,7 +336,7 @@ tests: below is the sample log provided for the raspi platform: - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, + [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 [1685018283.726589][16418:16420] CHIP:DMG: } [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 @@ -349,4 +349,4 @@ tests: - name: "message" value: "Please enter 'y' for success" - name: "expectedValue" - value: "y" \ No newline at end of file + value: "y" From cc39aae68521616dc8aae8a621a6b8829793b3e0 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Fri, 14 Jul 2023 17:52:57 +0000 Subject: [PATCH 11/46] Restyled by prettier-yaml --- .../certification/Test_TC_DISHM_1_1.yaml | 1 - .../certification/Test_TC_DISHM_2_1.yaml | 212 +++++++++--------- .../certification/Test_TC_DISHM_3_3.yaml | 3 +- 3 files changed, 108 insertions(+), 108 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml index 0ca7b03b639fe3..e9c876b081d6b3 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml @@ -59,7 +59,6 @@ tests: constraints: type: bitmap32 - - label: "TH reads AttributeList from DUT" PICS: DISHM.S.Afffb command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml index 43dcc7241f6982..cc24ee5734e8b3 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml @@ -13,9 +13,7 @@ # 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: - 193.2.1. [TC-DISHM-2.1] ChangeToMode Verification with DUT as - Server +name: 193.2.1. [TC-DISHM-2.1] ChangeToMode Verification with DUT as Server PICS: - DISHM.S @@ -36,52 +34,52 @@ tests: - label: "TH reads the SupportedModes attribute from DUT" verification: | - ./chip-tool dishwashermodeselect read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute should contains two or more ModeOptionsStruct entries and - Save the Mode field values as supported_modes_dut, below is the sample log provided for the raspi platform: - - [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 - [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries - [1687687925.444452][18054:18056] CHIP:TOO: [1]: { - [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal - [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 - [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries - [1687687925.444575][18054:18056] CHIP:TOO: [1]: { - [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 - [1687687925.444654][18054:18056] CHIP:TOO: } - [1687687925.444674][18054:18056] CHIP:TOO: } - [1687687925.444702][18054:18056] CHIP:TOO: [2]: { - [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy - [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 - [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries - [1687687925.444787][18054:18056] CHIP:TOO: [1]: { - [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 - [1687687925.444847][18054:18056] CHIP:TOO: } - [1687687925.444869][18054:18056] CHIP:TOO: [2]: { - [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 - [1687687925.444971][18054:18056] CHIP:TOO: } - [1687687925.444991][18054:18056] CHIP:TOO: } - [1687687925.445016][18054:18056] CHIP:TOO: [3]: { - [1687687925.445036][18054:18056] CHIP:TOO: Label: Light - [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 - [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries - [1687687925.445133][18054:18056] CHIP:TOO: [1]: { - [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 - [1687687925.445194][18054:18056] CHIP:TOO: } - [1687687925.445216][18054:18056] CHIP:TOO: [2]: { - [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 - [1687687925.445275][18054:18056] CHIP:TOO: } - [1687687925.445297][18054:18056] CHIP:TOO: [3]: { - [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 - [1687687925.445385][18054:18056] CHIP:TOO: } - [1687687925.445405][18054:18056] CHIP:TOO: } + ./chip-tool dishwashermodeselect read supported-modes 1 1 + + On TH(chip-tool) log, Verify SupportedModes attribute should contains two or more ModeOptionsStruct entries and + Save the Mode field values as supported_modes_dut, below is the sample log provided for the raspi platform: + + [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 + [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries + [1687687925.444452][18054:18056] CHIP:TOO: [1]: { + [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal + [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 + [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries + [1687687925.444575][18054:18056] CHIP:TOO: [1]: { + [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 + [1687687925.444654][18054:18056] CHIP:TOO: } + [1687687925.444674][18054:18056] CHIP:TOO: } + [1687687925.444702][18054:18056] CHIP:TOO: [2]: { + [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy + [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 + [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries + [1687687925.444787][18054:18056] CHIP:TOO: [1]: { + [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 + [1687687925.444847][18054:18056] CHIP:TOO: } + [1687687925.444869][18054:18056] CHIP:TOO: [2]: { + [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 + [1687687925.444971][18054:18056] CHIP:TOO: } + [1687687925.444991][18054:18056] CHIP:TOO: } + [1687687925.445016][18054:18056] CHIP:TOO: [3]: { + [1687687925.445036][18054:18056] CHIP:TOO: Label: Light + [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 + [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries + [1687687925.445133][18054:18056] CHIP:TOO: [1]: { + [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 + [1687687925.445194][18054:18056] CHIP:TOO: } + [1687687925.445216][18054:18056] CHIP:TOO: [2]: { + [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 + [1687687925.445275][18054:18056] CHIP:TOO: } + [1687687925.445297][18054:18056] CHIP:TOO: [3]: { + [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 + [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 + [1687687925.445385][18054:18056] CHIP:TOO: } + [1687687925.445405][18054:18056] CHIP:TOO: } cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -94,18 +92,18 @@ tests: - label: "TH reads the CurrentMode attribute from the DUT" verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - - Save the value as old_current_mode_dut - - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, - below is the sample log provided for the raspi platform: - - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 + ./chip-tool dishwashermodeselect read current-mode 1 1 + + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value + - Save the value as old_current_mode_dut + - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, + below is the sample log provided for the raspi platform: + + [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, + [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 + [1685018283.726589][16418:16420] CHIP:DMG: } + [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 + [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -141,7 +139,8 @@ tests: value: "y" - label: - "Manually put the device in a state from which it will FAIL to transition to PIXIT.DISHM.MODE_CHANGE_FAIL" + "Manually put the device in a state from which it will FAIL to + transition to PIXIT.DISHM.MODE_CHANGE_FAIL" cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -154,17 +153,17 @@ tests: - label: "TH reads the CurrentMode attribute from the DUT" verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermodeselect read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - - Save the value as old_current_mode_dut, - below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value + - Save the value as old_current_mode_dut, + below is the sample log provided for the raspi platform: - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 2 + [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, + [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 + [1685018283.726589][16418:16420] CHIP:DMG: } + [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 + [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 2 cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -201,17 +200,17 @@ tests: - label: "TH reads the CurrentMode attribute from the DUT" verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermodeselect read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - - Save the value as old_current_mode_dut, - below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value + - Save the value as old_current_mode_dut, + below is the sample log provided for the raspi platform: - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 2 + [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, + [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 + [1685018283.726589][16418:16420] CHIP:DMG: } + [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 + [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 2 cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -223,7 +222,8 @@ tests: value: "y" - label: - "Manually put the device in a state from which it will SUCCESSFULLY transition to PIXIT.DISHM.MODE_CHANGE_OK" + "Manually put the device in a state from which it will SUCCESSFULLY + transition to PIXIT.DISHM.MODE_CHANGE_OK" cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -236,17 +236,17 @@ tests: - label: "TH reads the CurrentMode attribute from the DUT" verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermodeselect read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - - Save the value as old_current_mode_dut, - below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value + - Save the value as old_current_mode_dut, + below is the sample log provided for the raspi platform: - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 1 + [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, + [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 + [1685018283.726589][16418:16420] CHIP:DMG: } + [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 + [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 1 cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -283,17 +283,17 @@ tests: - label: "TH reads the CurrentMode attribute from the DUT" verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermodeselect read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value equal to PIXIT.DISHM.MODE_CHANGE_OK + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value equal to PIXIT.DISHM.MODE_CHANGE_OK - below is the sample log provided for the raspi platform: + below is the sample log provided for the raspi platform: - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 2 + [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, + [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 + [1685018283.726589][16418:16420] CHIP:DMG: } + [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 + [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 2 cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -330,17 +330,17 @@ tests: - label: "TH reads the CurrentMode attribute from the DUT" verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermodeselect read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value equal to PIXIT.DISHM.MODE_CHANGE_OK + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value equal to PIXIT.DISHM.MODE_CHANGE_OK - below is the sample log provided for the raspi platform: + below is the sample log provided for the raspi platform: - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 2 + [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, + [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 + [1685018283.726589][16418:16420] CHIP:DMG: } + [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 + [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 2 cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml index 87cb95bb32a5f3..9c1472d44d4f2c 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml @@ -144,7 +144,8 @@ tests: - name: "expectedValue" value: "y" - - label: "TH writes to the DUT the OnMode attribute with the new_mode_th value" + - label: + "TH writes to the DUT the OnMode attribute with the new_mode_th value" verification: | ./chip-tool dishwashermodeselect write on-mode 2 1 1 From 1fb12d2eb5d1ae086b1935df10e46200be7fa5ce Mon Sep 17 00:00:00 2001 From: abpoth Date: Fri, 14 Jul 2023 13:58:46 -0400 Subject: [PATCH 12/46] updated PICs file for OnMode Attribute in TC-DISHM-1.1 --- src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml index e9c876b081d6b3..847a59ba1cdf47 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml @@ -81,7 +81,7 @@ tests: - label: "TH reads optional attribute (DISHM.S.A0003(OnMode)) in AttributeList" - PICS: DISHM.S.A0003 + PICS: DISHM.S.F00 command: "readAttribute" attribute: "AttributeList" response: From bf570bd5c6c3c0cd91469ddbbfef761ae4b0ef24 Mon Sep 17 00:00:00 2001 From: abpoth Date: Fri, 14 Jul 2023 14:31:22 -0400 Subject: [PATCH 13/46] updated changes to src/app/tests/suites/ciTests.json --- src/app/tests/suites/ciTests.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index 71a6406bfa2c2b..9edee54063ae75 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -56,6 +56,14 @@ "Test_TC_DGETH_2_2" ], "DiagnosticsLogs": ["Test_TC_DLOG_1_1"], + "DishwasherModeSelect": [ + "Test_TC_DISHM_1_1", + "Test_TC_DISHM_1_2", + "Test_TC_DISHM_2_1", + "Test_TC_DISHM_3_1", + "Test_TC_DISHM_3_2", + "Test_TC_DISHM_3_3" + ], "FlowMeasurement": ["Test_TC_FLW_1_1", "Test_TC_FLW_2_1"], "FixedLabel": ["Test_TC_FLABEL_1_1", "Test_TC_FLABEL_2_1"], "FanControl": [ @@ -351,6 +359,7 @@ "DeviceManagement", "Descriptor", "DiagnosticsLogs", + "DishwasherModeSelect", "EthernetNetworkDiagnostics", "FlowMeasurement", "FixedLabel", From cea284db9128f82bf775f52cf374e9c749a0ee02 Mon Sep 17 00:00:00 2001 From: abpoth Date: Mon, 17 Jul 2023 15:34:08 -0400 Subject: [PATCH 14/46] ran regen zap and disabled tests in darwin --- .../darwin-framework-tool/templates/tests/ciTests.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/darwin-framework-tool/templates/tests/ciTests.json b/examples/darwin-framework-tool/templates/tests/ciTests.json index f20fb1683d75ea..25ab9780d040bb 100644 --- a/examples/darwin-framework-tool/templates/tests/ciTests.json +++ b/examples/darwin-framework-tool/templates/tests/ciTests.json @@ -115,7 +115,15 @@ "Disabled due to HEPAFilterMonitoring not being enabled in Matter.framework for now:", "Test_TC_HEPAFREMON_1_1", "Test_TC_HEPAFREMON_2_1", + "Disabled due to DishWasherModeSelect verification being enabled in MAtter.framework for now:", + "Test_TC_DISHM_1_1", + "Test_TC_DISHM_1_2", + "Test_TC_DISHM_2_1", + "Test_TC_DISHM_3_1", + "Test_TC_DISHM_3_2", + "Test_TC_DISHM_3_3", "Disabled due to Events verification not supported", "Test_TC_BINFO_2_2" + ] } From e6d437225622f528623d3fa6f2760a3893fa5e5d Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 18 Jul 2023 13:49:13 +0000 Subject: [PATCH 15/46] Restyled by prettier-json --- examples/darwin-framework-tool/templates/tests/ciTests.json | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/darwin-framework-tool/templates/tests/ciTests.json b/examples/darwin-framework-tool/templates/tests/ciTests.json index 25ab9780d040bb..98c4b270d9bf8a 100644 --- a/examples/darwin-framework-tool/templates/tests/ciTests.json +++ b/examples/darwin-framework-tool/templates/tests/ciTests.json @@ -124,6 +124,5 @@ "Test_TC_DISHM_3_3", "Disabled due to Events verification not supported", "Test_TC_BINFO_2_2" - ] } From d5ea9b00b0295ad7d1fb779d0a0c09303e8f7b90 Mon Sep 17 00:00:00 2001 From: abpoth Date: Tue, 18 Jul 2023 15:11:08 -0400 Subject: [PATCH 16/46] updated dishwasher mode test scripts --- src/app/tests/suites/certification/PICS.yaml | 33 +++++++++++++++++++ .../certification/Test_TC_DISHM_1_1.yaml | 1 - .../certification/Test_TC_DISHM_1_2.yaml | 8 ++--- .../certification/Test_TC_DISHM_2_1.yaml | 22 ++++++------- .../certification/Test_TC_DISHM_3_1.yaml | 10 +++--- .../certification/Test_TC_DISHM_3_2.yaml | 10 +++--- .../certification/Test_TC_DISHM_3_3.yaml | 14 ++++---- .../tests/suites/certification/ci-pics-values | 20 ++++++++++- src/app/tests/suites/ciTests.json | 4 +-- 9 files changed, 86 insertions(+), 36 deletions(-) diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index 82d7d55a1ff0ea..bcf20b5adae686 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -9536,3 +9536,36 @@ PICS: - label: "Does the device implement sending the ChangeToModeResponse command?" id: RVCCLEANMS.S.C03.Tx + +## Dishwasher Mode control + + # Features + - label: "Does the device support depending on an On/Off cluster implemented on the same endpoint?" + id: DISHM.S.F00 + + # + # Server Attributes + # + - label: "Does the device implement the SupportedModes attribute?" + id: DISHM.S.A0000 + + - label: "Does the device implement the CurrentMode attribute?" + id: DISHM.S.A0001 + + - label: "Does the device implement the StartUpMode attribute?" + id: DISHM.S.A0002 + + - label: "Does the device implement the OnMode attribute?" + id: DISHM.S.A0003 + + # + #Server commands received + # + - label: "Does the device implement receiving the ChangeToMode command?" + id: DISHM.S.C00.Rsp + + # + #Server commands generated + # + - label: "Does the device implement sending the ChangeToModeResponse command?" + id: DISHM.S.C01.Tx \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml index 847a59ba1cdf47..8db9559e33d726 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml @@ -60,7 +60,6 @@ tests: type: bitmap32 - label: "TH reads AttributeList from DUT" - PICS: DISHM.S.Afffb command: "readAttribute" attribute: "AttributeList" response: diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml index f5b305a7cf40af..ea958c782557ca 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml @@ -34,7 +34,7 @@ tests: - label: "TH reads the SupportedModes attribute from DUT" verification: | - ./chip-tool dishwashermodeselect read supported-modes 1 1 + ./chip-tool dishwashermode read supported-modes 1 1 On TH(chip-tool) log, Verify SupportedModes attribute should contains atleast one ModeOptionsStruct entries with unique mode field value and label field value below is the sample log provided for the raspi platform: @@ -91,7 +91,7 @@ tests: - label: "TH reads the CurrentMode attribute from the DUT" verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut, below is the sample log provided for the raspi platform: @@ -110,7 +110,7 @@ tests: - label: "TH reads the OnMode attribute from the DUT" verification: | - ./chip-tool dishwashermodeselect read on-mode 1 1 + ./chip-tool dishwashermode read on-mode 1 1 Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut (As per spec default value is null) , below is the sample log provided for the raspi platform: @@ -130,7 +130,7 @@ tests: - label: "TH reads the StartUpMode attribute from the DUT" verification: | - ./chip-tool dishwashermodeselect read start-up-mode 1 1 + ./chip-tool dishwashermode read start-up-mode 1 1 Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer and value is from supported_modes_dut, below is the sample log provided for the raspi platform: diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml index cc24ee5734e8b3..0bc90a5e4ec895 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml @@ -34,7 +34,7 @@ tests: - label: "TH reads the SupportedModes attribute from DUT" verification: | - ./chip-tool dishwashermodeselect read supported-modes 1 1 + ./chip-tool dishwashermode read supported-modes 1 1 On TH(chip-tool) log, Verify SupportedModes attribute should contains two or more ModeOptionsStruct entries and Save the Mode field values as supported_modes_dut, below is the sample log provided for the raspi platform: @@ -92,7 +92,7 @@ tests: - label: "TH reads the CurrentMode attribute from the DUT" verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - Save the value as old_current_mode_dut @@ -118,7 +118,7 @@ tests: "TH sends a ChangeToMode command to the DUT with NewMode set to old_current_mode_dut" verification: | - ./chip-tool dishwashermodeselect change-to-mode 1 1 1 + ./chip-tool dishwashermode change-to-mode 1 1 1 On TH(chip-tool) log, verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: @@ -153,7 +153,7 @@ tests: - label: "TH reads the CurrentMode attribute from the DUT" verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - Save the value as old_current_mode_dut, @@ -178,7 +178,7 @@ tests: "TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.DISHM.MODE_CHANGE_FAIL" verification: | - ./chip-tool dishwashermodeselect change-to-mode 2 1 1 + ./chip-tool dishwashermode change-to-mode 2 1 1 On TH(chip-tool) log, verify DUT responds with a GenericFailure (value 0x02) or MfgCodes (0x80 to 0xBF range) status response and below is the sample log provided for the raspi platform: @@ -200,7 +200,7 @@ tests: - label: "TH reads the CurrentMode attribute from the DUT" verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - Save the value as old_current_mode_dut, @@ -236,7 +236,7 @@ tests: - label: "TH reads the CurrentMode attribute from the DUT" verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - Save the value as old_current_mode_dut, @@ -261,7 +261,7 @@ tests: "TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.DISHM.MODE_CHANGE_OK" verification: | - ./chip-tool dishwashermodeselect change-to-mode 2 1 1 + ./chip-tool dishwashermode change-to-mode 2 1 1 On TH(chip-tool) log, verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: @@ -283,7 +283,7 @@ tests: - label: "TH reads the CurrentMode attribute from the DUT" verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value equal to PIXIT.DISHM.MODE_CHANGE_OK @@ -308,7 +308,7 @@ tests: "TH sends a ChangeToMode command to the DUT with NewMode set to invalid_mode_th" verification: | - ./chip-tool dishwashermodeselect change-to-mode 10 1 1 + ./chip-tool dishwashermode change-to-mode 10 1 1 On TH(chip-tool) log, verify DUT responds with a UnsupportedMode (value 0x01) status response and below is the sample log provided for the raspi platform: @@ -330,7 +330,7 @@ tests: - label: "TH reads the CurrentMode attribute from the DUT" verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value equal to PIXIT.DISHM.MODE_CHANGE_OK diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml index b5bc1b391880cf..2714273d026c84 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml @@ -29,7 +29,7 @@ tests: - label: "TH reads from the OnMode attribute from DUT" verification: | - ./chip-tool dishwashermodeselect read on-mode 1 1 + ./chip-tool dishwashermode read on-mode 1 1 On TH(chip-tool), Verify OnMode attribute value is an integer. Save the value as on_mode_dut and below is the sample log provided for the raspi platform: @@ -47,7 +47,7 @@ tests: - label: "TH reads the CurrentMode attribute from the DUT" verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 On TH(chip-tool), Verify CurrentMode attribute is an integer. Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: @@ -67,7 +67,7 @@ tests: - label: "TH reads the SupportedModes attribute from DUT" verification: | - ./chip-tool dishwashermodeselect read supported-modes 1 1 + ./chip-tool dishwashermode read supported-modes 1 1 On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. Save the Mode field values as supported_modes_dut. @@ -128,7 +128,7 @@ tests: "TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th" verification: | - ./chip-tool dishwashermodeselect change-to-mode 2 1 1 + ./chip-tool dishwashermode change-to-mode 2 1 1 On TH(chip-tool) log, verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: @@ -190,7 +190,7 @@ tests: - label: "TH reads the CurrentMode attribute from the DUT" verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 On TH(chip-tool), Verify that CurrentMode attribute value is an integer and value is equal to on_mode_dut. Below is the sample log provided for the raspi platform: diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml index 437793b8e81265..346abd250d96eb 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml @@ -43,7 +43,7 @@ tests: - label: "TH reads from the StartUpMode attribute from DUT" verification: | - ./chip-tool dishwashermodeselect read start-up-mode 1 1 + ./chip-tool dishwashermode read start-up-mode 1 1 On TH(chip-tool), Verify StartUpMode attribute value is an integer. Save the value as startup_mode_dut and below is the sample log provided for the raspi platform: @@ -61,7 +61,7 @@ tests: - label: "TH reads the CurrentMode attribute from the DUT" verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 On TH(chip-tool), Verify CurrentMode attribute value is an integer, save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: @@ -82,7 +82,7 @@ tests: - label: "TH reads the SupportedModes attribute from DUT" verification: | - ./chip-tool dishwashermodeselect read supported-modes 1 1 + ./chip-tool dishwashermode read supported-modes 1 1 On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. Save the Mode field values as supported_modes_dut. @@ -143,7 +143,7 @@ tests: "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th" verification: | - ./chip-tool dishwashermodeselect change-to-mode 2 1 1 + ./chip-tool dishwashermode change-to-mode 2 1 1 On TH(chip-tool) , Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: @@ -177,7 +177,7 @@ tests: - label: "TH reads the CurrentMode attribute from the DUT" verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 on TH(chip-tool), Verify that CurrentMode attribute value is same as value recorded in step 1 and below is the sample log provided for the raspi platform: diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml index 9c1472d44d4f2c..5df4e0d136170d 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml @@ -34,7 +34,7 @@ tests: To execute this test case set onmode to any integer value because as default it value has null. - ./chip-tool dishwashermodeselect write on-mode 4 1 1 + ./chip-tool dishwashermode write on-mode 4 1 1 disabled: true - label: "Wait for the commissioned device to be retrieved" @@ -47,7 +47,7 @@ tests: - label: "TH reads from the StartUpMode attribute from DUT" verification: | - ./chip-tool dishwashermodeselect read start-up-mode 1 1 + ./chip-tool dishwashermode read start-up-mode 1 1 On TH(chip-tool) log, Verify StartUpMode attribute value is an integer. Save this value as startup_mode_dut and below is the sample log provided for the raspi platform: @@ -66,7 +66,7 @@ tests: - label: "TH reads from the OnMode attribute from DUT" verification: | - ./chip-tool dishwashermodeselect read on-mode 1 1 + ./chip-tool dishwashermode read on-mode 1 1 On TH(chip-tool) log, Verify OnMode attribute value is an integer. Save the value as old_on_mode_dut and below is the sample log provided for the raspi platform: @@ -87,7 +87,7 @@ tests: - label: "TH reads the SupportedModes attribute from DUT" verification: | - ./chip-tool dishwashermodeselect read supported-modes 1 1 + ./chip-tool dishwashermode read supported-modes 1 1 On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. Save the Mode field values as supported_modes_dut. @@ -147,7 +147,7 @@ tests: - label: "TH writes to the DUT the OnMode attribute with the new_mode_th value" verification: | - ./chip-tool dishwashermodeselect write on-mode 2 1 1 + ./chip-tool dishwashermode write on-mode 2 1 1 On TH(chip-tool) log, verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: @@ -187,7 +187,7 @@ tests: - label: "TH reads from the OnMode attribute from DUT" verification: | - ./chip-tool dishwashermodeselect read on-mode 1 1 + ./chip-tool dishwashermode read on-mode 1 1 On TH(chip-tool) log, Verify OnMode attribute value is an integer and that it is equal to new_mode_th. Save the value as new_on_mode_dut and below is the sample log provided for the raspi platform: @@ -258,7 +258,7 @@ tests: - label: "TH reads the CurrentMode attribute from the DUT" verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 + ./chip-tool dishwashermode read current-mode 1 1 On TH(chip-tool), Verify CurrentMode attribute value is an integer and that it is equal to new_on_mode_th. Below is the sample log provided for the raspi platform: diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index 0264ad8fe3be8d..c2bc726f658593 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -2637,4 +2637,22 @@ RVCCLEANMS.S.A0005=1 #Commands: RVCCLEANMS.S.C00.Rsp=1 RVCCLEANMS.S.C01.Rsp=1 -RVCCLEANMS.S.C03.Tx=1 \ No newline at end of file +RVCCLEANMS.S.C03.Tx=1 + +# Dishwasher Mode Cluster +DISHM.S=1 + +#Server Features +DISHM.S.F00=1 + +#Server Attributes +DISHM.S.A0000=1 +DISHM.S.A0001=1 +DISHM.S.A0002=1 +DISHM.S.A0003=1 + +#Server Commands Received: +DISHM.S.C00.Rsp=1 + +#Server Commands Generated: +DISHM.S.C01.Tx=1 \ No newline at end of file diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index c0104c9ca94aa2..bd4cf974041eac 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -55,7 +55,7 @@ "Test_TC_DGETH_2_2" ], "DiagnosticsLogs": ["Test_TC_DLOG_1_1"], - "DishwasherModeSelect": [ + "DishwasherMode": [ "Test_TC_DISHM_1_1", "Test_TC_DISHM_1_2", "Test_TC_DISHM_2_1", @@ -356,7 +356,7 @@ "DeviceManagement", "Descriptor", "DiagnosticsLogs", - "DishwasherModeSelect", + "DishwasherMode", "EthernetNetworkDiagnostics", "FlowMeasurement", "FixedLabel", From e970d0336cebfb2ac8827a6e30726df2a585786e Mon Sep 17 00:00:00 2001 From: abpoth Date: Tue, 18 Jul 2023 15:40:35 -0400 Subject: [PATCH 17/46] chip-tool rebuild with updated dishwasher mode tests --- .gitmodules | 4 --- .../data_model/controller-clusters.zap | 26 +++++++++---------- third_party/mbed-mcu-boot/repo | 1 - third_party/mbedtls/repo | 1 + third_party/openthread/repo | 1 + 5 files changed, 15 insertions(+), 18 deletions(-) delete mode 160000 third_party/mbed-mcu-boot/repo create mode 160000 third_party/mbedtls/repo create mode 160000 third_party/openthread/repo diff --git a/.gitmodules b/.gitmodules index d3145165b84b0b..f9b2635a7aab19 100644 --- a/.gitmodules +++ b/.gitmodules @@ -204,10 +204,6 @@ path = third_party/infineon/psoc6/psoc6_sdk/libs/anycloud-ota url = https://github.com/Infineon/anycloud-ota platforms = infineon -[submodule "third_party/mbed-mcu-boot/repo"] - path = third_party/mbed-mcu-boot/repo - url = https://github.com/ATmobica/mcuboot.git - platforms = mbed [submodule "p6/serial-flash"] path = third_party/infineon/psoc6/psoc6_sdk/libs/serial-flash url = https://github.com/Infineon/serial-flash diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 229e8cdbe0e8af..a149ff0b153580 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -8251,7 +8251,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3", @@ -8267,7 +8267,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11272,7 +11272,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "NumberOfRinsesEnum", "included": 0, "storageOption": "RAM", "singleton": 0, @@ -11284,13 +11284,13 @@ "reportableChange": 0 }, { - "name": "MaxRinses", + "name": "SupportedRinses", "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13320,7 +13320,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13336,7 +13336,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13366,7 +13366,7 @@ "code": 4, "mfgCode": null, "side": "server", - "type": "OperationalStateStruct", + "type": "OperationalStateEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -13608,7 +13608,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13624,7 +13624,7 @@ "side": "server", "type": "elapsed_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13654,7 +13654,7 @@ "code": 4, "mfgCode": null, "side": "server", - "type": "OperationalStateStruct", + "type": "enum8", "included": 1, "storageOption": "External", "singleton": 0, @@ -39310,4 +39310,4 @@ } ], "log": [] -} +} \ No newline at end of file diff --git a/third_party/mbed-mcu-boot/repo b/third_party/mbed-mcu-boot/repo deleted file mode 160000 index 46070d75e06058..00000000000000 --- a/third_party/mbed-mcu-boot/repo +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 46070d75e06058a2e6a525d8be71b9b872178514 diff --git a/third_party/mbedtls/repo b/third_party/mbedtls/repo new file mode 160000 index 00000000000000..8eaf2d2ac93c43 --- /dev/null +++ b/third_party/mbedtls/repo @@ -0,0 +1 @@ +Subproject commit 8eaf2d2ac93c432399a7c580496a45ad16519a17 diff --git a/third_party/openthread/repo b/third_party/openthread/repo new file mode 160000 index 00000000000000..9b99fbfd092380 --- /dev/null +++ b/third_party/openthread/repo @@ -0,0 +1 @@ +Subproject commit 9b99fbfd092380b0b8760bcb4863ea7c5f46e476 From 105c4ce47ea2fca08c9f53dca630827968159c2b Mon Sep 17 00:00:00 2001 From: abpoth Date: Tue, 18 Jul 2023 16:02:53 -0400 Subject: [PATCH 18/46] resync submodules --- .gitmodules | 8 ++++++++ third_party/mbed-mcu-boot/repo | 1 + 2 files changed, 9 insertions(+) create mode 160000 third_party/mbed-mcu-boot/repo diff --git a/.gitmodules b/.gitmodules index f9b2635a7aab19..d39bbf868f0b16 100644 --- a/.gitmodules +++ b/.gitmodules @@ -14,6 +14,10 @@ path = third_party/nlunit-test/repo url = https://github.com/nestlabs/nlunit-test.git branch = master +[submodule "mbedtls"] + path = third_party/mbedtls/repo + url = https://github.com/ARMmbed/mbedtls.git + branch = mbedtls-2.28 [submodule "qrcode"] path = examples/common/QRCode/repo url = https://github.com/nayuki/QR-Code-generator.git @@ -27,6 +31,10 @@ path = third_party/pigweed/repo url = https://github.com/google/pigweed.git branch = main +[submodule "openthread"] + path = third_party/openthread/repo + url = https://github.com/openthread/openthread.git + branch = main [submodule "ot-br-posix"] path = third_party/ot-br-posix/repo url = https://github.com/openthread/ot-br-posix.git diff --git a/third_party/mbed-mcu-boot/repo b/third_party/mbed-mcu-boot/repo new file mode 160000 index 00000000000000..46070d75e06058 --- /dev/null +++ b/third_party/mbed-mcu-boot/repo @@ -0,0 +1 @@ +Subproject commit 46070d75e06058a2e6a525d8be71b9b872178514 From 8f223592c03889e67e7af4d101b3d8bd8dbb7acc Mon Sep 17 00:00:00 2001 From: abpoth Date: Tue, 18 Jul 2023 16:07:13 -0400 Subject: [PATCH 19/46] resync submodules --- .gitmodules | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitmodules b/.gitmodules index d39bbf868f0b16..fac9c7aa1afe47 100644 --- a/.gitmodules +++ b/.gitmodules @@ -212,6 +212,10 @@ path = third_party/infineon/psoc6/psoc6_sdk/libs/anycloud-ota url = https://github.com/Infineon/anycloud-ota platforms = infineon +[submodule "third_party/mbed-mcu-boot/repo"] + path = third_party/mbed-mcu-boot/repo + url = https://github.com/ATmobica/mcuboot.git + platforms = mbed [submodule "p6/serial-flash"] path = third_party/infineon/psoc6/psoc6_sdk/libs/serial-flash url = https://github.com/Infineon/serial-flash From 268a3dedd19a8f821427676dbca49c10180fc483 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Wed, 19 Jul 2023 14:41:53 +0000 Subject: [PATCH 20/46] Restyled by prettier-yaml --- src/app/tests/suites/certification/PICS.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index 616132ef4273fd..6d2e59ef9a3755 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -9540,10 +9540,12 @@ PICS: "Does the device implement sending the ChangeToModeResponse command?" id: RVCCLEANMS.S.C03.Tx -## Dishwasher Mode control + ## Dishwasher Mode control # Features - - label: "Does the device support depending on an On/Off cluster implemented on the same endpoint?" + - label: + "Does the device support depending on an On/Off cluster implemented on + the same endpoint?" id: DISHM.S.F00 # @@ -9570,7 +9572,8 @@ PICS: # #Server commands generated # - - label: "Does the device implement sending the ChangeToModeResponse command?" + - label: + "Does the device implement sending the ChangeToModeResponse command?" id: DISHM.S.C01.Tx # #Operational State From f4c6667a59878859534b1bb1cbbe4d2fb302816f Mon Sep 17 00:00:00 2001 From: abpoth Date: Wed, 19 Jul 2023 15:03:15 -0400 Subject: [PATCH 21/46] solved run of codegen --- .../certification/Test_TC_DISHM_1_1.yaml | 17 +- .../chip-tool/zap-generated/test/Commands.h | 1070 +++++++++++++++++ 2 files changed, 1079 insertions(+), 8 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml index 8db9559e33d726..3de575f8ad5da4 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml @@ -31,7 +31,7 @@ tests: values: - name: "nodeId" value: nodeId - + - label: "TH reads the ClusterRevision from DUT" command: "readAttribute" attribute: "ClusterRevision" @@ -39,7 +39,7 @@ tests: value: 1 constraints: type: int16u - + - label: "TH reads the FeatureMap from DUT" PICS: " !DISHM.S.F00 " command: "readAttribute" @@ -48,7 +48,7 @@ tests: value: 0 constraints: type: bitmap32 - + - label: "Given DISHM.S.F00(DEPONOFF) ensure featuremap has the correct bit set" PICS: DISHM.S.F00 @@ -66,7 +66,7 @@ tests: constraints: type: list contains: [0, 1, 65528, 65529, 65530, 65531, 65532, 65533] - + - label: "TH reads optional attribute (DISHM.S.A0004(StartUpMode)) in AttributeList" @@ -77,7 +77,7 @@ tests: constraints: type: list contains: [2] - + - label: "TH reads optional attribute (DISHM.S.A0003(OnMode)) in AttributeList" PICS: DISHM.S.F00 @@ -87,18 +87,19 @@ tests: constraints: type: list contains: [3] - + - label: "TH reads AcceptedCommandList from DUT" + command: "readAttribute" attribute: "AcceptedCommandList" response: constraints: type: list contains: [0] - + - label: "Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" response: constraints: type: list - contains: [1] + contains: [1] \ No newline at end of file diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 56107d510b3470..53a4b5c3dd25e6 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -104,6 +104,12 @@ class TestList : public Command printf("Test_TC_CNET_1_3\n"); printf("Test_TC_DESC_1_1\n"); printf("Test_TC_DLOG_1_1\n"); + printf("Test_TC_DISHM_1_1\n"); + printf("Test_TC_DISHM_1_2\n"); + printf("Test_TC_DISHM_2_1\n"); + printf("Test_TC_DISHM_3_1\n"); + printf("Test_TC_DISHM_3_2\n"); + printf("Test_TC_DISHM_3_3\n"); printf("Test_TC_DGETH_1_1\n"); printf("Test_TC_DGETH_2_1\n"); printf("Test_TC_DGETH_2_2\n"); @@ -34854,6 +34860,1064 @@ class Test_TC_DLOG_1_1Suite : public TestCommand } }; +class Test_TC_DISHM_1_1Suite : public TestCommand +{ +public: + Test_TC_DISHM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_1_1", 9, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DISHM_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", "int16u", "int16u")); + } + 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", "bitmap32", "bitmap32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 1UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + 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))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + 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))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + } + break; + case 6: + 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", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } + break; + case 7: + 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", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + } + break; + case 8: + 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", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + } + 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 from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, + DishwasherMode::Attributes::ClusterRevision::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads the FeatureMap from DUT"); + VerifyOrDo(!ShouldSkip(" !DISHM.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::FeatureMap::Id, + true, chip::NullOptional); + } + case 3: { + LogStep(3, "Given DISHM.S.F00(DEPONOFF) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("DISHM.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::FeatureMap::Id, + true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads AttributeList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads optional attribute (DISHM.S.A0004(StartUpMode)) in AttributeList"); + VerifyOrDo(!ShouldSkip("DISHM.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 6: { + LogStep(6, "TH reads optional attribute (DISHM.S.A0003(OnMode)) in AttributeList"); + VerifyOrDo(!ShouldSkip("DISHM.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 7: { + LogStep(7, "TH reads AcceptedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, + DishwasherMode::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, + DishwasherMode::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DISHM_1_2Suite : public TestCommand +{ +public: + Test_TC_DISHM_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_1_2", 5, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DISHM_1_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)); + shouldContinue = true; + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + 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)); + 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 SupportedModes attribute 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 2: { + LogStep(2, "TH reads the CurrentMode attribute from the 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 3: { + LogStep(3, "TH reads the OnMode attribute from the 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 4: { + LogStep(4, "TH reads the StartUpMode attribute from the 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_DISHM_2_1Suite : public TestCommand +{ +public: + Test_TC_DISHM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_2_1", 14, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DISHM_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)); + shouldContinue = true; + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + 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)); + 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)); + shouldContinue = true; + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + 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)); + shouldContinue = true; + 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 the SupportedModes attribute 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 2: { + LogStep(2, "TH reads the CurrentMode attribute from the 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 3: { + LogStep(3, "TH sends a ChangeToMode command to the DUT with NewMode set to old_current_mode_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 4: { + LogStep(4, "Manually put the device in a state from which it will FAIL to transition to PIXIT.DISHM.MODE_CHANGE_FAIL"); + 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 5: { + LogStep(5, "TH reads the CurrentMode attribute from the 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 6: { + LogStep(6, "TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.DISHM.MODE_CHANGE_FAIL"); + 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, "TH reads the CurrentMode attribute from the 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 8: { + LogStep(8, + "Manually put the device in a state from which it will SUCCESSFULLY transition to PIXIT.DISHM.MODE_CHANGE_OK"); + 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 reads the CurrentMode attribute from the 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 10: { + LogStep(10, "TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.DISHM.MODE_CHANGE_OK"); + 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 11: { + LogStep(11, "TH reads the CurrentMode attribute from the 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 sends a ChangeToMode command to the DUT with NewMode set to invalid_mode_th"); + 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 the CurrentMode attribute from the 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_DISHM_3_1Suite : public TestCommand +{ +public: + Test_TC_DISHM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_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_DISHM_3_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)); + shouldContinue = true; + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + 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)); + 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)); + 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 from the OnMode attribute 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 2: { + LogStep(2, "TH reads the CurrentMode attribute from the 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 3: { + LogStep(3, "TH reads the SupportedModes attribute 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 4: { + LogStep(4, "TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th"); + 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 5: { + LogStep(5, "TH sends Off 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 6: { + LogStep(6, "TH sends On 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 7: { + LogStep(7, "TH reads the CurrentMode attribute from the 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_DISHM_3_2Suite : public TestCommand +{ +public: + Test_TC_DISHM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_2", 7, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DISHM_3_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)); + shouldContinue = true; + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + 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)); + 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)); + 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 from the StartUpMode attribute 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 2: { + LogStep(2, "TH reads the CurrentMode attribute from the 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 3: { + LogStep(3, "TH reads the SupportedModes attribute 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 4: { + LogStep(4, "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th"); + 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 5: { + LogStep(5, "Physically power cycle the device"); + 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 reads the CurrentMode attribute from the 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_DISHM_3_3Suite : public TestCommand +{ +public: + Test_TC_DISHM_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_3", 9, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DISHM_3_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), 0)); + shouldContinue = true; + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + 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)); + 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)); + shouldContinue = true; + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 8: + 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 from the StartUpMode attribute 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 2: { + LogStep(2, "TH reads from the OnMode attribute 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 3: { + LogStep(3, "TH reads the SupportedModes attribute 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 4: { + LogStep(4, "TH writes to the DUT the OnMode attribute with the new_mode_th value"); + 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 5: { + LogStep(5, "TH reads from the OnMode attribute 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 6: { + LogStep(6, "TH writes to the DUT the StartUpOnOff attribute with the value 1."); + 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, "Physically power cycle the device"); + 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 8: { + LogStep(8, "TH reads the CurrentMode attribute from the 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_DGETH_1_1Suite : public TestCommand { public: @@ -138486,6 +139550,12 @@ 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), make_unique(credsIssuerConfig), From 60fd6beceabeeea7796a568efa3ff46813a09267 Mon Sep 17 00:00:00 2001 From: abpoth Date: Wed, 19 Jul 2023 15:10:33 -0400 Subject: [PATCH 22/46] adding back in missing repo --- third_party/bouffalolab/repo | 1 + 1 file changed, 1 insertion(+) create mode 160000 third_party/bouffalolab/repo diff --git a/third_party/bouffalolab/repo b/third_party/bouffalolab/repo new file mode 160000 index 00000000000000..d1aba795ad1b36 --- /dev/null +++ b/third_party/bouffalolab/repo @@ -0,0 +1 @@ +Subproject commit d1aba795ad1b36ab2a0f58f664caf176e26fe97b From e1ed1ba4feefa898a3056f406aee9c1b87e678b1 Mon Sep 17 00:00:00 2001 From: abpoth Date: Wed, 19 Jul 2023 15:15:07 -0400 Subject: [PATCH 23/46] aligning .gitmodule with upstream --- .gitmodules | 489 ++++++++++++++++++++++++++-------------------------- 1 file changed, 247 insertions(+), 242 deletions(-) diff --git a/.gitmodules b/.gitmodules index b8cf6b4584d177..421ae509c98d9d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,315 +1,320 @@ [submodule "nlassert"] - path = third_party/nlassert/repo - url = https://github.com/nestlabs/nlassert.git - branch = master +path = third_party/nlassert/repo +url = https://github.com/nestlabs/nlassert.git +branch = master [submodule "nlfaultinjection"] - path = third_party/nlfaultinjection/repo - url = https://github.com/nestlabs/nlfaultinjection.git - branch = master +path = third_party/nlfaultinjection/repo +url = https://github.com/nestlabs/nlfaultinjection.git +branch = master [submodule "nlio"] - path = third_party/nlio/repo - url = https://github.com/nestlabs/nlio.git - branch = master +path = third_party/nlio/repo +url = https://github.com/nestlabs/nlio.git +branch = master [submodule "nlunit-test"] - path = third_party/nlunit-test/repo - url = https://github.com/nestlabs/nlunit-test.git - branch = master +path = third_party/nlunit-test/repo +url = https://github.com/nestlabs/nlunit-test.git +branch = master [submodule "mbedtls"] - path = third_party/mbedtls/repo - url = https://github.com/ARMmbed/mbedtls.git - branch = mbedtls-2.28 +path = third_party/mbedtls/repo +url = https://github.com/ARMmbed/mbedtls.git +branch = mbedtls-2.28 [submodule "qrcode"] - path = examples/common/QRCode/repo - url = https://github.com/nayuki/QR-Code-generator.git - branch = master +path = examples/common/QRCode/repo +url = https://github.com/nayuki/QR-Code-generator.git +branch = master [submodule "m5stack-tft"] - path = examples/common/m5stack-tft/repo - url = https://github.com/jeremyjh/ESP32_TFT_library.git - branch = master - platforms = esp32 +path = examples/common/m5stack-tft/repo +url = https://github.com/jeremyjh/ESP32_TFT_library.git +branch = master +platforms = esp32 [submodule "pigweed"] - path = third_party/pigweed/repo - url = https://github.com/google/pigweed.git - branch = main +path = third_party/pigweed/repo +url = https://github.com/google/pigweed.git +branch = main [submodule "openthread"] - path = third_party/openthread/repo - url = https://github.com/openthread/openthread.git - branch = main +path = third_party/openthread/repo +url = https://github.com/openthread/openthread.git +branch = main [submodule "ot-br-posix"] - path = third_party/ot-br-posix/repo - url = https://github.com/openthread/ot-br-posix.git - branch = main - platforms = linux +path = third_party/ot-br-posix/repo +url = https://github.com/openthread/ot-br-posix.git +branch = main +platforms = linux [submodule "cirque"] - path = third_party/cirque/repo - url = https://github.com/openweave/cirque.git - branch = master - platforms = linux +path = third_party/cirque/repo +url = https://github.com/openweave/cirque.git +branch = master +platforms = linux [submodule "nanopb"] - path = third_party/nanopb/repo - url = https://github.com/nanopb/nanopb.git - branch = master +path = third_party/nanopb/repo +url = https://github.com/nanopb/nanopb.git +branch = master [submodule "qpg_sdk"] - path = third_party/qpg_sdk/repo - url = https://github.com/Qorvo/QMatter - branch = vlatest-libs - platforms = qpg +path = third_party/qpg_sdk/repo +url = https://github.com/Qorvo/QMatter +branch = vlatest-libs +platforms = qpg [submodule "freertos"] - path = third_party/freertos/repo - url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git - branch = V10.3.1-kernel-only - platforms = ameba,cc13xx_26xx,bouffalolab,efr32,esp32,k32w0,infineon,qpg,cc32xx,silabs_docker +path = third_party/freertos/repo +url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git +branch = V10.3.1-kernel-only +platforms = ameba,cc13xx_26xx,bouffalolab,efr32,esp32,k32w0,infineon,qpg,cc32xx,silabs_docker [submodule "simw-top-mini"] - path = third_party/simw-top-mini/repo - url = https://github.com/NXP/plug-and-trust.git - branch = int/CHIPSE_Release - platforms = k32w0 +path = third_party/simw-top-mini/repo +url = https://github.com/NXP/plug-and-trust.git +branch = int/CHIPSE_Release +platforms = k32w0 [submodule "third_party/openthread/ot-nxp"] - path = third_party/openthread/ot-nxp - url = https://github.com/openthread/ot-nxp.git - platforms = k32w0 +path = third_party/openthread/ot-nxp +url = https://github.com/openthread/ot-nxp.git +platforms = k32w0 [submodule "third_party/openthread/ot-qorvo"] - path = third_party/openthread/ot-qorvo - url = https://github.com/openthread/ot-qorvo.git - platforms = qpg +path = third_party/openthread/ot-qorvo +url = https://github.com/openthread/ot-qorvo.git +platforms = qpg [submodule "third_party/openthread/ot-efr32"] - path = third_party/openthread/ot-efr32 - url = https://github.com/SiliconLabs/ot-efr32.git - branch = matter_sve - platforms = efr32,silabs_docker +path = third_party/openthread/ot-efr32 +url = https://github.com/SiliconLabs/ot-efr32.git +branch = matter_sve +platforms = efr32,silabs_docker [submodule "third_party/openthread/ot-ifx"] - path = third_party/openthread/ot-ifx - url = https://github.com/Infineon/ot-ifx-release.git - platforms = infineon +path = third_party/openthread/ot-ifx +url = https://github.com/Infineon/ot-ifx-release.git +platforms = infineon [submodule "third_party/mbed-os/repo"] - path = third_party/mbed-os/repo - url = https://github.com/ARMmbed/mbed-os.git - branch = master - platforms = mbed +path = third_party/mbed-os/repo +url = https://github.com/ARMmbed/mbed-os.git +branch = master +platforms = mbed [submodule "third_party/mbed-os-posix-socket/repo"] - path = third_party/mbed-os-posix-socket/repo - url = https://github.com/ARMmbed/mbed-os-posix-socket.git - branch = main - platforms = mbed +path = third_party/mbed-os-posix-socket/repo +url = https://github.com/ARMmbed/mbed-os-posix-socket.git +branch = main +platforms = mbed [submodule "mbed-os-cypress-capsense-button"] - path = third_party/mbed-os-cypress-capsense-button/repo - url = https://github.com/ARMmbed/mbed-os-cypress-capsense-button.git - branch = main - platforms = mbed +path = third_party/mbed-os-cypress-capsense-button/repo +url = https://github.com/ARMmbed/mbed-os-cypress-capsense-button.git +branch = main +platforms = mbed [submodule "p6/abstraction-rtos"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/abstraction-rtos - url = https://github.com/Infineon/abstraction-rtos - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/abstraction-rtos +url = https://github.com/Infineon/abstraction-rtos +platforms = infineon [submodule "p6/bluetooth-freertos"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/bluetooth-freertos - url = https://github.com/Infineon/bluetooth-freertos - branch = v2.X - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/bluetooth-freertos +url = https://github.com/Infineon/bluetooth-freertos +branch = v2.X +platforms = infineon [submodule "p6/btstack"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/btstack - url = https://github.com/Infineon/btstack - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/btstack +url = https://github.com/Infineon/btstack +platforms = infineon [submodule "p6/clib-support"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/clib-support - url = https://github.com/Infineon/clib-support - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/clib-support +url = https://github.com/Infineon/clib-support +platforms = infineon [submodule "p6/connectivity-utilities"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/connectivity-utilities - url = https://github.com/Infineon/connectivity-utilities - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/connectivity-utilities +url = https://github.com/Infineon/connectivity-utilities +platforms = infineon [submodule "p6/core-lib"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/core-lib - url = https://github.com/Infineon/core-lib - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/core-lib +url = https://github.com/Infineon/core-lib +platforms = infineon [submodule "p6/core-make"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/core-make - url = https://github.com/Infineon/core-make - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/core-make +url = https://github.com/Infineon/core-make +platforms = infineon [submodule "p6/kv-store"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/kv-store - url = https://github.com/Infineon/kv-store - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/kv-store +url = https://github.com/Infineon/kv-store +platforms = infineon [submodule "p6/mtb-hal-cat1"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/mtb-hal-cat1 - url = https://github.com/Infineon/mtb-hal-cat1 - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/mtb-hal-cat1 +url = https://github.com/Infineon/mtb-hal-cat1 +platforms = infineon [submodule "p6/mtb-pdl-cat1"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/mtb-pdl-cat1 - url = https://github.com/Infineon/mtb-pdl-cat1 - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/mtb-pdl-cat1 +url = https://github.com/Infineon/mtb-pdl-cat1 +platforms = infineon [submodule "p6/psoc6cm0p"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/psoc6cm0p - url = https://github.com/Infineon/psoc6cm0p - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/psoc6cm0p +url = https://github.com/Infineon/psoc6cm0p +platforms = infineon [submodule "p6/whd-bsp-integration"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/whd-bsp-integration - url = https://github.com/Infineon/whd-bsp-integration - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/whd-bsp-integration +url = https://github.com/Infineon/whd-bsp-integration +platforms = infineon [submodule "p6/wifi-connection-manager"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/wifi-connection-manager - url = https://github.com/Infineon/wifi-connection-manager - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/wifi-connection-manager +url = https://github.com/Infineon/wifi-connection-manager +platforms = infineon [submodule "p6/wifi-host-driver"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/wifi-host-driver - url = https://github.com/Infineon/wifi-host-driver - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/wifi-host-driver +url = https://github.com/Infineon/wifi-host-driver +platforms = infineon [submodule "p6/wifi-mw-core"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/wifi-mw-core - url = https://github.com/Infineon/wifi-mw-core - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/wifi-mw-core +url = https://github.com/Infineon/wifi-mw-core +platforms = infineon [submodule "p6/TARGET_CY8CKIT-062S2-43012"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/TARGET_CY8CKIT-062S2-43012 - url = https://github.com/Infineon/TARGET_CY8CKIT-062S2-43012 - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/TARGET_CY8CKIT-062S2-43012 +url = https://github.com/Infineon/TARGET_CY8CKIT-062S2-43012 +platforms = infineon [submodule "p6/freertos"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/freertos - url = https://github.com/Infineon/freertos - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/freertos +url = https://github.com/Infineon/freertos +platforms = infineon [submodule "p6/retarget-io"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/retarget-io - url = https://github.com/Infineon/retarget-io - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/retarget-io +url = https://github.com/Infineon/retarget-io +platforms = infineon [submodule "p6/mbedtls"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/mbedtls - url = https://github.com/ARMmbed/mbedtls - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/mbedtls +url = https://github.com/ARMmbed/mbedtls +platforms = infineon [submodule "p6/secure-sockets"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/secure-sockets - url = https://github.com/Infineon/secure-sockets - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/secure-sockets +url = https://github.com/Infineon/secure-sockets +platforms = infineon [submodule "p6/recipe-make-cat1a"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/recipe-make-cat1a - url = https://github.com/Infineon/recipe-make-cat1a - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/recipe-make-cat1a +url = https://github.com/Infineon/recipe-make-cat1a +platforms = infineon [submodule "third_party/pybind11/repo"] - path = third_party/pybind11/repo - url = https://github.com/pybind/pybind11 - branch = stable +path = third_party/pybind11/repo +url = https://github.com/pybind/pybind11 +branch = stable [submodule "p6/lwip"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/lwip - url = https://github.com/lwip-tcpip/lwip.git - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/lwip +url = https://github.com/lwip-tcpip/lwip.git +platforms = infineon [submodule "third_party/jsoncpp/repo"] - path = third_party/jsoncpp/repo - url = https://github.com/open-source-parsers/jsoncpp.git +path = third_party/jsoncpp/repo +url = https://github.com/open-source-parsers/jsoncpp.git [submodule "cyw30739_sdk/30739A0"] - path = third_party/infineon/cyw30739_sdk/repos/30739A0 - url = https://github.com/Infineon/OT-Matter-30739A0.git - platforms = infineon +path = third_party/infineon/cyw30739_sdk/repos/30739A0 +url = https://github.com/Infineon/OT-Matter-30739A0.git +platforms = infineon [submodule "cyw30739_sdk/include"] - path = third_party/infineon/cyw30739_sdk/repos/btsdk-include - url = https://github.com/Infineon/btsdk-include.git - platforms = infineon +path = third_party/infineon/cyw30739_sdk/repos/btsdk-include +url = https://github.com/Infineon/btsdk-include.git +platforms = infineon [submodule "cyw30739_sdk/target"] - path = third_party/infineon/cyw30739_sdk/repos/CYW930739M2EVB-01 - url = https://github.com/Infineon/OT-Matter-TARGET_CYW930739M2EVB-01.git - platforms = infineon +path = third_party/infineon/cyw30739_sdk/repos/CYW930739M2EVB-01 +url = https://github.com/Infineon/OT-Matter-TARGET_CYW930739M2EVB-01.git +platforms = infineon [submodule "cyw30739_sdk/tools"] - path = third_party/infineon/cyw30739_sdk/repos/btsdk-tools - url = https://github.com/Infineon/btsdk-tools.git - platforms = infineon +path = third_party/infineon/cyw30739_sdk/repos/btsdk-tools +url = https://github.com/Infineon/btsdk-tools.git +platforms = infineon [submodule "third_party/p6/p6_sdk/libs/anycloud-ota"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/anycloud-ota - url = https://github.com/Infineon/anycloud-ota - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/anycloud-ota +url = https://github.com/Infineon/anycloud-ota +platforms = infineon [submodule "third_party/mbed-mcu-boot/repo"] - path = third_party/mbed-mcu-boot/repo - url = https://github.com/ATmobica/mcuboot.git - platforms = mbed +path = third_party/mbed-mcu-boot/repo +url = https://github.com/ATmobica/mcuboot.git +platforms = mbed [submodule "p6/serial-flash"] - path = third_party/infineon/psoc6/psoc6_sdk/libs/serial-flash - url = https://github.com/Infineon/serial-flash - platforms = infineon +path = third_party/infineon/psoc6/psoc6_sdk/libs/serial-flash +url = https://github.com/Infineon/serial-flash +platforms = infineon [submodule "ti_simplelink_sdk"] - path = third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx - url = https://github.com/TexasInstruments/cc13xx_cc26xx_sdk.git - branch = main - platforms = cc13xx_26xx +path = third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx +url = https://github.com/TexasInstruments/cc13xx_cc26xx_sdk.git +branch = main +platforms = cc13xx_26xx [submodule "third_party/ti_simplelink_sdk/repo_cc32xx"] - path = third_party/ti_simplelink_sdk/repo_cc32xx - url = https://github.com/TexasInstruments/cc32xx_open_sdk.git - branch = main - platforms = cc32xx +path = third_party/ti_simplelink_sdk/repo_cc32xx +url = https://github.com/TexasInstruments/cc32xx_open_sdk.git +branch = main +platforms = cc32xx [submodule "third_party/openthread/ot-ti"] - path = third_party/openthread/ot-ti - url = https://github.com/TexasInstruments/ot-ti.git - branch = main - platforms = cc13xx_26xx +path = third_party/openthread/ot-ti +url = https://github.com/TexasInstruments/ot-ti.git +branch = main +platforms = cc13xx_26xx [submodule "third_party/nxp/mw320_sdk/repo"] - path = third_party/nxp/mw320_sdk/repo - url = https://github.com/nxptest/mw320_sdk - platforms = mw320 +path = third_party/nxp/mw320_sdk/repo +url = https://github.com/nxptest/mw320_sdk +platforms = mw320 [submodule "third_party/silabs/matter_support"] - path = third_party/silabs/matter_support - url = https://github.com/SiliconLabs/sdk_support.git - branch = main - platforms = efr32,silabs_docker +path = third_party/silabs/matter_support +url = https://github.com/SiliconLabs/sdk_support.git +branch = main +platforms = efr32,silabs_docker [submodule "third_party/silabs/gecko_sdk"] - path = third_party/silabs/gecko_sdk - url = https://github.com/SiliconLabs/gecko_sdk.git - branch = gsdk_4.1 - platforms = efr32 +path = third_party/silabs/gecko_sdk +url = https://github.com/SiliconLabs/gecko_sdk.git +branch = gsdk_4.1 +platforms = efr32 [submodule "third_party/silabs/wiseconnect-wifi-bt-sdk"] - path = third_party/silabs/wiseconnect-wifi-bt-sdk - url = https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk.git - branch = 2.7.1-Matter - platforms = efr32,silabs_docker +path = third_party/silabs/wiseconnect-wifi-bt-sdk +url = https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk.git +branch = 2.7.1-Matter +platforms = efr32,silabs_docker [submodule "editline"] - path = third_party/editline/repo - url = https://github.com/troglobit/editline.git +path = third_party/editline/repo +url = https://github.com/troglobit/editline.git [submodule "third_party/boringssl/repo/src"] - path = third_party/boringssl/repo/src - url = https://github.com/google/boringssl.git +path = third_party/boringssl/repo/src +url = https://github.com/google/boringssl.git [submodule "third_party/mt793x_sdk/filogic"] - path = third_party/mt793x_sdk/filogic - url = https://github.com/MediaTek-Labs/genio-matter-bsp.git - branch = main - platforms = genio +path = third_party/mt793x_sdk/filogic +url = https://github.com/MediaTek-Labs/genio-matter-bsp.git +branch = main +platforms = genio [submodule "third_party/mt793x_sdk/mDNSResponder"] - path = third_party/mt793x_sdk/mDNSResponder - url = https://github.com/matter-mtk/genio-matter-mdnsresponder.git - branch = main - platforms = genio +path = third_party/mt793x_sdk/mDNSResponder +url = https://github.com/matter-mtk/genio-matter-mdnsresponder.git +branch = main +platforms = genio [submodule "third_party/mt793x_sdk/lwip"] - path = third_party/mt793x_sdk/lwip - url = https://github.com/matter-mtk/genio-matter-lwip.git - branch = main - platforms = genio +path = third_party/mt793x_sdk/lwip +url = https://github.com/matter-mtk/genio-matter-lwip.git +branch = main +platforms = genio [submodule "open-iot-sdk"] - path = third_party/open-iot-sdk/sdk - url = https://git.gitlab.arm.com/iot/open-iot-sdk/sdk.git - branch = main - platforms = openiotsdk +path = third_party/open-iot-sdk/sdk +url = https://git.gitlab.arm.com/iot/open-iot-sdk/sdk.git +branch = main +platforms = openiotsdk +[submodule "bouffalolab_sdk"] +path = third_party/bouffalolab/repo +url = https://github.com/bouffalolab/bl_iot_sdk_tiny.git +branch = main +platforms = bouffalolab [submodule "third_party/libwebsockets/repo"] - path = third_party/libwebsockets/repo - url = https://github.com/warmcat/libwebsockets - platforms = linux,darwin,tizen +path = third_party/libwebsockets/repo +url = https://github.com/warmcat/libwebsockets +platforms = linux,darwin,tizen [submodule "third_party/imgui/repo"] - path = third_party/imgui/repo - url = https://github.com/ocornut/imgui - platforms = linux +path = third_party/imgui/repo +url = https://github.com/ocornut/imgui +platforms = linux [submodule "third_party/asr/asr582x/asr_sdk"] - path = third_party/asr/asr582x/asr_sdk - url = https://github.com/asriot/ASR582X_Freertos.git - branch = matter - platforms = asr +path = third_party/asr/asr582x/asr_sdk +url = https://github.com/asriot/ASR582X_Freertos.git +branch = matter +platforms = asr [submodule "third_party/asr/asr595x/asr_sdk"] - path = third_party/asr/asr595x/asr_sdk - url = https://github.com/asriot/ASR595X_Freertos.git - branch = matter - platforms = asr +path = third_party/asr/asr595x/asr_sdk +url = https://github.com/asriot/ASR595X_Freertos.git +branch = matter +platforms = asr [submodule "perfetto"] - path = third_party/perfetto/repo - url = https://github.com/google/perfetto.git - branch = master - platforms = linux,android +path = third_party/perfetto/repo +url = https://github.com/google/perfetto.git +branch = master +platforms = linux,android [submodule "third_party/asr/components"] - path = third_party/asr/components - url = https://github.com/asriot/asriot_components.git - branch = matter - platforms = asr +path = third_party/asr/components +url = https://github.com/asriot/asriot_components.git +branch = matter +platforms = asr [submodule "third_party/asr/asr550x/asr_sdk"] - path = third_party/asr/asr550x/asr_sdk - url = https://github.com/asriot/ASR550X_Freertos.git - branch = matter - platforms = asr +path = third_party/asr/asr550x/asr_sdk +url = https://github.com/asriot/ASR550X_Freertos.git +branch = matter +platforms = asr From b982fbf75bf27a57f70aecf1fb3cb20080cf61da Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Wed, 19 Jul 2023 19:03:46 +0000 Subject: [PATCH 24/46] Restyled by whitespace --- .../suites/certification/Test_TC_DISHM_1_1.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml index 3de575f8ad5da4..289e537023cf11 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml @@ -31,7 +31,7 @@ tests: values: - name: "nodeId" value: nodeId - + - label: "TH reads the ClusterRevision from DUT" command: "readAttribute" attribute: "ClusterRevision" @@ -39,7 +39,7 @@ tests: value: 1 constraints: type: int16u - + - label: "TH reads the FeatureMap from DUT" PICS: " !DISHM.S.F00 " command: "readAttribute" @@ -48,7 +48,7 @@ tests: value: 0 constraints: type: bitmap32 - + - label: "Given DISHM.S.F00(DEPONOFF) ensure featuremap has the correct bit set" PICS: DISHM.S.F00 @@ -66,7 +66,7 @@ tests: constraints: type: list contains: [0, 1, 65528, 65529, 65530, 65531, 65532, 65533] - + - label: "TH reads optional attribute (DISHM.S.A0004(StartUpMode)) in AttributeList" @@ -77,7 +77,7 @@ tests: constraints: type: list contains: [2] - + - label: "TH reads optional attribute (DISHM.S.A0003(OnMode)) in AttributeList" PICS: DISHM.S.F00 @@ -87,7 +87,7 @@ tests: constraints: type: list contains: [3] - + - label: "TH reads AcceptedCommandList from DUT" command: "readAttribute" attribute: "AcceptedCommandList" @@ -95,11 +95,11 @@ tests: constraints: type: list contains: [0] - + - label: "Read the global attribute: GeneratedCommandList" command: "readAttribute" attribute: "GeneratedCommandList" response: constraints: type: list - contains: [1] \ No newline at end of file + contains: [1] From 38e7cede07acf0f4f506e2046230142f3048dfa9 Mon Sep 17 00:00:00 2001 From: abpoth Date: Thu, 20 Jul 2023 12:11:11 -0400 Subject: [PATCH 25/46] sync submodules --- .gitmodules | 492 ++++++++++++++++++------------------ third_party/openthread/repo | 1 + 2 files changed, 247 insertions(+), 246 deletions(-) create mode 160000 third_party/openthread/repo diff --git a/.gitmodules b/.gitmodules index 421ae509c98d9d..d8f478e1858b72 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,320 +1,320 @@ [submodule "nlassert"] -path = third_party/nlassert/repo -url = https://github.com/nestlabs/nlassert.git -branch = master + path = third_party/nlassert/repo + url = https://github.com/nestlabs/nlassert.git + branch = master [submodule "nlfaultinjection"] -path = third_party/nlfaultinjection/repo -url = https://github.com/nestlabs/nlfaultinjection.git -branch = master + path = third_party/nlfaultinjection/repo + url = https://github.com/nestlabs/nlfaultinjection.git + branch = master [submodule "nlio"] -path = third_party/nlio/repo -url = https://github.com/nestlabs/nlio.git -branch = master + path = third_party/nlio/repo + url = https://github.com/nestlabs/nlio.git + branch = master [submodule "nlunit-test"] -path = third_party/nlunit-test/repo -url = https://github.com/nestlabs/nlunit-test.git -branch = master + path = third_party/nlunit-test/repo + url = https://github.com/nestlabs/nlunit-test.git + branch = master [submodule "mbedtls"] -path = third_party/mbedtls/repo -url = https://github.com/ARMmbed/mbedtls.git -branch = mbedtls-2.28 + path = third_party/mbedtls/repo + url = https://github.com/ARMmbed/mbedtls.git + branch = mbedtls-2.28 [submodule "qrcode"] -path = examples/common/QRCode/repo -url = https://github.com/nayuki/QR-Code-generator.git -branch = master + path = examples/common/QRCode/repo + url = https://github.com/nayuki/QR-Code-generator.git + branch = master [submodule "m5stack-tft"] -path = examples/common/m5stack-tft/repo -url = https://github.com/jeremyjh/ESP32_TFT_library.git -branch = master -platforms = esp32 + path = examples/common/m5stack-tft/repo + url = https://github.com/jeremyjh/ESP32_TFT_library.git + branch = master + platforms = esp32 [submodule "pigweed"] -path = third_party/pigweed/repo -url = https://github.com/google/pigweed.git -branch = main + path = third_party/pigweed/repo + url = https://github.com/google/pigweed.git + branch = main [submodule "openthread"] -path = third_party/openthread/repo -url = https://github.com/openthread/openthread.git -branch = main + path = third_party/openthread/repo + url = https://github.com/openthread/openthread.git + branch = main [submodule "ot-br-posix"] -path = third_party/ot-br-posix/repo -url = https://github.com/openthread/ot-br-posix.git -branch = main -platforms = linux + path = third_party/ot-br-posix/repo + url = https://github.com/openthread/ot-br-posix.git + branch = main + platforms = linux [submodule "cirque"] -path = third_party/cirque/repo -url = https://github.com/openweave/cirque.git -branch = master -platforms = linux + path = third_party/cirque/repo + url = https://github.com/openweave/cirque.git + branch = master + platforms = linux [submodule "nanopb"] -path = third_party/nanopb/repo -url = https://github.com/nanopb/nanopb.git -branch = master + path = third_party/nanopb/repo + url = https://github.com/nanopb/nanopb.git + branch = master [submodule "qpg_sdk"] -path = third_party/qpg_sdk/repo -url = https://github.com/Qorvo/QMatter -branch = vlatest-libs -platforms = qpg + path = third_party/qpg_sdk/repo + url = https://github.com/Qorvo/QMatter + branch = vlatest-libs + platforms = qpg [submodule "freertos"] -path = third_party/freertos/repo -url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git -branch = V10.3.1-kernel-only -platforms = ameba,cc13xx_26xx,bouffalolab,efr32,esp32,k32w0,infineon,qpg,cc32xx,silabs_docker + path = third_party/freertos/repo + url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git + branch = V10.3.1-kernel-only + platforms = ameba,cc13xx_26xx,bouffalolab,efr32,esp32,k32w0,infineon,qpg,cc32xx,silabs_docker [submodule "simw-top-mini"] -path = third_party/simw-top-mini/repo -url = https://github.com/NXP/plug-and-trust.git -branch = int/CHIPSE_Release -platforms = k32w0 + path = third_party/simw-top-mini/repo + url = https://github.com/NXP/plug-and-trust.git + branch = int/CHIPSE_Release + platforms = k32w0 [submodule "third_party/openthread/ot-nxp"] -path = third_party/openthread/ot-nxp -url = https://github.com/openthread/ot-nxp.git -platforms = k32w0 + path = third_party/openthread/ot-nxp + url = https://github.com/openthread/ot-nxp.git + platforms = k32w0 [submodule "third_party/openthread/ot-qorvo"] -path = third_party/openthread/ot-qorvo -url = https://github.com/openthread/ot-qorvo.git -platforms = qpg + path = third_party/openthread/ot-qorvo + url = https://github.com/openthread/ot-qorvo.git + platforms = qpg [submodule "third_party/openthread/ot-efr32"] -path = third_party/openthread/ot-efr32 -url = https://github.com/SiliconLabs/ot-efr32.git -branch = matter_sve -platforms = efr32,silabs_docker + path = third_party/openthread/ot-efr32 + url = https://github.com/SiliconLabs/ot-efr32.git + branch = matter_sve + platforms = efr32,silabs_docker [submodule "third_party/openthread/ot-ifx"] -path = third_party/openthread/ot-ifx -url = https://github.com/Infineon/ot-ifx-release.git -platforms = infineon + path = third_party/openthread/ot-ifx + url = https://github.com/Infineon/ot-ifx-release.git + platforms = infineon [submodule "third_party/mbed-os/repo"] -path = third_party/mbed-os/repo -url = https://github.com/ARMmbed/mbed-os.git -branch = master -platforms = mbed + path = third_party/mbed-os/repo + url = https://github.com/ARMmbed/mbed-os.git + branch = master + platforms = mbed [submodule "third_party/mbed-os-posix-socket/repo"] -path = third_party/mbed-os-posix-socket/repo -url = https://github.com/ARMmbed/mbed-os-posix-socket.git -branch = main -platforms = mbed + path = third_party/mbed-os-posix-socket/repo + url = https://github.com/ARMmbed/mbed-os-posix-socket.git + branch = main + platforms = mbed [submodule "mbed-os-cypress-capsense-button"] -path = third_party/mbed-os-cypress-capsense-button/repo -url = https://github.com/ARMmbed/mbed-os-cypress-capsense-button.git -branch = main -platforms = mbed + path = third_party/mbed-os-cypress-capsense-button/repo + url = https://github.com/ARMmbed/mbed-os-cypress-capsense-button.git + branch = main + platforms = mbed [submodule "p6/abstraction-rtos"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/abstraction-rtos -url = https://github.com/Infineon/abstraction-rtos -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/abstraction-rtos + url = https://github.com/Infineon/abstraction-rtos + platforms = infineon [submodule "p6/bluetooth-freertos"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/bluetooth-freertos -url = https://github.com/Infineon/bluetooth-freertos -branch = v2.X -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/bluetooth-freertos + url = https://github.com/Infineon/bluetooth-freertos + branch = v2.X + platforms = infineon [submodule "p6/btstack"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/btstack -url = https://github.com/Infineon/btstack -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/btstack + url = https://github.com/Infineon/btstack + platforms = infineon [submodule "p6/clib-support"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/clib-support -url = https://github.com/Infineon/clib-support -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/clib-support + url = https://github.com/Infineon/clib-support + platforms = infineon [submodule "p6/connectivity-utilities"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/connectivity-utilities -url = https://github.com/Infineon/connectivity-utilities -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/connectivity-utilities + url = https://github.com/Infineon/connectivity-utilities + platforms = infineon [submodule "p6/core-lib"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/core-lib -url = https://github.com/Infineon/core-lib -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/core-lib + url = https://github.com/Infineon/core-lib + platforms = infineon [submodule "p6/core-make"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/core-make -url = https://github.com/Infineon/core-make -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/core-make + url = https://github.com/Infineon/core-make + platforms = infineon [submodule "p6/kv-store"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/kv-store -url = https://github.com/Infineon/kv-store -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/kv-store + url = https://github.com/Infineon/kv-store + platforms = infineon [submodule "p6/mtb-hal-cat1"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/mtb-hal-cat1 -url = https://github.com/Infineon/mtb-hal-cat1 -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/mtb-hal-cat1 + url = https://github.com/Infineon/mtb-hal-cat1 + platforms = infineon [submodule "p6/mtb-pdl-cat1"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/mtb-pdl-cat1 -url = https://github.com/Infineon/mtb-pdl-cat1 -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/mtb-pdl-cat1 + url = https://github.com/Infineon/mtb-pdl-cat1 + platforms = infineon [submodule "p6/psoc6cm0p"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/psoc6cm0p -url = https://github.com/Infineon/psoc6cm0p -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/psoc6cm0p + url = https://github.com/Infineon/psoc6cm0p + platforms = infineon [submodule "p6/whd-bsp-integration"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/whd-bsp-integration -url = https://github.com/Infineon/whd-bsp-integration -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/whd-bsp-integration + url = https://github.com/Infineon/whd-bsp-integration + platforms = infineon [submodule "p6/wifi-connection-manager"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/wifi-connection-manager -url = https://github.com/Infineon/wifi-connection-manager -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/wifi-connection-manager + url = https://github.com/Infineon/wifi-connection-manager + platforms = infineon [submodule "p6/wifi-host-driver"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/wifi-host-driver -url = https://github.com/Infineon/wifi-host-driver -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/wifi-host-driver + url = https://github.com/Infineon/wifi-host-driver + platforms = infineon [submodule "p6/wifi-mw-core"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/wifi-mw-core -url = https://github.com/Infineon/wifi-mw-core -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/wifi-mw-core + url = https://github.com/Infineon/wifi-mw-core + platforms = infineon [submodule "p6/TARGET_CY8CKIT-062S2-43012"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/TARGET_CY8CKIT-062S2-43012 -url = https://github.com/Infineon/TARGET_CY8CKIT-062S2-43012 -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/TARGET_CY8CKIT-062S2-43012 + url = https://github.com/Infineon/TARGET_CY8CKIT-062S2-43012 + platforms = infineon [submodule "p6/freertos"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/freertos -url = https://github.com/Infineon/freertos -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/freertos + url = https://github.com/Infineon/freertos + platforms = infineon [submodule "p6/retarget-io"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/retarget-io -url = https://github.com/Infineon/retarget-io -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/retarget-io + url = https://github.com/Infineon/retarget-io + platforms = infineon [submodule "p6/mbedtls"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/mbedtls -url = https://github.com/ARMmbed/mbedtls -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/mbedtls + url = https://github.com/ARMmbed/mbedtls + platforms = infineon [submodule "p6/secure-sockets"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/secure-sockets -url = https://github.com/Infineon/secure-sockets -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/secure-sockets + url = https://github.com/Infineon/secure-sockets + platforms = infineon [submodule "p6/recipe-make-cat1a"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/recipe-make-cat1a -url = https://github.com/Infineon/recipe-make-cat1a -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/recipe-make-cat1a + url = https://github.com/Infineon/recipe-make-cat1a + platforms = infineon [submodule "third_party/pybind11/repo"] -path = third_party/pybind11/repo -url = https://github.com/pybind/pybind11 -branch = stable + path = third_party/pybind11/repo + url = https://github.com/pybind/pybind11 + branch = stable [submodule "p6/lwip"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/lwip -url = https://github.com/lwip-tcpip/lwip.git -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/lwip + url = https://github.com/lwip-tcpip/lwip.git + platforms = infineon [submodule "third_party/jsoncpp/repo"] -path = third_party/jsoncpp/repo -url = https://github.com/open-source-parsers/jsoncpp.git + path = third_party/jsoncpp/repo + url = https://github.com/open-source-parsers/jsoncpp.git [submodule "cyw30739_sdk/30739A0"] -path = third_party/infineon/cyw30739_sdk/repos/30739A0 -url = https://github.com/Infineon/OT-Matter-30739A0.git -platforms = infineon + path = third_party/infineon/cyw30739_sdk/repos/30739A0 + url = https://github.com/Infineon/OT-Matter-30739A0.git + platforms = infineon [submodule "cyw30739_sdk/include"] -path = third_party/infineon/cyw30739_sdk/repos/btsdk-include -url = https://github.com/Infineon/btsdk-include.git -platforms = infineon + path = third_party/infineon/cyw30739_sdk/repos/btsdk-include + url = https://github.com/Infineon/btsdk-include.git + platforms = infineon [submodule "cyw30739_sdk/target"] -path = third_party/infineon/cyw30739_sdk/repos/CYW930739M2EVB-01 -url = https://github.com/Infineon/OT-Matter-TARGET_CYW930739M2EVB-01.git -platforms = infineon + path = third_party/infineon/cyw30739_sdk/repos/CYW930739M2EVB-01 + url = https://github.com/Infineon/OT-Matter-TARGET_CYW930739M2EVB-01.git + platforms = infineon [submodule "cyw30739_sdk/tools"] -path = third_party/infineon/cyw30739_sdk/repos/btsdk-tools -url = https://github.com/Infineon/btsdk-tools.git -platforms = infineon + path = third_party/infineon/cyw30739_sdk/repos/btsdk-tools + url = https://github.com/Infineon/btsdk-tools.git + platforms = infineon [submodule "third_party/p6/p6_sdk/libs/anycloud-ota"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/anycloud-ota -url = https://github.com/Infineon/anycloud-ota -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/anycloud-ota + url = https://github.com/Infineon/anycloud-ota + platforms = infineon [submodule "third_party/mbed-mcu-boot/repo"] -path = third_party/mbed-mcu-boot/repo -url = https://github.com/ATmobica/mcuboot.git -platforms = mbed + path = third_party/mbed-mcu-boot/repo + url = https://github.com/ATmobica/mcuboot.git + platforms = mbed [submodule "p6/serial-flash"] -path = third_party/infineon/psoc6/psoc6_sdk/libs/serial-flash -url = https://github.com/Infineon/serial-flash -platforms = infineon + path = third_party/infineon/psoc6/psoc6_sdk/libs/serial-flash + url = https://github.com/Infineon/serial-flash + platforms = infineon [submodule "ti_simplelink_sdk"] -path = third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx -url = https://github.com/TexasInstruments/cc13xx_cc26xx_sdk.git -branch = main -platforms = cc13xx_26xx + path = third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx + url = https://github.com/TexasInstruments/cc13xx_cc26xx_sdk.git + branch = main + platforms = cc13xx_26xx [submodule "third_party/ti_simplelink_sdk/repo_cc32xx"] -path = third_party/ti_simplelink_sdk/repo_cc32xx -url = https://github.com/TexasInstruments/cc32xx_open_sdk.git -branch = main -platforms = cc32xx + path = third_party/ti_simplelink_sdk/repo_cc32xx + url = https://github.com/TexasInstruments/cc32xx_open_sdk.git + branch = main + platforms = cc32xx [submodule "third_party/openthread/ot-ti"] -path = third_party/openthread/ot-ti -url = https://github.com/TexasInstruments/ot-ti.git -branch = main -platforms = cc13xx_26xx + path = third_party/openthread/ot-ti + url = https://github.com/TexasInstruments/ot-ti.git + branch = main + platforms = cc13xx_26xx [submodule "third_party/nxp/mw320_sdk/repo"] -path = third_party/nxp/mw320_sdk/repo -url = https://github.com/nxptest/mw320_sdk -platforms = mw320 + path = third_party/nxp/mw320_sdk/repo + url = https://github.com/nxptest/mw320_sdk + platforms = mw320 [submodule "third_party/silabs/matter_support"] -path = third_party/silabs/matter_support -url = https://github.com/SiliconLabs/sdk_support.git -branch = main -platforms = efr32,silabs_docker + path = third_party/silabs/matter_support + url = https://github.com/SiliconLabs/sdk_support.git + branch = main + platforms = efr32,silabs_docker [submodule "third_party/silabs/gecko_sdk"] -path = third_party/silabs/gecko_sdk -url = https://github.com/SiliconLabs/gecko_sdk.git -branch = gsdk_4.1 -platforms = efr32 + path = third_party/silabs/gecko_sdk + url = https://github.com/SiliconLabs/gecko_sdk.git + branch = gsdk_4.1 + platforms = efr32 [submodule "third_party/silabs/wiseconnect-wifi-bt-sdk"] -path = third_party/silabs/wiseconnect-wifi-bt-sdk -url = https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk.git -branch = 2.7.1-Matter -platforms = efr32,silabs_docker + path = third_party/silabs/wiseconnect-wifi-bt-sdk + url = https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk.git + branch = 2.7.1-Matter + platforms = efr32,silabs_docker [submodule "editline"] -path = third_party/editline/repo -url = https://github.com/troglobit/editline.git + path = third_party/editline/repo + url = https://github.com/troglobit/editline.git [submodule "third_party/boringssl/repo/src"] -path = third_party/boringssl/repo/src -url = https://github.com/google/boringssl.git + path = third_party/boringssl/repo/src + url = https://github.com/google/boringssl.git [submodule "third_party/mt793x_sdk/filogic"] -path = third_party/mt793x_sdk/filogic -url = https://github.com/MediaTek-Labs/genio-matter-bsp.git -branch = main -platforms = genio + path = third_party/mt793x_sdk/filogic + url = https://github.com/MediaTek-Labs/genio-matter-bsp.git + branch = main + platforms = genio [submodule "third_party/mt793x_sdk/mDNSResponder"] -path = third_party/mt793x_sdk/mDNSResponder -url = https://github.com/matter-mtk/genio-matter-mdnsresponder.git -branch = main -platforms = genio + path = third_party/mt793x_sdk/mDNSResponder + url = https://github.com/matter-mtk/genio-matter-mdnsresponder.git + branch = main + platforms = genio [submodule "third_party/mt793x_sdk/lwip"] -path = third_party/mt793x_sdk/lwip -url = https://github.com/matter-mtk/genio-matter-lwip.git -branch = main -platforms = genio + path = third_party/mt793x_sdk/lwip + url = https://github.com/matter-mtk/genio-matter-lwip.git + branch = main + platforms = genio [submodule "open-iot-sdk"] -path = third_party/open-iot-sdk/sdk -url = https://git.gitlab.arm.com/iot/open-iot-sdk/sdk.git -branch = main -platforms = openiotsdk + path = third_party/open-iot-sdk/sdk + url = https://git.gitlab.arm.com/iot/open-iot-sdk/sdk.git + branch = main + platforms = openiotsdk [submodule "bouffalolab_sdk"] -path = third_party/bouffalolab/repo -url = https://github.com/bouffalolab/bl_iot_sdk_tiny.git -branch = main -platforms = bouffalolab + path = third_party/bouffalolab/repo + url = https://github.com/bouffalolab/bl_iot_sdk_tiny.git + branch = main + platforms = bouffalolab [submodule "third_party/libwebsockets/repo"] -path = third_party/libwebsockets/repo -url = https://github.com/warmcat/libwebsockets -platforms = linux,darwin,tizen + path = third_party/libwebsockets/repo + url = https://github.com/warmcat/libwebsockets + platforms = linux,darwin,tizen [submodule "third_party/imgui/repo"] -path = third_party/imgui/repo -url = https://github.com/ocornut/imgui -platforms = linux + path = third_party/imgui/repo + url = https://github.com/ocornut/imgui + platforms = linux [submodule "third_party/asr/asr582x/asr_sdk"] -path = third_party/asr/asr582x/asr_sdk -url = https://github.com/asriot/ASR582X_Freertos.git -branch = matter -platforms = asr + path = third_party/asr/asr582x/asr_sdk + url = https://github.com/asriot/ASR582X_Freertos.git + branch = matter + platforms = asr [submodule "third_party/asr/asr595x/asr_sdk"] -path = third_party/asr/asr595x/asr_sdk -url = https://github.com/asriot/ASR595X_Freertos.git -branch = matter -platforms = asr + path = third_party/asr/asr595x/asr_sdk + url = https://github.com/asriot/ASR595X_Freertos.git + branch = matter + platforms = asr [submodule "perfetto"] -path = third_party/perfetto/repo -url = https://github.com/google/perfetto.git -branch = master -platforms = linux,android + path = third_party/perfetto/repo + url = https://github.com/google/perfetto.git + branch = master + platforms = linux,android [submodule "third_party/asr/components"] -path = third_party/asr/components -url = https://github.com/asriot/asriot_components.git -branch = matter -platforms = asr + path = third_party/asr/components + url = https://github.com/asriot/asriot_components.git + branch = matter + platforms = asr [submodule "third_party/asr/asr550x/asr_sdk"] -path = third_party/asr/asr550x/asr_sdk -url = https://github.com/asriot/ASR550X_Freertos.git -branch = matter -platforms = asr + path = third_party/asr/asr550x/asr_sdk + url = https://github.com/asriot/ASR550X_Freertos.git + branch = matter + platforms = asr diff --git a/third_party/openthread/repo b/third_party/openthread/repo new file mode 160000 index 00000000000000..7f4c7fca2e72e2 --- /dev/null +++ b/third_party/openthread/repo @@ -0,0 +1 @@ +Subproject commit 7f4c7fca2e72e2fee3c33f8acf14d36d1be205a6 From 618d2ecc03076299dea6631a73d90f24e18929d3 Mon Sep 17 00:00:00 2001 From: abpoth Date: Thu, 20 Jul 2023 16:08:30 -0400 Subject: [PATCH 26/46] resolving conflicts --- .../tests/suites/certification/ci-pics-values | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index afe8105f4c5f37..665a89453add0f 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -2516,22 +2516,4 @@ RVCCLEANMS.S.A0005=1 #Commands: RVCCLEANMS.S.C00.Rsp=1 RVCCLEANMS.S.C01.Rsp=1 -RVCCLEANMS.S.C03.Tx=1 - -# Dishwasher Mode Cluster -DISHM.S=1 - -#Server Features -DISHM.S.F00=1 - -#Server Attributes -DISHM.S.A0000=1 -DISHM.S.A0001=1 -DISHM.S.A0002=1 -DISHM.S.A0003=1 - -#Server Commands Received: -DISHM.S.C00.Rsp=1 - -#Server Commands Generated: -DISHM.S.C01.Tx=1 \ No newline at end of file +RVCCLEANMS.S.C03.Tx=1 \ No newline at end of file From 491a9d24913ee48ff6a1eadf63167eaafc423b48 Mon Sep 17 00:00:00 2001 From: abpoth Date: Mon, 24 Jul 2023 16:39:38 +0800 Subject: [PATCH 27/46] updated DISHM test cases per current spec and ran code regen successfully --- .../certification/Test_TC_DISHM_1_2.yaml | 55 - .../certification/Test_TC_DISHM_3_1.yaml | 86 - .../certification/Test_TC_DISHM_3_3.yaml | 128 -- .../chip-tool/zap-generated/test/Commands.h | 862 ++++++++- .../zap-generated/test/Commands.h | 1592 +++++++++++++++++ 5 files changed, 2387 insertions(+), 336 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml index 438a341c2a0cde..ea958c782557ca 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml @@ -13,18 +13,13 @@ # 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 -<<<<<<< HEAD name: 193.1.2. [TC-DISHM-1.2] Cluster attributes with DUT as Server -======= -name: 263.1.2. [TC-DISHM-1.2] Cluster attributes with DUT as Server ->>>>>>> master PICS: - DISHM.S config: nodeId: 0x12344321 -<<<<<<< HEAD cluster: "Dishwasher Mode" endpoint: 1 @@ -42,25 +37,6 @@ tests: ./chip-tool dishwashermode read supported-modes 1 1 On TH(chip-tool) log, Verify SupportedModes attribute should contains atleast one ModeOptionsStruct entries with unique mode field value and label field value below is the sample log provided for the raspi platform: -======= - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the SupportedModes attribute." - PICS: DISHM.S.A0000 - verification: | - ./chip-tool dishwashermodeselect read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute should contains atleast two ModeOptionsStruct entries with unique mode field value and label field value below is the sample log provided for the raspi platform: ->>>>>>> master [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries @@ -103,7 +79,6 @@ tests: [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 [1687687925.445385][18054:18056] CHIP:TOO: } [1687687925.445405][18054:18056] CHIP:TOO: } -<<<<<<< HEAD cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -117,21 +92,12 @@ tests: - label: "TH reads the CurrentMode attribute from the DUT" verification: | ./chip-tool dishwashermode read current-mode 1 1 -======= - disabled: true - - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 - verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 ->>>>>>> master Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut, below is the sample log provided for the raspi platform: [1645776767.611140][4667:4672] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469718 [1645776767.611214][4667:4672] CHIP:TOO: CurrentMode: 0 -<<<<<<< HEAD cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -145,14 +111,6 @@ tests: - label: "TH reads the OnMode attribute from the DUT" verification: | ./chip-tool dishwashermode read on-mode 1 1 -======= - disabled: true - - - label: "Step 4: TH reads from the DUT the OnMode attribute." - PICS: DISHM.S.A0003 - verification: | - ./chip-tool dishwashermodeselect read on-mode 1 1 ->>>>>>> master Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut (As per spec default value is null) , below is the sample log provided for the raspi platform: @@ -160,7 +118,6 @@ tests: [1649676072.465968][10754:10759] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065072 [1649676072.466094][10754:10759] CHIP:TOO: OnMode: null -<<<<<<< HEAD cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -174,20 +131,11 @@ tests: - label: "TH reads the StartUpMode attribute from the DUT" verification: | ./chip-tool dishwashermode read start-up-mode 1 1 -======= - disabled: true - - - label: "Step 5: TH reads from the DUT the StartUpMode attribute." - PICS: DISHM.S.A0002 - verification: | - ./chip-tool dishwashermodeselect read start-up-mode 1 1 ->>>>>>> master Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer and value is from supported_modes_dut, below is the sample log provided for the raspi platform: [1649677014.496348][10778:10784] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 4277065072 [1649677014.496469][10778:10784] CHIP:TOO: StartUpMode: 0 -<<<<<<< HEAD cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -197,6 +145,3 @@ tests: value: "Please enter 'y' for success" - name: "expectedValue" value: "y" -======= - disabled: true ->>>>>>> master diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml index 841768c3d79fdc..b1df59258acc23 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml @@ -13,18 +13,13 @@ # 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 -<<<<<<< HEAD name: 193.3.1. [TC-DISHM-3.1] OnMode Verification with DUT as Server -======= -name: 263.4.1. [TC-DISHM-3.1] OnMode verification with DUT as Server ->>>>>>> master PICS: - DISHM.S config: nodeId: 0x12344321 -<<<<<<< HEAD cluster: "Dishwasher Mode" endpoint: 1 @@ -78,47 +73,6 @@ tests: - label: "TH reads the SupportedModes attribute from DUT" verification: | ./chip-tool dishwashermode read supported-modes 1 1 -======= - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the OnMode attribute." - PICS: DISHM.S.A0003 && DISHM.S.F00 - verification: | - ./chip-tool dishwashermodeselect read on-mode 1 1 - - On TH(chip-tool), Verify OnMode attribute value is an integer. save the value as on_mode_dut and below is the sample log provided for the raspi platform: - - [1649678983.679893][10871:10876] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065073 - [1649678983.680002][10871:10876] CHIP:TOO: OnMode: 0 - disabled: true - - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 && DISHM.S.F00 - verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 - - On TH(chip-tool), Verify CurrentMode attribute is an integer. save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: - - NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. - - [1649679034.895848][10879:10884] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 - [1649679034.895972][10879:10884] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." - PICS: DISHM.S.A0000 && DISHM.S.F00 - verification: | - ./chip-tool dishwashermodeselect read supported-modes 1 1 ->>>>>>> master On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. Save the Mode field values as supported_modes_dut. @@ -165,7 +119,6 @@ tests: [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 [1687687925.445385][18054:18056] CHIP:TOO: } [1687687925.445405][18054:18056] CHIP:TOO: } -<<<<<<< HEAD cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -181,16 +134,6 @@ tests: new_mode_th" verification: | ./chip-tool dishwashermode change-to-mode 2 1 1 -======= - disabled: true - - - label: - "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - PICS: DISHM.S.C00.Rsp && DISHM.S.F00 - verification: | - ./chip-tool dishwashermodeselect change-to-mode 2 1 1 ->>>>>>> master On TH(chip-tool) log, verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: @@ -200,7 +143,6 @@ tests: [1684931013.571027][20667:20669] CHIP:DMG: status = 0x00 (SUCCESS), [1684931013.571030][20667:20669] CHIP:DMG: }, [1684931013.571034][20667:20669] CHIP:DMG: -<<<<<<< HEAD cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -212,12 +154,6 @@ tests: value: "y" - label: "TH sends Off Command to DUT" -======= - disabled: true - - - label: "Step 6: TH sends a Off command to the DUT" - PICS: OO.S.C00.Rsp && DISHM.S.F00 ->>>>>>> master verification: | ./chip-tool onoff off 1 1 @@ -227,7 +163,6 @@ tests: [1684931101.118659][20709:20711] CHIP:DMG: { [1684931101.118663][20709:20711] CHIP:DMG: status = 0x00 (SUCCESS), [1684931101.118665][20709:20711] CHIP:DMG: }, -<<<<<<< HEAD cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -239,12 +174,6 @@ tests: value: "y" - label: "TH sends On Command to DUT" -======= - disabled: true - - - label: "Step 7: TH sends a On command to the DUT" - PICS: OO.S.C01.Rsp && DISHM.S.F00 ->>>>>>> master verification: | ./chip-tool onoff on 1 1 @@ -254,7 +183,6 @@ tests: [1684931217.055517][20729:20731] CHIP:DMG: { [1684931217.055520][20729:20731] CHIP:DMG: status = 0x00 (SUCCESS), [1684931217.055523][20729:20731] CHIP:DMG: }, -<<<<<<< HEAD cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -282,17 +210,3 @@ tests: value: "Please enter 'y' for success" - name: "expectedValue" value: "y" -======= - disabled: true - - - label: "Step 8: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 && DISHM.S.F00 - verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute value is an integer and value is equal to on_mode_dut. below is the sample log provided for the raspi platform: - - [1649679202.069163][10899:10904] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 - [1649679202.069278][10899:10904] CHIP:TOO: CurrentMode: 2 - disabled: true ->>>>>>> master diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml index 996c202b0f1084..8e0ab9604566aa 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml @@ -1,11 +1,8 @@ -<<<<<<< HEAD -======= # Copyright (c) 2023 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 ->>>>>>> master # # http://www.apache.org/licenses/LICENSE-2.0 # @@ -16,18 +13,13 @@ # 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 -<<<<<<< HEAD name: 193.3.3. [TC-DISHM-3.3] OnMode overwriting StartUpMode with DUT as Server -======= -name: 189.3.3.[TC-DISHM-3.3] OnMode overwriting StartUpMode with DUT as Server ->>>>>>> master PICS: - DISHM.S config: nodeId: 0x12344321 -<<<<<<< HEAD cluster: "Dishwasher Mode" endpoint: 1 @@ -63,30 +55,10 @@ tests: ./chip-tool dishwashermode read start-up-mode 1 1 On TH(chip-tool) log, Verify StartUpMode attribute value is an integer. Save this value as startup_mode_dut and below is the sample log provided for the raspi platform: -======= - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: DISHM.S.A0002 - verification: | - ./chip-tool dishwashermodeselect read start-up-mode 1 1 - - On TH(chip-tool) log, Verify StartUpMode attribute value is an integer. save this value as startup_mode_dut and below is the sample log provided for the raspi platform: ->>>>>>> master [1651099663211] [82177:7560652] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 2609052118 [1651099663212] [82177:7560652] CHIP: [TOO] StartUpMode: 0 -<<<<<<< HEAD cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -125,31 +97,6 @@ tests: On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. Save the Mode field values as supported_modes_dut. Select a value from supported_modes_dut different from startup_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: -======= - disabled: true - - - label: "Step 3: TH reads from the DUT the OnMode attribute." - PICS: DISHM.S.A0003 && DISHM.S.A0002 - verification: | - ./chip-tool dishwashermodeselect read on-mode 1 1 - - On TH(chip-tool) log, Verify OnMode attribute value is an integer. save the value as old_on_mode_dut and below is the sample log provided for the raspi platform: - - - [1654780979.979743][61542:61547] CHIP:DMG: } - [1654780979.980040][61542:61547] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 235764160 - [1654780979.980202][61542:61547] CHIP:TOO: OnMode: 4 - disabled: true - - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." - PICS: DISHM.S.A0000 && DISHM.S.A0002 - verification: | - ./chip-tool dishwashermodeselect read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. - Save the Mode field values as supported_modes_dut. - Select a value from supported_modes_dut different from on_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: ->>>>>>> master [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries @@ -192,7 +139,6 @@ tests: [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 [1687687925.445385][18054:18056] CHIP:TOO: } [1687687925.445405][18054:18056] CHIP:TOO: } -<<<<<<< HEAD cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -263,60 +209,6 @@ tests: value: "y" - label: "TH writes to the DUT the StartUpOnOff attribute with the value 1." -======= - disabled: true - - - label: - "Step 5: TH writes to the DUT the OnMode attribute with the - new_mode_th value" - PICS: DISHM.S.A0003 - verification: | - ./chip-tool dishwashermodeselect write on-mode 7 1 1 - - On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1651099941884] [84269:7567211] CHIP: [DMG] WriteResponseMessage = - [1651099941884] [84269:7567211] CHIP: [DMG] { - [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIBs = - [1651099941884] [84269:7567211] CHIP: [DMG] [ - [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIB = - [1651099941884] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] AttributePathIB = - [1651099941887] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] Endpoint = 0x1, - [1651099941887] [84269:7567211] CHIP: [DMG] Cluster = 0x50, - [1651099941887] [84269:7567211] CHIP: [DMG] Attribute = 0x0000_0005, - [1651099941887] [84269:7567211] CHIP: [DMG] } - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] StatusIB = - [1651099941887] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651099941887] [84269:7567211] CHIP: [DMG] }, - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] }, - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] ], - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] InteractionModelRevision = 1 - [1651099941887] [84269:7567211] CHIP: [DMG] } - disabled: true - - - label: "Step 6: TH reads from the DUT the OnMode attribute." - PICS: DISHM.S.A0003 && DISHM.S.F00 - verification: | - ./chip-tool dishwashermodeselect read on-mode 1 1 - - On TH(chip-tool) log, Verify OnMode attribute value is an integer. save the value as new_on_mode_dut and below is the sample log provided for the raspi platform: - - [1669190858.739158][4187:4189] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4107771634 - [1669190858.739222][4187:4189] CHIP:TOO: OnMode: 7 - disabled: true - - - label: - "Step 7: TH writes to the DUT the StartUpOnOff attribute with the - value 1." - PICS: OO.S.A4003 ->>>>>>> master verification: | ./chip-tool onoff write start-up-on-off 1 1 1 @@ -346,7 +238,6 @@ tests: [1651101661960] [90832:7598169] CHIP: [DMG] [1651101661960] [90832:7598169] CHIP: [DMG] InteractionModelRevision = 1 [1651101661960] [90832:7598169] CHIP: [DMG] } -<<<<<<< HEAD cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT @@ -387,22 +278,3 @@ tests: value: "Please enter 'y' for success" - name: "expectedValue" value: "y" -======= - disabled: true - - - label: "Step 8: Physically power cycle the device" - verification: | - Physically power cycle the device. - disabled: true - - - label: "Step 9: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 - verification: | - ./chip-tool dishwashermodeselect read current-mode 1 1 - - On TH(chip-tool), Verify CurrentMode attribute value is same as the value recorded in step 3 and below is the sample log provided for the raspi platform: - - [1669190936.869804][4194:4196] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3908583538 - [1669190936.869875][4194:4196] CHIP:TOO: CurrentMode: 7 - disabled: true ->>>>>>> master diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 4d2df17c93e962..2a0a341758e770 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -120837,7 +120837,7 @@ class Test_TC_DISHALM_3_6Suite : public TestCommand class Test_TC_DISHM_1_1Suite : public TestCommand { public: - Test_TC_DISHM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_1_1", 0, credsIssuerConfig) + Test_TC_DISHM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_1_1", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -120870,6 +120870,89 @@ class Test_TC_DISHM_1_1Suite : public TestCommand 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", "int16u", "int16u")); + } + 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", "bitmap32", "bitmap32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 1UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + 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))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + 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))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + } + break; + case 6: + 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", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } + break; + case 7: + 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", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + } + break; + case 8: + 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", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -120884,7 +120967,59 @@ class Test_TC_DISHM_1_1Suite : public TestCommand { 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 from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, + DishwasherMode::Attributes::ClusterRevision::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads the FeatureMap from DUT"); + VerifyOrDo(!ShouldSkip(" !DISHM.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::FeatureMap::Id, + true, chip::NullOptional); + } + case 3: { + LogStep(3, "Given DISHM.S.F00(DEPONOFF) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("DISHM.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::FeatureMap::Id, + true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads AttributeList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads optional attribute (DISHM.S.A0004(StartUpMode)) in AttributeList"); + VerifyOrDo(!ShouldSkip("DISHM.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 6: { + LogStep(6, "TH reads optional attribute (DISHM.S.A0003(OnMode)) in AttributeList"); + VerifyOrDo(!ShouldSkip("DISHM.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 7: { + LogStep(7, "TH reads AcceptedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, + DishwasherMode::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, + DishwasherMode::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + } return CHIP_NO_ERROR; } }; @@ -120892,7 +121027,7 @@ class Test_TC_DISHM_1_1Suite : public TestCommand class Test_TC_DISHM_1_2Suite : public TestCommand { public: - Test_TC_DISHM_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_1_2", 0, credsIssuerConfig) + Test_TC_DISHM_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_1_2", 5, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -120925,6 +121060,26 @@ class Test_TC_DISHM_1_2Suite : public TestCommand 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)); + shouldContinue = true; + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + 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)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -120939,7 +121094,55 @@ class Test_TC_DISHM_1_2Suite : public TestCommand { 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 SupportedModes attribute 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 2: { + LogStep(2, "TH reads the CurrentMode attribute from the 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 3: { + LogStep(3, "TH reads the OnMode attribute from the 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 4: { + LogStep(4, "TH reads the StartUpMode attribute from the 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; } }; @@ -120947,7 +121150,7 @@ class Test_TC_DISHM_1_2Suite : public TestCommand class Test_TC_DISHM_2_1Suite : public TestCommand { public: - Test_TC_DISHM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_2_1", 0, credsIssuerConfig) + Test_TC_DISHM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_2_1", 14, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -120980,53 +121183,248 @@ class Test_TC_DISHM_2_1Suite : public TestCommand 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_DISHM_3_1Suite : public TestCommand -{ -public: - Test_TC_DISHM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_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_DISHM_3_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 + 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)); + shouldContinue = true; + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + 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)); + 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)); + shouldContinue = true; + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + 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)); + shouldContinue = true; + 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 the SupportedModes attribute 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 2: { + LogStep(2, "TH reads the CurrentMode attribute from the 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 3: { + LogStep(3, "TH sends a ChangeToMode command to the DUT with NewMode set to old_current_mode_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 4: { + LogStep(4, "Manually put the device in a state from which it will FAIL to transition to PIXIT.DISHM.MODE_CHANGE_FAIL"); + 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 5: { + LogStep(5, "TH reads the CurrentMode attribute from the 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 6: { + LogStep(6, "TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.DISHM.MODE_CHANGE_FAIL"); + 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, "TH reads the CurrentMode attribute from the 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 8: { + LogStep(8, + "Manually put the device in a state from which it will SUCCESSFULLY transition to PIXIT.DISHM.MODE_CHANGE_OK"); + 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 reads the CurrentMode attribute from the 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 10: { + LogStep(10, "TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.DISHM.MODE_CHANGE_OK"); + 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 11: { + LogStep(11, "TH reads the CurrentMode attribute from the 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 sends a ChangeToMode command to the DUT with NewMode set to invalid_mode_th"); + 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 the CurrentMode attribute from the 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_DISHM_3_1Suite : public TestCommand +{ +public: + Test_TC_DISHM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_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_DISHM_3_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 @@ -121035,21 +121433,131 @@ class Test_TC_DISHM_3_1Suite : public TestCommand 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)); + shouldContinue = true; + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + 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)); + 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)); + 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); + + 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 from the OnMode attribute 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 2: { + LogStep(2, "TH reads the CurrentMode attribute from the 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 3: { + LogStep(3, "TH reads the SupportedModes attribute 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 4: { + LogStep(4, "TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th"); + 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 5: { + LogStep(5, "TH sends Off 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 6: { + LogStep(6, "TH sends On 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 7: { + LogStep(7, "TH reads the CurrentMode attribute from the 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); + } } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} return CHIP_NO_ERROR; } }; @@ -121057,7 +121565,7 @@ class Test_TC_DISHM_3_1Suite : public TestCommand class Test_TC_DISHM_3_2Suite : public TestCommand { public: - Test_TC_DISHM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_2", 0, credsIssuerConfig) + Test_TC_DISHM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_2", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121090,6 +121598,34 @@ class Test_TC_DISHM_3_2Suite : public TestCommand 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)); + shouldContinue = true; + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + 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)); + 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)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -121104,7 +121640,75 @@ class Test_TC_DISHM_3_2Suite : public TestCommand { 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 from the StartUpMode attribute 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 2: { + LogStep(2, "TH reads the CurrentMode attribute from the 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 3: { + LogStep(3, "TH reads the SupportedModes attribute 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 4: { + LogStep(4, "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th"); + 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 5: { + LogStep(5, "Physically power cycle the device"); + 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 reads the CurrentMode attribute from the 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; } }; @@ -121112,7 +121716,7 @@ class Test_TC_DISHM_3_2Suite : public TestCommand class Test_TC_DISHM_3_3Suite : public TestCommand { public: - Test_TC_DISHM_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_3", 0, credsIssuerConfig) + Test_TC_DISHM_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_3", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121145,6 +121749,42 @@ class Test_TC_DISHM_3_3Suite : public TestCommand 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)); + shouldContinue = true; + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + 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)); + 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)); + shouldContinue = true; + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -121159,7 +121799,95 @@ class Test_TC_DISHM_3_3Suite : public TestCommand { 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 from the StartUpMode attribute 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 2: { + LogStep(2, "TH reads from the OnMode attribute 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 3: { + LogStep(3, "TH reads the SupportedModes attribute 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 4: { + LogStep(4, "TH writes to the DUT the OnMode attribute with the new_mode_th value"); + 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 5: { + LogStep(5, "TH reads from the OnMode attribute 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 6: { + LogStep(6, "TH writes to the DUT the StartUpOnOff attribute with the value 1."); + 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, "Physically power cycle the device"); + 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 8: { + LogStep(8, "TH reads the CurrentMode attribute from the 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; } }; 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 2dc568d1ef81d4..8a207416bd081f 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -92,6 +92,12 @@ class TestList : public Command { printf("Test_TC_CNET_1_3\n"); printf("Test_TC_DESC_1_1\n"); printf("Test_TC_DLOG_1_1\n"); + printf("Test_TC_DISHM_1_1\n"); + printf("Test_TC_DISHM_1_2\n"); + printf("Test_TC_DISHM_2_1\n"); + printf("Test_TC_DISHM_3_1\n"); + printf("Test_TC_DISHM_3_2\n"); + printf("Test_TC_DISHM_3_3\n"); printf("Test_TC_DGETH_1_1\n"); printf("Test_TC_DGETH_2_1\n"); printf("Test_TC_DGETH_2_2\n"); @@ -45675,6 +45681,1586 @@ class Test_TC_DLOG_1_1 : public TestCommandBridge { } }; +class Test_TC_DISHM_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_DISHM_1_1() + : TestCommandBridge("Test_TC_DISHM_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_DISHM_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DISHM_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DISHM_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 from DUT\n"); + err = TestThReadsTheClusterRevisionFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + if (ShouldSkip(" !DISHM.S.F00 ")) { + NextTest(); + return; + } + err = TestThReadsTheFeatureMapFromDut_2(); + break; + case 3: + ChipLogProgress( + chipTool, " ***** Test Step 3 : Given DISHM.S.F00(DEPONOFF) ensure featuremap has the correct bit set\n"); + if (ShouldSkip("DISHM.S.F00")) { + NextTest(); + return; + } + err = TestGivenDishmsf00deponoffEnsureFeaturemapHasTheCorrectBitSet_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads AttributeList from DUT\n"); + err = TestThReadsAttributeListFromDut_4(); + break; + case 5: + ChipLogProgress( + chipTool, " ***** Test Step 5 : TH reads optional attribute (DISHM.S.A0004(StartUpMode)) in AttributeList\n"); + if (ShouldSkip("DISHM.S.A0002")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeDISHMSA0004StartUpModeInAttributeList_5(); + break; + case 6: + ChipLogProgress( + chipTool, " ***** Test Step 6 : TH reads optional attribute (DISHM.S.A0003(OnMode)) in AttributeList\n"); + if (ShouldSkip("DISHM.S.F00")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeDISHMSA0003OnModeInAttributeList_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads AcceptedCommandList from DUT\n"); + err = TestThReadsAcceptedCommandListFromDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_8(); + 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; + } + + // 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 = 9; + + 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 TestThReadsTheClusterRevisionFromDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestGivenDishmsf00deponoffEnsureFeaturemapHasTheCorrectBitSet_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Given DISHM.S.F00(DEPONOFF) ensure featuremap has the correct bit set Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsAttributeListFromDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeDISHMSA0004StartUpModeInAttributeList_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (DISHM.S.A0004(StartUpMode)) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeDISHMSA0003OnModeInAttributeList_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (DISHM.S.A0003(OnMode)) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DISHM_1_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_DISHM_1_2() + : TestCommandBridge("Test_TC_DISHM_1_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_DISHM_1_2() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DISHM_1_2\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DISHM_1_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 reads the SupportedModes attribute from DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheSupportedModesAttributeFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the CurrentMode attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheCurrentModeAttributeFromTheDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the OnMode attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheOnModeAttributeFromTheDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads the StartUpMode attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheStartUpModeAttributeFromTheDut_4(); + 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; + } + + // 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 = 5; + + 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 TestThReadsTheSupportedModesAttributeFromDut_1() + { + + 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 TestThReadsTheCurrentModeAttributeFromTheDut_2() + { + + 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 TestThReadsTheOnModeAttributeFromTheDut_3() + { + + 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 TestThReadsTheStartUpModeAttributeFromTheDut_4() + { + + 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_DISHM_2_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_DISHM_2_1() + : TestCommandBridge("Test_TC_DISHM_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_DISHM_2_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DISHM_2_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DISHM_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 SupportedModes attribute from DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheSupportedModesAttributeFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the CurrentMode attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheCurrentModeAttributeFromTheDut_2(); + break; + case 3: + ChipLogProgress(chipTool, + " ***** Test Step 3 : TH sends a ChangeToMode command to the DUT with NewMode set to old_current_mode_dut\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThSendsAChangeToModeCommandToTheDutWithNewModeSetToOldCurrentModeDut_3(); + break; + case 4: + ChipLogProgress(chipTool, + " ***** Test Step 4 : Manually put the device in a state from which it will FAIL to transition to " + "PIXIT.DISHM.MODE_CHANGE_FAIL\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestManuallyPutTheDeviceInAStateFromWhichItWillFailToTransitionToPixitdishmmodeChangeFail_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads the CurrentMode attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheCurrentModeAttributeFromTheDut_5(); + break; + case 6: + ChipLogProgress(chipTool, + " ***** Test Step 6 : TH sends a ChangeToMode command to the DUT with NewMode set to " + "PIXIT.DISHM.MODE_CHANGE_FAIL\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThSendsAChangeToModeCommandToTheDutWithNewModeSetToPixitdishmmodeChangeFail_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads the CurrentMode attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheCurrentModeAttributeFromTheDut_7(); + break; + case 8: + ChipLogProgress(chipTool, + " ***** Test Step 8 : Manually put the device in a state from which it will SUCCESSFULLY transition to " + "PIXIT.DISHM.MODE_CHANGE_OK\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestManuallyPutTheDeviceInAStateFromWhichItWillSuccessfullyTransitionToPixitdishmmodeChangeOk_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads the CurrentMode attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheCurrentModeAttributeFromTheDut_9(); + break; + case 10: + ChipLogProgress(chipTool, + " ***** Test Step 10 : TH sends a ChangeToMode command to the DUT with NewMode set to " + "PIXIT.DISHM.MODE_CHANGE_OK\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThSendsAChangeToModeCommandToTheDutWithNewModeSetToPixitdishmmodeChangeOk_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads the CurrentMode attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheCurrentModeAttributeFromTheDut_11(); + break; + case 12: + ChipLogProgress( + chipTool, " ***** Test Step 12 : TH sends a ChangeToMode command to the DUT with NewMode set to invalid_mode_th\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThSendsAChangeToModeCommandToTheDutWithNewModeSetToInvalidModeTh_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads the CurrentMode attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheCurrentModeAttributeFromTheDut_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 TestThReadsTheSupportedModesAttributeFromDut_1() + { + + 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 TestThReadsTheCurrentModeAttributeFromTheDut_2() + { + + 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 TestThSendsAChangeToModeCommandToTheDutWithNewModeSetToOldCurrentModeDut_3() + { + + 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 TestManuallyPutTheDeviceInAStateFromWhichItWillFailToTransitionToPixitdishmmodeChangeFail_4() + { + + 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 TestThReadsTheCurrentModeAttributeFromTheDut_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 TestThSendsAChangeToModeCommandToTheDutWithNewModeSetToPixitdishmmodeChangeFail_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 TestThReadsTheCurrentModeAttributeFromTheDut_7() + { + + 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 TestManuallyPutTheDeviceInAStateFromWhichItWillSuccessfullyTransitionToPixitdishmmodeChangeOk_8() + { + + 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 TestThReadsTheCurrentModeAttributeFromTheDut_9() + { + + 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 TestThSendsAChangeToModeCommandToTheDutWithNewModeSetToPixitdishmmodeChangeOk_10() + { + + 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 TestThReadsTheCurrentModeAttributeFromTheDut_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 TestThSendsAChangeToModeCommandToTheDutWithNewModeSetToInvalidModeTh_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 TestThReadsTheCurrentModeAttributeFromTheDut_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_DISHM_3_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_DISHM_3_1() + : TestCommandBridge("Test_TC_DISHM_3_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_DISHM_3_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DISHM_3_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DISHM_3_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 from the OnMode attribute from DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsFromTheOnModeAttributeFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the CurrentMode attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheCurrentModeAttributeFromTheDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the SupportedModes attribute from DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheSupportedModesAttributeFromDut_3(); + break; + case 4: + ChipLogProgress( + chipTool, " ***** Test Step 4 : TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThSendsAChangeToModeCommandToTheDutWithNewModeSetToNewModeTh_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends Off Command to DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThSendsOffCommandToDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends On Command to DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThSendsOnCommandToDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads the CurrentMode attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheCurrentModeAttributeFromTheDut_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 TestThReadsFromTheOnModeAttributeFromDut_1() + { + + 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 TestThReadsTheCurrentModeAttributeFromTheDut_2() + { + + 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 TestThReadsTheSupportedModesAttributeFromDut_3() + { + + 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 TestThSendsAChangeToModeCommandToTheDutWithNewModeSetToNewModeTh_4() + { + + 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 TestThSendsOffCommandToDut_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 TestThSendsOnCommandToDut_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 TestThReadsTheCurrentModeAttributeFromTheDut_7() + { + + 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_DISHM_3_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_DISHM_3_2() + : TestCommandBridge("Test_TC_DISHM_3_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_DISHM_3_2() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DISHM_3_2\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DISHM_3_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 reads from the StartUpMode attribute from DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsFromTheStartUpModeAttributeFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the CurrentMode attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheCurrentModeAttributeFromTheDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the SupportedModes attribute from DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheSupportedModesAttributeFromDut_3(); + break; + case 4: + ChipLogProgress( + chipTool, " ***** Test Step 4 : TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThSendAChangeToModeCommandToTheDutWithNewModeSetToNewModeTh_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Physically power cycle the device\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestPhysicallyPowerCycleTheDevice_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads the CurrentMode attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheCurrentModeAttributeFromTheDut_6(); + 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; + } + + // 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 = 7; + + 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 TestThReadsFromTheStartUpModeAttributeFromDut_1() + { + + 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 TestThReadsTheCurrentModeAttributeFromTheDut_2() + { + + 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 TestThReadsTheSupportedModesAttributeFromDut_3() + { + + 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 TestThSendAChangeToModeCommandToTheDutWithNewModeSetToNewModeTh_4() + { + + 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 TestPhysicallyPowerCycleTheDevice_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 TestThReadsTheCurrentModeAttributeFromTheDut_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); + } +}; + +class Test_TC_DISHM_3_3 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_DISHM_3_3() + : TestCommandBridge("Test_TC_DISHM_3_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_DISHM_3_3() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DISHM_3_3\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DISHM_3_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 reads from the StartUpMode attribute from DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsFromTheStartUpModeAttributeFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the OnMode attribute from DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsFromTheOnModeAttributeFromDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the SupportedModes attribute from DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheSupportedModesAttributeFromDut_3(); + break; + case 4: + ChipLogProgress( + chipTool, " ***** Test Step 4 : TH writes to the DUT the OnMode attribute with the new_mode_th value\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThWritesToTheDutTheOnModeAttributeWithTheNewModeThValue_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads from the OnMode attribute from DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsFromTheOnModeAttributeFromDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH writes to the DUT the StartUpOnOff attribute with the value 1.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThWritesToTheDutTheStartUpOnOffAttributeWithTheValue1_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Physically power cycle the device\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestPhysicallyPowerCycleTheDevice_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads the CurrentMode attribute from the DUT\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsTheCurrentModeAttributeFromTheDut_8(); + 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; + } + + // 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 = 9; + + 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 TestThReadsFromTheStartUpModeAttributeFromDut_1() + { + + 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 TestThReadsFromTheOnModeAttributeFromDut_2() + { + + 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 TestThReadsTheSupportedModesAttributeFromDut_3() + { + + 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 TestThWritesToTheDutTheOnModeAttributeWithTheNewModeThValue_4() + { + + 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 TestThReadsFromTheOnModeAttributeFromDut_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 TestThWritesToTheDutTheStartUpOnOffAttributeWithTheValue1_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 TestPhysicallyPowerCycleTheDevice_7() + { + + 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 TestThReadsTheCurrentModeAttributeFromTheDut_8() + { + + 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_DGETH_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -173565,6 +175151,12 @@ 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(), make_unique(), From 0e2af46fbc356a6d758cdb5ee8d61fb528a02271 Mon Sep 17 00:00:00 2001 From: abpoth Date: Mon, 24 Jul 2023 17:20:57 +0800 Subject: [PATCH 28/46] updated code regen and removed manual tests --- src/app/tests/suites/manualTests.json | 9 - .../chip-tool/zap-generated/test/Commands.h | 1196 +---------------- 2 files changed, 63 insertions(+), 1142 deletions(-) diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index cde28a356d9e97..92822cb7ba9429 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -72,14 +72,6 @@ "Test_TC_DISHALM_3_5", "Test_TC_DISHALM_3_6" ], - "DishwasherMode": [ - "Test_TC_DISHM_1_1", - "Test_TC_DISHM_1_2", - "Test_TC_DISHM_2_1", - "Test_TC_DISHM_3_1", - "Test_TC_DISHM_3_2", - "Test_TC_DISHM_3_3" - ], "DeviceManagement": [ "Test_TC_BINFO_3_1", "Test_TC_OPCREDS_3_1", @@ -373,7 +365,6 @@ "DeviceManagement", "DiagnosticsLogs", "DishwasherAlarm", - "DishwasherMode", "Descriptor", "FanControl", "EthernetNetworkDiagnostics", diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 2a0a341758e770..d984be6b6db5d9 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -438,12 +438,6 @@ class ManualTestList : public Command printf("Test_TC_DISHALM_3_4\n"); printf("Test_TC_DISHALM_3_5\n"); printf("Test_TC_DISHALM_3_6\n"); - printf("Test_TC_DISHM_1_1\n"); - printf("Test_TC_DISHM_1_2\n"); - printf("Test_TC_DISHM_2_1\n"); - printf("Test_TC_DISHM_3_1\n"); - printf("Test_TC_DISHM_3_2\n"); - printf("Test_TC_DISHM_3_3\n"); printf("Test_TC_DESC_2_1\n"); printf("Test_TC_FAN_3_3\n"); printf("Test_TC_FAN_3_5\n"); @@ -120834,10 +120828,10 @@ class Test_TC_DISHALM_3_6Suite : public TestCommand } }; -class Test_TC_DISHM_1_1Suite : public TestCommand +class Test_TC_DESC_2_1Suite : public TestCommand { public: - Test_TC_DISHM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_1_1", 9, 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); @@ -120845,7 +120839,7 @@ class Test_TC_DISHM_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DISHM_1_1Suite() {} + ~Test_TC_DESC_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -120870,89 +120864,6 @@ class Test_TC_DISHM_1_1Suite : public TestCommand 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", "int16u", "int16u")); - } - 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", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 1UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - 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))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - 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))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 6: - 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", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 7: - 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", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 8: - 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", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -120967,67 +120878,15 @@ class Test_TC_DISHM_1_1Suite : public TestCommand { 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 from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, - DishwasherMode::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads the FeatureMap from DUT"); - VerifyOrDo(!ShouldSkip(" !DISHM.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 3: { - LogStep(3, "Given DISHM.S.F00(DEPONOFF) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("DISHM.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::FeatureMap::Id, - true, chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads AttributeList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 5: { - LogStep(5, "TH reads optional attribute (DISHM.S.A0004(StartUpMode)) in AttributeList"); - VerifyOrDo(!ShouldSkip("DISHM.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "TH reads optional attribute (DISHM.S.A0003(OnMode)) in AttributeList"); - VerifyOrDo(!ShouldSkip("DISHM.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 7: { - LogStep(7, "TH reads AcceptedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, - DishwasherMode::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, - DishwasherMode::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } + {} return CHIP_NO_ERROR; } }; -class Test_TC_DISHM_1_2Suite : public TestCommand +class Test_TC_FAN_3_3Suite : public TestCommand { public: - Test_TC_DISHM_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_1_2", 5, credsIssuerConfig) + Test_TC_FAN_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FAN_3_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -121035,7 +120894,7 @@ class Test_TC_DISHM_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DISHM_1_2Suite() {} + ~Test_TC_FAN_3_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -121060,26 +120919,6 @@ class Test_TC_DISHM_1_2Suite : public TestCommand 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)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -121094,63 +120933,70 @@ class Test_TC_DISHM_1_2Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_FAN_3_5Suite : public TestCommand +{ +public: + Test_TC_FAN_3_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FAN_3_5", 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_FAN_3_5Suite() {} + + 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: { - 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 SupportedModes attribute 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 2: { - LogStep(2, "TH reads the CurrentMode attribute from the 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 3: { - LogStep(3, "TH reads the OnMode attribute from the 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 4: { - LogStep(4, "TH reads the StartUpMode attribute from the 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); + 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_DISHM_2_1Suite : public TestCommand +class Test_TC_CGEN_2_2Suite : public TestCommand { public: - Test_TC_DISHM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_2_1", 14, 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); @@ -121158,917 +121004,7 @@ class Test_TC_DISHM_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DISHM_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)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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)); - 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)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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)); - shouldContinue = true; - 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 the SupportedModes attribute 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 2: { - LogStep(2, "TH reads the CurrentMode attribute from the 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 3: { - LogStep(3, "TH sends a ChangeToMode command to the DUT with NewMode set to old_current_mode_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 4: { - LogStep(4, "Manually put the device in a state from which it will FAIL to transition to PIXIT.DISHM.MODE_CHANGE_FAIL"); - 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 5: { - LogStep(5, "TH reads the CurrentMode attribute from the 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 6: { - LogStep(6, "TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.DISHM.MODE_CHANGE_FAIL"); - 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, "TH reads the CurrentMode attribute from the 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 8: { - LogStep(8, - "Manually put the device in a state from which it will SUCCESSFULLY transition to PIXIT.DISHM.MODE_CHANGE_OK"); - 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 reads the CurrentMode attribute from the 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 10: { - LogStep(10, "TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.DISHM.MODE_CHANGE_OK"); - 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 11: { - LogStep(11, "TH reads the CurrentMode attribute from the 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 sends a ChangeToMode command to the DUT with NewMode set to invalid_mode_th"); - 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 the CurrentMode attribute from the 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_DISHM_3_1Suite : public TestCommand -{ -public: - Test_TC_DISHM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_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_DISHM_3_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)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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)); - 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)); - 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 from the OnMode attribute 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 2: { - LogStep(2, "TH reads the CurrentMode attribute from the 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 3: { - LogStep(3, "TH reads the SupportedModes attribute 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 4: { - LogStep(4, "TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th"); - 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 5: { - LogStep(5, "TH sends Off 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 6: { - LogStep(6, "TH sends On 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 7: { - LogStep(7, "TH reads the CurrentMode attribute from the 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_DISHM_3_2Suite : public TestCommand -{ -public: - Test_TC_DISHM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_2", 7, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DISHM_3_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)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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)); - 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)); - 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 from the StartUpMode attribute 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 2: { - LogStep(2, "TH reads the CurrentMode attribute from the 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 3: { - LogStep(3, "TH reads the SupportedModes attribute 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 4: { - LogStep(4, "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th"); - 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 5: { - LogStep(5, "Physically power cycle the device"); - 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 reads the CurrentMode attribute from the 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_DISHM_3_3Suite : public TestCommand -{ -public: - Test_TC_DISHM_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_3", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DISHM_3_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), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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)); - 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)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - 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 from the StartUpMode attribute 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 2: { - LogStep(2, "TH reads from the OnMode attribute 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 3: { - LogStep(3, "TH reads the SupportedModes attribute 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 4: { - LogStep(4, "TH writes to the DUT the OnMode attribute with the new_mode_th value"); - 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 5: { - LogStep(5, "TH reads from the OnMode attribute 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 6: { - LogStep(6, "TH writes to the DUT the StartUpOnOff attribute with the value 1."); - 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, "Physically power cycle the device"); - 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 8: { - LogStep(8, "TH reads the CurrentMode attribute from the 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_DESC_2_1Suite : public TestCommand -{ -public: - Test_TC_DESC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_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_DESC_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) - { - 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_FAN_3_3Suite : public TestCommand -{ -public: - Test_TC_FAN_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FAN_3_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_FAN_3_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_FAN_3_5Suite : public TestCommand -{ -public: - Test_TC_FAN_3_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FAN_3_5", 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_FAN_3_5Suite() {} - - 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_CGEN_2_2Suite : public TestCommand -{ -public: - Test_TC_CGEN_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_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_CGEN_2_2Suite() {} + ~Test_TC_CGEN_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -146500,12 +145436,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), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), From b97c686748038bbcf4118d776311be785f1a1838 Mon Sep 17 00:00:00 2001 From: abpoth Date: Thu, 27 Jul 2023 14:32:46 +0800 Subject: [PATCH 29/46] updated DISHM_1_1 test to accomodate test plan and comments --- .../certification/Test_TC_DISHM_1_1.yaml | 50 ++++++++++++++++--- 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml index 289e537023cf11..df751ff7a73490 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml @@ -13,7 +13,7 @@ # 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: 193.1.1. [TC-DISHM-1.1] Global Attributes with DUT as Server +name: 194.1.1. [TC-DISHM-1.1] Global Attributes with DUT as Server PICS: - DISHM.S @@ -58,8 +58,8 @@ tests: value: 1 constraints: type: bitmap32 - - - label: "TH reads AttributeList from DUT" +# Reference for "SHALL NOT contain" issue: https://github.com/project-chip/connectedhomeip/issues/28287 + - label: "4. TH reads AttributeList from DUT" command: "readAttribute" attribute: "AttributeList" response: @@ -68,7 +68,7 @@ tests: contains: [0, 1, 65528, 65529, 65530, 65531, 65532, 65533] - label: - "TH reads optional attribute (DISHM.S.A0004(StartUpMode)) in + "4. TH reads optional attribute (DISHM.S.A0002(StartUpMode)) in AttributeList" PICS: DISHM.S.A0002 command: "readAttribute" @@ -79,7 +79,19 @@ tests: contains: [2] - label: - "TH reads optional attribute (DISHM.S.A0003(OnMode)) in AttributeList" + "4. TH reads optional attribute (DISHM.S.A0002(StartUpMode)) in + AttributeList" + PICS: " !DISHM.S.A0002 " + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + excludes: [2] + + - label: + "4. TH reads optional attribute (DISHM.S.F00(DEPONOFF)) in + AttributeList" PICS: DISHM.S.F00 command: "readAttribute" attribute: "AttributeList" @@ -88,7 +100,30 @@ tests: type: list contains: [3] - - label: "TH reads AcceptedCommandList from DUT" + - label: + "4. TH reads optional attribute (DISHM.S.F00(DEPONOFF)) in + AttributeList" + PICS: " !DISHM.S.F00 " + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + excludes: [3] + +# Reference for "SHALL NOT contain" issue: https://github.com/project-chip/connectedhomeip/issues/28287 + - label: + "5. TH reads from the DUT the EventList attribute" + PICS: DISHM.S.F00 + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list + +# Reference for "SHALL NOT contain" issue: https://github.com/project-chip/connectedhomeip/issues/28287 + - label: "6. TH reads AcceptedCommandList from DUT" command: "readAttribute" attribute: "AcceptedCommandList" response: @@ -96,7 +131,8 @@ tests: type: list contains: [0] - - label: "Read the global attribute: GeneratedCommandList" +# Reference for "SHALL NOT contain" issue: https://github.com/project-chip/connectedhomeip/issues/28287 + - label: "7. TH reads from the DUT the GeneratedCommandList attribute" command: "readAttribute" attribute: "GeneratedCommandList" response: From bd39d3468112360aaeedd4c095f4fede56adde0a Mon Sep 17 00:00:00 2001 From: abpoth Date: Thu, 27 Jul 2023 14:39:44 +0800 Subject: [PATCH 30/46] updated test wording --- src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml index ea958c782557ca..7879ccc8a067c9 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml @@ -36,7 +36,7 @@ tests: verification: | ./chip-tool dishwashermode read supported-modes 1 1 - On TH(chip-tool) log, Verify SupportedModes attribute should contains atleast one ModeOptionsStruct entries with unique mode field value and label field value below is the sample log provided for the raspi platform: + On TH(chip-tool) log, Verify SupportedModes attribute should contain atleast one ModeOptionsStruct entry and that each entry has a unique mode field value and label field value. Below is the sample log provided for the raspi platform: [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries From ab5fbec33ae19621143bea95e26df28c6eaa0f3a Mon Sep 17 00:00:00 2001 From: abpoth Date: Thu, 27 Jul 2023 17:10:17 +0800 Subject: [PATCH 31/46] updating DISHM yaml test scripts in prep for writing python test scripts --- .../certification/Test_TC_DISHM_1_2.yaml | 81 ++--- .../certification/Test_TC_DISHM_2_1.yaml | 289 ++++-------------- .../certification/Test_TC_DISHM_3_1.yaml | 134 +++----- .../certification/Test_TC_DISHM_3_2.yaml | 123 +++----- .../certification/Test_TC_DISHM_3_3.yaml | 206 ++++--------- src/app/tests/suites/ciTests.json | 7 +- src/app/tests/suites/manualTests.json | 7 + 7 files changed, 238 insertions(+), 609 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml index 7879ccc8a067c9..0bd3de97dc0e44 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml @@ -13,30 +13,30 @@ # 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: 193.1.2. [TC-DISHM-1.2] Cluster attributes with DUT as Server +name: 194.1.2. [TC-DISHM-1.2] Cluster attributes with DUT as Server PICS: - DISHM.S config: nodeId: 0x12344321 - cluster: "Dishwasher Mode" - endpoint: 1 + cluster: "Basic Information" + 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 the SupportedModes attribute from DUT" + - label: + "Step 1: Commission DUT to TH (can be skipped if done in a preceding + test)." + verification: | + + disabled: true + + - label: "Step 2: TH reads from the DUT the SupportedModes attribute." + PICS: DISHM.S.A0000 verification: | ./chip-tool dishwashermode read supported-modes 1 1 - On TH(chip-tool) log, Verify SupportedModes attribute should contain atleast one ModeOptionsStruct entry and that each entry has a unique mode field value and label field value. Below is the sample log provided for the raspi platform: + On TH(chip-tool) log, Verify SupportedModes attribute should contains atleast two ModeOptionsStruct entries with unique mode field value and label field value below is the sample log provided for the raspi platform: [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries @@ -79,17 +79,10 @@ tests: [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 [1687687925.445385][18054:18056] CHIP:TOO: } [1687687925.445405][18054:18056] CHIP:TOO: } - 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 the CurrentMode attribute from the DUT" + disabled: true + + - label: "Step 3: TH reads from the DUT the CurrentMode attribute." + PICS: DISHM.S.A0001 verification: | ./chip-tool dishwashermode read current-mode 1 1 @@ -98,17 +91,10 @@ tests: [1645776767.611140][4667:4672] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469718 [1645776767.611214][4667:4672] CHIP:TOO: CurrentMode: 0 - 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 the OnMode attribute from the DUT" + disabled: true + + - label: "Step 4: TH reads from the DUT the OnMode attribute." + PICS: DISHM.S.A0003 verification: | ./chip-tool dishwashermode read on-mode 1 1 @@ -118,17 +104,10 @@ tests: [1649676072.465968][10754:10759] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065072 [1649676072.466094][10754:10759] CHIP:TOO: OnMode: null - 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 the StartUpMode attribute from the DUT" + disabled: true + + - label: "Step 5: TH reads from the DUT the StartUpMode attribute." + PICS: DISHM.S.A0002 verification: | ./chip-tool dishwashermode read start-up-mode 1 1 @@ -136,12 +115,4 @@ tests: [1649677014.496348][10778:10784] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 4277065072 [1649677014.496469][10778:10784] CHIP:TOO: StartUpMode: 0 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + disabled: true \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml index 0bc90a5e4ec895..295803cc9a1385 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml @@ -13,26 +13,26 @@ # 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: 193.2.1. [TC-DISHM-2.1] ChangeToMode Verification with DUT as Server +name: 194.2.1. [TC-DISHM-2.1] ChangeToModeWithStatus Verification DUT as Server PICS: - DISHM.S config: nodeId: 0x12344321 - cluster: "Dishwasher Mode" - endpoint: 1 + cluster: "Basic Information" + endpoint: 0 tests: - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId + - label: + "Step 1: Commission DUT to TH (can be skipped if done in a preceding + test)." + verification: | + + disabled: true - - label: "TH reads the SupportedModes attribute from DUT" + - label: "Step 2: TH reads from the DUT the SupportedModes attribute." + PICS: DISHM.S.A0000 verification: | ./chip-tool dishwashermode read supported-modes 1 1 @@ -80,273 +80,106 @@ tests: [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 [1687687925.445385][18054:18056] CHIP:TOO: } [1687687925.445405][18054:18056] CHIP:TOO: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + disabled: true - - label: "TH reads the CurrentMode attribute from the DUT" + - label: "Step 2: TH reads from the DUT the CurrentMode attribute." + PICS: DISHM.S.A0001 verification: | ./chip-tool dishwashermode read current-mode 1 1 Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - Save the value as old_current_mode_dut + - Select a value from supported_modes_dut, different from old_current_mode_dut, and which corresponds to a mode the device can switch to, given its current state and save this value as new_mode_th - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, - below is the sample log provided for the raspi platform: + below is the sample log provided for the raspi platform: [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 [1685018283.726589][16418:16420] CHIP:DMG: } [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + disabled: true - label: - "TH sends a ChangeToMode command to the DUT with NewMode set to - old_current_mode_dut" + "Step 3: TH sends a ChangeToMode command to the DUT with NewMode set + to old_current_mode_dut" + PICS: DISHM.S.C00.Rsp verification: | - ./chip-tool dishwashermode change-to-mode 1 1 1 - - On TH(chip-tool) log, verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1684931013.571019][20667:20669] CHIP:DMG: - [1684931013.571021][20667:20669] CHIP:DMG: StatusIB = - [1684931013.571024][20667:20669] CHIP:DMG: { - [1684931013.571027][20667:20669] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931013.571030][20667:20669] CHIP:DMG: }, - [1684931013.571034][20667:20669] CHIP:DMG: - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + ChangeToModeWithStatus Command is not impleented. + disabled: true - label: - "Manually put the device in a state from which it will FAIL to + "Step 4: Manually put the device in a state from which it will FAIL to transition to PIXIT.DISHM.MODE_CHANGE_FAIL" - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + verification: | + ChangeToModeWithStatus Command is not implented. + disabled: true - - label: "TH reads the CurrentMode attribute from the DUT" + - label: "Step 5: TH reads from the DUT the CurrentMode attribute." + PICS: DISHM.S.A0001 verification: | ./chip-tool dishwashermode read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - - Save the value as old_current_mode_dut, - below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and equal to the new_mode_th, below is the sample log provided for the raspi platform: [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 [1685018283.726589][16418:16420] CHIP:DMG: } [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 2 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 + disabled: true - label: - "TH sends a ChangeToMode command to the DUT with NewMode set to - PIXIT.DISHM.MODE_CHANGE_FAIL" + "Step 6: TH sends a ChangeToMode command to the DUT with NewMode set + to PIXIT.DISHM.MODE_CHANGE_FAIL" + PICS: DISHM.S.C00.Rsp verification: | - ./chip-tool dishwashermode change-to-mode 2 1 1 - - On TH(chip-tool) log, verify DUT responds with a GenericFailure (value 0x02) or MfgCodes (0x80 to 0xBF range) status response and below is the sample log provided for the raspi platform: + ChangeToModeWithStatus Command is not implented. + disabled: true - [1684931013.571019][20667:20669] CHIP:DMG: - [1684931013.571021][20667:20669] CHIP:DMG: StatusIB = - [1684931013.571024][20667:20669] CHIP:DMG: { - [1684931013.571027][20667:20669] CHIP:DMG: status = 0x02 (GENERICFAILURE), - [1684931013.571030][20667:20669] CHIP:DMG: }, - [1684931013.571034][20667:20669] CHIP:DMG: - 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 the CurrentMode attribute from the DUT" + - label: "Step 7: TH reads from the DUT the CurrentMode attribute." + PICS: DISHM.S.A0001 verification: | - ./chip-tool dishwashermode read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - - Save the value as old_current_mode_dut, - below is the sample log provided for the raspi platform: - - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 2 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + disabled: true - label: - "Manually put the device in a state from which it will SUCCESSFULLY - transition to PIXIT.DISHM.MODE_CHANGE_OK" - 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 the CurrentMode attribute from the DUT" + "Step 8: Manually put the device in a state from which it will + SUCCESSFULLY transition to PIXIT.DISHM.MODE_CHANGE_OK" verification: | - ./chip-tool dishwashermode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - - Save the value as old_current_mode_dut, - below is the sample log provided for the raspi platform: - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 1 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + disabled: true - - label: - "TH sends a ChangeToMode command to the DUT with NewMode set to - PIXIT.DISHM.MODE_CHANGE_OK" + - label: "Step 9: TH reads from the DUT the CurrentMode attribute." + PICS: DISHM.S.A0001 verification: | - ./chip-tool dishwashermode change-to-mode 2 1 1 - - On TH(chip-tool) log, verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - [1684931013.571019][20667:20669] CHIP:DMG: - [1684931013.571021][20667:20669] CHIP:DMG: StatusIB = - [1684931013.571024][20667:20669] CHIP:DMG: { - [1684931013.571027][20667:20669] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931013.571030][20667:20669] CHIP:DMG: }, - [1684931013.571034][20667:20669] CHIP:DMG: - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + disabled: true - - label: "TH reads the CurrentMode attribute from the DUT" + - label: + "Step 10: TH sends a ChangeToMode command to the DUT with NewMode set + to PIXIT.DISHM.MODE_CHANGE_OK" + PICS: DISHM.S.C00.Rsp verification: | - ./chip-tool dishwashermode read current-mode 1 1 - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value equal to PIXIT.DISHM.MODE_CHANGE_OK + disabled: true - below is the sample log provided for the raspi platform: + - label: "Step 11: TH reads from the DUT the CurrentMode attribute." + PICS: DISHM.S.A0001 + verification: | - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 2 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + disabled: true - label: - "TH sends a ChangeToMode command to the DUT with NewMode set to - invalid_mode_th" + "Step 12: TH sends a ChangeToMode command to the DUT with NewMode set + to invalid_mode_th" + PICS: DISHM.S.C00.Rsp verification: | - ./chip-tool dishwashermode change-to-mode 10 1 1 - - On TH(chip-tool) log, verify DUT responds with a UnsupportedMode (value 0x01) status response and below is the sample log provided for the raspi platform: - [1684931013.571019][20667:20669] CHIP:DMG: - [1684931013.571021][20667:20669] CHIP:DMG: StatusIB = - [1684931013.571024][20667:20669] CHIP:DMG: { - [1684931013.571027][20667:20669] CHIP:DMG: status = 0x01 (UNSUPPORTEDMODE), - [1684931013.571030][20667:20669] CHIP:DMG: }, - [1684931013.571034][20667:20669] CHIP:DMG: - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + disabled: true - - label: "TH reads the CurrentMode attribute from the DUT" + - label: "Step 13: TH reads from the DUT the CurrentMode attribute." + PICS: DISHM.S.A0001 verification: | - ./chip-tool dishwashermode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value equal to PIXIT.DISHM.MODE_CHANGE_OK - below is the sample log provided for the raspi platform: - - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 2 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + disabled: true \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml index b1df59258acc23..3127032a17333a 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml @@ -13,64 +13,50 @@ # 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: 193.3.1. [TC-DISHM-3.1] OnMode Verification with DUT as Server +name: 194.3.1. [TC-DISHM-3.1] OnMode verification with DUT as Server PICS: - DISHM.S config: nodeId: 0x12344321 - cluster: "Dishwasher Mode" - endpoint: 1 + cluster: "Basic Information" + 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 from the OnMode attribute from DUT" + - label: + "Step 1: Commission DUT to TH (can be skipped if done in a preceding + test)." + verification: | + + disabled: true + + - label: "Step 2: TH reads from the DUT the OnMode attribute." + PICS: DISHM.S.A0003 && DISHM.S.F00 verification: | ./chip-tool dishwashermode read on-mode 1 1 - On TH(chip-tool), Verify OnMode attribute value is an integer. Save the value as on_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify OnMode attribute value is an integer. save the value as on_mode_dut and below is the sample log provided for the raspi platform: [1649678983.679893][10871:10876] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065073 [1649678983.680002][10871:10876] CHIP:TOO: OnMode: 0 - 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 the CurrentMode attribute from the DUT" + disabled: true + + - label: "Step 3: TH reads from the DUT the CurrentMode attribute." + PICS: DISHM.S.A0001 && DISHM.S.F00 verification: | ./chip-tool dishwashermode read current-mode 1 1 - On TH(chip-tool), Verify CurrentMode attribute is an integer. Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify CurrentMode attribute is an integer. save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: - NOTE: If on_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. + NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. [1649679034.895848][10879:10884] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 [1649679034.895972][10879:10884] CHIP:TOO: CurrentMode: 0 - 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 the SupportedModes attribute from DUT" + disabled: true + + - label: "Step 4: TH reads from the DUT the SupportedModes attribute." + PICS: DISHM.S.A0000 && DISHM.S.F00 verification: | ./chip-tool dishwashermode read supported-modes 1 1 @@ -119,19 +105,12 @@ tests: [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 [1687687925.445385][18054:18056] CHIP:TOO: } [1687687925.445405][18054:18056] CHIP:TOO: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + disabled: true - label: - "TH sends a ChangeToMode command to the DUT with NewMode set to - new_mode_th" + "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set + to new_mode_th" + PICS: DISHM.S.C00.Rsp && DISHM.S.F00 verification: | ./chip-tool dishwashermode change-to-mode 2 1 1 @@ -143,17 +122,10 @@ tests: [1684931013.571027][20667:20669] CHIP:DMG: status = 0x00 (SUCCESS), [1684931013.571030][20667:20669] CHIP:DMG: }, [1684931013.571034][20667:20669] CHIP:DMG: - 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 Off Command to DUT" + disabled: true + + - label: "Step 6: TH sends a Off command to the DUT" + PICS: OO.S.C00.Rsp && DISHM.S.F00 verification: | ./chip-tool onoff off 1 1 @@ -163,17 +135,10 @@ tests: [1684931101.118659][20709:20711] CHIP:DMG: { [1684931101.118663][20709:20711] CHIP:DMG: status = 0x00 (SUCCESS), [1684931101.118665][20709:20711] CHIP:DMG: }, - 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 On Command to DUT" + disabled: true + + - label: "Step 7: TH sends a On command to the DUT" + PICS: OO.S.C01.Rsp && DISHM.S.F00 verification: | ./chip-tool onoff on 1 1 @@ -183,30 +148,15 @@ tests: [1684931217.055517][20729:20731] CHIP:DMG: { [1684931217.055520][20729:20731] CHIP:DMG: status = 0x00 (SUCCESS), [1684931217.055523][20729:20731] CHIP:DMG: }, - 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 the CurrentMode attribute from the DUT" + disabled: true + + - label: "Step 8: TH reads from the DUT the CurrentMode attribute." + PICS: DISHM.S.A0001 && DISHM.S.F00 verification: | ./chip-tool dishwashermode read current-mode 1 1 - On TH(chip-tool), Verify that CurrentMode attribute value is an integer and value is equal to on_mode_dut. Below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify that CurrentMode attribute value is an integer and value is equal to on_mode_dut. below is the sample log provided for the raspi platform: [1649679202.069163][10899:10904] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 - [1649679202.069278][10899:10904] CHIP:TOO: CurrentMode: 0 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + [1649679202.069278][10899:10904] CHIP:TOO: CurrentMode: 2 + disabled: true \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml index 346abd250d96eb..d0bd44582166b4 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml @@ -1,3 +1,8 @@ +# Copyright (c) 2023 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 # @@ -8,58 +13,37 @@ # 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: 193.3.2. [TC-DISHM-3.2] StartUpMode Verification with DUT as Server +name: 194.3.2. [TC-DISHM-3.2] StartUpMode verification with DUT as Server PICS: - DISHM.S config: nodeId: 0x12344321 - cluster: "Dishwasher Mode" - endpoint: 1 + cluster: "Basic Information" + endpoint: 0 tests: - - label: "Note" + - label: + "Step 1: Commission DUT to TH (can be skipped if done in a preceding + test)." verification: | - To Execute the TC-DISHM-3.2 test case using reboot in raspi device we followed the below suggested way: - - To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps - - step-1: create a file using touch command , something like touch mytest.txt - step-2: chmod 777 mytest.txt - step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt - - if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. disabled: true - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "TH reads from the StartUpMode attribute from DUT" + - label: "Step 2: TH reads from the DUT the StartUpMode attribute." + PICS: DISHM.S.A0002 verification: | ./chip-tool dishwashermode read start-up-mode 1 1 - On TH(chip-tool), Verify StartUpMode attribute value is an integer. Save the value as startup_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify StartUpMode attribute value is an integer. save the value as startup_mode_dut and below is the sample log provided for the raspi platform: [1645777708.406864][4841:4846] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003DataVersion: 3781469721 [1645777708.406933][4841:4846] CHIP:TOO: StartUpMode: 0 - 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 the CurrentMode attribute from the DUT" + disabled: true + + - label: "Step 3: TH reads from the DUT the CurrentMode attribute." + PICS: DISHM.S.A0001 verification: | ./chip-tool dishwashermode read current-mode 1 1 @@ -70,23 +54,16 @@ tests: [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 - 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 the SupportedModes attribute from DUT" + disabled: true + + - label: "Step 4: TH reads from the DUT the SupportedModes attribute." + PICS: DISHM.S.A0000 verification: | ./chip-tool dishwashermode read supported-modes 1 1 On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. Save the Mode field values as supported_modes_dut. - Select a value from supported_modes_dut different from startup_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: + Select a value from supported_modes_dut different from on_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries @@ -129,19 +106,12 @@ tests: [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 [1687687925.445385][18054:18056] CHIP:TOO: } [1687687925.445405][18054:18056] CHIP:TOO: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + disabled: true - label: - "TH send a ChangeToMode command to the DUT with NewMode set to - new_mode_th" + "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set + to new_mode_th" + PICS: DISHM.S.C00.Rsp verification: | ./chip-tool dishwashermode change-to-mode 2 1 1 @@ -152,30 +122,15 @@ tests: [1684931419.768143][20792:20794] CHIP:DMG: { [1684931419.768148][20792:20794] CHIP:DMG: status = 0x00 (SUCCESS), [1684931419.768152][20792:20794] CHIP:DMG: }, - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Physically power cycle the device" + disabled: true + + - label: "Step 6: Physically power cycle the device" verification: | Physically power cycle the device. - 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 the CurrentMode attribute from the DUT" + disabled: true + + - label: "Step 7: TH reads from the DUT the CurrentMode attribute." + PICS: DISHM.S.A0001 verification: | ./chip-tool dishwashermode read current-mode 1 1 @@ -183,12 +138,4 @@ tests: [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + disabled: true \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml index 8e0ab9604566aa..94917d256883cd 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml @@ -13,90 +13,57 @@ # 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: 193.3.3. [TC-DISHM-3.3] OnMode overwriting StartUpMode with DUT as Server +name: 194.3.3.[TC-DISHM-3.3] OnMode overwriting StartUpMode with DUT as Server PICS: - DISHM.S config: nodeId: 0x12344321 - cluster: "Dishwasher Mode" - endpoint: 1 + cluster: "Basic Information" + endpoint: 0 tests: - - label: "Note" + - label: + "Step 1: Commission DUT to TH (can be skipped if done in a preceding + test)." verification: | - To Execute the TC-DISHM-3.3 test case using reboot in raspi device we followed the below suggested way: - - To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps - - - step-1: create a file using touch command , something like touch mytest.txt - step-2: chmod 777 mytest.txt - step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt - - if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. - To execute this test case set onmode to any integer value because as default it value has null. - - ./chip-tool dishwashermode write on-mode 4 1 1 disabled: true - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "TH reads from the StartUpMode attribute from DUT" + - label: "Step 2: TH reads from the DUT the StartUpMode attribute." + PICS: DISHM.S.A0002 verification: | ./chip-tool dishwashermode read start-up-mode 1 1 - On TH(chip-tool) log, Verify StartUpMode attribute value is an integer. Save this value as startup_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool) log, Verify StartUpMode attribute value is an integer. save this value as startup_mode_dut and below is the sample log provided for the raspi platform: [1651099663211] [82177:7560652] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 2609052118 [1651099663212] [82177:7560652] CHIP: [TOO] StartUpMode: 0 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + disabled: true - - label: "TH reads from the OnMode attribute from DUT" + - label: "Step 3: TH reads from the DUT the OnMode attribute." + PICS: DISHM.S.A0003 && DISHM.S.A0002 verification: | ./chip-tool dishwashermode read on-mode 1 1 - On TH(chip-tool) log, Verify OnMode attribute value is an integer. Save the value as old_on_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool) log, Verify OnMode attribute value is an integer. save the value as old_on_mode_dut and below is the sample log provided for the raspi platform: - NOTE: If startup_mode_dut is equal to old_on_mode_dut proceed to step 4. Else proceed to step 6. [1654780979.979743][61542:61547] CHIP:DMG: } [1654780979.980040][61542:61547] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 235764160 - [1654780979.980202][61542:61547] CHIP:TOO: OnMode: 1 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + [1654780979.980202][61542:61547] CHIP:TOO: OnMode: 4 + disabled: true - - label: "TH reads the SupportedModes attribute from DUT" + - label: "Step 4: TH reads from the DUT the SupportedModes attribute." + PICS: DISHM.S.A0000 && DISHM.S.A0002 verification: | ./chip-tool dishwashermode read supported-modes 1 1 On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. Save the Mode field values as supported_modes_dut. - Select a value from supported_modes_dut different from startup_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: + Select a value from supported_modes_dut different from on_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries @@ -139,76 +106,58 @@ tests: [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 [1687687925.445385][18054:18056] CHIP:TOO: } [1687687925.445405][18054:18056] CHIP:TOO: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + disabled: true - label: - "TH writes to the DUT the OnMode attribute with the new_mode_th value" + "Step 5: TH writes to the DUT the OnMode attribute with the + new_mode_th value" + PICS: DISHM.S.A0003 verification: | - ./chip-tool dishwashermode write on-mode 2 1 1 + ./chip-tool dishwashermode write on-mode 7 1 1 - On TH(chip-tool) log, verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: + On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - [1651101661959] [90832:7598169] CHIP: [DMG] WriteResponseMessage = - [1651101661959] [90832:7598169] CHIP: [DMG] { - [1651101661959] [90832:7598169] CHIP: [DMG] AttributeStatusIBs = - [1651101661959] [90832:7598169] CHIP: [DMG] [ - [1651101661959] [90832:7598169] CHIP: [DMG] AttributeStatusIB = - [1651101661959] [90832:7598169] CHIP: [DMG] { - [1651101661960] [90832:7598169] CHIP: [DMG] AttributePathIB = - [1651101661960] [90832:7598169] CHIP: [DMG] { - [1651101661960] [90832:7598169] CHIP: [DMG] Endpoint = 0x1, - [1651101661960] [90832:7598169] CHIP: [DMG] Cluster = 0x6, - [1651101661960] [90832:7598169] CHIP: [DMG] Attribute = 0x0000_4003, - [1651101661960] [90832:7598169] CHIP: [DMG] } - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] StatusIB = - [1651101661960] [90832:7598169] CHIP: [DMG] { - [1651101661960] [90832:7598169] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651101661960] [90832:7598169] CHIP: [DMG] }, - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] }, - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] ], - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] InteractionModelRevision = 1 - [1651101661960] [90832:7598169] CHIP: [DMG] } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + [1651099941884] [84269:7567211] CHIP: [DMG] WriteResponseMessage = + [1651099941884] [84269:7567211] CHIP: [DMG] { + [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIBs = + [1651099941884] [84269:7567211] CHIP: [DMG] [ + [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIB = + [1651099941884] [84269:7567211] CHIP: [DMG] { + [1651099941887] [84269:7567211] CHIP: [DMG] AttributePathIB = + [1651099941887] [84269:7567211] CHIP: [DMG] { + [1651099941887] [84269:7567211] CHIP: [DMG] Endpoint = 0x1, + [1651099941887] [84269:7567211] CHIP: [DMG] Cluster = 0x50, + [1651099941887] [84269:7567211] CHIP: [DMG] Attribute = 0x0000_0005, + [1651099941887] [84269:7567211] CHIP: [DMG] } + [1651099941887] [84269:7567211] CHIP: [DMG] + [1651099941887] [84269:7567211] CHIP: [DMG] StatusIB = + [1651099941887] [84269:7567211] CHIP: [DMG] { + [1651099941887] [84269:7567211] CHIP: [DMG] status = 0x00 (SUCCESS), + [1651099941887] [84269:7567211] CHIP: [DMG] }, + [1651099941887] [84269:7567211] CHIP: [DMG] + [1651099941887] [84269:7567211] CHIP: [DMG] }, + [1651099941887] [84269:7567211] CHIP: [DMG] + [1651099941887] [84269:7567211] CHIP: [DMG] ], + [1651099941887] [84269:7567211] CHIP: [DMG] + [1651099941887] [84269:7567211] CHIP: [DMG] InteractionModelRevision = 1 + [1651099941887] [84269:7567211] CHIP: [DMG] } + disabled: true - - label: "TH reads from the OnMode attribute from DUT" + - label: "Step 6: TH reads from the DUT the OnMode attribute." + PICS: DISHM.S.A0003 && DISHM.S.F00 verification: | ./chip-tool dishwashermode read on-mode 1 1 - On TH(chip-tool) log, Verify OnMode attribute value is an integer and that it is equal to new_mode_th. Save the value as new_on_mode_dut and below is the sample log provided for the raspi platform: + On TH(chip-tool) log, Verify OnMode attribute value is an integer. save the value as new_on_mode_dut and below is the sample log provided for the raspi platform: [1669190858.739158][4187:4189] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4107771634 - [1669190858.739222][4187:4189] CHIP:TOO: OnMode: 2 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + [1669190858.739222][4187:4189] CHIP:TOO: OnMode: 7 + disabled: true - - label: "TH writes to the DUT the StartUpOnOff attribute with the value 1." + - label: + "Step 7: TH writes to the DUT the StartUpOnOff attribute with the + value 1." + PICS: OO.S.A4003 verification: | ./chip-tool onoff write start-up-on-off 1 1 1 @@ -238,43 +187,20 @@ tests: [1651101661960] [90832:7598169] CHIP: [DMG] [1651101661960] [90832:7598169] CHIP: [DMG] InteractionModelRevision = 1 [1651101661960] [90832:7598169] CHIP: [DMG] } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + disabled: true - - label: "Physically power cycle the device" + - label: "Step 8: Physically power cycle the device" verification: | Physically power cycle the device. - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + disabled: true - - label: "TH reads the CurrentMode attribute from the DUT" + - label: "Step 9: TH reads from the DUT the CurrentMode attribute." + PICS: DISHM.S.A0001 verification: | ./chip-tool dishwashermode read current-mode 1 1 - On TH(chip-tool), Verify CurrentMode attribute value is an integer and that it is equal to new_on_mode_th. Below is the sample log provided for the raspi platform: + On TH(chip-tool), Verify CurrentMode attribute value is same as the value recorded in step 3 and below is the sample log provided for the raspi platform: [1669190936.869804][4194:4196] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3908583538 - [1669190936.869875][4194:4196] CHIP:TOO: CurrentMode: 2 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + [1669190936.869875][4194:4196] CHIP:TOO: CurrentMode: 7 + disabled: true \ No newline at end of file diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index f83f9888071e6b..58a20b493f1044 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -59,12 +59,7 @@ ], "DiagnosticsLogs": ["Test_TC_DLOG_1_1"], "DishwasherMode": [ - "Test_TC_DISHM_1_1", - "Test_TC_DISHM_1_2", - "Test_TC_DISHM_2_1", - "Test_TC_DISHM_3_1", - "Test_TC_DISHM_3_2", - "Test_TC_DISHM_3_3" + "Test_TC_DISHM_1_1" ], "FlowMeasurement": ["Test_TC_FLW_1_1", "Test_TC_FLW_2_1"], "FixedLabel": ["Test_TC_FLABEL_1_1", "Test_TC_FLABEL_2_1"], diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index 92822cb7ba9429..58de90c3d9c637 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -107,6 +107,13 @@ "Test_TC_DLOG_3_1" ], "Descriptor": ["Test_TC_DESC_2_1"], + "DishwasherMode": [ + "Test_TC_DISHM_1_2", + "Test_TC_DISHM_2_1", + "Test_TC_DISHM_3_1", + "Test_TC_DISHM_3_2", + "Test_TC_DISHM_3_3" + ], "FanControl": ["Test_TC_FAN_3_3", "Test_TC_FAN_3_5"], "GeneralCommissioning": ["Test_TC_CGEN_2_2"], "GeneralDiagnostics": [ From 34b1940582c2453c951374dc16c03342d197ca50 Mon Sep 17 00:00:00 2001 From: abpoth Date: Thu, 27 Jul 2023 17:44:47 +0800 Subject: [PATCH 32/46] ran code regeneration --- .../chip-tool/zap-generated/test/Commands.h | 940 +----------- .../zap-generated/test/Commands.h | 1345 ++--------------- 2 files changed, 143 insertions(+), 2142 deletions(-) diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 1c26640d58028b..b8a9ae82a8c022 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -106,11 +106,6 @@ class TestList : public Command printf("Test_TC_DESC_1_1\n"); printf("Test_TC_DLOG_1_1\n"); printf("Test_TC_DISHM_1_1\n"); - printf("Test_TC_DISHM_1_2\n"); - printf("Test_TC_DISHM_2_1\n"); - printf("Test_TC_DISHM_3_1\n"); - printf("Test_TC_DISHM_3_2\n"); - printf("Test_TC_DISHM_3_3\n"); printf("Test_TC_DGETH_1_1\n"); printf("Test_TC_DGETH_2_1\n"); printf("Test_TC_DGETH_2_2\n"); @@ -35190,7 +35185,7 @@ class Test_TC_DLOG_1_1Suite : public TestCommand class Test_TC_DISHM_1_1Suite : public TestCommand { public: - Test_TC_DISHM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_1_1", 9, credsIssuerConfig) + Test_TC_DISHM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_1_1", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -35285,10 +35280,40 @@ class Test_TC_DISHM_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintExcludes("value", value, 2UL)); } break; case 7: + 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", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } + break; + case 8: + 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", "list")); + VerifyOrReturn(CheckConstraintExcludes("value", value, 3UL)); + } + break; + case 9: + 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("eventList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -35297,7 +35322,7 @@ class Test_TC_DISHM_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 8: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -35346,899 +35371,49 @@ class Test_TC_DISHM_1_1Suite : public TestCommand true, chip::NullOptional); } case 4: { - LogStep(4, "TH reads AttributeList from DUT"); + LogStep(4, "4. TH reads AttributeList from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "TH reads optional attribute (DISHM.S.A0004(StartUpMode)) in AttributeList"); + LogStep(5, "4. TH reads optional attribute (DISHM.S.A0002(StartUpMode)) in AttributeList"); VerifyOrDo(!ShouldSkip("DISHM.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "TH reads optional attribute (DISHM.S.A0003(OnMode)) in AttributeList"); - VerifyOrDo(!ShouldSkip("DISHM.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "4. TH reads optional attribute (DISHM.S.A0002(StartUpMode)) in AttributeList"); + VerifyOrDo(!ShouldSkip(" !DISHM.S.A0002 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "TH reads AcceptedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, - DishwasherMode::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, - DishwasherMode::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DISHM_1_2Suite : public TestCommand -{ -public: - Test_TC_DISHM_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_1_2", 5, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DISHM_1_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)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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)); - 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 SupportedModes attribute 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 2: { - LogStep(2, "TH reads the CurrentMode attribute from the 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 3: { - LogStep(3, "TH reads the OnMode attribute from the 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 4: { - LogStep(4, "TH reads the StartUpMode attribute from the 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_DISHM_2_1Suite : public TestCommand -{ -public: - Test_TC_DISHM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_2_1", 14, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DISHM_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)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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)); - 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)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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)); - shouldContinue = true; - 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 the SupportedModes attribute 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 2: { - LogStep(2, "TH reads the CurrentMode attribute from the 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 3: { - LogStep(3, "TH sends a ChangeToMode command to the DUT with NewMode set to old_current_mode_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 4: { - LogStep(4, "Manually put the device in a state from which it will FAIL to transition to PIXIT.DISHM.MODE_CHANGE_FAIL"); - 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 5: { - LogStep(5, "TH reads the CurrentMode attribute from the 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 6: { - LogStep(6, "TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.DISHM.MODE_CHANGE_FAIL"); - 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, "TH reads the CurrentMode attribute from the 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); + LogStep(7, "4. TH reads optional attribute (DISHM.S.F00(DEPONOFF)) in AttributeList"); + VerifyOrDo(!ShouldSkip("DISHM.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 8: { - LogStep(8, - "Manually put the device in a state from which it will SUCCESSFULLY transition to PIXIT.DISHM.MODE_CHANGE_OK"); - 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); + LogStep(8, "4. TH reads optional attribute (DISHM.S.F00(DEPONOFF)) in AttributeList"); + VerifyOrDo(!ShouldSkip(" !DISHM.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 9: { - LogStep(9, "TH reads the CurrentMode attribute from the 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); + LogStep(9, "5. TH reads from the DUT the EventList attribute"); + VerifyOrDo(!ShouldSkip("DISHM.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::EventList::Id, + true, chip::NullOptional); } case 10: { - LogStep(10, "TH sends a ChangeToMode command to the DUT with NewMode set to PIXIT.DISHM.MODE_CHANGE_OK"); - 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); + LogStep(10, "6. TH reads AcceptedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, + DishwasherMode::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "TH reads the CurrentMode attribute from the 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 sends a ChangeToMode command to the DUT with NewMode set to invalid_mode_th"); - 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 the CurrentMode attribute from the 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_DISHM_3_1Suite : public TestCommand -{ -public: - Test_TC_DISHM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_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_DISHM_3_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)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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)); - 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)); - 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 from the OnMode attribute 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 2: { - LogStep(2, "TH reads the CurrentMode attribute from the 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 3: { - LogStep(3, "TH reads the SupportedModes attribute 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 4: { - LogStep(4, "TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th"); - 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 5: { - LogStep(5, "TH sends Off 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 6: { - LogStep(6, "TH sends On 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 7: { - LogStep(7, "TH reads the CurrentMode attribute from the 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_DISHM_3_2Suite : public TestCommand -{ -public: - Test_TC_DISHM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_2", 7, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DISHM_3_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)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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)); - 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)); - 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 from the StartUpMode attribute 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 2: { - LogStep(2, "TH reads the CurrentMode attribute from the 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 3: { - LogStep(3, "TH reads the SupportedModes attribute 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 4: { - LogStep(4, "TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th"); - 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 5: { - LogStep(5, "Physically power cycle the device"); - 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 reads the CurrentMode attribute from the 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_DISHM_3_3Suite : public TestCommand -{ -public: - Test_TC_DISHM_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_3", 9, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DISHM_3_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), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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)); - 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)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - 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 from the StartUpMode attribute 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 2: { - LogStep(2, "TH reads from the OnMode attribute 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 3: { - LogStep(3, "TH reads the SupportedModes attribute 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 4: { - LogStep(4, "TH writes to the DUT the OnMode attribute with the new_mode_th value"); - 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 5: { - LogStep(5, "TH reads from the OnMode attribute 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 6: { - LogStep(6, "TH writes to the DUT the StartUpOnOff attribute with the value 1."); - 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, "Physically power cycle the device"); - 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 8: { - LogStep(8, "TH reads the CurrentMode attribute from the 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); + LogStep(11, "7. TH reads from the DUT the GeneratedCommandList attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, + DishwasherMode::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } } return CHIP_NO_ERROR; @@ -145698,11 +144873,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), - 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 2c8feb0dc695cf..c5bfb69d9156ea 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -93,11 +93,6 @@ class TestList : public Command { printf("Test_TC_DESC_1_1\n"); printf("Test_TC_DLOG_1_1\n"); printf("Test_TC_DISHM_1_1\n"); - printf("Test_TC_DISHM_1_2\n"); - printf("Test_TC_DISHM_2_1\n"); - printf("Test_TC_DISHM_3_1\n"); - printf("Test_TC_DISHM_3_2\n"); - printf("Test_TC_DISHM_3_3\n"); printf("Test_TC_DGETH_1_1\n"); printf("Test_TC_DGETH_2_1\n"); printf("Test_TC_DGETH_2_2\n"); @@ -45748,34 +45743,60 @@ class Test_TC_DISHM_1_1 : public TestCommandBridge { err = TestGivenDishmsf00deponoffEnsureFeaturemapHasTheCorrectBitSet_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads AttributeList from DUT\n"); - err = TestThReadsAttributeListFromDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : 4. TH reads AttributeList from DUT\n"); + err = Test4ThReadsAttributeListFromDut_4(); break; case 5: ChipLogProgress( - chipTool, " ***** Test Step 5 : TH reads optional attribute (DISHM.S.A0004(StartUpMode)) in AttributeList\n"); + chipTool, " ***** Test Step 5 : 4. TH reads optional attribute (DISHM.S.A0002(StartUpMode)) in AttributeList\n"); if (ShouldSkip("DISHM.S.A0002")) { NextTest(); return; } - err = TestThReadsOptionalAttributeDISHMSA0004StartUpModeInAttributeList_5(); + err = Test4ThReadsOptionalAttributeDISHMSA0002StartUpModeInAttributeList_5(); break; case 6: ChipLogProgress( - chipTool, " ***** Test Step 6 : TH reads optional attribute (DISHM.S.A0003(OnMode)) in AttributeList\n"); - if (ShouldSkip("DISHM.S.F00")) { + chipTool, " ***** Test Step 6 : 4. TH reads optional attribute (DISHM.S.A0002(StartUpMode)) in AttributeList\n"); + if (ShouldSkip(" !DISHM.S.A0002 ")) { NextTest(); return; } - err = TestThReadsOptionalAttributeDISHMSA0003OnModeInAttributeList_6(); + err = Test4ThReadsOptionalAttributeDISHMSA0002StartUpModeInAttributeList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads AcceptedCommandList from DUT\n"); - err = TestThReadsAcceptedCommandListFromDut_7(); + ChipLogProgress( + chipTool, " ***** Test Step 7 : 4. TH reads optional attribute (DISHM.S.F00(DEPONOFF)) in AttributeList\n"); + if (ShouldSkip("DISHM.S.F00")) { + NextTest(); + return; + } + err = Test4ThReadsOptionalAttributeDishmsf00deponoffInAttributeList_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_8(); + ChipLogProgress( + chipTool, " ***** Test Step 8 : 4. TH reads optional attribute (DISHM.S.F00(DEPONOFF)) in AttributeList\n"); + if (ShouldSkip(" !DISHM.S.F00 ")) { + NextTest(); + return; + } + err = Test4ThReadsOptionalAttributeDishmsf00deponoffInAttributeList_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : 5. TH reads from the DUT the EventList attribute\n"); + if (ShouldSkip("DISHM.S.F00")) { + NextTest(); + return; + } + NextTest(); + return; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : 6. TH reads AcceptedCommandList from DUT\n"); + err = Test6ThReadsAcceptedCommandListFromDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : 7. TH reads from the DUT the GeneratedCommandList attribute\n"); + err = Test7ThReadsFromTheDutTheGeneratedCommandListAttribute_11(); break; } @@ -45815,6 +45836,15 @@ class Test_TC_DISHM_1_1 : public TestCommandBridge { 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. @@ -45828,7 +45858,7 @@ class Test_TC_DISHM_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; @@ -45915,7 +45945,7 @@ class Test_TC_DISHM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAttributeListFromDut_4() + CHIP_ERROR Test4ThReadsAttributeListFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -45923,7 +45953,7 @@ class Test_TC_DISHM_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AttributeList from DUT Error: %@", err); + NSLog(@"4. TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45943,7 +45973,7 @@ class Test_TC_DISHM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeDISHMSA0004StartUpModeInAttributeList_5() + CHIP_ERROR Test4ThReadsOptionalAttributeDISHMSA0002StartUpModeInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -45951,7 +45981,7 @@ class Test_TC_DISHM_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute (DISHM.S.A0004(StartUpMode)) in AttributeList Error: %@", err); + NSLog(@"4. TH reads optional attribute (DISHM.S.A0002(StartUpMode)) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -45964,7 +45994,7 @@ class Test_TC_DISHM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionalAttributeDISHMSA0003OnModeInAttributeList_6() + CHIP_ERROR Test4ThReadsOptionalAttributeDISHMSA0002StartUpModeInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -45972,12 +46002,12 @@ class Test_TC_DISHM_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute (DISHM.S.A0003(OnMode)) in AttributeList Error: %@", err); + NSLog(@"4. TH reads optional attribute (DISHM.S.A0002(StartUpMode)) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 2UL)); NextTest(); }]; @@ -45985,20 +46015,20 @@ class Test_TC_DISHM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAcceptedCommandListFromDut_7() + CHIP_ERROR Test4ThReadsOptionalAttributeDishmsf00deponoffInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"4. TH reads optional attribute (DISHM.S.F00(DEPONOFF)) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); NextTest(); }]; @@ -46006,1261 +46036,67 @@ class Test_TC_DISHM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() + CHIP_ERROR Test4ThReadsOptionalAttributeDishmsf00deponoffInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"4. TH reads optional attribute (DISHM.S.F00(DEPONOFF)) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintExcludes("attributeList", value, 3UL)); NextTest(); }]; return CHIP_NO_ERROR; } -}; - -class Test_TC_DISHM_1_2 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DISHM_1_2() - : TestCommandBridge("Test_TC_DISHM_1_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_DISHM_1_2() {} - - /////////// TestCommand Interface ///////// - void NextTest() override + CHIP_ERROR Test6ThReadsAcceptedCommandListFromDut_10() { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DISHM_1_2\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DISHM_1_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 reads the SupportedModes attribute from DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsTheSupportedModesAttributeFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the CurrentMode attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsTheCurrentModeAttributeFromTheDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the OnMode attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsTheOnModeAttributeFromTheDut_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads the StartUpMode attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsTheStartUpModeAttributeFromTheDut_4(); - 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; - } - - // 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 = 5; - - 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 TestThReadsTheSupportedModesAttributeFromDut_1() - { - - 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 TestThReadsTheCurrentModeAttributeFromTheDut_2() - { - - 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 TestThReadsTheOnModeAttributeFromTheDut_3() - { - - 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 TestThReadsTheStartUpModeAttributeFromTheDut_4() - { - - 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_DISHM_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DISHM_2_1() - : TestCommandBridge("Test_TC_DISHM_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_DISHM_2_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DISHM_2_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DISHM_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 SupportedModes attribute from DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsTheSupportedModesAttributeFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the CurrentMode attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsTheCurrentModeAttributeFromTheDut_2(); - break; - case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : TH sends a ChangeToMode command to the DUT with NewMode set to old_current_mode_dut\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThSendsAChangeToModeCommandToTheDutWithNewModeSetToOldCurrentModeDut_3(); - break; - case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : Manually put the device in a state from which it will FAIL to transition to " - "PIXIT.DISHM.MODE_CHANGE_FAIL\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestManuallyPutTheDeviceInAStateFromWhichItWillFailToTransitionToPixitdishmmodeChangeFail_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads the CurrentMode attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsTheCurrentModeAttributeFromTheDut_5(); - break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : TH sends a ChangeToMode command to the DUT with NewMode set to " - "PIXIT.DISHM.MODE_CHANGE_FAIL\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThSendsAChangeToModeCommandToTheDutWithNewModeSetToPixitdishmmodeChangeFail_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads the CurrentMode attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsTheCurrentModeAttributeFromTheDut_7(); - break; - case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Manually put the device in a state from which it will SUCCESSFULLY transition to " - "PIXIT.DISHM.MODE_CHANGE_OK\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestManuallyPutTheDeviceInAStateFromWhichItWillSuccessfullyTransitionToPixitdishmmodeChangeOk_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads the CurrentMode attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsTheCurrentModeAttributeFromTheDut_9(); - break; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : TH sends a ChangeToMode command to the DUT with NewMode set to " - "PIXIT.DISHM.MODE_CHANGE_OK\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThSendsAChangeToModeCommandToTheDutWithNewModeSetToPixitdishmmodeChangeOk_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads the CurrentMode attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsTheCurrentModeAttributeFromTheDut_11(); - break; - case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : TH sends a ChangeToMode command to the DUT with NewMode set to invalid_mode_th\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThSendsAChangeToModeCommandToTheDutWithNewModeSetToInvalidModeTh_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads the CurrentMode attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsTheCurrentModeAttributeFromTheDut_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 TestThReadsTheSupportedModesAttributeFromDut_1() - { - - 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 TestThReadsTheCurrentModeAttributeFromTheDut_2() - { - - 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 TestThSendsAChangeToModeCommandToTheDutWithNewModeSetToOldCurrentModeDut_3() - { - - 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 TestManuallyPutTheDeviceInAStateFromWhichItWillFailToTransitionToPixitdishmmodeChangeFail_4() - { - - 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 TestThReadsTheCurrentModeAttributeFromTheDut_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 TestThSendsAChangeToModeCommandToTheDutWithNewModeSetToPixitdishmmodeChangeFail_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 TestThReadsTheCurrentModeAttributeFromTheDut_7() - { - - 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 TestManuallyPutTheDeviceInAStateFromWhichItWillSuccessfullyTransitionToPixitdishmmodeChangeOk_8() - { - - 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 TestThReadsTheCurrentModeAttributeFromTheDut_9() - { - - 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 TestThSendsAChangeToModeCommandToTheDutWithNewModeSetToPixitdishmmodeChangeOk_10() - { - - 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 TestThReadsTheCurrentModeAttributeFromTheDut_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 TestThSendsAChangeToModeCommandToTheDutWithNewModeSetToInvalidModeTh_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 TestThReadsTheCurrentModeAttributeFromTheDut_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_DISHM_3_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DISHM_3_1() - : TestCommandBridge("Test_TC_DISHM_3_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_DISHM_3_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DISHM_3_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DISHM_3_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 from the OnMode attribute from DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsFromTheOnModeAttributeFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the CurrentMode attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsTheCurrentModeAttributeFromTheDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the SupportedModes attribute from DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsTheSupportedModesAttributeFromDut_3(); - break; - case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : TH sends a ChangeToMode command to the DUT with NewMode set to new_mode_th\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThSendsAChangeToModeCommandToTheDutWithNewModeSetToNewModeTh_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends Off Command to DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThSendsOffCommandToDut_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends On Command to DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThSendsOnCommandToDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads the CurrentMode attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsTheCurrentModeAttributeFromTheDut_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 TestThReadsFromTheOnModeAttributeFromDut_1() - { - - 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 TestThReadsTheCurrentModeAttributeFromTheDut_2() - { - - 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 TestThReadsTheSupportedModesAttributeFromDut_3() - { - - 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 TestThSendsAChangeToModeCommandToTheDutWithNewModeSetToNewModeTh_4() - { - - 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 TestThSendsOffCommandToDut_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 TestThSendsOnCommandToDut_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 TestThReadsTheCurrentModeAttributeFromTheDut_7() - { - - 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_DISHM_3_2 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DISHM_3_2() - : TestCommandBridge("Test_TC_DISHM_3_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_DISHM_3_2() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DISHM_3_2\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DISHM_3_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 reads from the StartUpMode attribute from DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsFromTheStartUpModeAttributeFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the CurrentMode attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsTheCurrentModeAttributeFromTheDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the SupportedModes attribute from DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsTheSupportedModesAttributeFromDut_3(); - break; - case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : TH send a ChangeToMode command to the DUT with NewMode set to new_mode_th\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThSendAChangeToModeCommandToTheDutWithNewModeSetToNewModeTh_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Physically power cycle the device\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestPhysicallyPowerCycleTheDevice_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads the CurrentMode attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsTheCurrentModeAttributeFromTheDut_6(); - 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; - } - - // 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 = 7; - - 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 TestThReadsFromTheStartUpModeAttributeFromDut_1() - { - - 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 TestThReadsTheCurrentModeAttributeFromTheDut_2() - { - - 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 TestThReadsTheSupportedModesAttributeFromDut_3() - { - - 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 TestThSendAChangeToModeCommandToTheDutWithNewModeSetToNewModeTh_4() - { - - 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 TestPhysicallyPowerCycleTheDevice_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 TestThReadsTheCurrentModeAttributeFromTheDut_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); - } -}; - -class Test_TC_DISHM_3_3 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DISHM_3_3() - : TestCommandBridge("Test_TC_DISHM_3_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_DISHM_3_3() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DISHM_3_3\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DISHM_3_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 reads from the StartUpMode attribute from DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsFromTheStartUpModeAttributeFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads from the OnMode attribute from DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsFromTheOnModeAttributeFromDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the SupportedModes attribute from DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsTheSupportedModesAttributeFromDut_3(); - break; - case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : TH writes to the DUT the OnMode attribute with the new_mode_th value\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThWritesToTheDutTheOnModeAttributeWithTheNewModeThValue_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads from the OnMode attribute from DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsFromTheOnModeAttributeFromDut_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH writes to the DUT the StartUpOnOff attribute with the value 1.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThWritesToTheDutTheStartUpOnOffAttributeWithTheValue1_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Physically power cycle the device\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestPhysicallyPowerCycleTheDevice_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads the CurrentMode attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsTheCurrentModeAttributeFromTheDut_8(); - 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; - } - - // 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 = 9; - - 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 TestThReadsFromTheStartUpModeAttributeFromDut_1() - { - - 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 TestThReadsFromTheOnModeAttributeFromDut_2() - { + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - 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); - } + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"6. TH reads AcceptedCommandList from DUT Error: %@", err); - CHIP_ERROR TestThReadsTheSupportedModesAttributeFromDut_3() - { + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - 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); - } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - CHIP_ERROR TestThWritesToTheDutTheOnModeAttributeWithTheNewModeThValue_4() - { + NextTest(); + }]; - 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); + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheOnModeAttributeFromDut_5() + CHIP_ERROR Test7ThReadsFromTheDutTheGeneratedCommandListAttribute_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 TestThWritesToTheDutTheStartUpOnOffAttributeWithTheValue1_6() - { + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - 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); - } + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"7. TH reads from the DUT the GeneratedCommandList attribute Error: %@", err); - CHIP_ERROR TestPhysicallyPowerCycleTheDevice_7() - { + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - 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); - } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); - CHIP_ERROR TestThReadsTheCurrentModeAttributeFromTheDut_8() - { + NextTest(); + }]; - 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); + return CHIP_NO_ERROR; } }; @@ -176155,11 +174991,6 @@ 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(), From be8cc2700c2fc6a617dee2ef7c423d9d8bf1cc7e Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Thu, 27 Jul 2023 10:11:12 +0000 Subject: [PATCH 33/46] Restyled by whitespace --- src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml | 2 +- src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml | 2 +- src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml | 2 +- src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml | 2 +- src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml index 0bd3de97dc0e44..50b8cdfc0e794b 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml @@ -115,4 +115,4 @@ tests: [1649677014.496348][10778:10784] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 4277065072 [1649677014.496469][10778:10784] CHIP:TOO: StartUpMode: 0 - disabled: true \ No newline at end of file + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml index 295803cc9a1385..22929612674538 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml @@ -182,4 +182,4 @@ tests: PICS: DISHM.S.A0001 verification: | - disabled: true \ No newline at end of file + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml index 3127032a17333a..faf7b9642bc0a6 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml @@ -159,4 +159,4 @@ tests: [1649679202.069163][10899:10904] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 [1649679202.069278][10899:10904] CHIP:TOO: CurrentMode: 2 - disabled: true \ No newline at end of file + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml index d0bd44582166b4..7324ef55919763 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml @@ -138,4 +138,4 @@ tests: [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 - disabled: true \ No newline at end of file + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml index 94917d256883cd..399b80b1276e2f 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml @@ -203,4 +203,4 @@ tests: [1669190936.869804][4194:4196] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3908583538 [1669190936.869875][4194:4196] CHIP:TOO: CurrentMode: 7 - disabled: true \ No newline at end of file + disabled: true From 6b3b577e255a419289eed2b95369efa250945780 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Thu, 27 Jul 2023 10:11:14 +0000 Subject: [PATCH 34/46] Restyled by prettier-json --- src/app/tests/suites/ciTests.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index fbded496da7023..52a57003583d11 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -58,9 +58,7 @@ "Test_TC_DGETH_2_2" ], "DiagnosticsLogs": ["Test_TC_DLOG_1_1"], - "DishwasherMode": [ - "Test_TC_DISHM_1_1" - ], + "DishwasherMode": ["Test_TC_DISHM_1_1"], "FlowMeasurement": ["Test_TC_FLW_1_1", "Test_TC_FLW_2_1"], "FixedLabel": ["Test_TC_FLABEL_1_1", "Test_TC_FLABEL_2_1"], "FanControl": [ From ca76f30c54eecb4ddca67d0104a1c76eed61ef2b Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Thu, 27 Jul 2023 10:11:28 +0000 Subject: [PATCH 35/46] Restyled by prettier-yaml --- .../tests/suites/certification/Test_TC_DISHM_1_1.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml index df751ff7a73490..79b1242c9e855d 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml @@ -58,7 +58,7 @@ tests: value: 1 constraints: type: bitmap32 -# Reference for "SHALL NOT contain" issue: https://github.com/project-chip/connectedhomeip/issues/28287 + # Reference for "SHALL NOT contain" issue: https://github.com/project-chip/connectedhomeip/issues/28287 - label: "4. TH reads AttributeList from DUT" command: "readAttribute" attribute: "AttributeList" @@ -111,9 +111,8 @@ tests: type: list excludes: [3] -# Reference for "SHALL NOT contain" issue: https://github.com/project-chip/connectedhomeip/issues/28287 - - label: - "5. TH reads from the DUT the EventList attribute" + # Reference for "SHALL NOT contain" issue: https://github.com/project-chip/connectedhomeip/issues/28287 + - label: "5. TH reads from the DUT the EventList attribute" PICS: DISHM.S.F00 command: "readAttribute" attribute: "EventList" @@ -122,7 +121,7 @@ tests: constraints: type: list -# Reference for "SHALL NOT contain" issue: https://github.com/project-chip/connectedhomeip/issues/28287 + # Reference for "SHALL NOT contain" issue: https://github.com/project-chip/connectedhomeip/issues/28287 - label: "6. TH reads AcceptedCommandList from DUT" command: "readAttribute" attribute: "AcceptedCommandList" @@ -131,7 +130,7 @@ tests: type: list contains: [0] -# Reference for "SHALL NOT contain" issue: https://github.com/project-chip/connectedhomeip/issues/28287 + # Reference for "SHALL NOT contain" issue: https://github.com/project-chip/connectedhomeip/issues/28287 - label: "7. TH reads from the DUT the GeneratedCommandList attribute" command: "readAttribute" attribute: "GeneratedCommandList" From 21aa444e60ef04a95e4f6d64a88b90cbab9f4b57 Mon Sep 17 00:00:00 2001 From: abpoth Date: Mon, 31 Jul 2023 16:04:20 -0400 Subject: [PATCH 36/46] added python test scripts and ran code regeneration --- src/app/tests/suites/manualTests.json | 1 + src/python_testing/TC_DISHM_1_2.py | 118 ++++++++ src/python_testing/TC_DISHM_2_1.py | 168 +++++++++++ src/python_testing/TC_DISHM_3_1.py | 157 ++++++++++ src/python_testing/TC_DISHM_3_2.py | 138 +++++++++ src/python_testing/TC_DISHM_3_3.py | 173 +++++++++++ .../chip-tool/zap-generated/test/Commands.h | 285 ++++++++++++++++++ 7 files changed, 1040 insertions(+) create mode 100644 src/python_testing/TC_DISHM_1_2.py create mode 100644 src/python_testing/TC_DISHM_2_1.py create mode 100644 src/python_testing/TC_DISHM_3_1.py create mode 100644 src/python_testing/TC_DISHM_3_2.py create mode 100644 src/python_testing/TC_DISHM_3_3.py diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index 58de90c3d9c637..98456d2904b5ff 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -372,6 +372,7 @@ "DeviceManagement", "DiagnosticsLogs", "DishwasherAlarm", + "DishwasherMode", "Descriptor", "FanControl", "EthernetNetworkDiagnostics", diff --git a/src/python_testing/TC_DISHM_1_2.py b/src/python_testing/TC_DISHM_1_2.py new file mode 100644 index 00000000000000..1abfc9a44091a7 --- /dev/null +++ b/src/python_testing/TC_DISHM_1_2.py @@ -0,0 +1,118 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# 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. +# + +import logging + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from mobly import asserts + +# This test requires several additional command line arguments +# run with +# --int-arg PIXIT_ENDPOINT: + + +class TC_DISHM_1_2(MatterBaseTest): + + async def read_mod_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.DishwasherMode + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + @async_test_body + async def test_TC_DISHM_1_2(self): + + asserts.assert_true('PIXIT_ENDPOINT' in self.matter_test_config.global_test_params, + "PIXIT_ENDPOINT must be included on the command line in " + "the --int-arg flag as PIXIT_ENDPOINT:") + + self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] + + attributes = Clusters.DishwasherMode.Attributes + + self.print_step(1, "Commissioning, already done") + + if self.check_pics("DISHM.S.A0000"): + self.print_step(2, "Read SupportedModes attribute") + supported_modes = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes) + + logging.info("SupportedModes: %s" % (supported_modes)) + + asserts.assert_greater_equal(len(supported_modes), 1, "SupportedModes must have at least one entries!") + + supported_modes_dut = [] + for m in supported_modes: + if m.mode in supported_modes_dut: + asserts.fail("SupportedModes must have unique mode values!") + else: + supported_modes_dut.append(m.mode) + + labels = [] + for m in supported_modes: + if m.label in labels: + asserts.fail("SupportedModes must have unique mode label values!") + else: + labels.append(m.label) + + # common mode tags + commonTags = {0x0: 'Auto', + 0x1: 'Quick', + 0x2: 'Quiet', + 0x3: 'LowNoise', + 0x4: 'LowEnergy', + 0x5: 'Vacation', + 0x6: 'Min', + 0x7: 'Max', + 0x8: 'Night', + 0x9: 'Day'} + + runTags = [tag.value for tag in Clusters.DishwasherMode.Enums.ModeTag + if tag is not Clusters.DishwasherMode.Enums.ModeTag.kUnknownEnumValue] + + for m in supported_modes: + for t in m.modeTags: + is_mfg = (0x8000 <= t.value and t.value <= 0xBFFF) + asserts.assert_true(t.value in commonTags.keys() or t.value in runTags or is_mfg, + "Found a SupportedModes entry with invalid mode tag value!") + if t.value == Clusters.DishwasherMode.Enums.ModeTag.kNormal: + normal_present = True + asserts.assert_true(normal_present, "The Supported Modes does not have an entry of Normal(0x4000)") + + if self.check_pics("DISHM.S.A0001"): + self.print_step(3, "Read CurrentMode attribute") + current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) + + logging.info("CurrentMode: %s" % (current_mode)) + asserts.assert_true(current_mode in supported_modes_dut, "CurrentMode is not a supported mode!") + + if self.check_pics("DISHM.S.A0003"): + self.print_step(4, "Read OnMode attribute") + on_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.OnMode) + + logging.info("OnMode: %s" % (on_mode)) + asserts.assert_true(on_mode in supported_modes_dut or on_mode == NullValue, "OnMode is not a supported mode!") + + if self.check_pics("DISHM.S.A0002"): + self.print_step(5, "Read StartUpMode attribute") + startup_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.StartUpMode) + + logging.info("StartUpMode: %s" % (startup_mode)) + asserts.assert_true(startup_mode in supported_modes_dut or startup_mode == NullValue, "StartUpMode is not a supported mode!") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_DISHM_2_1.py b/src/python_testing/TC_DISHM_2_1.py new file mode 100644 index 00000000000000..293704f0ce61bf --- /dev/null +++ b/src/python_testing/TC_DISHM_2_1.py @@ -0,0 +1,168 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# 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. +# + +import logging + +import chip.clusters as Clusters +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches +from mobly import asserts + +# This test requires several additional command line arguments +# run with +# --int-arg PIXIT_ENDPOINT: PIXIT_MODEOK: PIXIT_MODEFAIL: + + +class TC_DISHM_2_1(MatterBaseTest): + + async def read_mod_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.DishwasherMode + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + async def send_change_to_mode_cmd(self, newMode) -> Clusters.Objects.DishwasherMode.Commands.ChangeToModeResponse: + ret = await self.send_single_cmd(cmd=Clusters.Objects.DishwasherMode.Commands.ChangeToMode(newMode=newMode), endpoint=self.endpoint) + asserts.assert_true(type_matches(ret, Clusters.Objects.DishwasherMode.Commands.ChangeToModeResponse), + "Unexpected return type for ChangeToMode") + return ret + + @async_test_body + async def test_TC_DISHM_2_1(self): + + asserts.assert_true('PIXIT_ENDPOINT' in self.matter_test_config.global_test_params, + "PIXIT_ENDPOINT must be included on the command line in " + "the --int-arg flag as PIXIT_ENDPOINT:") + asserts.assert_true('PIXIT_MODEOK' in self.matter_test_config.global_test_params, + "PIXIT_MODEOK must be included on the command line in " + "the --int-arg flag as PIXIT_MODEOK:") + asserts.assert_true('PIXIT_MODEFAIL' in self.matter_test_config.global_test_params, + "PIXIT_MODEFAIL must be included on the command line in " + "the --int-arg flag as PIXIT_MODEFAIL:") + asserts.assert_true('pixit_can_test_mode_failure' in self.matter_test_config.global_test_params, + "PIXIT_CAN_TEST_MODE_FAILURE must be included on the command line in " + "the --bool-arg flag as PIXIT_CAN_TEST_MODE_FAILURE:") + + self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] + self.modeok = self.matter_test_config.global_test_params['PIXIT_MODEOK'] + self.modefail = self.matter_test_config.global_test_params['PIXIT_MODEFAIL'] + self.can_test_mode_failure = self.matter_test_config.global_test_params['pixit_can_test_mode_failure'] + + asserts.assert_true(self.check_pics("DISHM.S.A0000"), "DISHM.S.A0000 must be supported") + asserts.assert_true(self.check_pics("DISHM.S.A0001"), "DISHM.S.A0001 must be supported") + asserts.assert_true(self.check_pics("DISHM.S.C00.Rsp"), "DISHM.S.C00.Rsp must be supported") + asserts.assert_true(self.check_pics("DISHM.S.C01.Tx"), "DISHM.S.C01.Tx must be supported") + + attributes = Clusters.DishwasherMode.Attributes + + self.print_step(1, "Commissioning, already done") + + self.print_step(2, "Read SupportedModes attribute") + supported_modes = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes) + + logging.info("SupportedModes: %s" % (supported_modes)) + + asserts.assert_greater_equal(len(supported_modes), 2, "SupportedModes must have at least two entries!") + + suppoted_modes_dut = [m.mode for m in supported_modes] + + self.print_step(3, "Read CurrentMode attribute") + + old_current_mode_dut = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) + + logging.info("CurrentMode: %s" % (old_current_mode_dut)) + + # pick a value that's not on the list of supported modes + invalid_mode_th = max(suppoted_modes_dut) + 1 + + from enum import Enum + + class CommonCodes(Enum): + SUCCESS = 0x00 + UNSUPPORTED_MODE = 0x01 + GENERIC_FAILURE = 0x02 + + DishwasherModeCodes = [code.value for code in Clusters.DishwasherMode.Enums.StatusCode + if code is not Clusters.DishwasherMode.Enums.StatusCode.kUnknownEnumValue] + + self.print_step(4, "Send ChangeToMode command with NewMode set to %d" % (old_current_mode_dut)) + + ret = await self.send_change_to_mode_cmd(newMode=old_current_mode_dut) + asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the mode to the current mode should be a no-op") + + if self.can_test_mode_failure is True: + self.print_step(5, "Manually put the device in a state from which it will FAIL to transition to mode %d" % (self.modefail)) + input("Press Enter when done.\n") + + self.print_step(6, "Read CurrentMode attribute") + old_current_mode_dut = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) + + logging.info("CurrentMode: %s" % (old_current_mode_dut)) + + self.print_step(7, "Send ChangeToMode command with NewMode set to %d" % (self.modefail)) + + ret = await self.send_change_to_mode_cmd(newMode=self.modefail) + st = ret.status + is_mfg_code = st in range(0x80, 0xC0) + is_err_code = (st == CommonCodes.GENERIC_FAILURE.value) or (st in DishwasherModeCodes) or is_mfg_code + asserts.assert_true( + is_err_code, "Changing to mode %d must fail due to the current state of the device" % (self.modefail)) + st_text_len = len(ret.statusText) + asserts.assert_true(st_text_len in range(1, 65), "StatusText length (%d) must be between 1 and 64" % (st_text_len)) + + self.print_step(8, "Read CurrentMode attribute") + current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) + + logging.info("CurrentMode: %s" % (current_mode)) + + asserts.assert_true(current_mode == old_current_mode_dut, "CurrentMode changed after failed ChangeToMode command!") + + self.print_step(9, "Manually put the device in a state from which it will SUCCESSFULLY transition to mode %d" % (self.modeok)) + input("Press Enter when done.\n") + + self.print_step(10, "Read CurrentMode attribute") + old_current_mode_dut = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) + + logging.info("CurrentMode: %s" % (old_current_mode_dut)) + + self.print_step(11, "Send ChangeToMode command with NewMode set to %d" % (self.modeok)) + + ret = await self.send_change_to_mode_cmd(newMode=self.modeok) + asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, + "Changing to mode %d must succeed due to the current state of the device" % (self.modeok)) + + self.print_step(12, "Read CurrentMode attribute") + current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) + + logging.info("CurrentMode: %s" % (current_mode)) + + asserts.assert_true(current_mode == self.modeok, + "CurrentMode doesn't match the argument of the successful ChangeToMode command!") + + self.print_step(13, "Send ChangeToMode command with NewMode set to %d" % (invalid_mode_th)) + + ret = await self.send_change_to_mode_cmd(newMode=invalid_mode_th) + asserts.assert_true(ret.status == CommonCodes.UNSUPPORTED_MODE.value, + "Attempt to change to invalid mode %d didn't fail as expected" % (invalid_mode_th)) + + self.print_step(14, "Read CurrentMode attribute") + current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) + + logging.info("CurrentMode: %s" % (current_mode)) + + asserts.assert_true(current_mode == self.modeok, "CurrentMode changed after failed ChangeToMode command!") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_DISHM_3_1.py b/src/python_testing/TC_DISHM_3_1.py new file mode 100644 index 00000000000000..0d1732822c1a36 --- /dev/null +++ b/src/python_testing/TC_DISHM_3_1.py @@ -0,0 +1,157 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# 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. +# + +import logging +import random + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from chip.interaction_model import Status +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches +from mobly import asserts + +# This test requires several additional command line arguments +# run with +# --int-arg PIXIT_ENDPOINT: + + +class TC_DISHM_3_1(MatterBaseTest): + + async def read_mod_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.DishwasherMode + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + async def send_change_to_mode_cmd(self, newMode) -> Clusters.Objects.DishwasherMode.Commands.ChangeToModeResponse: + ret = await self.send_single_cmd(cmd=Clusters.Objects.DishwasherMode.Commands.ChangeToMode(newMode=newMode), endpoint=self.endpoint) + asserts.assert_true(type_matches(ret, Clusters.Objects.DishwasherMode.Commands.ChangeToModeResponse), + "Unexpected return type for ChangeToMode") + return ret + + async def write_on_mode(self, newMode): + ret = await self.default_controller.WriteAttribute(self.dut_node_id, [(self.endpoint, Clusters.DishwasherMode.Attributes.OnMode(newMode))]) + asserts.assert_equal(ret[0].Status, Status.Success, "Writing to OnMode failed") + + async def write_onoff_on_mode(self)-> Clusters.Objects.OnOff.Commands.On: + ret = await self.send_single_cmd(cmd=Clusters.Objects.OnOff.Commands.On, endpoint=self.endpoint) + asserts.assert_true(type_matches(ret, Clusters.Objects.OnOff.Commands.On), + "Unexpected return type for OnOff") + + async def write_onoff_off_mode(self)-> Clusters.Objects.OnOff.Commands.Off: + ret = await self.send_single_cmd(cmd=Clusters.Objects.OnOff.Commands.Off, endpoint=self.endpoint) + asserts.assert_true(type_matches(ret, Clusters.Objects.OnOff.Commands.Off), + "Unexpected return type for OnOff") + + @async_test_body + async def test_TC_DISHM_3_2(self): + + asserts.assert_true('PIXIT_ENDPOINT' in self.matter_test_config.global_test_params, + "PIXIT_ENDPOINT must be included on the command line in " + "the --int-arg flag as PIXIT_ENDPOINT:") + + self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] + + asserts.assert_true(self.check_pics("DISHM.S.A0000"), "DISHM.S.A0000 must be supported") + asserts.assert_true(self.check_pics("DISHM.S.A0001"), "DISHM.S.A0001 must be supported") + asserts.assert_true(self.check_pics("DISHM.S.A0002"), "DISHM.S.A0002 must be supported") + asserts.assert_true(self.check_pics("DISHM.S.C00.Rsp"), "DISHM.S.C00.Rsp must be supported") + asserts.assert_true(self.check_pics("DISHM.S.C01.Tx"), "DISHM.S.C01.Tx must be supported") + + attributes = Clusters.DishwasherMode.Attributes + + from enum import Enum + + class CommonCodes(Enum): + SUCCESS = 0x00 + UNSUPPORTED_MODE = 0x01 + GENERIC_FAILURE = 0x02 + + self.print_step(1, "Commissioning, already done") + + self.print_step(2, "Read OnMode attribute") + + on_mode_dut = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.OnMode) + + logging.info("OnMode: %s" % (on_mode_dut)) + + if on_mode_dut == NullValue: + self.print_step(3, "Read SupportedModes attribute") + supported_modes = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes) + + logging.info("SupportedModes: %s" % (supported_modes)) + + asserts.assert_greater_equal(len(supported_modes), 2, "SupportedModes must have at least two entries!") + + supported_modes_dut = [m.mode for m in supported_modes] + new_on_mode_th = random.choice(supported_modes_dut) + + self.print_step(4, "Write the value %s to OnMode" % (new_on_mode_th)) + + await self.write_on_mode(newMode=new_on_mode_th) + else: + new_on_mode_th = on_mode_dut + + self.print_step(3, "Read CurrentMode attribute") + + old_current_mode_dut = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) + + logging.info("CurrentMode: %s" % (old_current_mode_dut)) + + if old_current_mode_dut == new_on_mode_th: + + self.print_step(4, "Read SupportedModes attribute") + supported_modes = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes) + + logging.info("SupportedModes: %s" % (supported_modes)) + + asserts.assert_greater_equal(len(supported_modes), 2, "SupportedModes must have at least two entries!") + + new_mode_th = None + + for m in supported_modes: + if m.mode != new_on_mode_th: + new_mode_th = m.mode + break + + self.print_step(5, "Send ChangeToMode command with NewMode set to %d" % (new_mode_th)) + + ret = await self.send_change_to_mode_cmd(newMode=new_mode_th) + asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the mode should succeed") + + + self.print_step(6, "Send Off command") + + ret = await self.write_onoff_off_mode() + asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the mode to off should succeed") + + + self.print_step(7, "Send On command") + + ret = await self.write_onoff_on_mode() + asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the mode to on should succeed") + + + self.print_step(8, "Read CurrentMode attribute") + + current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) + + logging.info("CurrentMode: %s" % (current_mode)) + + asserts.assert_true(on_mode_dut == current_mode, "CurrentMode must match OnMode after a power cycle") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_DISHM_3_2.py b/src/python_testing/TC_DISHM_3_2.py new file mode 100644 index 00000000000000..edbc2e500be5f4 --- /dev/null +++ b/src/python_testing/TC_DISHM_3_2.py @@ -0,0 +1,138 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# 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. +# + +import logging +import random + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from chip.interaction_model import Status +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches +from mobly import asserts + +# This test requires several additional command line arguments +# run with +# --int-arg PIXIT_ENDPOINT: + + +class TC_DISHM_3_2(MatterBaseTest): + + async def read_mod_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.DishwasherMode + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + async def send_change_to_mode_cmd(self, newMode) -> Clusters.Objects.DishwasherMode.Commands.ChangeToModeResponse: + ret = await self.send_single_cmd(cmd=Clusters.Objects.DishwasherMode.Commands.ChangeToMode(newMode=newMode), endpoint=self.endpoint) + asserts.assert_true(type_matches(ret, Clusters.Objects.DishwasherMode.Commands.ChangeToModeResponse), + "Unexpected return type for ChangeToMode") + return ret + + async def write_start_up_mode(self, newMode): + ret = await self.default_controller.WriteAttribute(self.dut_node_id, [(self.endpoint, Clusters.DishwasherMode.Attributes.StartUpMode(newMode))]) + asserts.assert_equal(ret[0].Status, Status.Success, "Writing to StartUpMode failed") + + @async_test_body + async def test_TC_DISHM_3_2(self): + + asserts.assert_true('PIXIT_ENDPOINT' in self.matter_test_config.global_test_params, + "PIXIT_ENDPOINT must be included on the command line in " + "the --int-arg flag as PIXIT_ENDPOINT:") + + self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] + + asserts.assert_true(self.check_pics("DISHM.S.A0000"), "DISHM.S.A0000 must be supported") + asserts.assert_true(self.check_pics("DISHM.S.A0001"), "DISHM.S.A0001 must be supported") + asserts.assert_true(self.check_pics("DISHM.S.A0002"), "DISHM.S.A0002 must be supported") + asserts.assert_true(self.check_pics("DISHM.S.C00.Rsp"), "DISHM.S.C00.Rsp must be supported") + asserts.assert_true(self.check_pics("DISHM.S.C01.Tx"), "DISHM.S.C01.Tx must be supported") + + attributes = Clusters.DishwasherMode.Attributes + + from enum import Enum + + class CommonCodes(Enum): + SUCCESS = 0x00 + UNSUPPORTED_MODE = 0x01 + GENERIC_FAILURE = 0x02 + + self.print_step(1, "Commissioning, already done") + + self.print_step(2, "Read StartUpMode attribute") + + startup_mode_dut = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.StartUpMode) + + logging.info("StartUpMode: %s" % (startup_mode_dut)) + if startup_mode_dut == NullValue: + self.print_step(3, "Read SupportedModes attribute") + supported_modes = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes) + + logging.info("SupportedModes: %s" % (supported_modes)) + + asserts.assert_greater_equal(len(supported_modes), 2, "SupportedModes must have at least two entries!") + + modes = [m.mode for m in supported_modes] + new_startup_mode = random.choice(modes) + + self.print_step(4, "Write the value %s to StartUpMode" % (new_startup_mode)) + + await self.write_start_up_mode(newMode=new_startup_mode) + else: + new_startup_mode = startup_mode_dut + + self.print_step(3, "Read CurrentMode attribute") + + old_current_mode_dut = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) + + logging.info("CurrentMode: %s" % (old_current_mode)) + + if old_current_mode_dut == new_startup_mode: + + self.print_step(4, "Read SupportedModes attribute") + supported_modes_dut = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes) + + logging.info("SupportedModes: %s" % (supported_modes_dut)) + + asserts.assert_greater_equal(len(supported_modes_dut), 2, "SupportedModes must have at least two entries!") + + new_mode = None + + for m in supported_modes_dut: + if m.mode != new_startup_mode: + new_mode_th = m.mode + break + + self.print_step(5, "Send ChangeToMode command with NewMode set to %d" % (new_mode_th)) + + ret = await self.send_change_to_mode_cmd(newMode=new_mode_th) + asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the mode should succeed") + + self.default_controller.ExpireSessions(self.dut_node_id) + + self.print_step(6, "Physically power cycle the device") + input("Press Enter when done.\n") + + self.print_step(7, "Read CurrentMode attribute") + + current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) + + logging.info("CurrentMode: %s" % (current_mode)) + + asserts.assert_true(startup_mode_dut == current_mode, "CurrentMode must match StartUpMode after a power cycle") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_DISHM_3_3.py b/src/python_testing/TC_DISHM_3_3.py new file mode 100644 index 00000000000000..d0f2c15aaba9d4 --- /dev/null +++ b/src/python_testing/TC_DISHM_3_3.py @@ -0,0 +1,173 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# 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. +# + +import logging +import random + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from chip.interaction_model import Status +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches +from mobly import asserts + +# This test requires several additional command line arguments +# run with +# --int-arg PIXIT_ENDPOINT: + + +class TC_DISHM_3_2(MatterBaseTest): + + async def read_mod_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.DishwasherMode + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + async def send_change_to_mode_cmd(self, newMode) -> Clusters.Objects.DishwasherMode.Commands.ChangeToModeResponse: + ret = await self.send_single_cmd(cmd=Clusters.Objects.DishwasherMode.Commands.ChangeToMode(newMode=newMode), endpoint=self.endpoint) + asserts.assert_true(type_matches(ret, Clusters.Objects.DishwasherMode.Commands.ChangeToModeResponse), + "Unexpected return type for ChangeToMode") + return ret + + async def write_on_mode(self, newMode): + ret = await self.default_controller.WriteAttribute(self.dut_node_id, [(self.endpoint, Clusters.DishwasherMode.Attributes.OnMode(newMode))]) + asserts.assert_equal(ret[0].Status, Status.Success, "Writing to OnMode failed") + + async def write_startup_onoff(self)-> Clusters.Objects.OnOff.Commands.Off: + ret = await self.default_controller.WriteAttribute(self.dut_node_id, [(self.endpoint, Clusters.OnOff.Attributes.StartUpOnOff(1))]) + asserts.assert_equal(ret[0].Status, Status.Success, "Writing to OnOff failed") + + @async_test_body + async def test_TC_DISHM_3_2(self): + + asserts.assert_true('PIXIT_ENDPOINT' in self.matter_test_config.global_test_params, + "PIXIT_ENDPOINT must be included on the command line in " + "the --int-arg flag as PIXIT_ENDPOINT:") + + self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] + + asserts.assert_true(self.check_pics("DISHM.S.A0000"), "DISHM.S.A0000 must be supported") + asserts.assert_true(self.check_pics("DISHM.S.A0001"), "DISHM.S.A0001 must be supported") + asserts.assert_true(self.check_pics("DISHM.S.A0002"), "DISHM.S.A0002 must be supported") + asserts.assert_true(self.check_pics("DISHM.S.C00.Rsp"), "DISHM.S.C00.Rsp must be supported") + asserts.assert_true(self.check_pics("DISHM.S.C01.Tx"), "DISHM.S.C01.Tx must be supported") + + attributes = Clusters.DishwasherMode.Attributes + + from enum import Enum + + class CommonCodes(Enum): + SUCCESS = 0x00 + UNSUPPORTED_MODE = 0x01 + GENERIC_FAILURE = 0x02 + + self.print_step(1, "Commissioning, already done") + + self.print_step(2, "Read StartUpMode attribute") + + startup_mode_dut = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.StartUpMode) + + logging.info("StartUpMode: %s" % (startup_mode_dut)) + if startup_mode_dut == NullValue: + self.print_step(3, "Read SupportedModes attribute") + supported_modes = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes) + + logging.info("SupportedModes: %s" % (supported_modes)) + + asserts.assert_greater_equal(len(supported_modes), 2, "SupportedModes must have at least two entries!") + + modes = [m.mode for m in supported_modes] + new_startup_mode = random.choice(modes) + + self.print_step(4, "Write the value %s to StartUpMode" % (new_startup_mode)) + + await self.write_start_up_mode(newMode=new_startup_mode) + else: + new_startup_mode = startup_mode_dut + + self.print_step(3, "Read OnMode attribute") + + old_on_mode_dut = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.OnMode) + + logging.info("OnMode: %s" % (old_on_mode_dut)) + + if old_on_mode_dut == NullValue: + self.print_step(4, "Read SupportedModes attribute") + supported_modes = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes) + + logging.info("SupportedModes: %s" % (supported_modes)) + + asserts.assert_greater_equal(len(supported_modes), 2, "SupportedModes must have at least two entries!") + + supported_modes_dut = [m.mode for m in supported_modes] + new_old_on_mode_dut = random.choice(supported_modes_dut) + + self.print_step(5, "Write the value %s to OnMode" % (new_old_on_mode_dut)) + + await self.write_on_mode(newMode=new_old_on_mode_dut) + else: + new_old_on_mode_dut = old_on_mode_dut + + + if new_old_on_mode_dut == new_startup_mode: + + self.print_step(4, "Read SupportedModes attribute") + supported_modes_dut = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes) + + logging.info("SupportedModes: %s" % (supported_modes_dut)) + + asserts.assert_greater_equal(len(supported_modes_dut), 2, "SupportedModes must have at least two entries!") + + new_mode = None + + for m in supported_modes_dut: + if m.mode != new_startup_mode: + new_mode_th = m.mode + break + + self.print_step(5, "Write to OnMode attribute with NewMode set to %d" % (new_mode_th)) + + ret = await self.write_on_mode(newMode=new_mode_th) + asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the Onmode should succeed") + + self.print_step(6, "Read OnMode attribute") + + new_on_mode_dut = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.OnMode) + + logging.info("OnMode: %s" % (new_on_mode_dut)) + + asserts.assert_true(new_mode_th == new_on_mode_dut, "OnMode must match the mode written in previous step") + + self.print_step(7, "Write to the StartUpOnOff attribute of OnOff cluster with a value of 1") + + ret = await self.write_startup_onoff() + asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Writing to the StartUpOnOff attribute of OnOff should succeed") + + self.default_controller.ExpireSessions(self.dut_node_id) + + self.print_step(8, "Physically power cycle the device") + input("Press Enter when done.\n") + + self.print_step(9, "Read CurrentMode attribute") + + current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) + + logging.info("CurrentMode: %s" % (current_mode)) + + asserts.assert_true(new_on_mode_dut == current_mode, "CurrentMode must match OnMode after a power cycle") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index cecfab70acd248..efa42dfc2757db 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -436,6 +436,11 @@ class ManualTestList : public Command printf("Test_TC_DISHALM_3_4\n"); printf("Test_TC_DISHALM_3_5\n"); printf("Test_TC_DISHALM_3_6\n"); + printf("Test_TC_DISHM_1_2\n"); + printf("Test_TC_DISHM_2_1\n"); + printf("Test_TC_DISHM_3_1\n"); + printf("Test_TC_DISHM_3_2\n"); + printf("Test_TC_DISHM_3_3\n"); printf("Test_TC_DESC_2_1\n"); printf("Test_TC_FAN_3_3\n"); printf("Test_TC_FAN_3_5\n"); @@ -122715,6 +122720,281 @@ class Test_TC_DISHALM_3_6Suite : public TestCommand } }; +class Test_TC_DISHM_1_2Suite : public TestCommand +{ +public: + Test_TC_DISHM_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_1_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_DISHM_1_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_DISHM_2_1Suite : public TestCommand +{ +public: + Test_TC_DISHM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_2_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_DISHM_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) + { + 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_DISHM_3_1Suite : public TestCommand +{ +public: + Test_TC_DISHM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_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_DISHM_3_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_DISHM_3_2Suite : public TestCommand +{ +public: + Test_TC_DISHM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_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_DISHM_3_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_DISHM_3_3Suite : public TestCommand +{ +public: + Test_TC_DISHM_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_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_DISHM_3_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_DESC_2_1Suite : public TestCommand { public: @@ -147419,6 +147699,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), From b240a42d94e754088ab9dbc57c5f3d881648d84f Mon Sep 17 00:00:00 2001 From: abpoth Date: Mon, 31 Jul 2023 16:09:59 -0400 Subject: [PATCH 37/46] update to variable name --- src/python_testing/TC_DISHM_3_2.py | 2 +- third_party/pigweed/repo | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/python_testing/TC_DISHM_3_2.py b/src/python_testing/TC_DISHM_3_2.py index edbc2e500be5f4..c0acf4b98eaa86 100644 --- a/src/python_testing/TC_DISHM_3_2.py +++ b/src/python_testing/TC_DISHM_3_2.py @@ -97,7 +97,7 @@ class CommonCodes(Enum): old_current_mode_dut = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) - logging.info("CurrentMode: %s" % (old_current_mode)) + logging.info("CurrentMode: %s" % (old_current_mode_dut)) if old_current_mode_dut == new_startup_mode: diff --git a/third_party/pigweed/repo b/third_party/pigweed/repo index cf4291da443f5b..f4d0b3563c09d9 160000 --- a/third_party/pigweed/repo +++ b/third_party/pigweed/repo @@ -1 +1 @@ -Subproject commit cf4291da443f5b2db18827747bb66499459de5bd +Subproject commit f4d0b3563c09d945478267fcff619a959cd3e9f6 From cbf22cc560e821d1c16cd0d802f5597a9eae6080 Mon Sep 17 00:00:00 2001 From: abpoth Date: Mon, 31 Jul 2023 16:33:41 -0400 Subject: [PATCH 38/46] reverted back to old yaml test scripts with updated test values --- .../tests/suites/certification/Test_TC_DISHM_1_2.yaml | 8 +++++--- .../tests/suites/certification/Test_TC_DISHM_2_1.yaml | 9 +++++---- .../tests/suites/certification/Test_TC_DISHM_3_1.yaml | 3 ++- .../tests/suites/certification/Test_TC_DISHM_3_2.yaml | 3 ++- .../tests/suites/certification/Test_TC_DISHM_3_3.yaml | 3 ++- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml index 50b8cdfc0e794b..19e757e3748158 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml @@ -20,9 +20,10 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic Information" + cluster: "Dishwasher Mode" endpoint: 0 + tests: - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding @@ -31,12 +32,13 @@ tests: disabled: true +# Reference Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3204 - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: DISHM.S.A0000 verification: | ./chip-tool dishwashermode read supported-modes 1 1 - On TH(chip-tool) log, Verify SupportedModes attribute should contains atleast two ModeOptionsStruct entries with unique mode field value and label field value below is the sample log provided for the raspi platform: + On TH(chip-tool) log, Verify SupportedModes attribute should contain atleast two ModeOptionsStruct entries with unique mode field value and label field value. Below is the sample log provided for the raspi platform: [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries @@ -115,4 +117,4 @@ tests: [1649677014.496348][10778:10784] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 4277065072 [1649677014.496469][10778:10784] CHIP:TOO: StartUpMode: 0 - disabled: true + disabled: true \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml index 22929612674538..31730b519ce6b9 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml @@ -20,7 +20,7 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic Information" + cluster: "Dishwasher Mode" endpoint: 0 tests: @@ -31,13 +31,14 @@ tests: disabled: true +# Reference Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3204 - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: DISHM.S.A0000 verification: | ./chip-tool dishwashermode read supported-modes 1 1 - On TH(chip-tool) log, Verify SupportedModes attribute should contains two or more ModeOptionsStruct entries and - Save the Mode field values as supported_modes_dut, below is the sample log provided for the raspi platform: + On TH(chip-tool) log, Verify SupportedModes attribute should contain two or more ModeOptionsStruct entries and + Save the Mode field values as supported_modes_dut. Below is the sample log provided for the raspi platform: [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries @@ -182,4 +183,4 @@ tests: PICS: DISHM.S.A0001 verification: | - disabled: true + disabled: true \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml index faf7b9642bc0a6..be7069bc1508c4 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml @@ -20,7 +20,7 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic Information" + cluster: "Dishwasher Mode" endpoint: 0 tests: @@ -55,6 +55,7 @@ tests: [1649679034.895972][10879:10884] CHIP:TOO: CurrentMode: 0 disabled: true +# Reference Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3204 - label: "Step 4: TH reads from the DUT the SupportedModes attribute." PICS: DISHM.S.A0000 && DISHM.S.F00 verification: | diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml index 7324ef55919763..0b6afee0c71076 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml @@ -20,7 +20,7 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic Information" + cluster: "Dishwasher Mode" endpoint: 0 tests: @@ -56,6 +56,7 @@ tests: [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 disabled: true +# Reference Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3204 - label: "Step 4: TH reads from the DUT the SupportedModes attribute." PICS: DISHM.S.A0000 verification: | diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml index 399b80b1276e2f..15fc59adebea00 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml @@ -20,7 +20,7 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic Information" + cluster: "Dishwasher Mode" endpoint: 0 tests: @@ -56,6 +56,7 @@ tests: [1654780979.980202][61542:61547] CHIP:TOO: OnMode: 4 disabled: true +# Reference Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3204 - label: "Step 4: TH reads from the DUT the SupportedModes attribute." PICS: DISHM.S.A0000 && DISHM.S.A0002 verification: | From 071696adaf9d2aecc087ad89af64b4a4cb8c588c Mon Sep 17 00:00:00 2001 From: abpoth Date: Mon, 31 Jul 2023 16:54:34 -0400 Subject: [PATCH 39/46] updated whitespace and style --- src/python_testing/TC_DISHM_2_1.py | 2 +- src/python_testing/TC_DISHM_3_1.py | 9 +++------ src/python_testing/TC_DISHM_3_2.py | 2 +- src/python_testing/TC_DISHM_3_3.py | 9 ++++----- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/python_testing/TC_DISHM_2_1.py b/src/python_testing/TC_DISHM_2_1.py index 293704f0ce61bf..89044565ef817b 100644 --- a/src/python_testing/TC_DISHM_2_1.py +++ b/src/python_testing/TC_DISHM_2_1.py @@ -94,7 +94,7 @@ class CommonCodes(Enum): GENERIC_FAILURE = 0x02 DishwasherModeCodes = [code.value for code in Clusters.DishwasherMode.Enums.StatusCode - if code is not Clusters.DishwasherMode.Enums.StatusCode.kUnknownEnumValue] + if code is not Clusters.DishwasherMode.Enums.StatusCode.kUnknownEnumValue] self.print_step(4, "Send ChangeToMode command with NewMode set to %d" % (old_current_mode_dut)) diff --git a/src/python_testing/TC_DISHM_3_1.py b/src/python_testing/TC_DISHM_3_1.py index 0d1732822c1a36..b5632cac9af201 100644 --- a/src/python_testing/TC_DISHM_3_1.py +++ b/src/python_testing/TC_DISHM_3_1.py @@ -45,12 +45,12 @@ async def write_on_mode(self, newMode): ret = await self.default_controller.WriteAttribute(self.dut_node_id, [(self.endpoint, Clusters.DishwasherMode.Attributes.OnMode(newMode))]) asserts.assert_equal(ret[0].Status, Status.Success, "Writing to OnMode failed") - async def write_onoff_on_mode(self)-> Clusters.Objects.OnOff.Commands.On: + async def write_onoff_on_mode(self) -> Clusters.Objects.OnOff.Commands.On: ret = await self.send_single_cmd(cmd=Clusters.Objects.OnOff.Commands.On, endpoint=self.endpoint) asserts.assert_true(type_matches(ret, Clusters.Objects.OnOff.Commands.On), "Unexpected return type for OnOff") - async def write_onoff_off_mode(self)-> Clusters.Objects.OnOff.Commands.Off: + async def write_onoff_off_mode(self) -> Clusters.Objects.OnOff.Commands.Off: ret = await self.send_single_cmd(cmd=Clusters.Objects.OnOff.Commands.Off, endpoint=self.endpoint) asserts.assert_true(type_matches(ret, Clusters.Objects.OnOff.Commands.Off), "Unexpected return type for OnOff") @@ -86,7 +86,7 @@ class CommonCodes(Enum): on_mode_dut = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.OnMode) logging.info("OnMode: %s" % (on_mode_dut)) - + if on_mode_dut == NullValue: self.print_step(3, "Read SupportedModes attribute") supported_modes = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes) @@ -131,19 +131,16 @@ class CommonCodes(Enum): ret = await self.send_change_to_mode_cmd(newMode=new_mode_th) asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the mode should succeed") - self.print_step(6, "Send Off command") ret = await self.write_onoff_off_mode() asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the mode to off should succeed") - self.print_step(7, "Send On command") ret = await self.write_onoff_on_mode() asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the mode to on should succeed") - self.print_step(8, "Read CurrentMode attribute") current_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentMode) diff --git a/src/python_testing/TC_DISHM_3_2.py b/src/python_testing/TC_DISHM_3_2.py index c0acf4b98eaa86..ee3d60fc846e64 100644 --- a/src/python_testing/TC_DISHM_3_2.py +++ b/src/python_testing/TC_DISHM_3_2.py @@ -108,7 +108,7 @@ class CommonCodes(Enum): asserts.assert_greater_equal(len(supported_modes_dut), 2, "SupportedModes must have at least two entries!") - new_mode = None + new_mode_th = None for m in supported_modes_dut: if m.mode != new_startup_mode: diff --git a/src/python_testing/TC_DISHM_3_3.py b/src/python_testing/TC_DISHM_3_3.py index d0f2c15aaba9d4..3ddefed45b0e5a 100644 --- a/src/python_testing/TC_DISHM_3_3.py +++ b/src/python_testing/TC_DISHM_3_3.py @@ -45,10 +45,10 @@ async def write_on_mode(self, newMode): ret = await self.default_controller.WriteAttribute(self.dut_node_id, [(self.endpoint, Clusters.DishwasherMode.Attributes.OnMode(newMode))]) asserts.assert_equal(ret[0].Status, Status.Success, "Writing to OnMode failed") - async def write_startup_onoff(self)-> Clusters.Objects.OnOff.Commands.Off: + async def write_startup_onoff(self) -> Clusters.Objects.OnOff.Commands.Off: ret = await self.default_controller.WriteAttribute(self.dut_node_id, [(self.endpoint, Clusters.OnOff.Attributes.StartUpOnOff(1))]) asserts.assert_equal(ret[0].Status, Status.Success, "Writing to OnOff failed") - + @async_test_body async def test_TC_DISHM_3_2(self): @@ -102,7 +102,7 @@ class CommonCodes(Enum): old_on_mode_dut = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.OnMode) logging.info("OnMode: %s" % (old_on_mode_dut)) - + if old_on_mode_dut == NullValue: self.print_step(4, "Read SupportedModes attribute") supported_modes = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes) @@ -120,7 +120,6 @@ class CommonCodes(Enum): else: new_old_on_mode_dut = old_on_mode_dut - if new_old_on_mode_dut == new_startup_mode: self.print_step(4, "Read SupportedModes attribute") @@ -130,7 +129,7 @@ class CommonCodes(Enum): asserts.assert_greater_equal(len(supported_modes_dut), 2, "SupportedModes must have at least two entries!") - new_mode = None + new_mode_th = None for m in supported_modes_dut: if m.mode != new_startup_mode: From c9ac99911e6330a4bc267f30099f8ef0d65d18f0 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Mon, 31 Jul 2023 20:55:01 +0000 Subject: [PATCH 40/46] Restyled by whitespace --- src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml | 2 +- src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml index 19e757e3748158..91ebbaea7c829b 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml @@ -117,4 +117,4 @@ tests: [1649677014.496348][10778:10784] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 4277065072 [1649677014.496469][10778:10784] CHIP:TOO: StartUpMode: 0 - disabled: true \ No newline at end of file + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml index 31730b519ce6b9..f89eaffdb1a154 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml @@ -183,4 +183,4 @@ tests: PICS: DISHM.S.A0001 verification: | - disabled: true \ No newline at end of file + disabled: true From c7134867e360fb4e286b706528cced33cd12bd44 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Mon, 31 Jul 2023 20:55:13 +0000 Subject: [PATCH 41/46] Restyled by prettier-yaml --- src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml | 3 +-- src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml | 2 +- src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml | 2 +- src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml | 2 +- src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml index 91ebbaea7c829b..b81f87c1382412 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml @@ -23,7 +23,6 @@ config: cluster: "Dishwasher Mode" endpoint: 0 - tests: - label: "Step 1: Commission DUT to TH (can be skipped if done in a preceding @@ -32,7 +31,7 @@ tests: disabled: true -# Reference Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3204 + # Reference Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3204 - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: DISHM.S.A0000 verification: | diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml index f89eaffdb1a154..bc062d23af679b 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml @@ -31,7 +31,7 @@ tests: disabled: true -# Reference Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3204 + # Reference Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3204 - label: "Step 2: TH reads from the DUT the SupportedModes attribute." PICS: DISHM.S.A0000 verification: | diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml index be7069bc1508c4..1de776acddd144 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml @@ -55,7 +55,7 @@ tests: [1649679034.895972][10879:10884] CHIP:TOO: CurrentMode: 0 disabled: true -# Reference Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3204 + # Reference Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3204 - label: "Step 4: TH reads from the DUT the SupportedModes attribute." PICS: DISHM.S.A0000 && DISHM.S.F00 verification: | diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml index 0b6afee0c71076..786c9e0c88479d 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml @@ -56,7 +56,7 @@ tests: [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 disabled: true -# Reference Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3204 + # Reference Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3204 - label: "Step 4: TH reads from the DUT the SupportedModes attribute." PICS: DISHM.S.A0000 verification: | diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml index 15fc59adebea00..c9fa23450e9a76 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml @@ -56,7 +56,7 @@ tests: [1654780979.980202][61542:61547] CHIP:TOO: OnMode: 4 disabled: true -# Reference Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3204 + # Reference Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3204 - label: "Step 4: TH reads from the DUT the SupportedModes attribute." PICS: DISHM.S.A0000 && DISHM.S.A0002 verification: | From fb4cd63db08520d4796a5dce6fa5302b2ea3ae00 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Mon, 31 Jul 2023 20:55:14 +0000 Subject: [PATCH 42/46] Restyled by autopep8 --- src/python_testing/TC_DISHM_1_2.py | 3 ++- src/python_testing/TC_DISHM_2_1.py | 2 +- src/python_testing/TC_DISHM_3_3.py | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/python_testing/TC_DISHM_1_2.py b/src/python_testing/TC_DISHM_1_2.py index 1abfc9a44091a7..4fc497ccc37bbf 100644 --- a/src/python_testing/TC_DISHM_1_2.py +++ b/src/python_testing/TC_DISHM_1_2.py @@ -111,7 +111,8 @@ async def test_TC_DISHM_1_2(self): startup_mode = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.StartUpMode) logging.info("StartUpMode: %s" % (startup_mode)) - asserts.assert_true(startup_mode in supported_modes_dut or startup_mode == NullValue, "StartUpMode is not a supported mode!") + asserts.assert_true(startup_mode in supported_modes_dut or startup_mode == + NullValue, "StartUpMode is not a supported mode!") if __name__ == "__main__": diff --git a/src/python_testing/TC_DISHM_2_1.py b/src/python_testing/TC_DISHM_2_1.py index 89044565ef817b..f1c88b71f7309c 100644 --- a/src/python_testing/TC_DISHM_2_1.py +++ b/src/python_testing/TC_DISHM_2_1.py @@ -94,7 +94,7 @@ class CommonCodes(Enum): GENERIC_FAILURE = 0x02 DishwasherModeCodes = [code.value for code in Clusters.DishwasherMode.Enums.StatusCode - if code is not Clusters.DishwasherMode.Enums.StatusCode.kUnknownEnumValue] + if code is not Clusters.DishwasherMode.Enums.StatusCode.kUnknownEnumValue] self.print_step(4, "Send ChangeToMode command with NewMode set to %d" % (old_current_mode_dut)) diff --git a/src/python_testing/TC_DISHM_3_3.py b/src/python_testing/TC_DISHM_3_3.py index 3ddefed45b0e5a..e790c8adb1d6dd 100644 --- a/src/python_testing/TC_DISHM_3_3.py +++ b/src/python_testing/TC_DISHM_3_3.py @@ -152,7 +152,8 @@ class CommonCodes(Enum): self.print_step(7, "Write to the StartUpOnOff attribute of OnOff cluster with a value of 1") ret = await self.write_startup_onoff() - asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Writing to the StartUpOnOff attribute of OnOff should succeed") + asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, + "Writing to the StartUpOnOff attribute of OnOff should succeed") self.default_controller.ExpireSessions(self.dut_node_id) From e40da62dd14819003baaa9a6dcec43b2a6d60ff1 Mon Sep 17 00:00:00 2001 From: Alexi Poth <96315428+abpoth@users.noreply.github.com> Date: Thu, 3 Aug 2023 12:40:02 -0400 Subject: [PATCH 43/46] Update src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml Co-authored-by: Rob Bultman --- src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml index b81f87c1382412..0a76aa4a314478 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml @@ -37,7 +37,7 @@ tests: verification: | ./chip-tool dishwashermode read supported-modes 1 1 - On TH(chip-tool) log, Verify SupportedModes attribute should contain atleast two ModeOptionsStruct entries with unique mode field value and label field value. Below is the sample log provided for the raspi platform: + On TH(chip-tool) log, Verify SupportedModes attribute should contain at least two ModeOptionsStruct entries with unique mode field value and label field value. Below is the sample log provided for the raspi platform: [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries From cdc2d48c77b5a00ff04534a45e911c7dd9c9679e Mon Sep 17 00:00:00 2001 From: abpoth Date: Thu, 3 Aug 2023 16:36:43 -0400 Subject: [PATCH 44/46] removed conflicting .yaml test scripts and updated test steps per comments --- .github/workflows/tests.yaml | 2 + .../certification/Test_TC_DISHM_1_2.yaml | 119 -------- .../certification/Test_TC_DISHM_2_1.yaml | 186 ------------ .../certification/Test_TC_DISHM_3_1.yaml | 163 ---------- .../certification/Test_TC_DISHM_3_2.yaml | 142 --------- .../certification/Test_TC_DISHM_3_3.yaml | 207 ------------- src/app/tests/suites/manualTests.json | 8 - src/python_testing/TC_DISHM_3_1.py | 14 +- src/python_testing/TC_DISHM_3_2.py | 14 +- src/python_testing/TC_DISHM_3_3.py | 12 +- .../chip-tool/zap-generated/test/Commands.h | 285 ------------------ 11 files changed, 19 insertions(+), 1133 deletions(-) delete mode 100644 src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index c462203ae6cd0d..92a410b9901f90 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -455,6 +455,8 @@ jobs: scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_FAN_3_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_FAN_3_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_FAN_3_5.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_DISHM_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_DISHM_3_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestMatterTestingSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' - name: Uploading core files uses: actions/upload-artifact@v3 diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml deleted file mode 100644 index 0a76aa4a314478..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml +++ /dev/null @@ -1,119 +0,0 @@ -# Copyright (c) 2023 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: 194.1.2. [TC-DISHM-1.2] Cluster attributes with DUT as Server - -PICS: - - DISHM.S - -config: - nodeId: 0x12344321 - cluster: "Dishwasher Mode" - endpoint: 0 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - # Reference Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3204 - - label: "Step 2: TH reads from the DUT the SupportedModes attribute." - PICS: DISHM.S.A0000 - verification: | - ./chip-tool dishwashermode read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute should contain at least two ModeOptionsStruct entries with unique mode field value and label field value. Below is the sample log provided for the raspi platform: - - [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 - [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries - [1687687925.444452][18054:18056] CHIP:TOO: [1]: { - [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal - [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 - [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries - [1687687925.444575][18054:18056] CHIP:TOO: [1]: { - [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 - [1687687925.444654][18054:18056] CHIP:TOO: } - [1687687925.444674][18054:18056] CHIP:TOO: } - [1687687925.444702][18054:18056] CHIP:TOO: [2]: { - [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy - [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 - [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries - [1687687925.444787][18054:18056] CHIP:TOO: [1]: { - [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 - [1687687925.444847][18054:18056] CHIP:TOO: } - [1687687925.444869][18054:18056] CHIP:TOO: [2]: { - [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 - [1687687925.444971][18054:18056] CHIP:TOO: } - [1687687925.444991][18054:18056] CHIP:TOO: } - [1687687925.445016][18054:18056] CHIP:TOO: [3]: { - [1687687925.445036][18054:18056] CHIP:TOO: Label: Light - [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 - [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries - [1687687925.445133][18054:18056] CHIP:TOO: [1]: { - [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 - [1687687925.445194][18054:18056] CHIP:TOO: } - [1687687925.445216][18054:18056] CHIP:TOO: [2]: { - [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 - [1687687925.445275][18054:18056] CHIP:TOO: } - [1687687925.445297][18054:18056] CHIP:TOO: [3]: { - [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 - [1687687925.445385][18054:18056] CHIP:TOO: } - [1687687925.445405][18054:18056] CHIP:TOO: } - disabled: true - - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 - verification: | - ./chip-tool dishwashermode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer and the value is from supported_modes_dut, below is the sample log provided for the raspi platform: - - [1645776767.611140][4667:4672] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469718 - - [1645776767.611214][4667:4672] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: "Step 4: TH reads from the DUT the OnMode attribute." - PICS: DISHM.S.A0003 - verification: | - ./chip-tool dishwashermode read on-mode 1 1 - - Verify on TH(chip-tool) logs, OnMode attribute value is an integer and the value is from supported_modes_dut (As per spec default value is null) , below is the sample log provided for the raspi platform: - - - [1649676072.465968][10754:10759] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065072 - - [1649676072.466094][10754:10759] CHIP:TOO: OnMode: null - disabled: true - - - label: "Step 5: TH reads from the DUT the StartUpMode attribute." - PICS: DISHM.S.A0002 - verification: | - ./chip-tool dishwashermode read start-up-mode 1 1 - - Verify on TH(chip-tool) logs, StartUpMode attribute value is an integer and value is from supported_modes_dut, below is the sample log provided for the raspi platform: - - [1649677014.496348][10778:10784] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 4277065072 - [1649677014.496469][10778:10784] CHIP:TOO: StartUpMode: 0 - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml deleted file mode 100644 index bc062d23af679b..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DISHM_2_1.yaml +++ /dev/null @@ -1,186 +0,0 @@ -# Copyright (c) 2023 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: 194.2.1. [TC-DISHM-2.1] ChangeToModeWithStatus Verification DUT as Server - -PICS: - - DISHM.S - -config: - nodeId: 0x12344321 - cluster: "Dishwasher Mode" - endpoint: 0 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - # Reference Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3204 - - label: "Step 2: TH reads from the DUT the SupportedModes attribute." - PICS: DISHM.S.A0000 - verification: | - ./chip-tool dishwashermode read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute should contain two or more ModeOptionsStruct entries and - Save the Mode field values as supported_modes_dut. Below is the sample log provided for the raspi platform: - - [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 - [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries - [1687687925.444452][18054:18056] CHIP:TOO: [1]: { - [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal - [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 - [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries - [1687687925.444575][18054:18056] CHIP:TOO: [1]: { - [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 - [1687687925.444654][18054:18056] CHIP:TOO: } - [1687687925.444674][18054:18056] CHIP:TOO: } - [1687687925.444702][18054:18056] CHIP:TOO: [2]: { - [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy - [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 - [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries - [1687687925.444787][18054:18056] CHIP:TOO: [1]: { - [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 - [1687687925.444847][18054:18056] CHIP:TOO: } - [1687687925.444869][18054:18056] CHIP:TOO: [2]: { - [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 - [1687687925.444971][18054:18056] CHIP:TOO: } - [1687687925.444991][18054:18056] CHIP:TOO: } - [1687687925.445016][18054:18056] CHIP:TOO: [3]: { - [1687687925.445036][18054:18056] CHIP:TOO: Label: Light - [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 - [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries - [1687687925.445133][18054:18056] CHIP:TOO: [1]: { - [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 - [1687687925.445194][18054:18056] CHIP:TOO: } - [1687687925.445216][18054:18056] CHIP:TOO: [2]: { - [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 - [1687687925.445275][18054:18056] CHIP:TOO: } - [1687687925.445297][18054:18056] CHIP:TOO: [3]: { - [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 - [1687687925.445385][18054:18056] CHIP:TOO: } - [1687687925.445405][18054:18056] CHIP:TOO: } - disabled: true - - - label: "Step 2: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 - verification: | - ./chip-tool dishwashermode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value - - Save the value as old_current_mode_dut - - Select a value from supported_modes_dut, different from old_current_mode_dut, and which corresponds to a mode the device can switch to, given its current state and save this value as new_mode_th - - Select a value which is NOT in supported_modes_dut and save it as invalid_mode_th, - below is the sample log provided for the raspi platform: - - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: - "Step 3: TH sends a ChangeToMode command to the DUT with NewMode set - to old_current_mode_dut" - PICS: DISHM.S.C00.Rsp - verification: | - ChangeToModeWithStatus Command is not impleented. - disabled: true - - - label: - "Step 4: Manually put the device in a state from which it will FAIL to - transition to PIXIT.DISHM.MODE_CHANGE_FAIL" - verification: | - ChangeToModeWithStatus Command is not implented. - disabled: true - - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 - verification: | - ./chip-tool dishwashermode read current-mode 1 1 - - Verify on TH(chip-tool) logs, CurrentMode attribute value is an integer value and equal to the new_mode_th, below is the sample log provided for the raspi platform: - - [1685018283.726571][16418:16420] CHIP:DMG: SuppressResponse = true, - [1685018283.726581][16418:16420] CHIP:DMG: InteractionModelRevision = 1 - [1685018283.726589][16418:16420] CHIP:DMG: } - [1685018283.726667][16418:16420] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3898153349 - [1685018283.726680][16418:16420] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: - "Step 6: TH sends a ChangeToMode command to the DUT with NewMode set - to PIXIT.DISHM.MODE_CHANGE_FAIL" - PICS: DISHM.S.C00.Rsp - verification: | - ChangeToModeWithStatus Command is not implented. - disabled: true - - - label: "Step 7: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 - verification: | - - disabled: true - - - label: - "Step 8: Manually put the device in a state from which it will - SUCCESSFULLY transition to PIXIT.DISHM.MODE_CHANGE_OK" - verification: | - - disabled: true - - - label: "Step 9: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 - verification: | - - disabled: true - - - label: - "Step 10: TH sends a ChangeToMode command to the DUT with NewMode set - to PIXIT.DISHM.MODE_CHANGE_OK" - PICS: DISHM.S.C00.Rsp - verification: | - - disabled: true - - - label: "Step 11: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 - verification: | - - disabled: true - - - label: - "Step 12: TH sends a ChangeToMode command to the DUT with NewMode set - to invalid_mode_th" - PICS: DISHM.S.C00.Rsp - verification: | - - disabled: true - - - label: "Step 13: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 - verification: | - - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml deleted file mode 100644 index 1de776acddd144..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml +++ /dev/null @@ -1,163 +0,0 @@ -# Copyright (c) 2023 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: 194.3.1. [TC-DISHM-3.1] OnMode verification with DUT as Server - -PICS: - - DISHM.S - -config: - nodeId: 0x12344321 - cluster: "Dishwasher Mode" - endpoint: 0 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the OnMode attribute." - PICS: DISHM.S.A0003 && DISHM.S.F00 - verification: | - ./chip-tool dishwashermode read on-mode 1 1 - - On TH(chip-tool), Verify OnMode attribute value is an integer. save the value as on_mode_dut and below is the sample log provided for the raspi platform: - - [1649678983.679893][10871:10876] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065073 - [1649678983.680002][10871:10876] CHIP:TOO: OnMode: 0 - disabled: true - - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 && DISHM.S.F00 - verification: | - ./chip-tool dishwashermode read current-mode 1 1 - - On TH(chip-tool), Verify CurrentMode attribute is an integer. save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: - - NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. - - [1649679034.895848][10879:10884] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 - [1649679034.895972][10879:10884] CHIP:TOO: CurrentMode: 0 - disabled: true - - # Reference Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3204 - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." - PICS: DISHM.S.A0000 && DISHM.S.F00 - verification: | - ./chip-tool dishwashermode read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. - Save the Mode field values as supported_modes_dut. - Select a value from supported_modes_dut different from on_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 - [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries - [1687687925.444452][18054:18056] CHIP:TOO: [1]: { - [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal - [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 - [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries - [1687687925.444575][18054:18056] CHIP:TOO: [1]: { - [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 - [1687687925.444654][18054:18056] CHIP:TOO: } - [1687687925.444674][18054:18056] CHIP:TOO: } - [1687687925.444702][18054:18056] CHIP:TOO: [2]: { - [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy - [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 - [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries - [1687687925.444787][18054:18056] CHIP:TOO: [1]: { - [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 - [1687687925.444847][18054:18056] CHIP:TOO: } - [1687687925.444869][18054:18056] CHIP:TOO: [2]: { - [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 - [1687687925.444971][18054:18056] CHIP:TOO: } - [1687687925.444991][18054:18056] CHIP:TOO: } - [1687687925.445016][18054:18056] CHIP:TOO: [3]: { - [1687687925.445036][18054:18056] CHIP:TOO: Label: Light - [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 - [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries - [1687687925.445133][18054:18056] CHIP:TOO: [1]: { - [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 - [1687687925.445194][18054:18056] CHIP:TOO: } - [1687687925.445216][18054:18056] CHIP:TOO: [2]: { - [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 - [1687687925.445275][18054:18056] CHIP:TOO: } - [1687687925.445297][18054:18056] CHIP:TOO: [3]: { - [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 - [1687687925.445385][18054:18056] CHIP:TOO: } - [1687687925.445405][18054:18056] CHIP:TOO: } - disabled: true - - - label: - "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - PICS: DISHM.S.C00.Rsp && DISHM.S.F00 - verification: | - ./chip-tool dishwashermode change-to-mode 2 1 1 - - On TH(chip-tool) log, verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1684931013.571019][20667:20669] CHIP:DMG: - [1684931013.571021][20667:20669] CHIP:DMG: StatusIB = - [1684931013.571024][20667:20669] CHIP:DMG: { - [1684931013.571027][20667:20669] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931013.571030][20667:20669] CHIP:DMG: }, - [1684931013.571034][20667:20669] CHIP:DMG: - disabled: true - - - label: "Step 6: TH sends a Off command to the DUT" - PICS: OO.S.C00.Rsp && DISHM.S.F00 - verification: | - ./chip-tool onoff off 1 1 - - On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1684931101.118656][20709:20711] CHIP:DMG: StatusIB = - [1684931101.118659][20709:20711] CHIP:DMG: { - [1684931101.118663][20709:20711] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931101.118665][20709:20711] CHIP:DMG: }, - disabled: true - - - label: "Step 7: TH sends a On command to the DUT" - PICS: OO.S.C01.Rsp && DISHM.S.F00 - verification: | - ./chip-tool onoff on 1 1 - - On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1684931217.055514][20729:20731] CHIP:DMG: StatusIB = - [1684931217.055517][20729:20731] CHIP:DMG: { - [1684931217.055520][20729:20731] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931217.055523][20729:20731] CHIP:DMG: }, - disabled: true - - - label: "Step 8: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 && DISHM.S.F00 - verification: | - ./chip-tool dishwashermode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute value is an integer and value is equal to on_mode_dut. below is the sample log provided for the raspi platform: - - [1649679202.069163][10899:10904] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 - [1649679202.069278][10899:10904] CHIP:TOO: CurrentMode: 2 - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml deleted file mode 100644 index 786c9e0c88479d..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml +++ /dev/null @@ -1,142 +0,0 @@ -# Copyright (c) 2023 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: 194.3.2. [TC-DISHM-3.2] StartUpMode verification with DUT as Server - -PICS: - - DISHM.S - -config: - nodeId: 0x12344321 - cluster: "Dishwasher Mode" - endpoint: 0 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: DISHM.S.A0002 - verification: | - ./chip-tool dishwashermode read start-up-mode 1 1 - - On TH(chip-tool), Verify StartUpMode attribute value is an integer. save the value as startup_mode_dut and below is the sample log provided for the raspi platform: - - [1645777708.406864][4841:4846] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003DataVersion: 3781469721 - [1645777708.406933][4841:4846] CHIP:TOO: StartUpMode: 0 - disabled: true - - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 - verification: | - ./chip-tool dishwashermode read current-mode 1 1 - - On TH(chip-tool), Verify CurrentMode attribute value is an integer, - save the value as old_current_mode_dut and below is the sample log provided for the raspi platform: - - NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. - - [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 - [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 - disabled: true - - # Reference Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3204 - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." - PICS: DISHM.S.A0000 - verification: | - ./chip-tool dishwashermode read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. - Save the Mode field values as supported_modes_dut. - Select a value from supported_modes_dut different from on_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 - [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries - [1687687925.444452][18054:18056] CHIP:TOO: [1]: { - [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal - [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 - [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries - [1687687925.444575][18054:18056] CHIP:TOO: [1]: { - [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 - [1687687925.444654][18054:18056] CHIP:TOO: } - [1687687925.444674][18054:18056] CHIP:TOO: } - [1687687925.444702][18054:18056] CHIP:TOO: [2]: { - [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy - [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 - [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries - [1687687925.444787][18054:18056] CHIP:TOO: [1]: { - [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 - [1687687925.444847][18054:18056] CHIP:TOO: } - [1687687925.444869][18054:18056] CHIP:TOO: [2]: { - [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 - [1687687925.444971][18054:18056] CHIP:TOO: } - [1687687925.444991][18054:18056] CHIP:TOO: } - [1687687925.445016][18054:18056] CHIP:TOO: [3]: { - [1687687925.445036][18054:18056] CHIP:TOO: Label: Light - [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 - [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries - [1687687925.445133][18054:18056] CHIP:TOO: [1]: { - [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 - [1687687925.445194][18054:18056] CHIP:TOO: } - [1687687925.445216][18054:18056] CHIP:TOO: [2]: { - [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 - [1687687925.445275][18054:18056] CHIP:TOO: } - [1687687925.445297][18054:18056] CHIP:TOO: [3]: { - [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 - [1687687925.445385][18054:18056] CHIP:TOO: } - [1687687925.445405][18054:18056] CHIP:TOO: } - disabled: true - - - label: - "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - PICS: DISHM.S.C00.Rsp - verification: | - ./chip-tool dishwashermode change-to-mode 2 1 1 - - - On TH(chip-tool) , Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1684931419.768138][20792:20794] CHIP:DMG: StatusIB = - [1684931419.768143][20792:20794] CHIP:DMG: { - [1684931419.768148][20792:20794] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931419.768152][20792:20794] CHIP:DMG: }, - disabled: true - - - label: "Step 6: Physically power cycle the device" - verification: | - Physically power cycle the device. - disabled: true - - - label: "Step 7: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 - verification: | - ./chip-tool dishwashermode read current-mode 1 1 - - on TH(chip-tool), Verify that CurrentMode attribute value is same as value recorded in step 1 and below is the sample log provided for the raspi platform: - - [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 - [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml deleted file mode 100644 index c9fa23450e9a76..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml +++ /dev/null @@ -1,207 +0,0 @@ -# Copyright (c) 2023 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: 194.3.3.[TC-DISHM-3.3] OnMode overwriting StartUpMode with DUT as Server - -PICS: - - DISHM.S - -config: - nodeId: 0x12344321 - cluster: "Dishwasher Mode" - endpoint: 0 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: DISHM.S.A0002 - verification: | - ./chip-tool dishwashermode read start-up-mode 1 1 - - On TH(chip-tool) log, Verify StartUpMode attribute value is an integer. save this value as startup_mode_dut and below is the sample log provided for the raspi platform: - - - [1651099663211] [82177:7560652] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 2609052118 - [1651099663212] [82177:7560652] CHIP: [TOO] StartUpMode: 0 - disabled: true - - - label: "Step 3: TH reads from the DUT the OnMode attribute." - PICS: DISHM.S.A0003 && DISHM.S.A0002 - verification: | - ./chip-tool dishwashermode read on-mode 1 1 - - On TH(chip-tool) log, Verify OnMode attribute value is an integer. save the value as old_on_mode_dut and below is the sample log provided for the raspi platform: - - - [1654780979.979743][61542:61547] CHIP:DMG: } - [1654780979.980040][61542:61547] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 235764160 - [1654780979.980202][61542:61547] CHIP:TOO: OnMode: 4 - disabled: true - - # Reference Issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/3204 - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." - PICS: DISHM.S.A0000 && DISHM.S.A0002 - verification: | - ./chip-tool dishwashermode read supported-modes 1 1 - - On TH(chip-tool) log, Verify SupportedModes attribute contains two or more ModeOptionsStruct entries. - Save the Mode field values as supported_modes_dut. - Select a value from supported_modes_dut different from on_mode_dut and save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1687687925.438666][18054:18056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 4148960394 - [1687687925.438838][18054:18056] CHIP:TOO: SupportedModes: 3 entries - [1687687925.444452][18054:18056] CHIP:TOO: [1]: { - [1687687925.444485][18054:18056] CHIP:TOO: Label: Normal - [1687687925.444506][18054:18056] CHIP:TOO: Mode: 0 - [1687687925.444532][18054:18056] CHIP:TOO: SemanticTags: 1 entries - [1687687925.444575][18054:18056] CHIP:TOO: [1]: { - [1687687925.444598][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444632][18054:18056] CHIP:TOO: Value: 16384 - [1687687925.444654][18054:18056] CHIP:TOO: } - [1687687925.444674][18054:18056] CHIP:TOO: } - [1687687925.444702][18054:18056] CHIP:TOO: [2]: { - [1687687925.444723][18054:18056] CHIP:TOO: Label: Heavy - [1687687925.444742][18054:18056] CHIP:TOO: Mode: 1 - [1687687925.444764][18054:18056] CHIP:TOO: SemanticTags: 2 entries - [1687687925.444787][18054:18056] CHIP:TOO: [1]: { - [1687687925.444808][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444828][18054:18056] CHIP:TOO: Value: 7 - [1687687925.444847][18054:18056] CHIP:TOO: } - [1687687925.444869][18054:18056] CHIP:TOO: [2]: { - [1687687925.444928][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.444952][18054:18056] CHIP:TOO: Value: 16385 - [1687687925.444971][18054:18056] CHIP:TOO: } - [1687687925.444991][18054:18056] CHIP:TOO: } - [1687687925.445016][18054:18056] CHIP:TOO: [3]: { - [1687687925.445036][18054:18056] CHIP:TOO: Label: Light - [1687687925.445056][18054:18056] CHIP:TOO: Mode: 2 - [1687687925.445106][18054:18056] CHIP:TOO: SemanticTags: 3 entries - [1687687925.445133][18054:18056] CHIP:TOO: [1]: { - [1687687925.445154][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445174][18054:18056] CHIP:TOO: Value: 16386 - [1687687925.445194][18054:18056] CHIP:TOO: } - [1687687925.445216][18054:18056] CHIP:TOO: [2]: { - [1687687925.445236][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445256][18054:18056] CHIP:TOO: Value: 8 - [1687687925.445275][18054:18056] CHIP:TOO: } - [1687687925.445297][18054:18056] CHIP:TOO: [3]: { - [1687687925.445342][18054:18056] CHIP:TOO: MfgCode: 0 - [1687687925.445365][18054:18056] CHIP:TOO: Value: 2 - [1687687925.445385][18054:18056] CHIP:TOO: } - [1687687925.445405][18054:18056] CHIP:TOO: } - disabled: true - - - label: - "Step 5: TH writes to the DUT the OnMode attribute with the - new_mode_th value" - PICS: DISHM.S.A0003 - verification: | - ./chip-tool dishwashermode write on-mode 7 1 1 - - On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1651099941884] [84269:7567211] CHIP: [DMG] WriteResponseMessage = - [1651099941884] [84269:7567211] CHIP: [DMG] { - [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIBs = - [1651099941884] [84269:7567211] CHIP: [DMG] [ - [1651099941884] [84269:7567211] CHIP: [DMG] AttributeStatusIB = - [1651099941884] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] AttributePathIB = - [1651099941887] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] Endpoint = 0x1, - [1651099941887] [84269:7567211] CHIP: [DMG] Cluster = 0x50, - [1651099941887] [84269:7567211] CHIP: [DMG] Attribute = 0x0000_0005, - [1651099941887] [84269:7567211] CHIP: [DMG] } - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] StatusIB = - [1651099941887] [84269:7567211] CHIP: [DMG] { - [1651099941887] [84269:7567211] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651099941887] [84269:7567211] CHIP: [DMG] }, - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] }, - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] ], - [1651099941887] [84269:7567211] CHIP: [DMG] - [1651099941887] [84269:7567211] CHIP: [DMG] InteractionModelRevision = 1 - [1651099941887] [84269:7567211] CHIP: [DMG] } - disabled: true - - - label: "Step 6: TH reads from the DUT the OnMode attribute." - PICS: DISHM.S.A0003 && DISHM.S.F00 - verification: | - ./chip-tool dishwashermode read on-mode 1 1 - - On TH(chip-tool) log, Verify OnMode attribute value is an integer. save the value as new_on_mode_dut and below is the sample log provided for the raspi platform: - - [1669190858.739158][4187:4189] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4107771634 - [1669190858.739222][4187:4189] CHIP:TOO: OnMode: 7 - disabled: true - - - label: - "Step 7: TH writes to the DUT the StartUpOnOff attribute with the - value 1." - PICS: OO.S.A4003 - verification: | - ./chip-tool onoff write start-up-on-off 1 1 1 - - On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1651101661959] [90832:7598169] CHIP: [DMG] WriteResponseMessage = - [1651101661959] [90832:7598169] CHIP: [DMG] { - [1651101661959] [90832:7598169] CHIP: [DMG] AttributeStatusIBs = - [1651101661959] [90832:7598169] CHIP: [DMG] [ - [1651101661959] [90832:7598169] CHIP: [DMG] AttributeStatusIB = - [1651101661959] [90832:7598169] CHIP: [DMG] { - [1651101661960] [90832:7598169] CHIP: [DMG] AttributePathIB = - [1651101661960] [90832:7598169] CHIP: [DMG] { - [1651101661960] [90832:7598169] CHIP: [DMG] Endpoint = 0x1, - [1651101661960] [90832:7598169] CHIP: [DMG] Cluster = 0x6, - [1651101661960] [90832:7598169] CHIP: [DMG] Attribute = 0x0000_4003, - [1651101661960] [90832:7598169] CHIP: [DMG] } - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] StatusIB = - [1651101661960] [90832:7598169] CHIP: [DMG] { - [1651101661960] [90832:7598169] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651101661960] [90832:7598169] CHIP: [DMG] }, - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] }, - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] ], - [1651101661960] [90832:7598169] CHIP: [DMG] - [1651101661960] [90832:7598169] CHIP: [DMG] InteractionModelRevision = 1 - [1651101661960] [90832:7598169] CHIP: [DMG] } - disabled: true - - - label: "Step 8: Physically power cycle the device" - verification: | - Physically power cycle the device. - disabled: true - - - label: "Step 9: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 - verification: | - ./chip-tool dishwashermode read current-mode 1 1 - - On TH(chip-tool), Verify CurrentMode attribute value is same as the value recorded in step 3 and below is the sample log provided for the raspi platform: - - [1669190936.869804][4194:4196] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3908583538 - [1669190936.869875][4194:4196] CHIP:TOO: CurrentMode: 7 - disabled: true diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index 98456d2904b5ff..92822cb7ba9429 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -107,13 +107,6 @@ "Test_TC_DLOG_3_1" ], "Descriptor": ["Test_TC_DESC_2_1"], - "DishwasherMode": [ - "Test_TC_DISHM_1_2", - "Test_TC_DISHM_2_1", - "Test_TC_DISHM_3_1", - "Test_TC_DISHM_3_2", - "Test_TC_DISHM_3_3" - ], "FanControl": ["Test_TC_FAN_3_3", "Test_TC_FAN_3_5"], "GeneralCommissioning": ["Test_TC_CGEN_2_2"], "GeneralDiagnostics": [ @@ -372,7 +365,6 @@ "DeviceManagement", "DiagnosticsLogs", "DishwasherAlarm", - "DishwasherMode", "Descriptor", "FanControl", "EthernetNetworkDiagnostics", diff --git a/src/python_testing/TC_DISHM_3_1.py b/src/python_testing/TC_DISHM_3_1.py index b5632cac9af201..f6737ff1300969 100644 --- a/src/python_testing/TC_DISHM_3_1.py +++ b/src/python_testing/TC_DISHM_3_1.py @@ -88,7 +88,7 @@ class CommonCodes(Enum): logging.info("OnMode: %s" % (on_mode_dut)) if on_mode_dut == NullValue: - self.print_step(3, "Read SupportedModes attribute") + self.print_step(2, "Read SupportedModes attribute") supported_modes = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes) logging.info("SupportedModes: %s" % (supported_modes)) @@ -96,13 +96,11 @@ class CommonCodes(Enum): asserts.assert_greater_equal(len(supported_modes), 2, "SupportedModes must have at least two entries!") supported_modes_dut = [m.mode for m in supported_modes] - new_on_mode_th = random.choice(supported_modes_dut) + on_mode_th = random.choice(supported_modes_dut) - self.print_step(4, "Write the value %s to OnMode" % (new_on_mode_th)) + self.print_step(2, "Write the value %s to OnMode" % (on_mode_th)) - await self.write_on_mode(newMode=new_on_mode_th) - else: - new_on_mode_th = on_mode_dut + await self.write_on_mode(newMode=on_mode_th) self.print_step(3, "Read CurrentMode attribute") @@ -110,7 +108,7 @@ class CommonCodes(Enum): logging.info("CurrentMode: %s" % (old_current_mode_dut)) - if old_current_mode_dut == new_on_mode_th: + if old_current_mode_dut == on_mode_th: self.print_step(4, "Read SupportedModes attribute") supported_modes = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes) @@ -122,7 +120,7 @@ class CommonCodes(Enum): new_mode_th = None for m in supported_modes: - if m.mode != new_on_mode_th: + if m.mode != on_mode_th: new_mode_th = m.mode break diff --git a/src/python_testing/TC_DISHM_3_2.py b/src/python_testing/TC_DISHM_3_2.py index ee3d60fc846e64..78f5f496556fe9 100644 --- a/src/python_testing/TC_DISHM_3_2.py +++ b/src/python_testing/TC_DISHM_3_2.py @@ -77,7 +77,7 @@ class CommonCodes(Enum): logging.info("StartUpMode: %s" % (startup_mode_dut)) if startup_mode_dut == NullValue: - self.print_step(3, "Read SupportedModes attribute") + self.print_step(2, "Read SupportedModes attribute") supported_modes = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes) logging.info("SupportedModes: %s" % (supported_modes)) @@ -85,13 +85,11 @@ class CommonCodes(Enum): asserts.assert_greater_equal(len(supported_modes), 2, "SupportedModes must have at least two entries!") modes = [m.mode for m in supported_modes] - new_startup_mode = random.choice(modes) + startup_mode_dut = random.choice(modes) - self.print_step(4, "Write the value %s to StartUpMode" % (new_startup_mode)) + self.print_step(2, "Write the value %s to StartUpMode" % (startup_mode_dut)) - await self.write_start_up_mode(newMode=new_startup_mode) - else: - new_startup_mode = startup_mode_dut + await self.write_start_up_mode(newMode=startup_mode_dut) self.print_step(3, "Read CurrentMode attribute") @@ -99,7 +97,7 @@ class CommonCodes(Enum): logging.info("CurrentMode: %s" % (old_current_mode_dut)) - if old_current_mode_dut == new_startup_mode: + if old_current_mode_dut == startup_mode_dut: self.print_step(4, "Read SupportedModes attribute") supported_modes_dut = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes) @@ -111,7 +109,7 @@ class CommonCodes(Enum): new_mode_th = None for m in supported_modes_dut: - if m.mode != new_startup_mode: + if m.mode != startup_mode_dut: new_mode_th = m.mode break diff --git a/src/python_testing/TC_DISHM_3_3.py b/src/python_testing/TC_DISHM_3_3.py index e790c8adb1d6dd..abfb45b3bff003 100644 --- a/src/python_testing/TC_DISHM_3_3.py +++ b/src/python_testing/TC_DISHM_3_3.py @@ -89,13 +89,11 @@ class CommonCodes(Enum): asserts.assert_greater_equal(len(supported_modes), 2, "SupportedModes must have at least two entries!") modes = [m.mode for m in supported_modes] - new_startup_mode = random.choice(modes) + startup_mode_dut = random.choice(modes) - self.print_step(4, "Write the value %s to StartUpMode" % (new_startup_mode)) + self.print_step(4, "Write the value %s to StartUpMode" % (startup_mode_dut)) - await self.write_start_up_mode(newMode=new_startup_mode) - else: - new_startup_mode = startup_mode_dut + await self.write_start_up_mode(newMode=startup_mode_dut) self.print_step(3, "Read OnMode attribute") @@ -120,7 +118,7 @@ class CommonCodes(Enum): else: new_old_on_mode_dut = old_on_mode_dut - if new_old_on_mode_dut == new_startup_mode: + if new_old_on_mode_dut == startup_mode_dut: self.print_step(4, "Read SupportedModes attribute") supported_modes_dut = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes) @@ -132,7 +130,7 @@ class CommonCodes(Enum): new_mode_th = None for m in supported_modes_dut: - if m.mode != new_startup_mode: + if m.mode != startup_mode_dut: new_mode_th = m.mode break diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 00773a3c69f6e1..be934476a7fcb6 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -436,11 +436,6 @@ class ManualTestList : public Command printf("Test_TC_DISHALM_3_4\n"); printf("Test_TC_DISHALM_3_5\n"); printf("Test_TC_DISHALM_3_6\n"); - printf("Test_TC_DISHM_1_2\n"); - printf("Test_TC_DISHM_2_1\n"); - printf("Test_TC_DISHM_3_1\n"); - printf("Test_TC_DISHM_3_2\n"); - printf("Test_TC_DISHM_3_3\n"); printf("Test_TC_DESC_2_1\n"); printf("Test_TC_FAN_3_3\n"); printf("Test_TC_FAN_3_5\n"); @@ -122720,281 +122715,6 @@ class Test_TC_DISHALM_3_6Suite : public TestCommand } }; -class Test_TC_DISHM_1_2Suite : public TestCommand -{ -public: - Test_TC_DISHM_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_1_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_DISHM_1_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_DISHM_2_1Suite : public TestCommand -{ -public: - Test_TC_DISHM_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_2_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_DISHM_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) - { - 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_DISHM_3_1Suite : public TestCommand -{ -public: - Test_TC_DISHM_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_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_DISHM_3_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_DISHM_3_2Suite : public TestCommand -{ -public: - Test_TC_DISHM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_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_DISHM_3_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_DISHM_3_3Suite : public TestCommand -{ -public: - Test_TC_DISHM_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_3_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_DISHM_3_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_DESC_2_1Suite : public TestCommand { public: @@ -147699,11 +147419,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), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), From d24bd7aefe247f1aa7b9da17c91f8689c55181d9 Mon Sep 17 00:00:00 2001 From: abpoth Date: Fri, 4 Aug 2023 12:39:51 -0400 Subject: [PATCH 45/46] created and reference issue on dishwasher mode cluster for CI tests --- src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml index 79b1242c9e855d..eb824b08a6e2a2 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml @@ -59,6 +59,7 @@ tests: constraints: type: bitmap32 # Reference for "SHALL NOT contain" issue: https://github.com/project-chip/connectedhomeip/issues/28287 + # Reference for "Test Failure: value expects the the value 65530 but the list does not contan it": https://github.com/project-chip/connectedhomeip/issues/28525 - label: "4. TH reads AttributeList from DUT" command: "readAttribute" attribute: "AttributeList" From fd171b6b76d8bf872376b8d417ba77174ae85b50 Mon Sep 17 00:00:00 2001 From: abpoth Date: Fri, 4 Aug 2023 16:04:27 -0400 Subject: [PATCH 46/46] enabled EventList condition for test AttributeList support --- .../certification/Test_TC_DISHM_1_1.yaml | 14 ++- .../chip-tool/zap-generated/test/Commands.h | 60 +++++++++---- .../zap-generated/test/Commands.h | 90 ++++++++++++++----- 3 files changed, 119 insertions(+), 45 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml index eb824b08a6e2a2..7dffe5a00f680c 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_1.yaml @@ -58,9 +58,10 @@ tests: value: 1 constraints: type: bitmap32 + # Reference for "SHALL NOT contain" issue: https://github.com/project-chip/connectedhomeip/issues/28287 - # Reference for "Test Failure: value expects the the value 65530 but the list does not contan it": https://github.com/project-chip/connectedhomeip/issues/28525 - label: "4. TH reads AttributeList from DUT" + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "AttributeList" response: @@ -68,6 +69,15 @@ tests: type: list contains: [0, 1, 65528, 65529, 65530, 65531, 65532, 65533] + - label: "4. TH reads AttributeList from DUT" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 65528, 65529, 65531, 65532, 65533] + - label: "4. TH reads optional attribute (DISHM.S.A0002(StartUpMode)) in AttributeList" @@ -114,7 +124,7 @@ tests: # Reference for "SHALL NOT contain" issue: https://github.com/project-chip/connectedhomeip/issues/28287 - label: "5. TH reads from the DUT the EventList attribute" - PICS: DISHM.S.F00 + PICS: PICS_EVENT_LIST_ENABLED command: "readAttribute" attribute: "EventList" response: diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 4610fdce514ce1..03cbd0f0cff088 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -35642,7 +35642,7 @@ class Test_TC_DLOG_1_1Suite : public TestCommand class Test_TC_DISHM_1_1Suite : public TestCommand { public: - Test_TC_DISHM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_1_1", 12, credsIssuerConfig) + Test_TC_DISHM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DISHM_1_1", 13, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -35728,7 +35728,13 @@ class Test_TC_DISHM_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 6: @@ -35737,7 +35743,7 @@ class Test_TC_DISHM_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 7: @@ -35746,7 +35752,7 @@ class Test_TC_DISHM_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintExcludes("value", value, 2UL)); } break; case 8: @@ -35755,10 +35761,19 @@ class Test_TC_DISHM_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintExcludes("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; case 9: + 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", "list")); + VerifyOrReturn(CheckConstraintExcludes("value", value, 3UL)); + } + break; + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -35770,7 +35785,7 @@ class Test_TC_DISHM_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -35779,7 +35794,7 @@ class Test_TC_DISHM_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -35829,46 +35844,53 @@ class Test_TC_DISHM_1_1Suite : public TestCommand } case 4: { LogStep(4, "4. TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "4. TH reads optional attribute (DISHM.S.A0002(StartUpMode)) in AttributeList"); - VerifyOrDo(!ShouldSkip("DISHM.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "4. TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("!PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { LogStep(6, "4. TH reads optional attribute (DISHM.S.A0002(StartUpMode)) in AttributeList"); - VerifyOrDo(!ShouldSkip(" !DISHM.S.A0002 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("DISHM.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "4. TH reads optional attribute (DISHM.S.F00(DEPONOFF)) in AttributeList"); - VerifyOrDo(!ShouldSkip("DISHM.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "4. TH reads optional attribute (DISHM.S.A0002(StartUpMode)) in AttributeList"); + VerifyOrDo(!ShouldSkip(" !DISHM.S.A0002 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { LogStep(8, "4. TH reads optional attribute (DISHM.S.F00(DEPONOFF)) in AttributeList"); - VerifyOrDo(!ShouldSkip(" !DISHM.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("DISHM.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "5. TH reads from the DUT the EventList attribute"); - VerifyOrDo(!ShouldSkip("DISHM.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::EventList::Id, + LogStep(9, "4. TH reads optional attribute (DISHM.S.F00(DEPONOFF)) in AttributeList"); + VerifyOrDo(!ShouldSkip(" !DISHM.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "6. TH reads AcceptedCommandList from DUT"); + LogStep(10, "5. TH reads from the DUT the EventList attribute"); + VerifyOrDo(!ShouldSkip("PICS_EVENT_LIST_ENABLED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::EventList::Id, + true, chip::NullOptional); + } + case 11: { + LogStep(11, "6. TH reads AcceptedCommandList from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "7. TH reads from the DUT the GeneratedCommandList attribute"); + case 12: { + LogStep(12, "7. TH reads from the DUT the GeneratedCommandList attribute"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DishwasherMode::Id, DishwasherMode::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } 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 625161cb19700c..60159a034f0f47 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -46598,21 +46598,24 @@ class Test_TC_DISHM_1_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : 4. TH reads AttributeList from DUT\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } err = Test4ThReadsAttributeListFromDut_4(); break; case 5: - ChipLogProgress( - chipTool, " ***** Test Step 5 : 4. TH reads optional attribute (DISHM.S.A0002(StartUpMode)) in AttributeList\n"); - if (ShouldSkip("DISHM.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : 4. TH reads AttributeList from DUT\n"); + if (ShouldSkip("!PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } - err = Test4ThReadsOptionalAttributeDISHMSA0002StartUpModeInAttributeList_5(); + err = Test4ThReadsAttributeListFromDut_5(); break; case 6: ChipLogProgress( chipTool, " ***** Test Step 6 : 4. TH reads optional attribute (DISHM.S.A0002(StartUpMode)) in AttributeList\n"); - if (ShouldSkip(" !DISHM.S.A0002 ")) { + if (ShouldSkip("DISHM.S.A0002")) { NextTest(); return; } @@ -46620,37 +46623,46 @@ class Test_TC_DISHM_1_1 : public TestCommandBridge { break; case 7: ChipLogProgress( - chipTool, " ***** Test Step 7 : 4. TH reads optional attribute (DISHM.S.F00(DEPONOFF)) in AttributeList\n"); - if (ShouldSkip("DISHM.S.F00")) { + chipTool, " ***** Test Step 7 : 4. TH reads optional attribute (DISHM.S.A0002(StartUpMode)) in AttributeList\n"); + if (ShouldSkip(" !DISHM.S.A0002 ")) { NextTest(); return; } - err = Test4ThReadsOptionalAttributeDishmsf00deponoffInAttributeList_7(); + err = Test4ThReadsOptionalAttributeDISHMSA0002StartUpModeInAttributeList_7(); break; case 8: ChipLogProgress( chipTool, " ***** Test Step 8 : 4. TH reads optional attribute (DISHM.S.F00(DEPONOFF)) in AttributeList\n"); - if (ShouldSkip(" !DISHM.S.F00 ")) { + if (ShouldSkip("DISHM.S.F00")) { NextTest(); return; } err = Test4ThReadsOptionalAttributeDishmsf00deponoffInAttributeList_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : 5. TH reads from the DUT the EventList attribute\n"); - if (ShouldSkip("DISHM.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : 4. TH reads optional attribute (DISHM.S.F00(DEPONOFF)) in AttributeList\n"); + if (ShouldSkip(" !DISHM.S.F00 ")) { + NextTest(); + return; + } + err = Test4ThReadsOptionalAttributeDishmsf00deponoffInAttributeList_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : 5. TH reads from the DUT the EventList attribute\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { NextTest(); return; } NextTest(); return; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : 6. TH reads AcceptedCommandList from DUT\n"); - err = Test6ThReadsAcceptedCommandListFromDut_10(); - break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : 7. TH reads from the DUT the GeneratedCommandList attribute\n"); - err = Test7ThReadsFromTheDutTheGeneratedCommandListAttribute_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : 6. TH reads AcceptedCommandList from DUT\n"); + err = Test6ThReadsAcceptedCommandListFromDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : 7. TH reads from the DUT the GeneratedCommandList attribute\n"); + err = Test7ThReadsFromTheDutTheGeneratedCommandListAttribute_12(); break; } @@ -46699,6 +46711,9 @@ class Test_TC_DISHM_1_1 : public TestCommandBridge { case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -46712,7 +46727,7 @@ class Test_TC_DISHM_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 13; chip::Optional mNodeId; chip::Optional mCluster; @@ -46827,7 +46842,34 @@ class Test_TC_DISHM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test4ThReadsOptionalAttributeDISHMSA0002StartUpModeInAttributeList_5() + CHIP_ERROR Test4ThReadsAttributeListFromDut_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"4. TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR Test4ThReadsOptionalAttributeDISHMSA0002StartUpModeInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46848,7 +46890,7 @@ class Test_TC_DISHM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test4ThReadsOptionalAttributeDISHMSA0002StartUpModeInAttributeList_6() + CHIP_ERROR Test4ThReadsOptionalAttributeDISHMSA0002StartUpModeInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46869,7 +46911,7 @@ class Test_TC_DISHM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test4ThReadsOptionalAttributeDishmsf00deponoffInAttributeList_7() + CHIP_ERROR Test4ThReadsOptionalAttributeDishmsf00deponoffInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46890,7 +46932,7 @@ class Test_TC_DISHM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test4ThReadsOptionalAttributeDishmsf00deponoffInAttributeList_8() + CHIP_ERROR Test4ThReadsOptionalAttributeDishmsf00deponoffInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46911,7 +46953,7 @@ class Test_TC_DISHM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test6ThReadsAcceptedCommandListFromDut_10() + CHIP_ERROR Test6ThReadsAcceptedCommandListFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -46932,7 +46974,7 @@ class Test_TC_DISHM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR Test7ThReadsFromTheDutTheGeneratedCommandListAttribute_11() + CHIP_ERROR Test7ThReadsFromTheDutTheGeneratedCommandListAttribute_12() { MTRBaseDevice * device = GetDevice("alpha");