From 20701623fdb9150d85ee81aa726458396064c1ac Mon Sep 17 00:00:00 2001 From: manjunath-grl <102359958+manjunath-grl@users.noreply.github.com> Date: Wed, 8 Feb 2023 01:04:39 +0530 Subject: [PATCH] Modified tests Feb 07 (#24898) * Modifed scripts: TC-ACL-2.4 TC-ACL-2.7 TC-ACL-2.8 TC-ACL-2.9 TC-ACL-2.10 TC-BRBINFO-2.3 TC-CADMIN-1.15 TC-CADMIN-1.16 TC-G-2.2 TC-G-2.3 TC-TSTAT-2.2 TC-RH-3.1_Simulated Removed tests: TC-ACT-2.2 TC-CGEN-2.4 * Auto generated files * Restyled by whitespace * Modified ACT-2.2 * Modified ACL test TC-ACL-2.8 TC-ACL-2.10 * Fixes issue #681 ACL-2.9 --------- Co-authored-by: Restyled.io --- .../certification/Test_TC_ACL_2_10.yaml | 23 +- .../suites/certification/Test_TC_ACL_2_4.yaml | 11 +- .../suites/certification/Test_TC_ACL_2_7.yaml | 23 +- .../suites/certification/Test_TC_ACL_2_8.yaml | 23 +- .../suites/certification/Test_TC_ACL_2_9.yaml | 17 +- .../suites/certification/Test_TC_ACT_2_2.yaml | 5 - .../certification/Test_TC_BRBINFO_2_3.yaml | 12 - .../certification/Test_TC_CADMIN_1_15.yaml | 4 +- .../certification/Test_TC_CADMIN_1_16.yaml | 4 +- .../certification/Test_TC_CGEN_2_4.yaml | 81 -- .../suites/certification/Test_TC_G_2_2.yaml | 5 +- .../suites/certification/Test_TC_G_2_3.yaml | 17 +- .../Test_TC_RH_3_1_Simulated.yaml | 351 +++++++ src/app/tests/suites/manualTests.json | 2 +- .../chip-tool/zap-generated/test/Commands.h | 891 +++++++++--------- .../app1/zap-generated/test/Commands.h | 49 +- .../app2/zap-generated/test/Commands.h | 49 +- 17 files changed, 999 insertions(+), 568 deletions(-) delete mode 100644 src/app/tests/suites/certification/Test_TC_CGEN_2_4.yaml diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_10.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_10.yaml index 5c94764acd696d..a514fec00b511c 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_10.yaml @@ -25,12 +25,6 @@ config: nodeId2: type: node_id defaultValue: 0xCAFE - TH1CommissionerNodeId: - type: node_id - defaultValue: 112233 - TH2CommissionerNodeId: - type: node_id - defaultValue: 112233 discriminator: type: int16u defaultValue: 3840 @@ -53,6 +47,14 @@ tests: - name: "nodeId" value: nodeId + - label: "Read the TH1 commissioner node ID" + cluster: "CommissionerCommands" + command: "GetCommissionerNodeId" + response: + values: + - name: "nodeId" + saveAs: TH1CommissionerNodeId + - label: "Step 2:TH1 reads OperationalCredentials cluster CurrentFabricIndex attribute" @@ -93,6 +95,15 @@ tests: - name: "nodeId" value: nodeId2 + - label: "Read the TH2 commissioner node ID" + identity: "beta" + cluster: "CommissionerCommands" + command: "GetCommissionerNodeId" + response: + values: + - name: "nodeId" + saveAs: TH2CommissionerNodeId + - label: "Step 4:TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute" diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml index 38a68b2a8b2da6..14f8bf734ef408 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml @@ -22,9 +22,6 @@ config: nodeId: 0x12344321 cluster: "Access Control" endpoint: 0 - CommissionerNodeId: - type: node_id - defaultValue: 112233 CAT1: type: int64u defaultValue: 65520 @@ -47,6 +44,14 @@ tests: - name: "nodeId" value: nodeId + - label: "Read the commissioner node ID" + cluster: "CommissionerCommands" + command: "GetCommissionerNodeId" + response: + values: + - name: "nodeId" + saveAs: CommissionerNodeId + - label: "Step 2:TH1 reads DUT Endpoint 0 OperationalCredentials cluster CurrentFabricIndex attribute" diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml index 08ae87141f2185..38be34e85320de 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml @@ -25,12 +25,6 @@ config: nodeId2: type: node_id defaultValue: 0xCAFE - TH1CommissionerNodeId: - type: node_id - defaultValue: 112233 - TH2CommissionerNodeId: - type: node_id - defaultValue: 112233 payload: type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" @@ -50,6 +44,14 @@ tests: - name: "nodeId" value: nodeId + - label: "Read the TH1 commissioner node ID" + cluster: "CommissionerCommands" + command: "GetCommissionerNodeId" + response: + values: + - name: "nodeId" + saveAs: TH1CommissionerNodeId + - label: "Step 2:TH1 reads OperationalCredentials cluster CurrentFabricIndex attribute" @@ -90,6 +92,15 @@ tests: - name: "nodeId" value: nodeId2 + - label: "Read the TH2 commissioner node ID" + identity: "beta" + cluster: "CommissionerCommands" + command: "GetCommissionerNodeId" + response: + values: + - name: "nodeId" + saveAs: TH2CommissionerNodeId + - label: "Step 5:TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute" diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml index fe69b83182997d..b4865ea186de2b 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml @@ -24,12 +24,6 @@ config: nodeId2: type: node_id defaultValue: 0xCAFE - TH1CommissionerNodeId: - type: node_id - defaultValue: 112233 - TH2CommissionerNodeId: - type: node_id - defaultValue: 112233 payload: type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" @@ -43,6 +37,14 @@ tests: - name: "nodeId" value: nodeId + - label: "Read the TH1 commissioner node ID" + cluster: "CommissionerCommands" + command: "GetCommissionerNodeId" + response: + values: + - name: "nodeId" + saveAs: TH1CommissionerNodeId + - label: "TH1 reads OperationalCredentials cluster CurrentFabricIndex attribute" command: "readAttribute" @@ -82,6 +84,15 @@ tests: - name: "nodeId" value: nodeId2 + - label: "Read the TH2 commissioner node ID" + identity: "beta" + cluster: "CommissionerCommands" + command: "GetCommissionerNodeId" + response: + values: + - name: "nodeId" + saveAs: TH2CommissionerNodeId + - label: "TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute" identity: "beta" diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_9.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_9.yaml index 3a573717b5a751..fe777c13bfa78f 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_9.yaml @@ -25,9 +25,6 @@ config: nodeId2: type: node_id defaultValue: 0xCAFE - CommissionerNodeId: - type: node_id - defaultValue: 112233 payload: type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically @@ -41,6 +38,14 @@ tests: - name: "nodeId" value: nodeId + - label: "Read the commissioner node ID" + cluster: "CommissionerCommands" + command: "GetCommissionerNodeId" + response: + values: + - name: "nodeId" + saveAs: CommissionerNodeId + - label: "TH1 reads OperationalCredentials cluster CurrentFabricIndex attribute" command: "readAttribute" @@ -116,7 +121,7 @@ tests: - label: "Step 7:TH1 reads DUT Endpoint 0 AccessControl cluster SubjectsPerAccessControlEntry attribute" - PICS: ACL.S.A0001 + PICS: ACL.S.A0002 command: "readAttribute" attribute: "SubjectsPerAccessControlEntry" response: @@ -126,7 +131,7 @@ tests: - label: "Step 8:TH1 reads DUT Endpoint 0 AccessControl cluster TargetsPerAccessControlEntry attribute" - PICS: ACL.S.A0001 + PICS: ACL.S.A0003 command: "readAttribute" attribute: "TargetsPerAccessControlEntry" response: @@ -136,7 +141,7 @@ tests: - label: "Step 9:TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlEntriesPerFabric attribute" - PICS: ACL.S.A0001 + PICS: ACL.S.A0004 command: "readAttribute" attribute: "AccessControlEntriesPerFabric" response: diff --git a/src/app/tests/suites/certification/Test_TC_ACT_2_2.yaml b/src/app/tests/suites/certification/Test_TC_ACT_2_2.yaml index f717f0615bdff8..08d1eae040a18e 100644 --- a/src/app/tests/suites/certification/Test_TC_ACT_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACT_2_2.yaml @@ -26,12 +26,7 @@ config: tests: - label: "Commission DUT to TH (can be skipped if done in a preceding test)" verification: | - On DUT side: - sudo ./chip-bridge-app - - On TH side: - ./chip-tool pairing ethernet 1 20202021 3840 fe80::e65f:1ff:fe0f:2753 5540 disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_BRBINFO_2_3.yaml b/src/app/tests/suites/certification/Test_TC_BRBINFO_2_3.yaml index 36e98876ecb714..7461750e3b08dd 100644 --- a/src/app/tests/suites/certification/Test_TC_BRBINFO_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_BRBINFO_2_3.yaml @@ -213,18 +213,6 @@ tests: [1663583922.989709][155023:155023] CHIP:DMG: << from UDP:[fe80::e2a:f0a6:5d44:15b1%wlp3s0]:35251 | 43255988 | [Secure Channel (0) / Standalone Ack (0x10) / Session = 0 / Exchange = 14682] disabled: true - - label: "DUT reads Location from the TH" - PICS: BRBINFO.C.A0006 - verification: | - ./chip-tool bridgeddevicebasic read location 1 3 - - Optional Attribute - If it is supported, then in TH(bridge-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE - - - - chip-tool needs to be implemented - disabled: true - - label: "DUT reads HardwareVersion from the TH" PICS: BRBINFO.C.A0007 verification: | diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml index 19b44210505cf9..8692225739b419 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml @@ -198,7 +198,9 @@ tests: verification: | Using TH_CR2 read attribute - ./chip-tool basic read node-label 2 0 --commissioner-name beta + Verify read command fail as expected since the DUT_CE is no longer on the network on TH_CR2 (chip-tool) side + + ./chip-tool basicinformation read node-label 2 0 --commissioner-name beta Received error (protocol code 2) during pairing process. ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter [1651819620.929567][4359:4364] CHIP:CTL: OperationalDeviceProxy[B8070CD13C99D367:0000000000000002]: State change 3 --> 2 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml index 1b9eb948ae2b1c..7964c3947511fc 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml @@ -180,7 +180,9 @@ tests: verification: | Using TH_CR2 read attribute - ./chip-tool basic read node-label 2 0 --commissioner-name beta + Verify read command fail as expected since the DUT_CE is no longer on the network on TH_CR2 (chip-tool) log + + ./chip-tool basicinformation read node-label 2 0 --commissioner-name beta Received error (protocol code 2) during pairing process. ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter [1651819620.929567][4359:4364] CHIP:CTL: OperationalDeviceProxy[B8070CD13C99D367:0000000000000002]: State change 3 --> 2 diff --git a/src/app/tests/suites/certification/Test_TC_CGEN_2_4.yaml b/src/app/tests/suites/certification/Test_TC_CGEN_2_4.yaml deleted file mode 100644 index dd998ec84f8efd..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_CGEN_2_4.yaml +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 93.2.3. [TC-CGEN-2.4] Verification For CommissioningError on response - message [DUT - Server] - -PICS: - - CGEN.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Start the commissioning process of TH1 on DUT" - verification: | - - disabled: true - - - label: - "During PASE Session, TH1 sends CommissioningComplete command to the - DUT" - PICS: CGEN.S.C04.Rsp && CGEN.S.C05.Tx - verification: | - Out of scope for V1.0 - disabled: true - - - label: "Complete the Commission for TH1 and DUT" - verification: | - - disabled: true - - - label: - "TH1 sends SetRegulatoryConfig command to the DUT with - NewRegulatoryConfig data value as greater than 3, Breadcrumb as 0 and - CountryCode value as PIXIT.CGEN.CountryCode" - PICS: CGEN.S.C02.Rsp && CGEN.S.C03.Tx - verification: | - ./chip-tool generalcommissioning set-regulatory-config 4 new 0 1 0 - - On TH(chip-tool), Verify that DUT sends SetRegulatoryConfigResponse command to TH1 with field ErrorCode as "ValueOutsideRange"(1) and DebugText argument is of type string with max length 512 or empty a "string" value - [1653996382.940789][7220:7225] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0003 - [1653996382.940900][7220:7225] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0003 - [1653996382.941033][7220:7225] CHIP:TOO: SetRegulatoryConfigResponse: { - [1653996382.941119][7220:7225] CHIP:TOO: errorCode: 1 - [1653996382.941171][7220:7225] CHIP:TOO: debugText: new - [1653996382.941220][7220:7225] CHIP:TOO: } - [1653996382.941317][7220:7225] CHIP:DMG: ICR moving to [AwaitingDe] - disabled: true - - - label: - "After Fail-Safe timer expires, TH1 Sends the CommissioningComplete - command to the DUT" - PICS: CGEN.S.C00.Rsp && CGEN.S.C01.Tx - verification: | - ./chip-tool generalcommissioning commissioning-complete 1 0 - - On TH(chip-tool), Verify that DUT sends SetRegulatoryConfigResponse command to TH1 with field With ErrorCode as "NoFailSafe"(3) and DebugText as a "string" value - based on Spec Default value empty is exceptable for debugText - [1653996461.207051][7229:7234] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1653996461.207140][7229:7234] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0005 - [1653996461.207228][7229:7234] CHIP:TOO: CommissioningCompleteResponse: { - [1653996461.207281][7229:7234] CHIP:TOO: errorCode: 3 - [1653996461.207319][7229:7234] CHIP:TOO: debugText: - [1653996461.207357][7229:7234] CHIP:TOO: } - [1653996461.207416][7229:7234] CHIP:DMG: ICR moving to [AwaitingDe] - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_G_2_2.yaml b/src/app/tests/suites/certification/Test_TC_G_2_2.yaml index 80cabf2cd55087..11c152a1214e4e 100644 --- a/src/app/tests/suites/certification/Test_TC_G_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_2_2.yaml @@ -44,7 +44,8 @@ tests: [1674543469.444257][19260:19262] CHIP:TOO: MaxGroupsPerFabric: 4 disabled: true - - label: "Precondition: If maxgroups>1, proceed with the following steps + - label: | + Precondition: If maxgroups>1, proceed with the following steps, TH generates fabric-unique GroupID, GroupName, random key, EpochKey0 and GroupKeySetID. @@ -66,7 +67,7 @@ tests: TH binds GroupId(0x0001 to (maxgroups+1)) with GroupKeySetID in the GroupKeyMap attribute list on GroupKeyManagement cluster with the - values provided in the above steps" + values provided in the above steps verification: | Execute the following command in TH to generate the pre-condition to execute this test case: diff --git a/src/app/tests/suites/certification/Test_TC_G_2_3.yaml b/src/app/tests/suites/certification/Test_TC_G_2_3.yaml index bc27784e2aeff5..c7345794dfd14d 100644 --- a/src/app/tests/suites/certification/Test_TC_G_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_2_3.yaml @@ -45,7 +45,8 @@ tests: [1674550919.106455][20702:20704] CHIP:TOO: MaxGroupsPerFabric: 4 disabled: true - - label: "Pre-Conditions: If maxgroups>0, proceed with the following steps + - label: | + Pre-Conditions: If maxgroups>0, proceed with the following steps TH generates fabric-unique GroupID, GroupName, random key, EpochKey0 and GroupKeySetID. @@ -71,16 +72,16 @@ tests: TH binds GroupId(0x0006 to (maxgroups+1)) with GroupKeySetID in the GroupKeyMap attribute list on GroupKeyManagement cluster with the - values provided in the above steps" + values provided in the above steps verification: | Execute the following command in TH to generate the pre-condition to execute this test case: - ./chip-tool groupkeymanagement key-set-write "{"groupKeySetID": 1, + ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 1, "groupKeySecurityPolicy": 0, "epochKey0": "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": - "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }" 1 0 + "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 Verify the "status is success" on the TH(Chip-tool) Log: @@ -91,7 +92,7 @@ tests: Before adding the Groups (0x0002,0x0003) execute this command - ./chip-tool groupkeymanagement write group-key-map "[{"groupId":2, "groupKeySetID": 1, "fabricIndex": 1},{"groupId": 3, "groupKeySetID": 1,"fabricIndex": 1} ]" 1 0 + ./chip-tool groupkeymanagement write group-key-map '[{"groupId":2, "groupKeySetID": 1, "fabricIndex": 1},{"groupId": 3, "groupKeySetID": 1,"fabricIndex": 1} ]' 1 0 Verify the status is success on the TH Log: @@ -131,7 +132,7 @@ tests: Before adding the Groups (0x0006,0x0007) execute this command - ./chip-tool groupkeymanagement write group-key-map "[{"groupId":6, "groupKeySetID": 1, "fabricIndex": 1},{"groupId": 7, "groupKeySetID": 1,"fabricIndex": 1}]" 1 0 + ./chip-tool groupkeymanagement write group-key-map '[{"groupId":6, "groupKeySetID": 1, "fabricIndex": 1},{"groupId": 7, "groupKeySetID": 1,"fabricIndex": 1}]' 1 0 Verify the "status is success" on the TH(Chip-tool) Log: @@ -192,7 +193,7 @@ tests: Before adding the Groups (0x0008) execute this command - ./chip-tool groupkeymanagement write group-key-map "[{"groupId": 8, "groupKeySetID": 1, "fabricIndex": 1}]" 1 0 + ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 8, "groupKeySetID": 1, "fabricIndex": 1}]' 1 0 Verify the "status is success" on the TH(Chip-tool) Log: @@ -235,7 +236,7 @@ tests: Before adding the Group0x0009 execute this command which is used to check the Resource_Exhausted Condition - ./chip-tool groupkeymanagement write group-key-map "[{"groupId": 9, "groupKeySetID": 1, "fabricIndex": 1}]" 1 0 + ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 9, "groupKeySetID": 1, "fabricIndex": 1}]' 1 0 Verify the "status is success" on the TH(Chip-tool) Log: diff --git a/src/app/tests/suites/certification/Test_TC_RH_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_RH_3_1_Simulated.yaml index 1b778b44ac99f4..fc687bc24d08b0 100644 --- a/src/app/tests/suites/certification/Test_TC_RH_3_1_Simulated.yaml +++ b/src/app/tests/suites/certification/Test_TC_RH_3_1_Simulated.yaml @@ -46,3 +46,354 @@ tests: - label: "Read attribute Tolerance" wait: "readAttribute" attribute: "Tolerance" + + - label: + "Configure TH such that it implements mandatory and none of the + optional attributes of the server-side of the cluster, and that it + also reflects this in global attributes such as FeatureMap and + AttributeList.Commission DUT to TH again" + verification: | + ./chip-tool relativehumiditymeasurement read feature-map 1 1 + + verify TH recieves "feature-map response" on the TH (all-cluster-minimal-app) log: + + [1666943749.218050][12769:12769] CHIP:DMG: + [1666943749.218060][12769:12769] CHIP:DMG: ReportDataMessage = + [1666943749.218062][12769:12769] CHIP:DMG: { + [1666943749.218064][12769:12769] CHIP:DMG: AttributeReportIBs = + [1666943749.218067][12769:12769] CHIP:DMG: [ + [1666943749.218069][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943749.218074][12769:12769] CHIP:DMG: { + [1666943749.218076][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943749.218078][12769:12769] CHIP:DMG: { + [1666943749.218081][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, + [1666943749.218083][12769:12769] CHIP:DMG: AttributePathIB = + [1666943749.218086][12769:12769] CHIP:DMG: { + [1666943749.218088][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943749.218091][12769:12769] CHIP:DMG: Cluster = 0x405, + [1666943749.218093][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFC, + [1666943749.218095][12769:12769] CHIP:DMG: } + [1666943749.218098][12769:12769] CHIP:DMG: + [1666943749.218101][12769:12769] CHIP:DMG: Data = 0, + [1666943749.218103][12769:12769] CHIP:DMG: }, + [1666943749.218106][12769:12769] CHIP:DMG: + [1666943749.218108][12769:12769] CHIP:DMG: }, + [1666943749.218112][12769:12769] CHIP:DMG: + [1666943749.218114][12769:12769] CHIP:DMG: ], + [1666943749.218117][12769:12769] CHIP:DMG: + + + ./chip-tool relativehumiditymeasurement read attribute-list 1 1 + + verify TH recieves "attribute-list response" on the TH (all-cluster-minimal-app) log: + + [1666943792.254338][12769:12769] CHIP:DMG: + [1666943792.254369][12769:12769] CHIP:DMG: ReportDataMessage = + [1666943792.254372][12769:12769] CHIP:DMG: { + [1666943792.254374][12769:12769] CHIP:DMG: AttributeReportIBs = + [1666943792.254378][12769:12769] CHIP:DMG: [ + [1666943792.254381][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943792.254385][12769:12769] CHIP:DMG: { + [1666943792.254388][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943792.254392][12769:12769] CHIP:DMG: { + [1666943792.254395][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, + [1666943792.254397][12769:12769] CHIP:DMG: AttributePathIB = + [1666943792.254399][12769:12769] CHIP:DMG: { + [1666943792.254402][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943792.254404][12769:12769] CHIP:DMG: Cluster = 0x405, + [1666943792.254406][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, + [1666943792.254409][12769:12769] CHIP:DMG: } + [1666943792.254411][12769:12769] CHIP:DMG: + [1666943792.254414][12769:12769] CHIP:DMG: Data = [ + [1666943792.254418][12769:12769] CHIP:DMG: + [1666943792.254422][12769:12769] CHIP:DMG: ], + [1666943792.254424][12769:12769] CHIP:DMG: }, + [1666943792.254427][12769:12769] CHIP:DMG: + [1666943792.254430][12769:12769] CHIP:DMG: }, + [1666943792.254435][12769:12769] CHIP:DMG: + [1666943792.254437][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943792.254441][12769:12769] CHIP:DMG: { + [1666943792.254443][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943792.254446][12769:12769] CHIP:DMG: { + [1666943792.254449][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, + [1666943792.254453][12769:12769] CHIP:DMG: AttributePathIB = + [1666943792.254456][12769:12769] CHIP:DMG: { + [1666943792.254459][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943792.254463][12769:12769] CHIP:DMG: Cluster = 0x405, + [1666943792.254465][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, + [1666943792.254470][12769:12769] CHIP:DMG: ListIndex = Null, + [1666943792.254473][12769:12769] CHIP:DMG: } + [1666943792.254477][12769:12769] CHIP:DMG: + [1666943792.254480][12769:12769] CHIP:DMG: Data = 0, + [1666943792.254483][12769:12769] CHIP:DMG: }, + [1666943792.254487][12769:12769] CHIP:DMG: + [1666943792.254489][12769:12769] CHIP:DMG: }, + [1666943792.254495][12769:12769] CHIP:DMG: + [1666943792.254497][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943792.254501][12769:12769] CHIP:DMG: { + [1666943792.254504][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943792.254506][12769:12769] CHIP:DMG: { + [1666943792.254509][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, + [1666943792.254513][12769:12769] CHIP:DMG: AttributePathIB = + [1666943792.254516][12769:12769] CHIP:DMG: { + [1666943792.254519][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943792.254522][12769:12769] CHIP:DMG: Cluster = 0x405, + [1666943792.254525][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, + [1666943792.254527][12769:12769] CHIP:DMG: ListIndex = Null, + [1666943792.254530][12769:12769] CHIP:DMG: } + [1666943792.254534][12769:12769] CHIP:DMG: + [1666943792.254538][12769:12769] CHIP:DMG: Data = 1, + [1666943792.254540][12769:12769] CHIP:DMG: }, + [1666943792.254544][12769:12769] CHIP:DMG: + [1666943792.254546][12769:12769] CHIP:DMG: }, + [1666943792.254551][12769:12769] CHIP:DMG: + [1666943792.254553][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943792.254557][12769:12769] CHIP:DMG: { + [1666943792.254559][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943792.254562][12769:12769] CHIP:DMG: { + [1666943792.254565][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, + [1666943792.254569][12769:12769] CHIP:DMG: AttributePathIB = + [1666943792.254571][12769:12769] CHIP:DMG: { + [1666943792.254573][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943792.254576][12769:12769] CHIP:DMG: Cluster = 0x405, + [1666943792.254578][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, + [1666943792.254580][12769:12769] CHIP:DMG: ListIndex = Null, + [1666943792.254582][12769:12769] CHIP:DMG: } + [1666943792.254586][12769:12769] CHIP:DMG: + [1666943792.254589][12769:12769] CHIP:DMG: Data = 2, + [1666943792.254592][12769:12769] CHIP:DMG: }, + [1666943792.254596][12769:12769] CHIP:DMG: + [1666943792.254598][12769:12769] CHIP:DMG: }, + [1666943792.254604][12769:12769] CHIP:DMG: + [1666943792.254606][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943792.254610][12769:12769] CHIP:DMG: { + [1666943792.254612][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943792.254615][12769:12769] CHIP:DMG: { + [1666943792.254618][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, + [1666943792.254621][12769:12769] CHIP:DMG: AttributePathIB = + [1666943792.254624][12769:12769] CHIP:DMG: { + [1666943792.254627][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943792.254630][12769:12769] CHIP:DMG: Cluster = 0x405, + [1666943792.254633][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, + [1666943792.254635][12769:12769] CHIP:DMG: ListIndex = Null, + [1666943792.254638][12769:12769] CHIP:DMG: } + [1666943792.254642][12769:12769] CHIP:DMG: + [1666943792.254645][12769:12769] CHIP:DMG: Data = 65528, + [1666943792.254647][12769:12769] CHIP:DMG: }, + [1666943792.254651][12769:12769] CHIP:DMG: + [1666943792.254653][12769:12769] CHIP:DMG: }, + [1666943792.254658][12769:12769] CHIP:DMG: + [1666943792.254660][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943792.254664][12769:12769] CHIP:DMG: { + [1666943792.254666][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943792.254669][12769:12769] CHIP:DMG: { + [1666943792.254672][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, + [1666943792.254674][12769:12769] CHIP:DMG: AttributePathIB = + [1666943792.254677][12769:12769] CHIP:DMG: { + [1666943792.254680][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943792.254683][12769:12769] CHIP:DMG: Cluster = 0x405, + [1666943792.254686][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, + [1666943792.254689][12769:12769] CHIP:DMG: ListIndex = Null, + [1666943792.254691][12769:12769] CHIP:DMG: } + [1666943792.254695][12769:12769] CHIP:DMG: + [1666943792.254698][12769:12769] CHIP:DMG: Data = 65529, + [1666943792.254700][12769:12769] CHIP:DMG: }, + [1666943792.254704][12769:12769] CHIP:DMG: + [1666943792.254707][12769:12769] CHIP:DMG: }, + [1666943792.254712][12769:12769] CHIP:DMG: + [1666943792.254714][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943792.254718][12769:12769] CHIP:DMG: { + [1666943792.254720][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943792.254723][12769:12769] CHIP:DMG: { + [1666943792.254726][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, + [1666943792.254729][12769:12769] CHIP:DMG: AttributePathIB = + [1666943792.254732][12769:12769] CHIP:DMG: { + [1666943792.254735][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943792.254738][12769:12769] CHIP:DMG: Cluster = 0x405, + [1666943792.254740][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, + [1666943792.254743][12769:12769] CHIP:DMG: ListIndex = Null, + [1666943792.254746][12769:12769] CHIP:DMG: } + [1666943792.254750][12769:12769] CHIP:DMG: + [1666943792.254753][12769:12769] CHIP:DMG: Data = 65531, + [1666943792.254756][12769:12769] CHIP:DMG: }, + [1666943792.254759][12769:12769] CHIP:DMG: + [1666943792.254762][12769:12769] CHIP:DMG: }, + [1666943792.254767][12769:12769] CHIP:DMG: + [1666943792.254769][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943792.254773][12769:12769] CHIP:DMG: { + [1666943792.254775][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943792.254778][12769:12769] CHIP:DMG: { + [1666943792.254780][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, + [1666943792.254783][12769:12769] CHIP:DMG: AttributePathIB = + [1666943792.254786][12769:12769] CHIP:DMG: { + [1666943792.254789][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943792.254792][12769:12769] CHIP:DMG: Cluster = 0x405, + [1666943792.254797][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, + [1666943792.254799][12769:12769] CHIP:DMG: ListIndex = Null, + [1666943792.254802][12769:12769] CHIP:DMG: } + [1666943792.254804][12769:12769] CHIP:DMG: + [1666943792.254807][12769:12769] CHIP:DMG: Data = 65532, + [1666943792.254809][12769:12769] CHIP:DMG: }, + [1666943792.254811][12769:12769] CHIP:DMG: + [1666943792.254813][12769:12769] CHIP:DMG: }, + [1666943792.254820][12769:12769] CHIP:DMG: + [1666943792.254822][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943792.254826][12769:12769] CHIP:DMG: { + [1666943792.254828][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943792.254831][12769:12769] CHIP:DMG: { + [1666943792.254833][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, + [1666943792.254835][12769:12769] CHIP:DMG: AttributePathIB = + [1666943792.254837][12769:12769] CHIP:DMG: { + [1666943792.254842][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943792.254845][12769:12769] CHIP:DMG: Cluster = 0x405, + [1666943792.254849][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, + [1666943792.254851][12769:12769] CHIP:DMG: ListIndex = Null, + [1666943792.254853][12769:12769] CHIP:DMG: } + [1666943792.254856][12769:12769] CHIP:DMG: + [1666943792.254859][12769:12769] CHIP:DMG: Data = 65533, + [1666943792.254861][12769:12769] CHIP:DMG: }, + [1666943792.254865][12769:12769] CHIP:DMG: + [1666943792.254867][12769:12769] CHIP:DMG: }, + [1666943792.254872][12769:12769] CHIP:DMG: + [1666943792.254874][12769:12769] CHIP:DMG: ], + [1666943792.254884][12769:12769] CHIP:DMG: + [1666943792.254886][12769:12769] CHIP:DMG: SuppressResponse = true, + [1666943792.254889][12769:12769] CHIP:DMG: InteractionModelRevision = 1 + [1666943792.254891][12769:12769] CHIP:DMG: } + [1666943792.254894][12769:12769] CHIP:DMG: + + ./chip-tool relativehumiditymeasurement read measured-value 1 1 + + verify TH recieves "measured-value response" on the TH (all-cluster-minimal-app) log: + [1666943851.649935][12769:12769] CHIP:DMG: + [1666943851.649947][12769:12769] CHIP:DMG: ReportDataMessage = + [1666943851.649950][12769:12769] CHIP:DMG: { + [1666943851.649952][12769:12769] CHIP:DMG: AttributeReportIBs = + [1666943851.649956][12769:12769] CHIP:DMG: [ + [1666943851.649958][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943851.649962][12769:12769] CHIP:DMG: { + [1666943851.649965][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943851.649967][12769:12769] CHIP:DMG: { + [1666943851.649970][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, + [1666943851.649973][12769:12769] CHIP:DMG: AttributePathIB = + [1666943851.649975][12769:12769] CHIP:DMG: { + [1666943851.649978][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943851.649981][12769:12769] CHIP:DMG: Cluster = 0x405, + [1666943851.649984][12769:12769] CHIP:DMG: Attribute = 0x0000_0000, + [1666943851.649987][12769:12769] CHIP:DMG: } + [1666943851.649990][12769:12769] CHIP:DMG: + [1666943851.649994][12769:12769] CHIP:DMG: Data = 0, + [1666943851.649997][12769:12769] CHIP:DMG: }, + [1666943851.650001][12769:12769] CHIP:DMG: + [1666943851.650003][12769:12769] CHIP:DMG: }, + [1666943851.650007][12769:12769] CHIP:DMG: + [1666943851.650009][12769:12769] CHIP:DMG: ], + [1666943851.650013][12769:12769] CHIP:DMG: + [1666943851.650015][12769:12769] CHIP:DMG: SuppressResponse = true, + [1666943851.650017][12769:12769] CHIP:DMG: InteractionModelRevision = 1 + + ./chip-tool relativehumiditymeasurement read min-measured-value 1 1 + + verify TH recieves "min-measured-value response" on the TH (all-cluster-minimal-app) log: + + 1651147834.075387][2336:2336] CHIP:IM: Received Read request + + [1666943887.048829][12769:12769] CHIP:DMG: ReportDataMessage = + [1666943887.048832][12769:12769] CHIP:DMG: { + [1666943887.048835][12769:12769] CHIP:DMG: AttributeReportIBs = + [1666943887.048840][12769:12769] CHIP:DMG: [ + [1666943887.048842][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943887.048846][12769:12769] CHIP:DMG: { + [1666943887.048848][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943887.048851][12769:12769] CHIP:DMG: { + [1666943887.048853][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, + [1666943887.048855][12769:12769] CHIP:DMG: AttributePathIB = + [1666943887.048857][12769:12769] CHIP:DMG: { + [1666943887.048859][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943887.048862][12769:12769] CHIP:DMG: Cluster = 0x405, + [1666943887.048865][12769:12769] CHIP:DMG: Attribute = 0x0000_0001, + [1666943887.048868][12769:12769] CHIP:DMG: } + [1666943887.048871][12769:12769] CHIP:DMG: + [1666943887.048874][12769:12769] CHIP:DMG: Data = 0, + [1666943887.048877][12769:12769] CHIP:DMG: }, + [1666943887.048881][12769:12769] CHIP:DMG: + [1666943887.048883][12769:12769] CHIP:DMG: }, + [1666943887.048887][12769:12769] CHIP:DMG: + [1666943887.048889][12769:12769] CHIP:DMG: ], + [1666943887.048893][12769:12769] CHIP:DMG: + [1666943887.048894][12769:12769] CHIP:DMG: SuppressResponse = true, + [1666943887.048897][12769:12769] CHIP:DMG: InteractionModelRevision = 1 + + + ./chip-tool relativehumiditymeasurement read max-measured-value 1 1 + + verify TH recieves "max-measured-value response" on the TH (all-cluster-minimal-app) log: + + [1666943902.417737][12769:12769] CHIP:DMG: ReportDataMessage = + [1666943902.417740][12769:12769] CHIP:DMG: { + [1666943902.417742][12769:12769] CHIP:DMG: AttributeReportIBs = + [1666943902.417747][12769:12769] CHIP:DMG: [ + [1666943902.417749][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943902.417755][12769:12769] CHIP:DMG: { + [1666943902.417758][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943902.417761][12769:12769] CHIP:DMG: { + [1666943902.417764][12769:12769] CHIP:DMG: DataVersion = 0xff7445f8, + [1666943902.417767][12769:12769] CHIP:DMG: AttributePathIB = + [1666943902.417771][12769:12769] CHIP:DMG: { + [1666943902.417774][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943902.417777][12769:12769] CHIP:DMG: Cluster = 0x405, + [1666943902.417781][12769:12769] CHIP:DMG: Attribute = 0x0000_0002, + [1666943902.417784][12769:12769] CHIP:DMG: } + [1666943902.417788][12769:12769] CHIP:DMG: + [1666943902.417791][12769:12769] CHIP:DMG: Data = 10000, + [1666943902.417794][12769:12769] CHIP:DMG: }, + [1666943902.417798][12769:12769] CHIP:DMG: + [1666943902.417801][12769:12769] CHIP:DMG: }, + [1666943902.417805][12769:12769] CHIP:DMG: + [1666943902.417808][12769:12769] CHIP:DMG: ], + [1666943902.417812][12769:12769] CHIP:DMG: + [1666943902.417815][12769:12769] CHIP:DMG: SuppressResponse = true, + [1666943902.417819][12769:12769] CHIP:DMG: InteractionModelRevision = 1 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: + "DUT reads all supported optional attributes from TH one at a time in + a manufacturer specific order" + verification: | + TH all-clusters-minimal-app does not support optional attributes + + ./chip-tool relativehumiditymeasurement read tolerance 1 1 + + status = 0x86 (UNSUPPORTED_ATTRIBUTE), + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: + "DUT writes a suitable value to all supported optional attributes on + the TH one at a time in a manufacturer specific order" + verification: | + This cluster doesn't have any writable attributes + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index ad5d1d9f633d71..ad07f2e0cda474 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -98,7 +98,7 @@ "Test_TC_DLOG_3_1" ], "Descriptor": ["Test_TC_DESC_2_1"], - "GeneralCommissioning": ["Test_TC_CGEN_2_2", "Test_TC_CGEN_2_4"], + "GeneralCommissioning": ["Test_TC_CGEN_2_2"], "GeneralDiagnostics": [ "Test_TC_DGGEN_2_2", "Test_TC_DGGEN_2_3", diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 50406d3e4632fc..44c0fa6c10d911 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -374,7 +374,6 @@ class ManualTestList : public Command printf("Test_TC_DESC_2_1\n"); printf("Test_TC_DGETH_3_2\n"); printf("Test_TC_CGEN_2_2\n"); - printf("Test_TC_CGEN_2_4\n"); printf("Test_TC_DGGEN_2_2\n"); printf("Test_TC_DGGEN_2_3\n"); printf("Test_TC_DGGEN_3_1\n"); @@ -3126,12 +3125,11 @@ class Test_TC_ACL_2_3Suite : public TestCommand class Test_TC_ACL_2_4Suite : public TestCommand { public: - Test_TC_ACL_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_4", 44, credsIssuerConfig) + Test_TC_ACL_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_4", 45, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("CommissionerNodeId", 0, UINT64_MAX, &mCommissionerNodeId); AddArgument("CAT1", 0, UINT64_MAX, &mCat1); AddArgument("CAT2", 0, UINT64_MAX, &mCat2); AddArgument("CAT3", 0, UINT64_MAX, &mCat3); @@ -3150,13 +3148,13 @@ class Test_TC_ACL_2_4Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mCommissionerNodeId; chip::Optional mCat1; chip::Optional mCat2; chip::Optional mCat3; chip::Optional mCat4; chip::Optional mTimeout; + chip::NodeId CommissionerNodeId; uint8_t CurrentFabricIndex; uint16_t MAXSUBJECTS; uint16_t TargetsPerAccessControlEntry; @@ -3179,6 +3177,15 @@ class Test_TC_ACL_2_4Suite : public TestCommand shouldContinue = true; break; case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + CommissionerNodeId = value.nodeId; + } + shouldContinue = true; + break; + case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -3186,7 +3193,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand CurrentFabricIndex = value; } break; - case 2: + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -3203,8 +3210,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand auto iter_3 = iter_0.GetValue().subjects.Value().begin(); VerifyOrReturn(CheckNextListItemDecodes( "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), - mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), CommissionerNodeId)); VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", iter_3, 1)); } @@ -3214,10 +3220,10 @@ class Test_TC_ACL_2_4Suite : public TestCommand } } break; - case 3: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -3234,8 +3240,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand auto iter_3 = iter_0.GetValue().subjects.Value().begin(); VerifyOrReturn(CheckNextListItemDecodes( "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), - mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), CommissionerNodeId)); VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", iter_3, 1)); } @@ -3319,10 +3324,10 @@ class Test_TC_ACL_2_4Suite : public TestCommand } } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -3339,8 +3344,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand auto iter_3 = iter_0.GetValue().subjects.Value().begin(); VerifyOrReturn(CheckNextListItemDecodes( "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), - mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), CommissionerNodeId)); VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", iter_3, 1)); } @@ -3424,10 +3428,10 @@ class Test_TC_ACL_2_4Suite : public TestCommand } } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -3444,8 +3448,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand auto iter_3 = iter_0.GetValue().subjects.Value().begin(); VerifyOrReturn(CheckNextListItemDecodes( "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), - mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), CommissionerNodeId)); VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", iter_3, 1)); } @@ -3547,10 +3550,10 @@ class Test_TC_ACL_2_4Suite : public TestCommand } } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -3567,8 +3570,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand auto iter_3 = iter_0.GetValue().subjects.Value().begin(); VerifyOrReturn(CheckNextListItemDecodes( "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), - mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), CommissionerNodeId)); VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", iter_3, 1)); } @@ -3636,10 +3638,10 @@ class Test_TC_ACL_2_4Suite : public TestCommand } } break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -3656,8 +3658,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand auto iter_3 = iter_0.GetValue().subjects.Value().begin(); VerifyOrReturn(CheckNextListItemDecodes( "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), - mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), CommissionerNodeId)); VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", iter_3, 1)); } @@ -3713,10 +3714,10 @@ class Test_TC_ACL_2_4Suite : public TestCommand } } break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -3733,8 +3734,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand auto iter_3 = iter_0.GetValue().subjects.Value().begin(); VerifyOrReturn(CheckNextListItemDecodes( "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), - mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), CommissionerNodeId)); VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", iter_3, 1)); } @@ -3750,10 +3750,10 @@ class Test_TC_ACL_2_4Suite : public TestCommand } } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -3770,8 +3770,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand auto iter_3 = iter_0.GetValue().subjects.Value().begin(); VerifyOrReturn(CheckNextListItemDecodes( "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), - mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), CommissionerNodeId)); VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", iter_3, 1)); } @@ -3787,7 +3786,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand } } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -3795,18 +3794,18 @@ class Test_TC_ACL_2_4Suite : public TestCommand MAXSUBJECTS = value; } break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -3823,8 +3822,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand auto iter_3 = iter_0.GetValue().subjects.Value().begin(); VerifyOrReturn(CheckNextListItemDecodes( "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), - mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), CommissionerNodeId)); VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", iter_3, 1)); } @@ -3861,7 +3859,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand } } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -3869,15 +3867,15 @@ class Test_TC_ACL_2_4Suite : public TestCommand TargetsPerAccessControlEntry = value; } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -3885,10 +3883,10 @@ class Test_TC_ACL_2_4Suite : public TestCommand MAXENTRIES = value; } break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 27: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -3905,8 +3903,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand auto iter_3 = iter_0.GetValue().subjects.Value().begin(); VerifyOrReturn(CheckNextListItemDecodes( "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), - mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), CommissionerNodeId)); VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", iter_3, 1)); } @@ -3928,10 +3925,10 @@ class Test_TC_ACL_2_4Suite : public TestCommand } } break; - case 28: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; - case 29: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -3948,8 +3945,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand auto iter_3 = iter_0.GetValue().subjects.Value().begin(); VerifyOrReturn(CheckNextListItemDecodes( "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), - mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), CommissionerNodeId)); VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", iter_3, 1)); } @@ -3959,9 +3955,6 @@ class Test_TC_ACL_2_4Suite : public TestCommand } } break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; @@ -3999,6 +3992,9 @@ class Test_TC_ACL_2_4Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 43: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; default: @@ -4024,19 +4020,25 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Step 2:TH1 reads DUT Endpoint 0 OperationalCredentials cluster CurrentFabricIndex attribute"); + LogStep(1, "Read the commissioner node ID"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; + return GetCommissionerNodeId(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "Step 2:TH1 reads DUT Endpoint 0 OperationalCredentials cluster CurrentFabricIndex attribute"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); } - case 2: { - LogStep(2, "Step 3:TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 3: { + LogStep(3, "Step 3:TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, chip::NullOptional); } - case 3: { + case 4: { LogStep( - 3, + 4, "Step 4:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct " "containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects field: [N1] " "Targets field: null 2 . struct Privilege field: View (1) AuthMode field: CASE (3) Subjects field: [111, 222, 333, " @@ -4060,7 +4062,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -4138,15 +4140,15 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 4: { - LogStep(4, "Step 5:TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 5: { + LogStep(5, "Step 5:TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, chip::NullOptional); } - case 5: { + case 6: { LogStep( - 5, + 6, "Step 6:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct " "containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE (2) Subjects field: [N1] " "Targets field: null 2.struct Privilege field: Manage (4) AuthMode field: Group (3) Subjects field: [444, 333, " @@ -4170,7 +4172,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -4248,14 +4250,14 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 6: { - LogStep(6, "Step 7:TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 7: { + LogStep(7, "Step 7:TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, + case 8: { + LogStep(8, "Step 8:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " "AccessControlEntryStruct containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: View (1) AuthMode field: CASE (2) " @@ -4280,7 +4282,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -4370,14 +4372,14 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 8: { - LogStep(8, "Step 9:TH1 reads AccessControl cluster ACL attribute"); + case 9: { + LogStep(9, "Step 9:TH1 reads AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, + case 10: { + LogStep(10, "Step 10:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " "AccessControlEntryStruct containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: View (1) AuthMode field: CASE (2) " @@ -4402,7 +4404,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -4472,14 +4474,14 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 10: { - LogStep(10, "Step 11:TH1 reads AccessControl cluster ACL attribute"); + case 11: { + LogStep(11, "Step 11:TH1 reads AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, + case 12: { + LogStep(12, "Step 12:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " "AccessControlEntryStruct containing 3 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: View (1) AuthMode field: CASE (2) " @@ -4503,7 +4505,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -4551,14 +4553,14 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 12: { - LogStep(12, "Step 13:TH1 reads AccessControl cluster ACL attribute"); + case 13: { + LogStep(13, "Step 13:TH1 reads AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, + case 14: { + LogStep(14, "Step 14:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: Group (3) " @@ -4581,7 +4583,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -4601,14 +4603,14 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 14: { - LogStep(14, "Step 15:TH1 reads AccessControl cluster ACL attribute"); + case 15: { + LogStep(15, "Step 15:TH1 reads AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, + case 16: { + LogStep(16, "Step 16:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: ProxyView (2) AuthMode field: CASE (2) " @@ -4631,7 +4633,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -4651,20 +4653,20 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 16: { - LogStep(16, "Step 17:TH1 reads AccessControl cluster ACL attribute"); + case 17: { + LogStep(17, "Step 17:TH1 reads AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Step 18:TH1 reads DUT AccessControl cluster SubjectsPerAccessControlEntry attribute"); + case 18: { + LogStep(18, "Step 18:TH1 reads DUT AccessControl cluster SubjectsPerAccessControlEntry attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::SubjectsPerAccessControlEntry::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, + case 19: { + LogStep(19, "Step 19:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " @@ -4677,8 +4679,8 @@ class Test_TC_ACL_2_4Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 19: { - LogStep(19, "Step 20:TH1 reads AccessControl cluster ACL attribute"); + case 20: { + LogStep(20, "Step 20:TH1 reads AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000 && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -4687,8 +4689,8 @@ class Test_TC_ACL_2_4Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 20: { - LogStep(20, + case 21: { + LogStep(21, "Step 21:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " @@ -4711,7 +4713,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -4741,20 +4743,20 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 21: { - LogStep(21, "Step 22:TH1 reads AccessControl cluster ACL attribute"); + case 22: { + LogStep(22, "Step 22:TH1 reads AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Step 23:TH1 reads AccessControl cluster TargetsPerAccessControlEntry attribute"); + case 23: { + LogStep(23, "Step 23:TH1 reads AccessControl cluster TargetsPerAccessControlEntry attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::TargetsPerAccessControlEntry::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, + case 24: { + LogStep(24, "Step 24:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " @@ -4767,8 +4769,8 @@ class Test_TC_ACL_2_4Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 24: { - LogStep(24, "Step 25:TH1 reads AccessControl cluster ACL attribute"); + case 25: { + LogStep(25, "Step 25:TH1 reads AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000 && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -4777,14 +4779,14 @@ class Test_TC_ACL_2_4Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 25: { - LogStep(25, "Step 26:TH1 reads AccessControl cluster AccessControlEntriesPerFabric attribute"); + case 26: { + LogStep(26, "Step 26:TH1 reads AccessControl cluster AccessControlEntriesPerFabric attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::AccessControlEntriesPerFabric::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, + case 27: { + LogStep(27, "Step 27:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " "AccessControlEntryStruct containing MAXENTRIES elements 1.struct Privilege field: Administer (5) AuthMode " "field: CASE (2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode " @@ -4807,7 +4809,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -4835,14 +4837,14 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 27: { - LogStep(27, "Step 28:TH1 reads AccessControl cluster ACL attribute"); + case 28: { + LogStep(28, "Step 28:TH1 reads AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, + case 29: { + LogStep(29, "Step 29:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: PASE (1) " @@ -4865,7 +4867,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -4885,14 +4887,14 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 29: { - LogStep(29, "Step 30:TH1 reads AccessControl cluster ACL attribute"); + case 30: { + LogStep(30, "Step 30:TH1 reads AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, chip::NullOptional); } - case 30: { - LogStep(30, + case 31: { + LogStep(31, "Step 31:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Administer (5) AuthMode field: Group " @@ -4915,7 +4917,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -4935,8 +4937,8 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 31: { - LogStep(31, + case 32: { + LogStep(32, "Step 32:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value is list of " "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: invalid value (not 1-5) AuthMode " @@ -4959,7 +4961,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -4979,8 +4981,8 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 32: { - LogStep(32, + case 33: { + LogStep(33, "Step 33:TH1 writes AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing " "2 elements"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -5001,7 +5003,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -5021,8 +5023,8 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 33: { - LogStep(33, + case 34: { + LogStep(34, "Step 34:TH1 writes AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing " "2 elements"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -5043,7 +5045,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -5070,8 +5072,8 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 34: { - LogStep(34, + case 35: { + LogStep(35, "Step 35:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " @@ -5094,7 +5096,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -5121,8 +5123,8 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 35: { - LogStep(35, + case 36: { + LogStep(36, "Step 36:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " @@ -5145,7 +5147,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -5172,8 +5174,8 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 36: { - LogStep(36, + case 37: { + LogStep(37, "Step 37:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " "AccessControlEntryStruct containing 2 elements struct Privilege field: Administer (5) AuthMode field: CASE " "(2) Subjects field: [N1] Targets field: null struct Privilege field: Operate (3) AuthMode field: CASE (2) " @@ -5196,7 +5198,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -5223,8 +5225,8 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 37: { - LogStep(37, + case 38: { + LogStep(38, "Step 38:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " @@ -5247,7 +5249,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -5280,8 +5282,8 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 38: { - LogStep(38, + case 39: { + LogStep(39, "Step 39:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " @@ -5304,7 +5306,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -5338,8 +5340,8 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 39: { - LogStep(39, + case 40: { + LogStep(40, "Step 40:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " "AccessControlEntryStruct containing 2 elements 1. struct Privilege field: Administer (5) AuthMode field: " "CASE (2) Subjects field: [N1] Targets field: null 2. struct Privilege field: Operate (3) AuthMode field: " @@ -5362,7 +5364,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -5396,8 +5398,8 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 40: { - LogStep(40, + case 41: { + LogStep(41, "Step 41:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " @@ -5420,7 +5422,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -5454,8 +5456,8 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 41: { - LogStep(41, + case 42: { + LogStep(42, "Step 42:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " @@ -5478,7 +5480,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -5513,8 +5515,8 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 42: { - LogStep(42, + case 43: { + LogStep(43, "Step 43:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is list of " "AccessControlEntryStruct containing 2 elements 1.struct Privilege field: Administer (5) AuthMode field: CASE " "(2) Subjects field: [N1] Targets field: null 2.struct Privilege field: Operate (3) AuthMode field: CASE (2) " @@ -5537,7 +5539,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -5573,8 +5575,8 @@ class Test_TC_ACL_2_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 43: { - LogStep(43, "Step 44:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is an empty list"); + case 44: { + LogStep(44, "Step 44:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute value is an empty list"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::DataModel::List value; @@ -5591,14 +5593,12 @@ class Test_TC_ACL_2_4Suite : public TestCommand class Test_TC_ACL_2_7Suite : public TestCommand { public: - Test_TC_ACL_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_7", 12, credsIssuerConfig) + Test_TC_ACL_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_7", 14, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("TH1CommissionerNodeId", 0, UINT64_MAX, &mTH1CommissionerNodeId); - AddArgument("TH2CommissionerNodeId", 0, UINT64_MAX, &mTH2CommissionerNodeId); AddArgument("payload", &mPayload); AddArgument("D_OK_EMPTY", &mDOkEmpty); AddArgument("D_OK_SINGLE", &mDOkSingle); @@ -5617,14 +5617,14 @@ class Test_TC_ACL_2_7Suite : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mNodeId2; - chip::Optional mTH1CommissionerNodeId; - chip::Optional mTH2CommissionerNodeId; chip::Optional mPayload; chip::Optional mDOkEmpty; chip::Optional mDOkSingle; chip::Optional mTimeout; + chip::NodeId TH1CommissionerNodeId; uint8_t TH1FabricIndex; + chip::NodeId TH2CommissionerNodeId; uint8_t TH2FabricIndex; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -5646,23 +5646,41 @@ class Test_TC_ACL_2_7Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TH1FabricIndex = value; + TH1CommissionerNodeId = value.nodeId; } + shouldContinue = true; break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + TH1FabricIndex = value; + } 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)); + { + chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + TH2CommissionerNodeId = value.nodeId; + } + shouldContinue = true; + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -5670,13 +5688,13 @@ class Test_TC_ACL_2_7Suite : public TestCommand TH2FabricIndex = value; } break; - case 6: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -5694,7 +5712,7 @@ class Test_TC_ACL_2_7Suite : public TestCommand } } break; - case 9: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -5719,7 +5737,7 @@ class Test_TC_ACL_2_7Suite : public TestCommand } } break; - case 10: + case 12: switch (mTestSubStepIndex) { case 0: @@ -5729,7 +5747,7 @@ class Test_TC_ACL_2_7Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("accessControlExtensionChanged.adminNodeID", value.adminNodeID)); VerifyOrReturn(CheckValue("accessControlExtensionChanged.adminNodeID.Value()", value.adminNodeID.Value(), - mTH1CommissionerNodeId.HasValue() ? mTH1CommissionerNodeId.Value() : 112233ULL)); + TH1CommissionerNodeId)); VerifyOrReturn(CheckValueNull("accessControlExtensionChanged.adminPasscodeID", value.adminPasscodeID)); VerifyOrReturn(CheckValue("accessControlExtensionChanged.changeType", value.changeType, 1U)); VerifyOrReturn(CheckValueNonNull("accessControlExtensionChanged.latestValue", value.latestValue)); @@ -5747,7 +5765,7 @@ class Test_TC_ACL_2_7Suite : public TestCommand break; } break; - case 11: + case 13: switch (mTestSubStepIndex) { case 0: @@ -5757,7 +5775,7 @@ class Test_TC_ACL_2_7Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("accessControlExtensionChanged.adminNodeID", value.adminNodeID)); VerifyOrReturn(CheckValue("accessControlExtensionChanged.adminNodeID.Value()", value.adminNodeID.Value(), - mTH2CommissionerNodeId.HasValue() ? mTH2CommissionerNodeId.Value() : 112233ULL)); + TH2CommissionerNodeId)); VerifyOrReturn(CheckValueNull("accessControlExtensionChanged.adminPasscodeID", value.adminPasscodeID)); VerifyOrReturn(CheckValue("accessControlExtensionChanged.changeType", value.changeType, 1U)); VerifyOrReturn(CheckValueNonNull("accessControlExtensionChanged.latestValue", value.latestValue)); @@ -5805,12 +5823,18 @@ class Test_TC_ACL_2_7Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Step 2:TH1 reads OperationalCredentials cluster CurrentFabricIndex attribute"); + LogStep(1, "Read the TH1 commissioner node ID"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; + return GetCommissionerNodeId(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "Step 2:TH1 reads OperationalCredentials cluster CurrentFabricIndex attribute"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); } - case 2: { - LogStep(2, "Step 3:TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin node ID N2"); + case 3: { + LogStep(3, "Step 3:TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin node ID N2"); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -5820,28 +5844,34 @@ class Test_TC_ACL_2_7Suite : public TestCommand ); } - case 3: { - LogStep(3, "Step 4:TH2 starts a commissioning process with DUT"); + case 4: { + LogStep(4, "Step 4:TH2 starts a commissioning process with DUT"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } - case 4: { - LogStep(4, "DUT is commissioned by TH2 on Fabric ID2 "); + case 5: { + LogStep(5, "DUT is commissioned by TH2 on Fabric ID2 "); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; return WaitForCommissionee(kIdentityBeta, value); } - case 5: { - LogStep(5, "Step 5:TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute"); + case 6: { + LogStep(6, "Read the TH2 commissioner node ID"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; + return GetCommissionerNodeId(kIdentityBeta, value); + } + case 7: { + LogStep(7, "Step 5:TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, + case 8: { + LogStep(8, "Step 6:TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " "AccessControlExtensionStruct containing 1 element"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -5863,8 +5893,8 @@ class Test_TC_ACL_2_7Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, chip::NullOptional, chip::NullOptional); } - case 7: { - LogStep(7, + case 9: { + LogStep(9, "Step 7:TH2 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " "AccessControlExtensionStruct containing 1 element"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -5892,27 +5922,27 @@ class Test_TC_ACL_2_7Suite : public TestCommand return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, chip::NullOptional, chip::NullOptional); } - case 8: { - LogStep(8, "Step 8:TH1 reads AccessControl cluster Extension attribute"); + case 10: { + LogStep(10, "Step 8:TH1 reads AccessControl cluster Extension attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Step 9:TH2 reads AccessControl cluster Extension attribute"); + case 11: { + LogStep(11, "Step 9:TH2 reads AccessControl cluster Extension attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Step 10:TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); + case 12: { + LogStep(12, "Step 10:TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); VerifyOrDo(!ShouldSkip("ACL.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); mTestSubStepCount = 1; return ReadEvent(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Events::AccessControlExtensionChanged::Id, false, chip::NullOptional); } - case 11: { - LogStep(11, "Step 11:TH2 reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); + case 13: { + LogStep(13, "Step 11:TH2 reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); VerifyOrDo(!ShouldSkip("ACL.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); mTestSubStepCount = 1; return ReadEvent(kIdentityBeta, GetEndpoint(0), AccessControl::Id, @@ -5926,14 +5956,12 @@ class Test_TC_ACL_2_7Suite : public TestCommand class Test_TC_ACL_2_8Suite : public TestCommand { public: - Test_TC_ACL_2_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_8", 12, credsIssuerConfig) + Test_TC_ACL_2_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_8", 14, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("TH1CommissionerNodeId", 0, UINT64_MAX, &mTH1CommissionerNodeId); - AddArgument("TH2CommissionerNodeId", 0, UINT64_MAX, &mTH2CommissionerNodeId); AddArgument("payload", &mPayload); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -5950,12 +5978,12 @@ class Test_TC_ACL_2_8Suite : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mNodeId2; - chip::Optional mTH1CommissionerNodeId; - chip::Optional mTH2CommissionerNodeId; chip::Optional mPayload; chip::Optional mTimeout; + chip::NodeId TH1CommissionerNodeId; uint8_t TH1FabricIndex; + chip::NodeId TH2CommissionerNodeId; uint8_t TH2FabricIndex; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -5977,23 +6005,41 @@ class Test_TC_ACL_2_8Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TH1FabricIndex = value; + TH1CommissionerNodeId = value.nodeId; } + shouldContinue = true; break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + TH1FabricIndex = value; + } 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)); + { + chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + TH2CommissionerNodeId = value.nodeId; + } + shouldContinue = true; + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -6001,13 +6047,13 @@ class Test_TC_ACL_2_8Suite : public TestCommand TH2FabricIndex = value; } break; - case 6: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -6024,8 +6070,7 @@ class Test_TC_ACL_2_8Suite : public TestCommand auto iter_3 = iter_0.GetValue().subjects.Value().begin(); VerifyOrReturn(CheckNextListItemDecodes( "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), - mTH1CommissionerNodeId.HasValue() ? mTH1CommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), TH1CommissionerNodeId)); VerifyOrReturn(CheckNextListItemDecodes( "acl[0].subjects.Value()", iter_3, 1)); VerifyOrReturn(CheckValue("acl[0].subjects.Value()[1]", iter_3.GetValue(), 1111ULL)); @@ -6038,7 +6083,7 @@ class Test_TC_ACL_2_8Suite : public TestCommand } } break; - case 9: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -6055,8 +6100,7 @@ class Test_TC_ACL_2_8Suite : public TestCommand auto iter_3 = iter_0.GetValue().subjects.Value().begin(); VerifyOrReturn(CheckNextListItemDecodes( "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), - mTH2CommissionerNodeId.HasValue() ? mTH2CommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), TH2CommissionerNodeId)); VerifyOrReturn(CheckNextListItemDecodes( "acl[0].subjects.Value()", iter_3, 1)); VerifyOrReturn(CheckValue("acl[0].subjects.Value()[1]", iter_3.GetValue(), 2222ULL)); @@ -6069,7 +6113,7 @@ class Test_TC_ACL_2_8Suite : public TestCommand } } break; - case 10: + case 12: switch (mTestSubStepIndex) { case 0: @@ -6094,8 +6138,7 @@ class Test_TC_ACL_2_8Suite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes( "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 0)); VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().subjects.Value()[0]", - iter_4.GetValue(), - mTH1CommissionerNodeId.HasValue() ? mTH1CommissionerNodeId.Value() : 112233ULL)); + iter_4.GetValue(), TH1CommissionerNodeId)); VerifyOrReturn(CheckNoMoreListItems( "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 1)); } @@ -6114,7 +6157,7 @@ class Test_TC_ACL_2_8Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.adminNodeID", value.adminNodeID)); VerifyOrReturn(CheckValue("accessControlEntryChanged.adminNodeID.Value()", value.adminNodeID.Value(), - mTH1CommissionerNodeId.HasValue() ? mTH1CommissionerNodeId.Value() : 112233ULL)); + TH1CommissionerNodeId)); VerifyOrReturn(CheckValueNull("accessControlEntryChanged.adminPasscodeID", value.adminPasscodeID)); VerifyOrReturn(CheckValue("accessControlEntryChanged.changeType", value.changeType, 2U)); VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue", value.latestValue)); @@ -6129,8 +6172,7 @@ class Test_TC_ACL_2_8Suite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes( "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 0)); VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().subjects.Value()[0]", - iter_4.GetValue(), - mTH1CommissionerNodeId.HasValue() ? mTH1CommissionerNodeId.Value() : 112233ULL)); + iter_4.GetValue(), TH1CommissionerNodeId)); VerifyOrReturn(CheckNoMoreListItems( "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 1)); } @@ -6149,7 +6191,7 @@ class Test_TC_ACL_2_8Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.adminNodeID", value.adminNodeID)); VerifyOrReturn(CheckValue("accessControlEntryChanged.adminNodeID.Value()", value.adminNodeID.Value(), - mTH1CommissionerNodeId.HasValue() ? mTH1CommissionerNodeId.Value() : 112233ULL)); + TH1CommissionerNodeId)); VerifyOrReturn(CheckValueNull("accessControlEntryChanged.adminPasscodeID", value.adminPasscodeID)); VerifyOrReturn(CheckValue("accessControlEntryChanged.changeType", value.changeType, 1U)); VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue", value.latestValue)); @@ -6164,8 +6206,7 @@ class Test_TC_ACL_2_8Suite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes( "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 0)); VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().subjects.Value()[0]", - iter_4.GetValue(), - mTH1CommissionerNodeId.HasValue() ? mTH1CommissionerNodeId.Value() : 112233ULL)); + iter_4.GetValue(), TH1CommissionerNodeId)); VerifyOrReturn(CheckNextListItemDecodes( "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 1)); VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().subjects.Value()[1]", @@ -6186,7 +6227,7 @@ class Test_TC_ACL_2_8Suite : public TestCommand break; } break; - case 11: + case 13: switch (mTestSubStepIndex) { case 0: @@ -6211,8 +6252,7 @@ class Test_TC_ACL_2_8Suite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes( "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 0)); VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().subjects.Value()[0]", - iter_4.GetValue(), - mTH2CommissionerNodeId.HasValue() ? mTH2CommissionerNodeId.Value() : 112233ULL)); + iter_4.GetValue(), TH2CommissionerNodeId)); VerifyOrReturn(CheckNoMoreListItems( "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 1)); } @@ -6231,7 +6271,7 @@ class Test_TC_ACL_2_8Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.adminNodeID", value.adminNodeID)); VerifyOrReturn(CheckValue("accessControlEntryChanged.adminNodeID.Value()", value.adminNodeID.Value(), - mTH2CommissionerNodeId.HasValue() ? mTH2CommissionerNodeId.Value() : 112233ULL)); + TH2CommissionerNodeId)); VerifyOrReturn(CheckValueNull("accessControlEntryChanged.adminPasscodeID", value.adminPasscodeID)); VerifyOrReturn(CheckValue("accessControlEntryChanged.changeType", value.changeType, 2U)); VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue", value.latestValue)); @@ -6246,8 +6286,7 @@ class Test_TC_ACL_2_8Suite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes( "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 0)); VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().subjects.Value()[0]", - iter_4.GetValue(), - mTH2CommissionerNodeId.HasValue() ? mTH2CommissionerNodeId.Value() : 112233ULL)); + iter_4.GetValue(), TH2CommissionerNodeId)); VerifyOrReturn(CheckNoMoreListItems( "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 1)); } @@ -6266,7 +6305,7 @@ class Test_TC_ACL_2_8Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.adminNodeID", value.adminNodeID)); VerifyOrReturn(CheckValue("accessControlEntryChanged.adminNodeID.Value()", value.adminNodeID.Value(), - mTH2CommissionerNodeId.HasValue() ? mTH2CommissionerNodeId.Value() : 112233ULL)); + TH2CommissionerNodeId)); VerifyOrReturn(CheckValueNull("accessControlEntryChanged.adminPasscodeID", value.adminPasscodeID)); VerifyOrReturn(CheckValue("accessControlEntryChanged.changeType", value.changeType, 1U)); VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue", value.latestValue)); @@ -6281,8 +6320,7 @@ class Test_TC_ACL_2_8Suite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes( "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 0)); VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().subjects.Value()[0]", - iter_4.GetValue(), - mTH2CommissionerNodeId.HasValue() ? mTH2CommissionerNodeId.Value() : 112233ULL)); + iter_4.GetValue(), TH2CommissionerNodeId)); VerifyOrReturn(CheckNextListItemDecodes( "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 1)); VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().subjects.Value()[1]", @@ -6326,12 +6364,18 @@ class Test_TC_ACL_2_8Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH1 reads OperationalCredentials cluster CurrentFabricIndex attribute"); + LogStep(1, "Read the TH1 commissioner node ID"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; + return GetCommissionerNodeId(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "TH1 reads OperationalCredentials cluster CurrentFabricIndex attribute"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); } - case 2: { - LogStep(2, "TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin node ID N2"); + case 3: { + LogStep(3, "TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin node ID N2"); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -6341,28 +6385,34 @@ class Test_TC_ACL_2_8Suite : public TestCommand ); } - case 3: { - LogStep(3, "TH2 starts a commissioning process with DUT"); + case 4: { + LogStep(4, "TH2 starts a commissioning process with DUT"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } - case 4: { - LogStep(4, "DUT is commissioned by TH2 on Fabric ID2 "); + case 5: { + LogStep(5, "DUT is commissioned by TH2 on Fabric ID2 "); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; return WaitForCommissionee(kIdentityBeta, value); } - case 5: { - LogStep(5, "TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute"); + case 6: { + LogStep(6, "Read the TH2 commissioner node ID"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; + return GetCommissionerNodeId(kIdentityBeta, value); + } + case 7: { + LogStep(7, "TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 8: { + LogStep(8, "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::DataModel::List value; @@ -6381,8 +6431,8 @@ class Test_TC_ACL_2_8Suite : public TestCommand { auto * listHolder_3 = new ListHolder(2); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mTH1CommissionerNodeId.HasValue() ? mTH1CommissionerNodeId.Value() : 112233ULL; - listHolder_3->mList[1] = 1111ULL; + listHolder_3->mList[0] = TH1CommissionerNodeId; + listHolder_3->mList[1] = 1111ULL; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 2); } listHolder_0->mList[0].targets.SetNull(); @@ -6394,8 +6444,8 @@ class Test_TC_ACL_2_8Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 7: { - LogStep(7, "TH2 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 9: { + LogStep(9, "TH2 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::DataModel::List value; @@ -6414,8 +6464,8 @@ class Test_TC_ACL_2_8Suite : public TestCommand { auto * listHolder_3 = new ListHolder(2); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mTH2CommissionerNodeId.HasValue() ? mTH2CommissionerNodeId.Value() : 112233ULL; - listHolder_3->mList[1] = 2222ULL; + listHolder_3->mList[0] = TH2CommissionerNodeId; + listHolder_3->mList[1] = 2222ULL; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 2); } listHolder_0->mList[0].targets.SetNull(); @@ -6427,27 +6477,27 @@ class Test_TC_ACL_2_8Suite : public TestCommand return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 8: { - LogStep(8, "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 10: { + LogStep(10, "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "TH2 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 11: { + LogStep(11, "TH2 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlEntryChanged event"); + case 12: { + LogStep(12, "TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlEntryChanged event"); VerifyOrDo(!ShouldSkip("ACL.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); mTestSubStepCount = 3; return ReadEvent(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Events::AccessControlEntryChanged::Id, false, chip::NullOptional); } - case 11: { - LogStep(11, "TH2 reads DUT Endpoint 0 AccessControl cluster AccessControlEntryChanged event"); + case 13: { + LogStep(13, "TH2 reads DUT Endpoint 0 AccessControl cluster AccessControlEntryChanged event"); VerifyOrDo(!ShouldSkip("ACL.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); mTestSubStepCount = 3; return ReadEvent(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Events::AccessControlEntryChanged::Id, @@ -6461,13 +6511,12 @@ class Test_TC_ACL_2_8Suite : public TestCommand class Test_TC_ACL_2_9Suite : public TestCommand { public: - Test_TC_ACL_2_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_9", 12, credsIssuerConfig) + Test_TC_ACL_2_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_9", 13, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("CommissionerNodeId", 0, UINT64_MAX, &mCommissionerNodeId); AddArgument("payload", &mPayload); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -6484,10 +6533,10 @@ class Test_TC_ACL_2_9Suite : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mNodeId2; - chip::Optional mCommissionerNodeId; chip::Optional mPayload; chip::Optional mTimeout; + chip::NodeId CommissionerNodeId; uint8_t CurrentFabricIndex; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -6509,16 +6558,22 @@ class Test_TC_ACL_2_9Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - CurrentFabricIndex = value; + CommissionerNodeId = value.nodeId; } + shouldContinue = true; break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + CurrentFabricIndex = value; + } break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); @@ -6530,6 +6585,9 @@ class Test_TC_ACL_2_9Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); break; case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6537,7 +6595,7 @@ class Test_TC_ACL_2_9Suite : public TestCommand VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6545,7 +6603,7 @@ class Test_TC_ACL_2_9Suite : public TestCommand VerifyOrReturn(CheckConstraintMinValue("value", value, 3U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6553,7 +6611,7 @@ class Test_TC_ACL_2_9Suite : public TestCommand VerifyOrReturn(CheckConstraintMinValue("value", value, 3U)); } break; - case 10: + case 11: switch (mTestSubStepIndex) { case 0: @@ -6565,7 +6623,7 @@ class Test_TC_ACL_2_9Suite : public TestCommand break; } break; - case 11: + case 12: switch (mTestSubStepIndex) { case 0: @@ -6600,12 +6658,18 @@ class Test_TC_ACL_2_9Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH1 reads OperationalCredentials cluster CurrentFabricIndex attribute"); + LogStep(1, "Read the commissioner node ID"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; + return GetCommissionerNodeId(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "TH1 reads OperationalCredentials cluster CurrentFabricIndex attribute"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); } - case 2: { - LogStep(2, "Step 2:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 3: { + LogStep(3, "Step 2:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::DataModel::List value; @@ -6624,7 +6688,7 @@ class Test_TC_ACL_2_9Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -6636,14 +6700,14 @@ class Test_TC_ACL_2_9Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 3: { - LogStep(3, "Step 3:TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 4: { + LogStep(4, "Step 3:TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Step 4:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 5: { + LogStep(5, "Step 4:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::DataModel::List value; @@ -6662,7 +6726,7 @@ class Test_TC_ACL_2_9Suite : public TestCommand { auto * listHolder_3 = new ListHolder(1); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mCommissionerNodeId.HasValue() ? mCommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[0] = CommissionerNodeId; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); @@ -6674,14 +6738,14 @@ class Test_TC_ACL_2_9Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 5: { - LogStep(5, "Step 5:TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute"); + case 6: { + LogStep(6, "Step 5:TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Step 6:TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute"); + case 7: { + LogStep(7, "Step 6:TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::DataModel::List value; @@ -6690,33 +6754,33 @@ class Test_TC_ACL_2_9Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, chip::NullOptional, chip::NullOptional); } - case 7: { - LogStep(7, "Step 7:TH1 reads DUT Endpoint 0 AccessControl cluster SubjectsPerAccessControlEntry attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "Step 7:TH1 reads DUT Endpoint 0 AccessControl cluster SubjectsPerAccessControlEntry attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::SubjectsPerAccessControlEntry::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Step 8:TH1 reads DUT Endpoint 0 AccessControl cluster TargetsPerAccessControlEntry attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "Step 8:TH1 reads DUT Endpoint 0 AccessControl cluster TargetsPerAccessControlEntry attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::TargetsPerAccessControlEntry::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Step 9:TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlEntriesPerFabric attribute"); - VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 10: { + LogStep(10, "Step 9:TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlEntriesPerFabric attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::AccessControlEntriesPerFabric::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlEntryChanged event"); + case 11: { + LogStep(11, "TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlEntryChanged event"); VerifyOrDo(!ShouldSkip("ACL.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); mTestSubStepCount = 1; return ReadEvent(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Events::AccessControlEntryChanged::Id, false, chip::NullOptional); } - case 11: { - LogStep(11, "TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); + case 12: { + LogStep(12, "TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); VerifyOrDo(!ShouldSkip("ACL.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); mTestSubStepCount = 1; return ReadEvent(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, @@ -6730,14 +6794,12 @@ class Test_TC_ACL_2_9Suite : public TestCommand class Test_TC_ACL_2_10Suite : public TestCommand { public: - Test_TC_ACL_2_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_10", 23, credsIssuerConfig) + Test_TC_ACL_2_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_10", 25, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("TH1CommissionerNodeId", 0, UINT64_MAX, &mTH1CommissionerNodeId); - AddArgument("TH2CommissionerNodeId", 0, UINT64_MAX, &mTH2CommissionerNodeId); AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); AddArgument("payload", &mPayload); AddArgument("D_OK_EMPTY", &mDOkEmpty); @@ -6757,15 +6819,15 @@ class Test_TC_ACL_2_10Suite : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mNodeId2; - chip::Optional mTH1CommissionerNodeId; - chip::Optional mTH2CommissionerNodeId; chip::Optional mDiscriminator; chip::Optional mPayload; chip::Optional mDOkEmpty; chip::Optional mDOkSingle; chip::Optional mTimeout; + chip::NodeId TH1CommissionerNodeId; uint8_t TH1FabricIndex; + chip::NodeId TH2CommissionerNodeId; uint8_t TH2FabricIndex; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -6787,17 +6849,22 @@ class Test_TC_ACL_2_10Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TH1FabricIndex = value; + TH1CommissionerNodeId = value.nodeId; } + shouldContinue = true; break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + TH1FabricIndex = value; + } 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)); @@ -6805,17 +6872,24 @@ class Test_TC_ACL_2_10Suite : public TestCommand break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - TH2FabricIndex = value; - } + shouldContinue = true; break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + TH2CommissionerNodeId = value.nodeId; + } + shouldContinue = true; break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + TH2FabricIndex = value; + } break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -6825,11 +6899,9 @@ class Test_TC_ACL_2_10Suite : public TestCommand 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)); @@ -6841,8 +6913,16 @@ class Test_TC_ACL_2_10Suite : public TestCommand break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -6860,7 +6940,7 @@ class Test_TC_ACL_2_10Suite : public TestCommand } } break; - case 16: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -6877,8 +6957,7 @@ class Test_TC_ACL_2_10Suite : public TestCommand auto iter_3 = iter_0.GetValue().subjects.Value().begin(); VerifyOrReturn(CheckNextListItemDecodes( "acl[0].subjects.Value()", iter_3, 0)); - VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), - mTH2CommissionerNodeId.HasValue() ? mTH2CommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), TH2CommissionerNodeId)); VerifyOrReturn(CheckNextListItemDecodes( "acl[0].subjects.Value()", iter_3, 1)); VerifyOrReturn(CheckValue("acl[0].subjects.Value()[1]", iter_3.GetValue(), 2222ULL)); @@ -6905,24 +6984,24 @@ class Test_TC_ACL_2_10Suite : public TestCommand } } break; - case 17: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 18: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 19: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); } break; - case 20: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 21: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -6940,7 +7019,7 @@ class Test_TC_ACL_2_10Suite : public TestCommand } } break; - case 22: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -6967,12 +7046,18 @@ class Test_TC_ACL_2_10Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Step 2:TH1 reads OperationalCredentials cluster CurrentFabricIndex attribute"); + LogStep(1, "Read the TH1 commissioner node ID"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; + return GetCommissionerNodeId(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "Step 2:TH1 reads OperationalCredentials cluster CurrentFabricIndex attribute"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); } - case 2: { - LogStep(2, "Step 3:TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin node ID N2"); + case 3: { + LogStep(3, "Step 3:TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin node ID N2"); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -6982,28 +7067,34 @@ class Test_TC_ACL_2_10Suite : public TestCommand ); } - case 3: { - LogStep(3, "TH2 starts a commissioning process with DUT"); + case 4: { + LogStep(4, "TH2 starts a commissioning process with DUT"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } - case 4: { - LogStep(4, "DUT is commissioned by TH2 on Fabric ID2 "); + case 5: { + LogStep(5, "DUT is commissioned by TH2 on Fabric ID2 "); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; return WaitForCommissionee(kIdentityBeta, value); } - case 5: { - LogStep(5, "Step 4:TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute"); + case 6: { + LogStep(6, "Read the TH2 commissioner node ID"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; + return GetCommissionerNodeId(kIdentityBeta, value); + } + case 7: { + LogStep(7, "Step 4:TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Step 5:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 8: { + LogStep(8, "Step 5:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::DataModel::List value; @@ -7022,8 +7113,8 @@ class Test_TC_ACL_2_10Suite : public TestCommand { auto * listHolder_3 = new ListHolder(2); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mTH1CommissionerNodeId.HasValue() ? mTH1CommissionerNodeId.Value() : 112233ULL; - listHolder_3->mList[1] = 1111ULL; + listHolder_3->mList[0] = TH1CommissionerNodeId; + listHolder_3->mList[1] = 1111ULL; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 2); } listHolder_0->mList[0].targets.SetNull(); @@ -7050,8 +7141,8 @@ class Test_TC_ACL_2_10Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 7: { - LogStep(7, "Step 6:TH2 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 9: { + LogStep(9, "Step 6:TH2 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::DataModel::List value; @@ -7070,8 +7161,8 @@ class Test_TC_ACL_2_10Suite : public TestCommand { auto * listHolder_3 = new ListHolder(2); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mTH2CommissionerNodeId.HasValue() ? mTH2CommissionerNodeId.Value() : 112233ULL; - listHolder_3->mList[1] = 2222ULL; + listHolder_3->mList[0] = TH2CommissionerNodeId; + listHolder_3->mList[1] = 2222ULL; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 2); } listHolder_0->mList[0].targets.SetNull(); @@ -7098,8 +7189,8 @@ class Test_TC_ACL_2_10Suite : public TestCommand return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 8: { - LogStep(8, + case 10: { + LogStep(10, "Step 7:TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " "AccessControlExtensionStruct containing 1 element 1.struct, Data field: D_OK_EMPTY"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -7121,8 +7212,8 @@ class Test_TC_ACL_2_10Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, chip::NullOptional, chip::NullOptional); } - case 9: { - LogStep(9, + case 11: { + LogStep(11, "Step 8:TH2 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " "AccessControlExtensionStruct containing 1 element 1.struct, Data field: D_OK_SINGLE"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -7150,15 +7241,15 @@ class Test_TC_ACL_2_10Suite : public TestCommand return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, chip::NullOptional, chip::NullOptional); } - case 10: { - LogStep(10, "Step 9: Reboot DUT"); + case 12: { + LogStep(12, "Step 9: Reboot DUT"); VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot(kIdentityAlpha, value); } - case 11: { - LogStep(11, "Step 9: Reboot DUT"); + case 13: { + LogStep(13, "Step 9: Reboot DUT"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -7168,22 +7259,22 @@ class Test_TC_ACL_2_10Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 12: { - LogStep(12, "TH1 Connects to the device again"); + case 14: { + LogStep(14, "TH1 Connects to the device again"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } - case 13: { - LogStep(13, "TH2 Connects to the device again"); + case 15: { + LogStep(15, "TH2 Connects to the device again"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; return WaitForCommissionee(kIdentityBeta, value); } - case 14: { - LogStep(14, "Step 10:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 16: { + LogStep(16, "Step 10:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::DataModel::List value; @@ -7202,8 +7293,8 @@ class Test_TC_ACL_2_10Suite : public TestCommand { auto * listHolder_3 = new ListHolder(2); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mTH1CommissionerNodeId.HasValue() ? mTH1CommissionerNodeId.Value() : 112233ULL; - listHolder_3->mList[1] = 1111ULL; + listHolder_3->mList[0] = TH1CommissionerNodeId; + listHolder_3->mList[1] = 1111ULL; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 2); } listHolder_0->mList[0].targets.SetNull(); @@ -7230,22 +7321,22 @@ class Test_TC_ACL_2_10Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 15: { - LogStep(15, + case 17: { + LogStep(17, "Step 11:TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " "AccessControlExtensionStruct containing 1 element"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Step 12:TH2 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 18: { + LogStep(18, "Step 12:TH2 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Step 13:TH2 reads DUT Endpoint 0 AccessControl cluster Extension attribute"); + case 19: { + LogStep(19, "Step 13:TH2 reads DUT Endpoint 0 AccessControl cluster Extension attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::DataModel::List value; @@ -7271,8 +7362,8 @@ class Test_TC_ACL_2_10Suite : public TestCommand return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, chip::NullOptional, chip::NullOptional); } - case 18: { - LogStep(18, "Step 14: If DUT is an app on host, examine persistent storage in /tmp/chip_kvs text file"); + case 20: { + LogStep(20, "Step 14: If DUT is an app on host, examine persistent storage in /tmp/chip_kvs text file"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -7281,8 +7372,8 @@ class Test_TC_ACL_2_10Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 19: { - LogStep(19, "Step 15:TH1 removes fabric F2 from DUT"); + case 21: { + LogStep(21, "Step 15:TH1 removes fabric F2 from DUT"); VerifyOrDo(!ShouldSkip("OPCREDS.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; @@ -7293,8 +7384,8 @@ class Test_TC_ACL_2_10Suite : public TestCommand ); } - case 20: { - LogStep(20, "Step 16:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 22: { + LogStep(22, "Step 16:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::DataModel::List value; @@ -7313,8 +7404,8 @@ class Test_TC_ACL_2_10Suite : public TestCommand { auto * listHolder_3 = new ListHolder(2); listFreer.add(listHolder_3); - listHolder_3->mList[0] = mTH1CommissionerNodeId.HasValue() ? mTH1CommissionerNodeId.Value() : 112233ULL; - listHolder_3->mList[1] = 1111ULL; + listHolder_3->mList[0] = TH1CommissionerNodeId; + listHolder_3->mList[1] = 1111ULL; listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 2); } listHolder_0->mList[0].targets.SetNull(); @@ -7341,16 +7432,16 @@ class Test_TC_ACL_2_10Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 21: { - LogStep(21, + case 23: { + LogStep(23, "Step 17:TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " "AccessControlExtensionStruct containing 1 element"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Step 18: If DUT is an app on host, examine persistent storage in /tmp/chip_kvs text file"); + case 24: { + LogStep(24, "Step 18: If DUT is an app on host, examine persistent storage in /tmp/chip_kvs text file"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -92935,61 +93026,6 @@ class Test_TC_CGEN_2_2Suite : public TestCommand } }; -class Test_TC_CGEN_2_4Suite : public TestCommand -{ -public: - Test_TC_CGEN_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_4", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CGEN_2_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - class Test_TC_DGGEN_2_2Suite : public TestCommand { public: @@ -113392,7 +113428,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), diff --git a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h index d843a18fefd79d..5e3bae14d80d99 100644 --- a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h @@ -1415,7 +1415,7 @@ class Test_TC_PSCFG_3_1_SimulatedSuite : public TestCommand class Test_TC_RH_3_1_SimulatedSuite : public TestCommand { public: - Test_TC_RH_3_1_SimulatedSuite() : TestCommand("Test_TC_RH_3_1_Simulated", 5) + Test_TC_RH_3_1_SimulatedSuite() : TestCommand("Test_TC_RH_3_1_Simulated", 8) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -1447,6 +1447,18 @@ class Test_TC_RH_3_1_SimulatedSuite : public TestCommand 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)); } @@ -1488,6 +1500,41 @@ class Test_TC_RH_3_1_SimulatedSuite : public TestCommand return WaitAttribute(GetEndpoint(0), RelativeHumidityMeasurement::Id, RelativeHumidityMeasurement::Attributes::Tolerance::Id); } + case 5: { + LogStep(5, + "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " + "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " + "DUT to TH again"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 6: { + LogStep(6, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 7: { + LogStep(7, + "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " + "specific order"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + 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/placeholder/app2/zap-generated/test/Commands.h b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h index d843a18fefd79d..5e3bae14d80d99 100644 --- a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h @@ -1415,7 +1415,7 @@ class Test_TC_PSCFG_3_1_SimulatedSuite : public TestCommand class Test_TC_RH_3_1_SimulatedSuite : public TestCommand { public: - Test_TC_RH_3_1_SimulatedSuite() : TestCommand("Test_TC_RH_3_1_Simulated", 5) + Test_TC_RH_3_1_SimulatedSuite() : TestCommand("Test_TC_RH_3_1_Simulated", 8) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -1447,6 +1447,18 @@ class Test_TC_RH_3_1_SimulatedSuite : public TestCommand 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)); } @@ -1488,6 +1500,41 @@ class Test_TC_RH_3_1_SimulatedSuite : public TestCommand return WaitAttribute(GetEndpoint(0), RelativeHumidityMeasurement::Id, RelativeHumidityMeasurement::Attributes::Tolerance::Id); } + case 5: { + LogStep(5, + "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " + "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " + "DUT to TH again"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 6: { + LogStep(6, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 7: { + LogStep(7, + "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " + "specific order"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } } return CHIP_NO_ERROR; }