diff --git a/examples/darwin-framework-tool/templates/tests/ciTests.json b/examples/darwin-framework-tool/templates/tests/ciTests.json index 77f97d3ce7e0a3..18819d7ccec204 100644 --- a/examples/darwin-framework-tool/templates/tests/ciTests.json +++ b/examples/darwin-framework-tool/templates/tests/ciTests.json @@ -27,6 +27,7 @@ "Test_TC_TSTAT_2_2", "Test_TC_ACL_2_4", "Test_TC_ACL_2_7", + "Test_TC_ACL_2_8", "Test_TC_ACL_2_9" ] } diff --git a/examples/placeholder/linux/apps/app1/ciTests.json b/examples/placeholder/linux/apps/app1/ciTests.json index 368eb2c968d052..2cea929d311392 100644 --- a/examples/placeholder/linux/apps/app1/ciTests.json +++ b/examples/placeholder/linux/apps/app1/ciTests.json @@ -5,11 +5,8 @@ "Test_TC_BOOL_3_1_Simulated", "Test_TC_DESC_2_2_Simulated", "Test_TC_DGETH_3_1_Simulated", - "Test_TC_DGETH_3_2_Simulated", "Test_TC_DGSW_3_1_Simulated", - "Test_TC_DGSW_3_2_Simulated", "Test_TC_DGWIFI_3_1_Simulated", - "Test_TC_DGWIFI_3_2_Simulated", "Test_TC_FLW_3_1_Simulated", "Test_TC_G_3_1_Simulated", "Test_TC_I_3_1_Simulated", @@ -24,7 +21,8 @@ "Test_TC_LUNIT_2_1_Simulated", "Test_TC_OCC_2_2_Simulated", "Test_TC_OCC_2_4_Simulated", - "Test_TC_ULABEL_3_1_Simulated" + "Test_TC_ULABEL_3_1_Simulated", + "Test_TC_FLABEL_3_1_Simulated" ], "collection": ["Test"] } 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 6d6b3c30baa66c..2df5382e156e70 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 @@ -11,380 +11,261 @@ # 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: 129.2.8. [TC-ACL-2.8] ACL multi-fabric +name: 133.2.3. [TC-ACL-2.8] Extension attribute PICS: - ACL.S config: nodeId: 0x12344321 - cluster: "Basic Information" + cluster: "Access Control" endpoint: 0 + 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" tests: - - label: "Pre-Conditions" - verification: | - 1.N1 is the node ID of TH1 - - 2 .N2 is the node ID of TH2 - disabled: true - - - label: "TH1 commissions DUT using admin node ID N1" - verification: | - DUT is commissioned on TH1 fabric - disabled: true + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: - "TH1 reads DUT Endpoint 0 OperationalCredentials cluster - CurrentFabricIndex attribute" - verification: | - ./chip-tool operationalcredentials read current-fabric-index 1 0 - - On TH1(Chiptool), verify CurrentFabricIndex attribute of operationalCredential cluster as 1 - - [1656588171.078880][3260:3265] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 1776815488 - [1656588171.078952][3260:3265] CHIP:TOO: CurrentFabricIndex: 1 - [1656588171.079037][3260:3265] CHIP:EM: Sending Standalone Ack for MessageCounter:260718042 on exchange 36423i - disabled: true + "TH1 reads OperationalCredentials cluster CurrentFabricIndex attribute" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: TH1FabricIndex - label: "TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin node ID N2" - verification: | - Open a commissioning window On TH1(Chiptool)using below command - - ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 - - [1657186324.710951][10820:10825] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 - [1657186324.710980][10820:10825] CHIP:CTL: Successfully opened pairing window On TH(Chiptool)e device - [1657186324.711048][10820:10825] CHIP:CTL: Manual pairing code: [36253605617] - [1657186324.711108][10820:10825] CHIP:CTL: SetupQRCode: [MT:-24J0IRV01A7TB7E700] - - - Commission TH2(Chiptool) to DUT using manualcode generated in TH1 using open commission window - - ./chip-tool pairing code 2 36253605617 --commissioner-name beta --commissioner-nodeid 223344 - - [1657186359.584672][3509:3514] CHIP:CTL: Successfully finished commissioning step "Cleanup" - [1657186359.584743][3509:3514] CHIP:TOO: Device commissioning completed with success - disabled: true + cluster: "Administrator Commissioning" + command: "OpenBasicCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + + - label: "TH2 starts a commissioning process with DUT" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload + + - label: "DUT is commissioned by TH2 on Fabric ID2 " + identity: "beta" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId2 - label: - "TH2 reads DUT Endpoint 0 OperationalCredentials cluster - CurrentFabricIndex attribute" - verification: | - ./chip-tool operationalcredentials read current-fabric-index 2 0 --commissioner-nodeid 223344 --commissioner-name beta - - On TH2(Chiptool),verify CurrentFabricIndex attribute of operationalCredential cluster as 2 - - 1658747098.843523][3024:3029] CHIP:DMG: }, - [1658747098.843552][3024:3029] CHIP:DMG: - [1658747098.843575][3024:3029] CHIP:DMG: ], - [1658747098.843604][3024:3029] CHIP:DMG: - [1658747098.843628][3024:3029] CHIP:DMG: SuppressResponse = true, - [1658747098.843653][3024:3029] CHIP:DMG: InteractionModelRevision = 1 - [1658747098.843676][3024:3029] CHIP:DMG: } - [1658747098.843805][3024:3029] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 2815046656 - [1658747098.846044][3024:3029] CHIP:TOO: CurrentFabricIndex: 2 - [1658747098.846131][3024:3029] CHIP:EM: Sending Standalone Ack for MessageCounter:263449390 on exchange 10738i - [1658747098.846202][3024:3029] CHIP:IN: Prepared secure message 0xffffb67cd9e8 to 0x0000000000000002 (2) of type 0x10 and protocolId (0, 0) on exchange 10738i with MessageCounter:175421270. - [1658747098.846282][3024:3029] CHIP:IN: Sending encrypted msg 0xffffb67cd9e8 with MessageCounter:175421270 to 0x0000000000000002 (2) at monotonic time: 00000000009FA528 msec - disabled: true - - - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 1 element 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1, 1111] Targets field: null" + "TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute" + identity: "beta" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: TH2FabricIndex + + - label: "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233,1111], "targets":null}]' 1 0 - - On TH1(Chiptool), verify AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing 1 element - - [1657286416.461279][4737:4742] CHIP:DMG: { - [1657286416.461307][4737:4742] CHIP:DMG: AttributeStatusIBs = - [1657286416.461345][4737:4742] CHIP:DMG: [ - [1657286416.461375][4737:4742] CHIP:DMG: AttributeStatusIB = - [1657286416.461409][4737:4742] CHIP:DMG: { - [1657286416.461441][4737:4742] CHIP:DMG: AttributePathIB = - [1657286416.461479][4737:4742] CHIP:DMG: { - [1657286416.461517][4737:4742] CHIP:DMG: Endpoint = 0x0, - [1657286416.461559][4737:4742] CHIP:DMG: Cluster = 0x1f, - [1657286416.461599][4737:4742] CHIP:DMG: Attribute = 0x0000_0000, - [1657286416.461657][4737:4742] CHIP:DMG: } - [1657286416.461741][4737:4742] CHIP:DMG: - [1657286416.461814][4737:4742] CHIP:DMG: StatusIB = - [1657286416.461879][4737:4742] CHIP:DMG: { - [1657286416.461945][4737:4742] CHIP:DMG: status = 0x00 (SUCCESS), - [1657286416.462017][4737:4742] CHIP:DMG: }, - [1657286416.462081][4737:4742] CHIP:DMG: - [1657286416.462134][4737:4742] CHIP:DMG: }, - [1657286416.462207][4737:4742] CHIP:DMG: - [1657286416.462258][4737:4742] CHIP:DMG: AttributeStatusIB = - [1657286416.462314][4737:4742] CHIP:DMG: { - [1657286416.462368][4737:4742] CHIP:DMG: AttributePathIB = - [1657286416.462430][4737:4742] CHIP:DMG: { - [1657286416.462495][4737:4742] CHIP:DMG: Endpoint = 0x0, - [1657286416.462565][4737:4742] CHIP:DMG: Cluster = 0x1f, - [1657286416.462640][4737:4742] CHIP:DMG: Attribute = 0x0000_0000, - [1657286416.462715][4737:4742] CHIP:DMG: ListIndex = Null, - [1657286416.462779][4737:4742] CHIP:DMG: } - [1657286416.462849][4737:4742] CHIP:DMG: - [1657286416.462910][4737:4742] CHIP:DMG: StatusIB = - [1657286416.462972][4737:4742] CHIP:DMG: { - [1657286416.463036][4737:4742] CHIP:DMG: status = 0x00 (SUCCESS), - [1657286416.463101][4737:4742] CHIP:DMG: }, - [1657286416.463164][4737:4742] CHIP:DMG: - [1657286416.463216][4737:4742] CHIP:DMG: }, - [1657286416.463277][4737:4742] CHIP:DMG: - [1657286416.463326][4737:4742] CHIP:DMG: ], - [1657286416.463394][4737:4742] CHIP:DMG: - [1657286416.463447][4737:4742] CHIP:DMG: InteractionModelRevision = 1 - [1657286416.463495][4737:4742] CHIP:DMG: } - [1657286416.463687][4737:4742] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1657286416.463785][4737:4742] CHIP:EM: Sending Standalone Ack for MessageCounter:171860790 on exchange 42820i - disabled: true - - - label: - "TH2 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 1 element 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N2, 2222] Targets field: null" + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [TH1CommissionerNodeId, 1111], + Targets: null, + FabricIndex: TH1FabricIndex, + }, + ] + + - label: "TH2 writes DUT Endpoint 0 AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [223344,2222], "targets":null}]' 2 0 --commissioner-nodeid 223344 --commissioner-name beta - On TH2(Chiptool), verify AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 1 element - - - [1658747124.117113][3031:3036] CHIP:DMG: { - [1658747124.117163][3031:3036] CHIP:DMG: AttributeStatusIBs = - [1658747124.117214][3031:3036] CHIP:DMG: [ - [1658747124.117269][3031:3036] CHIP:DMG: AttributeStatusIB = - [1658747124.117317][3031:3036] CHIP:DMG: { - [1658747124.117377][3031:3036] CHIP:DMG: AttributePathIB = - [1658747124.117434][3031:3036] CHIP:DMG: { - [1658747124.117488][3031:3036] CHIP:DMG: Endpoint = 0x0, - [1658747124.117548][3031:3036] CHIP:DMG: Cluster = 0x1f, - [1658747124.117602][3031:3036] CHIP:DMG: Attribute = 0x0000_0000, - [1658747124.117657][3031:3036] CHIP:DMG: } - [1658747124.117715][3031:3036] CHIP:DMG: - [1658747124.117764][3031:3036] CHIP:DMG: StatusIB = - [1658747124.117814][3031:3036] CHIP:DMG: { - [1658747124.117866][3031:3036] CHIP:DMG: status = 0x00 (SUCCESS), - [1658747124.117921][3031:3036] CHIP:DMG: }, - [1658747124.117972][3031:3036] CHIP:DMG: - [1658747124.118016][3031:3036] CHIP:DMG: }, - [1658747124.118077][3031:3036] CHIP:DMG: - [1658747124.118116][3031:3036] CHIP:DMG: AttributeStatusIB = - [1658747124.118161][3031:3036] CHIP:DMG: { - [1658747124.118205][3031:3036] CHIP:DMG: AttributePathIB = - [1658747124.118285][3031:3036] CHIP:DMG: { - [1658747124.118340][3031:3036] CHIP:DMG: Endpoint = 0x0, - [1658747124.118394][3031:3036] CHIP:DMG: Cluster = 0x1f, - [1658747124.118453][3031:3036] CHIP:DMG: Attribute = 0x0000_0000, - [1658747124.118505][3031:3036] CHIP:DMG: ListIndex = Null, - [1658747124.118555][3031:3036] CHIP:DMG: } - [1658747124.118609][3031:3036] CHIP:DMG: - [1658747124.118658][3031:3036] CHIP:DMG: StatusIB = - [1658747124.118707][3031:3036] CHIP:DMG: { - [1658747124.118757][3031:3036] CHIP:DMG: status = 0x00 (SUCCESS), - [1658747124.118810][3031:3036] CHIP:DMG: }, - [1658747124.118861][3031:3036] CHIP:DMG: - [1658747124.118904][3031:3036] CHIP:DMG: }, - [1658747124.118954][3031:3036] CHIP:DMG: - [1658747124.118992][3031:3036] CHIP:DMG: ], - [1658747124.119044][3031:3036] CHIP:DMG: - [1658747124.119082][3031:3036] CHIP:DMG: InteractionModelRevision = 1 - [1658747124.119119][3031:3036] CHIP:DMG: } - [1658747124.119272][3031:3036] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658747124.119359][3031:3036] CHIP:EM: Sending Standalone Ack for MessageCounter:33509818 on exchange 38117i - [1658747124.119446][3031:3036] CHIP:IN: Prepared secure message 0xffff7a7cd9e8 to 0x0000000000000002 (2) of type 0x10 and protocolId (0, 0) on exchange 38117i with MessageCounter:75755402. - [1658747124.119505][3031:3036] CHIP:IN: Sending encrypted msg 0xffff7a7cd9e8 with MessageCounter:7575 - disabled: true + identity: "beta" + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [TH2CommissionerNodeId, 2222], + Targets: null, + FabricIndex: TH2FabricIndex, + }, + ] - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read acl 1 0 - - On TH1(Chiptool), verify AccessControlEntryStruct containing 1 element, and MUST NOT contain an element with FabricIndex F2 - [1657286432.997319][4745:4751] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3308562949 - [1657286432.997655][4745:4751] CHIP:TOO: ACL: 1 entries - [1657286432.997727][4745:4751] CHIP:TOO: [1]: { - [1657286432.997774][4745:4751] CHIP:TOO: Privilege: 5 - [1657286432.997802][4745:4751] CHIP:TOO: AuthMode: 2 - [1657286432.997834][4745:4751] CHIP:TOO: Subjects: 2 entries - [1657286432.997867][4745:4751] CHIP:TOO: [1]: 112233 - [1657286432.997896][4745:4751] CHIP:TOO: [2]: 1111 - [1657286432.997925][4745:4751] CHIP:TOO: Targets: null - [1657286432.997950][4745:4751] CHIP:TOO: FabricIndex: 1 - [1657286432.997976][4745:4751] CHIP:TOO: } - disabled: true + command: "readAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [TH1CommissionerNodeId, 1111], + Targets: null, + FabricIndex: TH1FabricIndex, + }, + ] - label: "TH2 reads DUT Endpoint 0 AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read acl 2 0 --commissioner-name beta --commissioner-nodeid 223344 - - On TH2(Chiptool), verify AccessControlEntryStruct containing 1 element, and MUST NOT contain an element with FabricIndex F1 - - [1661407263.740571][2355:2360] CHIP:DMG: SuppressResponse = true, - [1661407263.740605][2355:2360] CHIP:DMG: InteractionModelRevision = 1 - [1661407263.740640][2355:2360] CHIP:DMG: } - [1661407263.741000][2355:2360] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 2445703657 - [1661407263.741100][2355:2360] CHIP:TOO: ACL: 1 entries - [1661407263.741165][2355:2360] CHIP:TOO: [1]: { - [1661407263.741222][2355:2360] CHIP:TOO: Privilege: 5 - [1661407263.741260][2355:2360] CHIP:TOO: AuthMode: 2 - [1661407263.741409][2355:2360] CHIP:TOO: Subjects: 2 entries - [1661407263.741453][2355:2360] CHIP:TOO: [1]: 223344 - [1661407263.741487][2355:2360] CHIP:TOO: [2]: 2222 - [1661407263.741518][2355:2360] CHIP:TOO: Targets: null - [1661407263.741553][2355:2360] CHIP:TOO: FabricIndex: 2 - [1661407263.741587][2355:2360] CHIP:TOO: } - disabled: true + identity: "beta" + command: "readAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [TH2CommissionerNodeId, 2222], + Targets: null, + FabricIndex: TH2FabricIndex, + }, + ] - label: "TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlEntryChanged event" PICS: ACL.S.E00 - verification: | - ./chip-tool accesscontrol read-event access-control-entry-changed 1 0 - On TH1(Chiptool), verify AccessControl cluster AccessControlEntryChanged containing 3 elements, and MUST NOT contain any element with FabricIndex F2 - - - 1661355674.033284][10375:10380] CHIP:DMG: - [1661355674.033304][10375:10380] CHIP:DMG: SuppressResponse = true, - [1661355674.033323][10375:10380] CHIP:DMG: InteractionModelRevision = 1 - [1661355674.033341][10375:10380] CHIP:DMG: } - [1661355674.033748][10375:10380] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 - [1661355674.033771][10375:10380] CHIP:TOO: Event number: 3 - [1661355674.033788][10375:10380] CHIP:TOO: Priority: Info - [1661355674.033804][10375:10380] CHIP:TOO: Timestamp: 23234824 - [1661355674.033906][10375:10380] CHIP:TOO: AccessControlEntryChanged: { - [1661355674.033942][10375:10380] CHIP:TOO: AdminNodeID: null - [1661355674.033966][10375:10380] CHIP:TOO: AdminPasscodeID: 0 - [1661355674.033988][10375:10380] CHIP:TOO: ChangeType: 1 - [1661355674.034009][10375:10380] CHIP:TOO: LatestValue: { - [1661355674.034030][10375:10380] CHIP:TOO: Privilege: 5 - [1661355674.034052][10375:10380] CHIP:TOO: AuthMode: 2 - [1661355674.034078][10375:10380] CHIP:TOO: Subjects: 1 entries - [1661355674.034106][10375:10380] CHIP:TOO: [1]: 112233 - [1661355674.034129][10375:10380] CHIP:TOO: Targets: null - [1661355674.034155][10375:10380] CHIP:TOO: FabricIndex: 1 - [1661355674.034180][10375:10380] CHIP:TOO: } - [1661355674.034206][10375:10380] CHIP:TOO: FabricIndex: 1 - [1661355674.034230][10375:10380] CHIP:TOO: } - [1661355674.034369][10375:10380] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 - [1661355674.034385][10375:10380] CHIP:TOO: Event number: 5 - [1661355674.034400][10375:10380] CHIP:TOO: Priority: Info - [1661355674.034413][10375:10380] CHIP:TOO: Timestamp: 23346775 - [1661355674.034449][10375:10380] CHIP:TOO: AccessControlEntryChanged: { - [1661355674.034467][10375:10380] CHIP:TOO: AdminNodeID: 112233 - [1661355674.034483][10375:10380] CHIP:TOO: AdminPasscodeID: null - [1661355674.034499][10375:10380] CHIP:TOO: ChangeType: 2 - [1661355674.034514][10375:10380] CHIP:TOO: LatestValue: { - [1661355674.034529][10375:10380] CHIP:TOO: Privilege: 5 - [1661355674.034544][10375:10380] CHIP:TOO: AuthMode: 2 - [1661355674.034561][10375:10380] CHIP:TOO: Subjects: 1 entries - [1661355674.034579][10375:10380] CHIP:TOO: [1]: 112233 - [1661355674.034595][10375:10380] CHIP:TOO: Targets: null - [1661355674.034611][10375:10380] CHIP:TOO: FabricIndex: 1 - [1661355674.034625][10375:10380] CHIP:TOO: } - [1661355674.034640][10375:10380] CHIP:TOO: FabricIndex: 1 - [1661355674.034654][10375:10380] CHIP:TOO: } - [1661355674.034789][10375:10380] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 - [1661355674.034805][10375:10380] CHIP:TOO: Event number: 6 - [1661355674.034819][10375:10380] CHIP:TOO: Priority: Info - [1661355674.034832][10375:10380] CHIP:TOO: Timestamp: 23346777 - [1661355674.034862][10375:10380] CHIP:TOO: AccessControlEntryChanged: { - [1661355674.034879][10375:10380] CHIP:TOO: AdminNodeID: 112233 - [1661355674.034894][10375:10380] CHIP:TOO: AdminPasscodeID: null - [1661355674.034909][10375:10380] CHIP:TOO: ChangeType: 1 - [1661355674.034923][10375:10380] CHIP:TOO: LatestValue: { - [1661355674.034938][10375:10380] CHIP:TOO: Privilege: 5 - [1661355674.034952][10375:10380] CHIP:TOO: AuthMode: 2 - [1661355674.034970][10375:10380] CHIP:TOO: Subjects: 2 entries - [1661355674.034988][10375:10380] CHIP:TOO: [1]: 112233 - [1661355674.035005][10375:10380] CHIP:TOO: [2]: 1111 - [1661355674.035020][10375:10380] CHIP:TOO: Targets: null - [1661355674.035035][10375:10380] CHIP:TOO: FabricIndex: 1 - [1661355674.035049][10375:10380] CHIP:TOO: } - [1661355674.035064][10375:10380] CHIP:TOO: FabricIndex: 1 - [1661355674.035078][10375:10380] CHIP:TOO: } - disabled: true + command: "readEvent" + event: "AccessControlEntryChanged" + response: + - values: + - value: + { + AdminNodeID: null, + AdminPasscodeID: 0, + ChangeType: 1, + LatestValue: + { + Privilege: "5", + AuthMode: "2", + Subjects: [TH1CommissionerNodeId], + Targets: null, + FabricIndex: TH1FabricIndex, + }, + FabricIndex: TH1FabricIndex, + } + - values: + - value: + { + AdminNodeID: TH1CommissionerNodeId, + AdminPasscodeID: null, + ChangeType: 2, + LatestValue: + { + Privilege: "5", + AuthMode: "2", + Subjects: [TH1CommissionerNodeId], + Targets: null, + FabricIndex: TH1FabricIndex, + }, + FabricIndex: TH1FabricIndex, + } + - values: + - value: + { + AdminNodeID: TH1CommissionerNodeId, + AdminPasscodeID: null, + ChangeType: 1, + LatestValue: + { + Privilege: "5", + AuthMode: "2", + Subjects: [TH1CommissionerNodeId, 1111], + Targets: null, + FabricIndex: TH1FabricIndex, + }, + FabricIndex: TH1FabricIndex, + } - label: "TH2 reads DUT Endpoint 0 AccessControl cluster AccessControlEntryChanged event" PICS: ACL.S.E00 - verification: | - ./chip-tool accesscontrol read-event access-control-entry-changed 2 0 --commissioner-name beta --commissioner-nodeid 223344 - - On TH2(Chiptool), verify AccessControl cluster AccessControlEntryChanged containing 3 elements, and MUST NOT contain any element with FabricIndex F1 - - - - [1661354915.731697][4136:4141] CHIP:DMG: - [1661354915.731730][4136:4141] CHIP:DMG: SuppressResponse = true, - [1661354915.731759][4136:4141] CHIP:DMG: InteractionModelRevision = 1 - [1661354915.731790][4136:4141] CHIP:DMG: } - [1661354915.732074][4136:4141] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 - [1661354915.732104][4136:4141] CHIP:TOO: Event number: 4 - [1661354915.732133][4136:4141] CHIP:TOO: Priority: Info - [1661354915.732159][4136:4141] CHIP:TOO: Timestamp: 22322302 - [1661354915.732291][4136:4141] CHIP:TOO: AccessControlEntryChanged: { - [1661354915.732328][4136:4141] CHIP:TOO: AdminNodeID: null - [1661354915.732374][4136:4141] CHIP:TOO: AdminPasscodeID: 0 - [1661354915.732423][4136:4141] CHIP:TOO: ChangeType: 1 - [1661354915.732456][4136:4141] CHIP:TOO: LatestValue: { - [1661354915.732486][4136:4141] CHIP:TOO: Privilege: 5 - [1661354915.732516][4136:4141] CHIP:TOO: AuthMode: 2 - [1661354915.732554][4136:4141] CHIP:TOO: Subjects: 1 entries - [1661354915.732593][4136:4141] CHIP:TOO: [1]: 223344 - [1661354915.732625][4136:4141] CHIP:TOO: Targets: null - [1661354915.732658][4136:4141] CHIP:TOO: FabricIndex: 2 - [1661354915.732688][4136:4141] CHIP:TOO: } - [1661354915.732720][4136:4141] CHIP:TOO: FabricIndex: 2 - [1661354915.732749][4136:4141] CHIP:TOO: } - [1661354915.732896][4136:4141] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 - [1661354915.732929][4136:4141] CHIP:TOO: Event number: 9 - [1661354915.732955][4136:4141] CHIP:TOO: Priority: Info - [1661354915.732980][4136:4141] CHIP:TOO: Timestamp: 22566955 - [1661354915.733031][4136:4141] CHIP:TOO: AccessControlEntryChanged: { - [1661354915.733065][4136:4141] CHIP:TOO: AdminNodeID: 223344 - [1661354915.733097][4136:4141] CHIP:TOO: AdminPasscodeID: null - [1661354915.733128][4136:4141] CHIP:TOO: ChangeType: 2 - [1661354915.733158][4136:4141] CHIP:TOO: LatestValue: { - [1661354915.733187][4136:4141] CHIP:TOO: Privilege: 5 - [1661354915.733219][4136:4141] CHIP:TOO: AuthMode: 2 - [1661354915.733252][4136:4141] CHIP:TOO: Subjects: 1 entries - [1661354915.733287][4136:4141] CHIP:TOO: [1]: 223344 - [1661354915.733319][4136:4141] CHIP:TOO: Targets: null - [1661354915.733349][4136:4141] CHIP:TOO: FabricIndex: 2 - [1661354915.733379][4136:4141] CHIP:TOO: } - [1661354915.733408][4136:4141] CHIP:TOO: FabricIndex: 2 - [1661354915.733437][4136:4141] CHIP:TOO: } - [1661354915.733578][4136:4141] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Event 0x0000_0000 - [1661354915.733610][4136:4141] CHIP:TOO: Event number: 10 - [1661354915.733637][4136:4141] CHIP:TOO: Priority: Info - [1661354915.733662][4136:4141] CHIP:TOO: Timestamp: 22566957 - [1661354915.733709][4136:4141] CHIP:TOO: AccessControlEntryChanged: { - [1661354915.733743][4136:4141] CHIP:TOO: AdminNodeID: 223344 - [1661354915.733772][4136:4141] CHIP:TOO: AdminPasscodeID: null - [1661354915.733803][4136:4141] CHIP:TOO: ChangeType: 1 - [1661354915.733833][4136:4141] CHIP:TOO: LatestValue: { - [1661354915.733863][4136:4141] CHIP:TOO: Privilege: 5 - [1661354915.733891][4136:4141] CHIP:TOO: AuthMode: 2 - [1661354915.733923][4136:4141] CHIP:TOO: Subjects: 2 entries - [1661354915.733957][4136:4141] CHIP:TOO: [1]: 223344 - [1661354915.733991][4136:4141] CHIP:TOO: [2]: 2222 - [1661354915.734018][4136:4141] CHIP:TOO: Targets: null - [1661354915.734048][4136:4141] CHIP:TOO: FabricIndex: 2 - [1661354915.734077][4136:4141] CHIP:TOO: } - [1661354915.734107][4136:4141] CHIP:TOO: FabricIndex: 2 - [1661354915.734136][4136:4141] CHIP:TOO: } - disabled: true + identity: "beta" + command: "readEvent" + event: "AccessControlEntryChanged" + response: + - values: + - value: + { + AdminNodeID: null, + AdminPasscodeID: 0, + ChangeType: 1, + LatestValue: + { + Privilege: "5", + AuthMode: "2", + Subjects: [TH2CommissionerNodeId], + Targets: null, + FabricIndex: TH2FabricIndex, + }, + FabricIndex: TH2FabricIndex, + } + - values: + - value: + { + AdminNodeID: TH2CommissionerNodeId, + AdminPasscodeID: null, + ChangeType: 2, + LatestValue: + { + Privilege: "5", + AuthMode: "2", + Subjects: [TH2CommissionerNodeId], + Targets: null, + FabricIndex: TH2FabricIndex, + }, + FabricIndex: TH2FabricIndex, + } + - values: + - value: + { + AdminNodeID: TH2CommissionerNodeId, + AdminPasscodeID: null, + ChangeType: 1, + LatestValue: + { + Privilege: "5", + AuthMode: "2", + Subjects: [TH2CommissionerNodeId, 2222], + Targets: null, + FabricIndex: TH2FabricIndex, + }, + FabricIndex: TH2FabricIndex, + } diff --git a/src/app/tests/suites/certification/Test_TC_DGETH_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DGETH_3_2.yaml new file mode 100644 index 00000000000000..fa4014112b76cb --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DGETH_3_2.yaml @@ -0,0 +1,70 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: 3.3.2. [TC-DGETH-3.2] Command Generated {DUT_Client}] + +PICS: + - DGETH.C + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + + - label: "Commission TH to DUT" + verification: | + + disabled: true + + - label: "DUT sends ResetCounts to TH." + PICS: DGETH.C.C00.Tx + verification: | + Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) + + ./chip-tool ethernetnetworkdiagnostics reset-counts 1 0 + + Verify Command data recieved from running the below command is a success on TH(all-clusters-app) Log + + [1659960382.148753][4826:4826] CHIP:DMG: InvokeRequestMessage = + [1659960382.148777][4826:4826] CHIP:DMG: { + [1659960382.148798][4826:4826] CHIP:DMG: suppressResponse = false, + [1659960382.148822][4826:4826] CHIP:DMG: timedRequest = false, + [1659960382.148856][4826:4826] CHIP:DMG: InvokeRequests = + [1659960382.148889][4826:4826] CHIP:DMG: [ + [1659960382.148921][4826:4826] CHIP:DMG: CommandDataIB = + [1659960382.148948][4826:4826] CHIP:DMG: { + [1659960382.148981][4826:4826] CHIP:DMG: CommandPathIB = + [1659960382.149013][4826:4826] CHIP:DMG: { + [1659960382.149051][4826:4826] CHIP:DMG: EndpointId = 0x0, + [1659960382.149081][4826:4826] CHIP:DMG: ClusterId = 0x37, + [1659960382.149119][4826:4826] CHIP:DMG: CommandId = 0x0, + [1659960382.149149][4826:4826] CHIP:DMG: }, + [1659960382.149178][4826:4826] CHIP:DMG: + [1659960382.149212][4826:4826] CHIP:DMG: CommandFields = + [1659960382.149239][4826:4826] CHIP:DMG: { + [1659960382.149276][4826:4826] CHIP:DMG: }, + [1659960382.149302][4826:4826] CHIP:DMG: }, + [1659960382.149337][4826:4826] CHIP:DMG: + [1659960382.149358][4826:4826] CHIP:DMG: ], + [1659960382.149392][4826:4826] CHIP:DMG: + [1659960382.149413][4826:4826] CHIP:DMG: InteractionModelRevision = 1 + [1659960382.149433][4826:4826] CHIP:DMG: }, + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DGETH_3_2_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_DGETH_3_2_Simulated.yaml deleted file mode 100644 index 8f9fec3dc82f91..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DGETH_3_2_Simulated.yaml +++ /dev/null @@ -1,32 +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. - -name: 47.3.2. [TC-DGETH-3.2] Command Generated DUT as Client] - -PICS: - - DGETH.C - -config: - nodeId: 0x12344321 - cluster: "Ethernet Network Diagnostics" - endpoint: 0 - -tests: - - label: "Wait for the device to be commissioned" - cluster: "DelayCommands" - command: "WaitForCommissioning" - - - label: "DUT sends ResetCounts to TH" - PICS: DGETH.C.C00.Tx - wait: "ResetCounts" diff --git a/src/app/tests/suites/certification/Test_TC_DGSW_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DGSW_3_2.yaml new file mode 100644 index 00000000000000..496b7a6229d0c9 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DGSW_3_2.yaml @@ -0,0 +1,120 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: 3.3.2. [TC-DGSW-3.2] Commands Generated [{DUT_Client}] + +PICS: + - DGSW.C + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + + - label: "Commission TH to DUT" + verification: | + + disabled: true + + - label: "DUT sends ResetWatermarks to TH." + PICS: DGSW.C.C00.Tx + verification: | + ./chip-tool softwarediagnostics reset-watermarks 1 0 + + Verify the success response on TH(all-clusters-app) Log: + + [1666950895.120765][5367:5367] CHIP:EM: Handling via exchange: 21122r, Delegate: 0xaaaac4ce0288 + [1666950895.120930][5367:5367] CHIP:DMG: InvokeRequestMessage = + [1666950895.121022][5367:5367] CHIP:DMG: { + [1666950895.121081][5367:5367] CHIP:DMG: suppressResponse = false, + [1666950895.121148][5367:5367] CHIP:DMG: timedRequest = false, + [1666950895.121232][5367:5367] CHIP:DMG: InvokeRequests = + [1666950895.121311][5367:5367] CHIP:DMG: [ + [1666950895.121394][5367:5367] CHIP:DMG: CommandDataIB = + [1666950895.121481][5367:5367] CHIP:DMG: { + [1666950895.121584][5367:5367] CHIP:DMG: CommandPathIB = + [1666950895.121675][5367:5367] CHIP:DMG: { + [1666950895.121777][5367:5367] CHIP:DMG: EndpointId = 0x0, + [1666950895.121870][5367:5367] CHIP:DMG: ClusterId = 0x34, + [1666950895.121985][5367:5367] CHIP:DMG: CommandId = 0x0, + [1666950895.122066][5367:5367] CHIP:DMG: }, + [1666950895.122174][5367:5367] CHIP:DMG: + [1666950895.122247][5367:5367] CHIP:DMG: CommandFields = + [1666950895.122356][5367:5367] CHIP:DMG: { + [1666950895.122443][5367:5367] CHIP:DMG: }, + [1666950895.122550][5367:5367] CHIP:DMG: }, + [1666950895.122631][5367:5367] CHIP:DMG: + [1666950895.122744][5367:5367] CHIP:DMG: ], + [1666950895.122824][5367:5367] CHIP:DMG: + [1666950895.122913][5367:5367] CHIP:DMG: InteractionModelRevision = 1 + [1666950895.122978][5367:5367] CHIP:DMG: }, + [1666950895.123150][5367:5367] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0034 e=0 p=o + [1666950895.123234][5367:5367] CHIP:DMG: AccessControl: allowed + [1666950895.123326][5367:5367] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_0034 Command=0x0000_0000 + [1666950895.123421][5367:5367] CHIP:DMG: Command handler moving to [ Preparing] + [1666950895.123520][5367:5367] CHIP:DMG: Command handler moving to [AddingComm] + [1666950895.123586][5367:5367] CHIP:DMG: Command handler moving to [AddedComma] + [1666950895.123697][5367:5367] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 + [1666950895.124253][5367:5367] CHIP:EM: <<< [E:21122r M:53749270 (Ack:215040220)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:09 (IM:InvokeCommandResponse) + [1666950895.124353][5367:5367] CHIP:IN: (S) Sending msg 53749270 on secure session with LSID: 41627 + [1666950895.125043][5367:5367] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:43984 | 53749270 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 7655 / Exchange = 21122] + [1666950895.125300][5367:5367] CHIP:DMG: Header Flags = + [1666950895.125360][5367:5367] CHIP:DMG: { + [1666950895.125474][5367:5367] CHIP:DMG: Exchange (0x06) = + [1666950895.125533][5367:5367] CHIP:DMG: { + [1666950895.125592][5367:5367] CHIP:DMG: AckMsg = 215040220 + [1666950895.125670][5367:5367] CHIP:DMG: NeedsAck = true + [1666950895.125728][5367:5367] CHIP:DMG: } + [1666950895.125801][5367:5367] CHIP:DMG: } + [1666950895.125881][5367:5367] CHIP:DMG: + [1666950895.125949][5367:5367] CHIP:DMG: Encrypted Payload (67 bytes) = + [1666950895.126029][5367:5367] CHIP:DMG: { + [1666950895.126086][5367:5367] CHIP:DMG: data = 00e71d001626340381eb47b7c924c57eb20842e6809b145878249948f15f820ef8edeb3aab5886a560d141b458fddda64b7a1d8caec61fd9ad1f223049490f6b8d9160 + [1666950895.126144][5367:5367] CHIP:DMG: buffer_ptr = 187650549874176 + [1666950895.126198][5367:5367] CHIP:DMG: } + [1666950895.126251][5367:5367] CHIP:DMG: + [1666950895.126421][5367:5367] CHIP:DMG: InvokeResponseMessage = + [1666950895.126509][5367:5367] CHIP:DMG: { + [1666950895.126569][5367:5367] CHIP:DMG: suppressResponse = false, + [1666950895.126638][5367:5367] CHIP:DMG: InvokeResponseIBs = + [1666950895.126768][5367:5367] CHIP:DMG: [ + [1666950895.126840][5367:5367] CHIP:DMG: InvokeResponseIB = + [1666950895.126960][5367:5367] CHIP:DMG: { + [1666950895.127033][5367:5367] CHIP:DMG: CommandStatusIB = + [1666950895.127147][5367:5367] CHIP:DMG: { + [1666950895.127226][5367:5367] CHIP:DMG: CommandPathIB = + [1666950895.127333][5367:5367] CHIP:DMG: { + [1666950895.127429][5367:5367] CHIP:DMG: EndpointId = 0x0, + [1666950895.127715][5367:5367] CHIP:DMG: ClusterId = 0x34, + [1666950895.127833][5367:5367] CHIP:DMG: CommandId = 0x0, + [1666950895.127928][5367:5367] CHIP:DMG: }, + [1666950895.128044][5367:5367] CHIP:DMG: + [1666950895.128127][5367:5367] CHIP:DMG: StatusIB = + [1666950895.128212][5367:5367] CHIP:DMG: { + [1666950895.128331][5367:5367] CHIP:DMG: status = 0x00 (SUCCESS), + [1666950895.128449][5367:5367] CHIP:DMG: }, + [1666950895.128544][5367:5367] CHIP:DMG: + [1666950895.128644][5367:5367] CHIP:DMG: }, + [1666950895.128741][5367:5367] CHIP:DMG: + [1666950895.128833][5367:5367] CHIP:DMG: }, + [1666950895.128918][5367:5367] CHIP:DMG: + [1666950895.129000][5367:5367] CHIP:DMG: ], + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DGSW_3_2_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_DGSW_3_2_Simulated.yaml deleted file mode 100644 index 221e0a80ab17a1..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DGSW_3_2_Simulated.yaml +++ /dev/null @@ -1,32 +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. - -name: 44.3.2. [TC-DGSW-3.2] Commands Generated [DUT as Client] - -PICS: - - DGSW.C - -config: - nodeId: 0x12344321 - cluster: "Software Diagnostics" - endpoint: 0 - -tests: - - label: "Wait for the device to be commissioned" - cluster: "DelayCommands" - command: "WaitForCommissioning" - - - label: "DUT sends ResetWatermarks to TH" - PICS: DGSW.C.C00.Tx - wait: "ResetWatermarks" diff --git a/src/app/tests/suites/certification/Test_TC_DGWIFI_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DGWIFI_3_2.yaml new file mode 100644 index 00000000000000..0fe5432d7624ea --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DGWIFI_3_2.yaml @@ -0,0 +1,121 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: 3.2.2. [TC-DGWIFI-3.2]Command Generated [DUT as Client] + +PICS: + - DGWIFI.C + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + + - label: "Commission TH to DUT" + verification: | + + disabled: true + + - label: "DUT sends ResetCounts command to TH" + PICS: DGWIFI.S.C00.Rsp + verification: | + ./chip-tool wifinetworkdiagnostics reset-counts 1 0 + + verify the " success response" for ResetCounts command on the TH (all-cluster-app) log: + + [1666959400.011236][6130:6130] CHIP:EM: Handling via exchange: 33250r, Delegate: 0xaaaad6e20288 + [1666959400.011383][6130:6130] CHIP:DMG: InvokeRequestMessage = + [1666959400.011452][6130:6130] CHIP:DMG: { + [1666959400.011511][6130:6130] CHIP:DMG: suppressResponse = false, + [1666959400.011579][6130:6130] CHIP:DMG: timedRequest = false, + [1666959400.011641][6130:6130] CHIP:DMG: InvokeRequests = + [1666959400.011720][6130:6130] CHIP:DMG: [ + [1666959400.011783][6130:6130] CHIP:DMG: CommandDataIB = + [1666959400.011853][6130:6130] CHIP:DMG: { + [1666959400.011984][6130:6130] CHIP:DMG: CommandPathIB = + [1666959400.012114][6130:6130] CHIP:DMG: { + [1666959400.012196][6130:6130] CHIP:DMG: EndpointId = 0x0, + [1666959400.012334][6130:6130] CHIP:DMG: ClusterId = 0x36, + [1666959400.012471][6130:6130] CHIP:DMG: CommandId = 0x0, + [1666959400.012601][6130:6130] CHIP:DMG: }, + [1666959400.012739][6130:6130] CHIP:DMG: + [1666959400.012810][6130:6130] CHIP:DMG: CommandFields = + [1666959400.012938][6130:6130] CHIP:DMG: { + [1666959400.013016][6130:6130] CHIP:DMG: }, + [1666959400.013134][6130:6130] CHIP:DMG: }, + [1666959400.013215][6130:6130] CHIP:DMG: + [1666959400.013277][6130:6130] CHIP:DMG: ], + [1666959400.013353][6130:6130] CHIP:DMG: + [1666959400.013416][6130:6130] CHIP:DMG: InteractionModelRevision = 1 + [1666959400.013476][6130:6130] CHIP:DMG: }, + [1666959400.013621][6130:6130] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0036 e=0 p=o + [1666959400.013704][6130:6130] CHIP:DMG: AccessControl: allowed + [1666959400.013774][6130:6130] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_0036 Command=0x0000_0000 + [1666959400.018281][6130:6130] CHIP:DL: Found the primary WiFi interface:wlan0 + [1666959400.018419][6130:6130] CHIP:DMG: Command handler moving to [ Preparing] + [1666959400.018494][6130:6130] CHIP:DMG: Command handler moving to [AddingComm] + [1666959400.018562][6130:6130] CHIP:DMG: Command handler moving to [AddedComma] + [1666959400.018675][6130:6130] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 + [1666959400.019314][6130:6130] CHIP:EM: <<< [E:33250r M:63255960 (Ack:74829349)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:09 (IM:InvokeCommandResponse) + [1666959400.019427][6130:6130] CHIP:IN: (S) Sending msg 63255960 on secure session with LSID: 44736 + [1666959400.020094][6130:6130] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:38143 | 63255960 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 63986 / Exchange = 33250] + [1666959400.020191][6130:6130] CHIP:DMG: Header Flags = + [1666959400.020249][6130:6130] CHIP:DMG: { + [1666959400.020335][6130:6130] CHIP:DMG: Exchange (0x06) = + [1666959400.020391][6130:6130] CHIP:DMG: { + [1666959400.020451][6130:6130] CHIP:DMG: AckMsg = 74829349 + [1666959400.020507][6130:6130] CHIP:DMG: NeedsAck = true + [1666959400.020574][6130:6130] CHIP:DMG: } + [1666959400.020643][6130:6130] CHIP:DMG: } + [1666959400.020699][6130:6130] CHIP:DMG: + [1666959400.020767][6130:6130] CHIP:DMG: Encrypted Payload (67 bytes) = + [1666959400.020823][6130:6130] CHIP:DMG: { + [1666959400.020878][6130:6130] CHIP:DMG: data = 00f2f9009835c50387f400a6ef13a28b3b46eb5a99745448df633531de072463f12d56a3f096824b82a3a409c494841c55a558a7ee3c8e94775c4495b700db3bc9f22a + [1666959400.020937][6130:6130] CHIP:DMG: buffer_ptr = 187651201115584 + [1666959400.020992][6130:6130] CHIP:DMG: } + [1666959400.021044][6130:6130] CHIP:DMG: + [1666959400.021196][6130:6130] CHIP:DMG: InvokeResponseMessage = + [1666959400.021264][6130:6130] CHIP:DMG: { + [1666959400.021323][6130:6130] CHIP:DMG: suppressResponse = false, + [1666959400.021385][6130:6130] CHIP:DMG: InvokeResponseIBs = + [1666959400.021463][6130:6130] CHIP:DMG: [ + [1666959400.021525][6130:6130] CHIP:DMG: InvokeResponseIB = + [1666959400.021769][6130:6130] CHIP:DMG: { + [1666959400.021841][6130:6130] CHIP:DMG: CommandStatusIB = + [1666959400.021930][6130:6130] CHIP:DMG: { + [1666959400.022009][6130:6130] CHIP:DMG: CommandPathIB = + [1666959400.022091][6130:6130] CHIP:DMG: { + [1666959400.022179][6130:6130] CHIP:DMG: EndpointId = 0x0, + [1666959400.022270][6130:6130] CHIP:DMG: ClusterId = 0x36, + [1666959400.022358][6130:6130] CHIP:DMG: CommandId = 0x0, + [1666959400.022442][6130:6130] CHIP:DMG: }, + [1666959400.022535][6130:6130] CHIP:DMG: + [1666959400.022612][6130:6130] CHIP:DMG: StatusIB = + [1666959400.022697][6130:6130] CHIP:DMG: { + [1666959400.022843][6130:6130] CHIP:DMG: status = 0x00 (SUCCESS), + [1666959400.022930][6130:6130] CHIP:DMG: }, + [1666959400.023016][6130:6130] CHIP:DMG: + [1666959400.023091][6130:6130] CHIP:DMG: }, + [1666959400.023185][6130:6130] CHIP:DMG: + [1666959400.023256][6130:6130] CHIP:DMG: }, + [1666959400.023338][6130:6130] CHIP:DMG: + [1666959400.023400][6130:6130] CHIP:DMG: ], + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DGWIFI_3_2_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_DGWIFI_3_2_Simulated.yaml deleted file mode 100644 index 9da6957d7982f5..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DGWIFI_3_2_Simulated.yaml +++ /dev/null @@ -1,32 +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. - -name: 53.3.2. [TC-DGWIFI-3.2] Command Generated [DUT as Client] - -PICS: - - DGWIFI.C - -config: - nodeId: 0x12344321 - cluster: "WiFi Network Diagnostics" - endpoint: 0 - -tests: - - label: "Wait for the device to be commissioned" - cluster: "DelayCommands" - command: "WaitForCommissioning" - - - label: "DUT sends ResetCounts command to TH" - PICS: DGTHREAD.C.C00.Tx - wait: "ResetCounts" diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index 77542393e3a746..b216318b9dc1ee 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -7,6 +7,7 @@ "Test_TC_ACL_2_3", "Test_TC_ACL_2_4", "Test_TC_ACL_2_7", + "Test_TC_ACL_2_8", "Test_TC_ACL_2_9" ], "BooleanState": ["Test_TC_BOOL_1_1", "Test_TC_BOOL_2_1"], diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index 6e27e68f41a6b3..9f3d106abe2137 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -235,9 +235,11 @@ "SoftwareDiagnostics": [ "Test_TC_DGSW_2_1", "Test_TC_DGSW_2_2", - "Test_TC_DGSW_2_3" + "Test_TC_DGSW_2_3", + "Test_TC_DGSW_3_2" ], - "WiFiNetworkDiagnostics": ["Test_TC_DGWIFI_2_2"], + "EthernetNetworkDiagnostics": ["Test_TC_DGETH_3_2"], + "WiFiNetworkDiagnostics": ["Test_TC_DGWIFI_2_2", "Test_TC_DGWIFI_3_2"], "WindowCovering": ["Test_TC_WNCV_6_1", "Test_TC_WNCV_7_1"], "FlowMeasurement": ["Test_TC_FLW_2_2"], "OccupancySensing": ["Test_TC_OCC_3_1"], @@ -297,12 +299,7 @@ "Test_TC_S_3_1" ], "PumpConfigurationControl": ["Test_TC_PCC_3_1"], - "AccessControl": [ - "Test_TC_ACL_2_5", - "Test_TC_ACL_2_6", - "Test_TC_ACL_2_8", - "Test_TC_ACL_2_10" - ], + "AccessControl": ["Test_TC_ACL_2_5", "Test_TC_ACL_2_6", "Test_TC_ACL_2_10"], "UserLabel": [], "BridgedDeviceBasicInformation": [ "Test_TC_BRBINFO_2_2", @@ -318,6 +315,7 @@ "DeviceManagement", "DiagnosticsLogs", "Descriptor", + "EthernetNetworkDiagnostics", "GeneralCommissioning", "GeneralDiagnostics", "Identify", diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index bb16d6ddd82251..e4bc58cac8faff 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -42,6 +42,7 @@ class TestList : public Command printf("Test_TC_ACL_2_3\n"); printf("Test_TC_ACL_2_4\n"); printf("Test_TC_ACL_2_7\n"); + printf("Test_TC_ACL_2_8\n"); printf("Test_TC_ACL_2_9\n"); printf("Test_TC_BOOL_1_1\n"); printf("Test_TC_BOOL_2_1\n"); @@ -365,6 +366,7 @@ class ManualTestList : public Command printf("Test_TC_DLOG_2_2\n"); printf("Test_TC_DLOG_3_1\n"); 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"); @@ -489,7 +491,9 @@ class ManualTestList : public Command printf("Test_TC_DGSW_2_1\n"); printf("Test_TC_DGSW_2_2\n"); printf("Test_TC_DGSW_2_3\n"); + printf("Test_TC_DGSW_3_2\n"); printf("Test_TC_DGWIFI_2_2\n"); + printf("Test_TC_DGWIFI_3_2\n"); printf("Test_TC_WNCV_6_1\n"); printf("Test_TC_WNCV_7_1\n"); printf("Test_TC_FLW_2_2\n"); @@ -552,7 +556,6 @@ class ManualTestList : public Command printf("Test_TC_PCC_3_1\n"); printf("Test_TC_ACL_2_5\n"); printf("Test_TC_ACL_2_6\n"); - printf("Test_TC_ACL_2_8\n"); printf("Test_TC_ACL_2_10\n"); printf("Test_TC_BRBINFO_2_2\n"); printf("Test_TC_BRBINFO_2_3\n"); @@ -5986,6 +5989,511 @@ 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) + { + 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); + } + + ~Test_TC_ACL_2_8Suite() {} + + 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 mNodeId2; + chip::Optional mTH1CommissionerNodeId; + chip::Optional mTH2CommissionerNodeId; + chip::Optional mPayload; + chip::Optional mTimeout; + + uint8_t TH1FabricIndex; + uint8_t TH2FabricIndex; + + 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 + { + + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + TH1FabricIndex = value; + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + 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)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + TH2FabricIndex = value; + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } + break; + case 10: + switch (mTestSubStepIndex) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::AccessControl::Events::AccessControlEntryChanged::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueNull("accessControlEntryChanged.adminNodeID", value.adminNodeID)); + VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.adminPasscodeID", value.adminPasscodeID)); + VerifyOrReturn( + CheckValue("accessControlEntryChanged.adminPasscodeID.Value()", value.adminPasscodeID.Value(), 0U)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.changeType", value.changeType, 1U)); + VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue", value.latestValue)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().privilege", + value.latestValue.Value().privilege, 5U)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().authMode", + value.latestValue.Value().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue.Value().subjects", + value.latestValue.Value().subjects)); + { + auto iter_4 = value.latestValue.Value().subjects.Value().begin(); + 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)); + VerifyOrReturn(CheckNoMoreListItems( + "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 1)); + } + VerifyOrReturn( + CheckValueNull("accessControlEntryChanged.latestValue.Value().targets", value.latestValue.Value().targets)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().fabricIndex", + value.latestValue.Value().fabricIndex, TH1FabricIndex)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.fabricIndex", value.fabricIndex, TH1FabricIndex)); + } + mTestSubStepIndex++; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::AccessControl::Events::AccessControlEntryChanged::DecodableType value; + 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)); + VerifyOrReturn(CheckValueNull("accessControlEntryChanged.adminPasscodeID", value.adminPasscodeID)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.changeType", value.changeType, 2U)); + VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue", value.latestValue)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().privilege", + value.latestValue.Value().privilege, 5U)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().authMode", + value.latestValue.Value().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue.Value().subjects", + value.latestValue.Value().subjects)); + { + auto iter_4 = value.latestValue.Value().subjects.Value().begin(); + 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)); + VerifyOrReturn(CheckNoMoreListItems( + "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 1)); + } + VerifyOrReturn( + CheckValueNull("accessControlEntryChanged.latestValue.Value().targets", value.latestValue.Value().targets)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().fabricIndex", + value.latestValue.Value().fabricIndex, TH1FabricIndex)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.fabricIndex", value.fabricIndex, TH1FabricIndex)); + } + mTestSubStepIndex++; + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::AccessControl::Events::AccessControlEntryChanged::DecodableType value; + 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)); + VerifyOrReturn(CheckValueNull("accessControlEntryChanged.adminPasscodeID", value.adminPasscodeID)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.changeType", value.changeType, 1U)); + VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue", value.latestValue)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().privilege", + value.latestValue.Value().privilege, 5U)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().authMode", + value.latestValue.Value().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue.Value().subjects", + value.latestValue.Value().subjects)); + { + auto iter_4 = value.latestValue.Value().subjects.Value().begin(); + 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)); + VerifyOrReturn(CheckNextListItemDecodes( + "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 1)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().subjects.Value()[1]", + iter_4.GetValue(), 1111ULL)); + VerifyOrReturn(CheckNoMoreListItems( + "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 2)); + } + VerifyOrReturn( + CheckValueNull("accessControlEntryChanged.latestValue.Value().targets", value.latestValue.Value().targets)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().fabricIndex", + value.latestValue.Value().fabricIndex, TH1FabricIndex)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.fabricIndex", value.fabricIndex, TH1FabricIndex)); + } + mTestSubStepIndex++; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + break; + } + break; + case 11: + switch (mTestSubStepIndex) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::AccessControl::Events::AccessControlEntryChanged::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueNull("accessControlEntryChanged.adminNodeID", value.adminNodeID)); + VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.adminPasscodeID", value.adminPasscodeID)); + VerifyOrReturn( + CheckValue("accessControlEntryChanged.adminPasscodeID.Value()", value.adminPasscodeID.Value(), 0U)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.changeType", value.changeType, 1U)); + VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue", value.latestValue)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().privilege", + value.latestValue.Value().privilege, 5U)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().authMode", + value.latestValue.Value().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue.Value().subjects", + value.latestValue.Value().subjects)); + { + auto iter_4 = value.latestValue.Value().subjects.Value().begin(); + 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)); + VerifyOrReturn(CheckNoMoreListItems( + "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 1)); + } + VerifyOrReturn( + CheckValueNull("accessControlEntryChanged.latestValue.Value().targets", value.latestValue.Value().targets)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().fabricIndex", + value.latestValue.Value().fabricIndex, TH2FabricIndex)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.fabricIndex", value.fabricIndex, TH2FabricIndex)); + } + mTestSubStepIndex++; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::AccessControl::Events::AccessControlEntryChanged::DecodableType value; + 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)); + VerifyOrReturn(CheckValueNull("accessControlEntryChanged.adminPasscodeID", value.adminPasscodeID)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.changeType", value.changeType, 2U)); + VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue", value.latestValue)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().privilege", + value.latestValue.Value().privilege, 5U)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().authMode", + value.latestValue.Value().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue.Value().subjects", + value.latestValue.Value().subjects)); + { + auto iter_4 = value.latestValue.Value().subjects.Value().begin(); + 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)); + VerifyOrReturn(CheckNoMoreListItems( + "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 1)); + } + VerifyOrReturn( + CheckValueNull("accessControlEntryChanged.latestValue.Value().targets", value.latestValue.Value().targets)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().fabricIndex", + value.latestValue.Value().fabricIndex, TH2FabricIndex)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.fabricIndex", value.fabricIndex, TH2FabricIndex)); + } + mTestSubStepIndex++; + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::AccessControl::Events::AccessControlEntryChanged::DecodableType value; + 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)); + VerifyOrReturn(CheckValueNull("accessControlEntryChanged.adminPasscodeID", value.adminPasscodeID)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.changeType", value.changeType, 1U)); + VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue", value.latestValue)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().privilege", + value.latestValue.Value().privilege, 5U)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().authMode", + value.latestValue.Value().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("accessControlEntryChanged.latestValue.Value().subjects", + value.latestValue.Value().subjects)); + { + auto iter_4 = value.latestValue.Value().subjects.Value().begin(); + 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)); + VerifyOrReturn(CheckNextListItemDecodes( + "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 1)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().subjects.Value()[1]", + iter_4.GetValue(), 2222ULL)); + VerifyOrReturn(CheckNoMoreListItems( + "accessControlEntryChanged.latestValue.Value().subjects.Value()", iter_4, 2)); + } + VerifyOrReturn( + CheckValueNull("accessControlEntryChanged.latestValue.Value().targets", value.latestValue.Value().targets)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.latestValue.Value().fabricIndex", + value.latestValue.Value().fabricIndex, TH2FabricIndex)); + VerifyOrReturn(CheckValue("accessControlEntryChanged.fabricIndex", value.fabricIndex, TH2FabricIndex)); + } + mTestSubStepIndex++; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + break; + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "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"); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 3: { + LogStep(3, "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 "); + 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"); + 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"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + 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_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 2); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = TH1FabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 1); + } + 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"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + 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_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 2); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = TH2FabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 1); + } + 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"); + 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"); + 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"); + 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"); + VerifyOrDo(!ShouldSkip("ACL.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + mTestSubStepCount = 3; + return ReadEvent(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Events::AccessControlEntryChanged::Id, + false, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_ACL_2_9Suite : public TestCommand { public: @@ -92590,10 +93098,79 @@ class Test_TC_CNET_4_16Suite : public TestCommand } }; -class Test_TC_CNET_4_17Suite : public TestCommand +class Test_TC_CNET_4_17Suite : public TestCommand +{ +public: + Test_TC_CNET_4_17Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_17", 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_CNET_4_17Suite() {} + + 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 + { + + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + + 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; + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_CNET_4_18Suite : public TestCommand { public: - Test_TC_CNET_4_17Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_17", 0, credsIssuerConfig) + Test_TC_CNET_4_18Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_18", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -92601,7 +93178,7 @@ class Test_TC_CNET_4_17Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_17Suite() {} + ~Test_TC_CNET_4_18Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -92659,10 +93236,10 @@ class Test_TC_CNET_4_17Suite : public TestCommand } }; -class Test_TC_CNET_4_18Suite : public TestCommand +class Test_TC_CNET_4_19Suite : public TestCommand { public: - Test_TC_CNET_4_18Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_18", 0, credsIssuerConfig) + Test_TC_CNET_4_19Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_19", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -92670,7 +93247,7 @@ class Test_TC_CNET_4_18Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_18Suite() {} + ~Test_TC_CNET_4_19Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -92728,10 +93305,10 @@ class Test_TC_CNET_4_18Suite : public TestCommand } }; -class Test_TC_CNET_4_19Suite : public TestCommand +class Test_TC_CNET_4_20Suite : public TestCommand { public: - Test_TC_CNET_4_19Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_19", 0, credsIssuerConfig) + Test_TC_CNET_4_20Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_20", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -92739,7 +93316,7 @@ class Test_TC_CNET_4_19Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_19Suite() {} + ~Test_TC_CNET_4_20Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -92797,10 +93374,10 @@ class Test_TC_CNET_4_19Suite : public TestCommand } }; -class Test_TC_CNET_4_20Suite : public TestCommand +class Test_TC_CNET_4_21Suite : public TestCommand { public: - Test_TC_CNET_4_20Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_20", 0, credsIssuerConfig) + Test_TC_CNET_4_21Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_21", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -92808,7 +93385,7 @@ class Test_TC_CNET_4_20Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_20Suite() {} + ~Test_TC_CNET_4_21Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -92866,10 +93443,10 @@ class Test_TC_CNET_4_20Suite : public TestCommand } }; -class Test_TC_CNET_4_21Suite : public TestCommand +class Test_TC_CNET_4_22Suite : public TestCommand { public: - Test_TC_CNET_4_21Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_21", 0, credsIssuerConfig) + Test_TC_CNET_4_22Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_22", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -92877,7 +93454,7 @@ class Test_TC_CNET_4_21Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_21Suite() {} + ~Test_TC_CNET_4_22Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -92935,10 +93512,10 @@ class Test_TC_CNET_4_21Suite : public TestCommand } }; -class Test_TC_CNET_4_22Suite : public TestCommand +class Test_TC_DLOG_2_1Suite : public TestCommand { public: - Test_TC_CNET_4_22Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_22", 0, credsIssuerConfig) + Test_TC_DLOG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -92946,7 +93523,7 @@ class Test_TC_CNET_4_22Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_22Suite() {} + ~Test_TC_DLOG_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -93004,10 +93581,10 @@ class Test_TC_CNET_4_22Suite : public TestCommand } }; -class Test_TC_DLOG_2_1Suite : public TestCommand +class Test_TC_DLOG_2_2Suite : public TestCommand { public: - Test_TC_DLOG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_1", 0, credsIssuerConfig) + Test_TC_DLOG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -93015,7 +93592,7 @@ class Test_TC_DLOG_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_2_1Suite() {} + ~Test_TC_DLOG_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -93073,10 +93650,10 @@ class Test_TC_DLOG_2_1Suite : public TestCommand } }; -class Test_TC_DLOG_2_2Suite : public TestCommand +class Test_TC_DLOG_3_1Suite : public TestCommand { public: - Test_TC_DLOG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_2", 0, credsIssuerConfig) + Test_TC_DLOG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -93084,7 +93661,7 @@ class Test_TC_DLOG_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_2_2Suite() {} + ~Test_TC_DLOG_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -93142,10 +93719,10 @@ class Test_TC_DLOG_2_2Suite : public TestCommand } }; -class Test_TC_DLOG_3_1Suite : public TestCommand +class Test_TC_DESC_2_1Suite : public TestCommand { public: - Test_TC_DLOG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_3_1", 0, credsIssuerConfig) + Test_TC_DESC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -93153,7 +93730,7 @@ class Test_TC_DLOG_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_3_1Suite() {} + ~Test_TC_DESC_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -93211,10 +93788,10 @@ class Test_TC_DLOG_3_1Suite : public TestCommand } }; -class Test_TC_DESC_2_1Suite : public TestCommand +class Test_TC_DGETH_3_2Suite : public TestCommand { public: - Test_TC_DESC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_1", 0, credsIssuerConfig) + Test_TC_DGETH_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -93222,7 +93799,7 @@ class Test_TC_DESC_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DESC_2_1Suite() {} + ~Test_TC_DGETH_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105960,6 +106537,75 @@ class Test_TC_DGSW_2_3Suite : public TestCommand } }; +class Test_TC_DGSW_3_2Suite : public TestCommand +{ +public: + Test_TC_DGSW_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGSW_3_2", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DGSW_3_2Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + + 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; + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + class Test_TC_DGWIFI_2_2Suite : public TestCommand { public: @@ -106029,6 +106675,75 @@ class Test_TC_DGWIFI_2_2Suite : public TestCommand } }; +class Test_TC_DGWIFI_3_2Suite : public TestCommand +{ +public: + Test_TC_DGWIFI_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGWIFI_3_2", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DGWIFI_3_2Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + + 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; + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + class Test_TC_WNCV_6_1Suite : public TestCommand { public: @@ -115900,75 +116615,6 @@ class Test_TC_ACL_2_6Suite : public TestCommand } }; -class Test_TC_ACL_2_8Suite : public TestCommand -{ -public: - Test_TC_ACL_2_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_8", 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_ACL_2_8Suite() {} - - 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 - { - - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - - 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; - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - class Test_TC_ACL_2_10Suite : public TestCommand { public: @@ -116333,6 +116979,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -116645,6 +117292,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -116769,7 +117417,9 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -116832,7 +117482,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 2ca956f79c8819..a59e5b40c62bbe 100644 --- a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h @@ -575,87 +575,6 @@ class Test_TC_DGETH_3_1_SimulatedSuite : public TestCommand } }; -class Test_TC_DGETH_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGETH_3_2_SimulatedSuite() : TestCommand("Test_TC_DGETH_3_2_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGETH_3_2_SimulatedSuite() {} - -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 - { - - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the device to be commissioned"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; - return WaitForCommissioning(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "DUT sends ResetCounts to TH"); - VerifyOrDo(!ShouldSkip("DGETH.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Commands::ResetCounts::Id); - } - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_DGSW_3_1_SimulatedSuite : public TestCommand { public: @@ -752,86 +671,6 @@ class Test_TC_DGSW_3_1_SimulatedSuite : public TestCommand } }; -class Test_TC_DGSW_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGSW_3_2_SimulatedSuite() : TestCommand("Test_TC_DGSW_3_2_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGSW_3_2_SimulatedSuite() {} - -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 - { - - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the device to be commissioned"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; - return WaitForCommissioning(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "DUT sends ResetWatermarks to TH"); - VerifyOrDo(!ShouldSkip("DGSW.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Commands::ResetWatermarks::Id); - } - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_DGWIFI_3_1_SimulatedSuite : public TestCommand { public: @@ -978,86 +817,6 @@ class Test_TC_DGWIFI_3_1_SimulatedSuite : public TestCommand } }; -class Test_TC_DGWIFI_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGWIFI_3_2_SimulatedSuite() : TestCommand("Test_TC_DGWIFI_3_2_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGWIFI_3_2_SimulatedSuite() {} - -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 - { - - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the device to be commissioned"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; - return WaitForCommissioning(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "DUT sends ResetCounts command to TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Commands::ResetCounts::Id); - } - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_FLW_3_1_SimulatedSuite : public TestCommand { public: @@ -2582,6 +2341,86 @@ class Test_TC_ULABEL_3_1_SimulatedSuite : public TestCommand } }; +class Test_TC_FLABEL_3_1_SimulatedSuite : public TestCommand +{ +public: + Test_TC_FLABEL_3_1_SimulatedSuite() : TestCommand("Test_TC_FLABEL_3_1_Simulated", 2) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_FLABEL_3_1_SimulatedSuite() {} + +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 + { + + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the device to be commissioned"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; + return WaitForCommissioning(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "DUT reads LabelList from the TH"); + VerifyOrDo(!ShouldSkip("FLABEL.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::LabelList::Id); + } + } + return CHIP_NO_ERROR; + } +}; + std::unique_ptr GetTestCommand(std::string testName) { if (testName == "Test_TC_BINFO_2_3_Simulated") @@ -2604,26 +2443,14 @@ std::unique_ptr GetTestCommand(std::string testName) { return std::unique_ptr(new Test_TC_DGETH_3_1_SimulatedSuite()); } - if (testName == "Test_TC_DGETH_3_2_Simulated") - { - return std::unique_ptr(new Test_TC_DGETH_3_2_SimulatedSuite()); - } if (testName == "Test_TC_DGSW_3_1_Simulated") { return std::unique_ptr(new Test_TC_DGSW_3_1_SimulatedSuite()); } - if (testName == "Test_TC_DGSW_3_2_Simulated") - { - return std::unique_ptr(new Test_TC_DGSW_3_2_SimulatedSuite()); - } if (testName == "Test_TC_DGWIFI_3_1_Simulated") { return std::unique_ptr(new Test_TC_DGWIFI_3_1_SimulatedSuite()); } - if (testName == "Test_TC_DGWIFI_3_2_Simulated") - { - return std::unique_ptr(new Test_TC_DGWIFI_3_2_SimulatedSuite()); - } if (testName == "Test_TC_FLW_3_1_Simulated") { return std::unique_ptr(new Test_TC_FLW_3_1_SimulatedSuite()); @@ -2684,6 +2511,10 @@ std::unique_ptr GetTestCommand(std::string testName) { return std::unique_ptr(new Test_TC_ULABEL_3_1_SimulatedSuite()); } + if (testName == "Test_TC_FLABEL_3_1_Simulated") + { + return std::unique_ptr(new Test_TC_FLABEL_3_1_SimulatedSuite()); + } return nullptr; } @@ -2696,11 +2527,8 @@ void PrintTestCommands() ChipLogError(chipTool, "\t* Test_TC_BOOL_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DESC_2_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGETH_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGETH_3_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGSW_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGSW_3_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGWIFI_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGWIFI_3_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_FLW_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_G_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_I_3_1_Simulated"); @@ -2716,4 +2544,5 @@ void PrintTestCommands() ChipLogError(chipTool, "\t* Test_TC_OCC_2_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_OCC_2_4_Simulated"); ChipLogError(chipTool, "\t* Test_TC_ULABEL_3_1_Simulated"); + ChipLogError(chipTool, "\t* Test_TC_FLABEL_3_1_Simulated"); } diff --git a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h index 2ca956f79c8819..a59e5b40c62bbe 100644 --- a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h @@ -575,87 +575,6 @@ class Test_TC_DGETH_3_1_SimulatedSuite : public TestCommand } }; -class Test_TC_DGETH_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGETH_3_2_SimulatedSuite() : TestCommand("Test_TC_DGETH_3_2_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGETH_3_2_SimulatedSuite() {} - -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 - { - - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the device to be commissioned"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; - return WaitForCommissioning(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "DUT sends ResetCounts to TH"); - VerifyOrDo(!ShouldSkip("DGETH.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), EthernetNetworkDiagnostics::Id, - EthernetNetworkDiagnostics::Commands::ResetCounts::Id); - } - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_DGSW_3_1_SimulatedSuite : public TestCommand { public: @@ -752,86 +671,6 @@ class Test_TC_DGSW_3_1_SimulatedSuite : public TestCommand } }; -class Test_TC_DGSW_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGSW_3_2_SimulatedSuite() : TestCommand("Test_TC_DGSW_3_2_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGSW_3_2_SimulatedSuite() {} - -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 - { - - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the device to be commissioned"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; - return WaitForCommissioning(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "DUT sends ResetWatermarks to TH"); - VerifyOrDo(!ShouldSkip("DGSW.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Commands::ResetWatermarks::Id); - } - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_DGWIFI_3_1_SimulatedSuite : public TestCommand { public: @@ -978,86 +817,6 @@ class Test_TC_DGWIFI_3_1_SimulatedSuite : public TestCommand } }; -class Test_TC_DGWIFI_3_2_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGWIFI_3_2_SimulatedSuite() : TestCommand("Test_TC_DGWIFI_3_2_Simulated", 2) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGWIFI_3_2_SimulatedSuite() {} - -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 - { - - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the device to be commissioned"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; - return WaitForCommissioning(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "DUT sends ResetCounts command to TH"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.C00.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitCommand(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Commands::ResetCounts::Id); - } - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_FLW_3_1_SimulatedSuite : public TestCommand { public: @@ -2582,6 +2341,86 @@ class Test_TC_ULABEL_3_1_SimulatedSuite : public TestCommand } }; +class Test_TC_FLABEL_3_1_SimulatedSuite : public TestCommand +{ +public: + Test_TC_FLABEL_3_1_SimulatedSuite() : TestCommand("Test_TC_FLABEL_3_1_Simulated", 2) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_FLABEL_3_1_SimulatedSuite() {} + +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 + { + + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the device to be commissioned"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; + return WaitForCommissioning(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "DUT reads LabelList from the TH"); + VerifyOrDo(!ShouldSkip("FLABEL.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::LabelList::Id); + } + } + return CHIP_NO_ERROR; + } +}; + std::unique_ptr GetTestCommand(std::string testName) { if (testName == "Test_TC_BINFO_2_3_Simulated") @@ -2604,26 +2443,14 @@ std::unique_ptr GetTestCommand(std::string testName) { return std::unique_ptr(new Test_TC_DGETH_3_1_SimulatedSuite()); } - if (testName == "Test_TC_DGETH_3_2_Simulated") - { - return std::unique_ptr(new Test_TC_DGETH_3_2_SimulatedSuite()); - } if (testName == "Test_TC_DGSW_3_1_Simulated") { return std::unique_ptr(new Test_TC_DGSW_3_1_SimulatedSuite()); } - if (testName == "Test_TC_DGSW_3_2_Simulated") - { - return std::unique_ptr(new Test_TC_DGSW_3_2_SimulatedSuite()); - } if (testName == "Test_TC_DGWIFI_3_1_Simulated") { return std::unique_ptr(new Test_TC_DGWIFI_3_1_SimulatedSuite()); } - if (testName == "Test_TC_DGWIFI_3_2_Simulated") - { - return std::unique_ptr(new Test_TC_DGWIFI_3_2_SimulatedSuite()); - } if (testName == "Test_TC_FLW_3_1_Simulated") { return std::unique_ptr(new Test_TC_FLW_3_1_SimulatedSuite()); @@ -2684,6 +2511,10 @@ std::unique_ptr GetTestCommand(std::string testName) { return std::unique_ptr(new Test_TC_ULABEL_3_1_SimulatedSuite()); } + if (testName == "Test_TC_FLABEL_3_1_Simulated") + { + return std::unique_ptr(new Test_TC_FLABEL_3_1_SimulatedSuite()); + } return nullptr; } @@ -2696,11 +2527,8 @@ void PrintTestCommands() ChipLogError(chipTool, "\t* Test_TC_BOOL_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DESC_2_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGETH_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGETH_3_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGSW_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGSW_3_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGWIFI_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_DGWIFI_3_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_FLW_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_G_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_I_3_1_Simulated"); @@ -2716,4 +2544,5 @@ void PrintTestCommands() ChipLogError(chipTool, "\t* Test_TC_OCC_2_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_OCC_2_4_Simulated"); ChipLogError(chipTool, "\t* Test_TC_ULABEL_3_1_Simulated"); + ChipLogError(chipTool, "\t* Test_TC_FLABEL_3_1_Simulated"); }