diff --git a/examples/darwin-framework-tool/templates/tests/ciTests.json b/examples/darwin-framework-tool/templates/tests/ciTests.json index 5be170ac3d8bba..fd8f8840d162a0 100644 --- a/examples/darwin-framework-tool/templates/tests/ciTests.json +++ b/examples/darwin-framework-tool/templates/tests/ciTests.json @@ -18,6 +18,8 @@ "Test_TC_APPLAUNCHER_3_8", "Test_TC_APPLAUNCHER_3_9", "Test_TC_BINFO_2_1", - "Test_TC_SWTCH_2_1" + "Test_TC_SWTCH_2_1", + "Test_TC_G_2_1", + "Test_TC_FLABEL_2_1" ] } diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index f8c913f271fea4..1a05e449616317 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -1783,6 +1783,9 @@ PICS: id: LTIME.C.A0000.24HR #Unit Localization Cluster + - label: "Does the device implement different units of temperature ?" + id: LUNIT.S.F00 + - label: "Does the DUT (Server) support TemperatureUnit attribute?" id: LUNIT.S.A0000 diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml index bcb20c10ac2f43..62b04fb0ab7a70 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml @@ -88,10 +88,10 @@ tests: 888] Targets field: [{Cluster: 55}, {Endpoint: 66}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 1, "authMode": 3, "subjects": [111,222,333,444], "targets": [{"cluster":11 , "endpoint":22, "deviceType": null}]}, - {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets": [{"cluster": 55, "endpoint": 66, "deviceType":null }]}]" 1 0 - On TH(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 1, "authMode": 3, "subjects": [111,222,333,444], "targets": [{"cluster":11 , "endpoint":22, "deviceType": null}]}, + { "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets": [{"cluster": 55, "endpoint": 66, "deviceType":null }]}]" 1 0 + On TH(Chiptool)1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements [1658323877.660699][2502:2507] CHIP:DMG: WriteClient moving to [ResponseRe] [1658323877.660829][2502:2507] CHIP:DMG: WriteResponseMessage = [1658323877.660890][2502:2507] CHIP:DMG: { @@ -176,7 +176,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements + On TH(Chiptool) 1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements InteractionModelRevision = 1 [1658229676.712083][4872:4878] CHIP:DMG: } [1658229676.712624][4872:4878] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 1307037423 @@ -235,9 +235,9 @@ tests: 666, 555] Targets field: [{Cluster: 88}, {Endpoint: 77}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 4, "authMode": 2, "subjects": [444,333,222,111], "targets": [{"cluster":44 , "endpoint":33, "deviceType":null}]},{"fabricIndex": 1, "privilege":4 , "authMode":3, "subjects": [888,777,666,555], "targets": [{"cluster": 88, "endpoint": 77, "deviceType":null}]}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 4, "authMode": 2, "subjects": [444,333,222,111], "targets": [{"cluster":44 , "endpoint":33, "deviceType":null}]},{ "privilege":4 , "authMode":3, "subjects": [888,777,666,555], "targets": [{"cluster": 88, "endpoint": 77, "deviceType":null}]}]" 1 0 - On TH(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements + On TH(Chiptool) 1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements 1658226959.554674][4736:4741] CHIP:DMG: AttributeStatusIBs = [1658226959.554706][4736:4741] CHIP:DMG: [ [1658226959.554732][4736:4741] CHIP:DMG: AttributeStatusIB = @@ -313,7 +313,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements + On TH(Chiptool)1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements 9800.959293][4892:4897] CHIP:DMG: [1658229800.959325][4892:4897] CHIP:DMG: ], [1658229800.959399][4892:4897] CHIP:DMG: @@ -377,8 +377,8 @@ tests: Endpoint: 66}, {Cluster: 77, DeviceType: 88}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 1, "authMode": 2, "subjects": [111,222,333,444], "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": null },{ "cluster": 33, "endpoint": null, "deviceType": 44 }]}, {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets":[{ "cluster": 55, "endpoint": 66, "deviceType": null },{ "cluster": 77, "endpoint": null, "deviceType": 88 }]}]" 1 0 - On TH(Chiptool) , Verify the Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 3 elements + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 1, "authMode": 2, "subjects": [111,222,333,444], "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": null },{ "cluster": 33, "endpoint": null, "deviceType": 44 }]}, { "privilege": 3, "authMode": 3, "subjects": [555,666,777,888], "targets":[{ "cluster": 55, "endpoint": 66, "deviceType": null },{ "cluster": 77, "endpoint": null, "deviceType": 88 }]}]" 1 0 + On TH(Chiptool)1, Verify the Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 3 elements 1657276276.708941][2297:2302] CHIP:DMG: WriteClient moving to [ResponseRe] [1657276276.709021][2297:2302] CHIP:DMG: WriteResponseMessage = [1657276276.709058][2297:2302] CHIP:DMG: { @@ -461,7 +461,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements + On TH(Chiptool) 1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements [1657278053.764924][2231:2236] CHIP:DMG: SuppressResponse = true, [1657278053.764958][2231:2236] CHIP:DMG: InteractionModelRevision = 1 @@ -535,8 +535,8 @@ tests: DeviceType: 88}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 1, "authMode": 2, "subjects": [], "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": null },{ "cluster": 33, "endpoint": null, "deviceType": 44 }]}, {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [], "targets":[{ "cluster": 55, "endpoint": 66, "deviceType": null },{ "cluster": 77, "endpoint": null, "deviceType": 88 }]}]" 1 0 - On TH(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 1, "authMode": 2, "subjects": [], "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": null },{ "cluster": 33, "endpoint": null, "deviceType": 44 }]}, { "privilege": 3, "authMode": 3, "subjects": [], "targets":[{ "cluster": 55, "endpoint": 66, "deviceType": null },{ "cluster": 77, "endpoint": null, "deviceType": 88 }]}]" 1 0 + On TH(Chiptool) 1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements [1657541707.114348][3004:3009] CHIP:DMG: { [1657541707.114393][3004:3009] CHIP:DMG: AttributeStatusIBs = @@ -618,7 +618,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements + On TH(Chiptool) 1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements [1657278352.938811][2258:2263] CHIP:DMG: [1657278352.938840][2258:2263] CHIP:DMG: }, @@ -686,10 +686,10 @@ tests: Group (3) Subjects field: [555, 666, 777, 888] Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 1, "authMode": 2, "subjects": [111, 222, 333, 444], "targets": null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": [555, 666, 777, 888], "targets": null}]" 1 0 - On TH(Chiptool) , Verify Successfully to acl attribute value is list of AccessControlEntryStruct containing 3 elements as Target Null. + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 1, "authMode": 2, "subjects": [111, 222, 333, 444], "targets": null}, + { "privilege": 3, "authMode": 3, "subjects": [555, 666, 777, 888], "targets": null}]" 1 0 + On TH(Chiptool) 1, Verify Successfully to acl attribute value is list of AccessControlEntryStruct containing 3 elements as Target Null. [1657542060.230268][3398:3403] CHIP:DMG: { [1657542060.230322][3398:3403] CHIP:DMG: AttributeStatusIBs = @@ -771,7 +771,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements as Target Null + On TH(Chiptool) 1, Verify Successfully AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 3 elements as Target Null [1656656511.643560][2994:2999] CHIP:DMG: [1656656511.643593][2994:2999] CHIP:DMG: SuppressResponse = true, [1656656511.643626][2994:2999] CHIP:DMG: InteractionModelRevision = 1 @@ -819,10 +819,10 @@ tests: AuthMode field: Group (3) Subjects field: null Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": null, "targets": null}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 3, "subjects": null, "targets": null}]" 1 0 - On TH(Chiptool) , Verify Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Target Null + On TH(Chiptool) 1, Verify Successfully to acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Target Null [1656507141.628453][3224:3229] CHIP:DMG: WriteResponseMessage = [1656507141.628515][3224:3229] CHIP:DMG: { @@ -890,7 +890,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully that acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Target Null + On TH(Chiptool) 1, Verify Successfully that acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Target Null [1656507318.740283][3241:3246] CHIP:DMG: ], [1656507318.740346][3241:3246] CHIP:DMG: @@ -925,9 +925,9 @@ tests: (2) AuthMode field: CASE (2) Subjects field: null Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 2, "authMode": 2, "subjects": null, "targets": null}]" 1 0 - On TH(Chiptool) , Verify Successfully that acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Subject and Target as null + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 2, "authMode": 2, "subjects": null, "targets": null}]" 1 0 + On TH(Chiptool)1 , Verify Successfully that acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Subject and Target as null [1656507439.868495][3249:3254] CHIP:DMG: WriteClient moving to [ResponseRe] [1656507439.868612][3249:3254] CHIP:DMG: WriteResponseMessage = [1656507439.868671][3249:3254] CHIP:DMG: { @@ -994,7 +994,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully acl attribute value is list of AccessControlEntryStruct containing 2 elements as Subject and Target as null + On TH(Chiptool) 1, Verify Successfully acl attribute value is list of AccessControlEntryStruct containing 2 elements as Subject and Target as null [1656507517.730614][3261:3266] CHIP:DMG: [1656507517.730654][3261:3266] CHIP:DMG: SuppressResponse = true, @@ -1027,7 +1027,7 @@ tests: verification: | ./chip-tool accesscontrol read subjects-per-access-control-entry 1 0 - On TH(Chiptool), verify with value 4 or greater as subjects-per-access-control-entry , value is stored as MAXSUBJECTS + On TH(Chiptool)1, verify with value 4 or greater as subjects-per-access-control-entry , value is stored as MAXSUBJECTS [1656657490.002372][3078:3083] CHIP:DMG: [1656657490.002408][3078:3083] CHIP:DMG: ], @@ -1050,8 +1050,8 @@ tests: node IDs (stored as SUBJECTS) Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects":[33,44,55,66] , "targets": null}]" 1 0 - On TH(Chiptool) , Verify Successfully acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Subject as SUBJECTS and Target as null + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects":[33,44,55,66] , "targets": null}]" 1 0 + On TH(Chiptool)1, Verify Successfully acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as Subject as SUBJECTS and Target as null @@ -1120,7 +1120,7 @@ tests: verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as SUBJECTS and Target as null + On TH(Chiptool) 1, Verify Successfully acl attribute with a value is list of AccessControlEntryStruct containing 2 elements as SUBJECTS and Target as null [1656928460.992030][4255:4260] CHIP:DMG: ], [1656928460.992075][4255:4260] CHIP:DMG: [1656928460.992101][4255:4260] CHIP:DMG: SuppressResponse = true, @@ -1160,10 +1160,10 @@ tests: Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects":[65520,65521,65522,65523] , "targets": null}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 2, "subjects":[65520,65521,65522,65523] , "targets": null}]" 1 0 - On TH(Chiptool) , Verify Successfully acl attribute value is list of AccessControlEntryStruct containing 2 elements , Subjects as CAT Values and Target as null + On TH(Chiptool) 1, Verify Successfully acl attribute value is list of AccessControlEntryStruct containing 2 elements , Subjects as CAT Values and Target as null [1656509348.174135][3403:3408] CHIP:DMG: WriteClient moving to [ResponseRe] [1656509348.174227][3403:3408] CHIP:DMG: WriteResponseMessage = [1656509348.174272][3403:3408] CHIP:DMG: { @@ -1232,7 +1232,7 @@ tests: verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully that acl attribute with a value is list of AccessControlEntryStruct containing 2 elements , Subjects as CAT Values and Target as null + On TH(Chiptool) 1, Verify Successfully that acl attribute with a value is list of AccessControlEntryStruct containing 2 elements , Subjects as CAT Values and Target as null [1656509471.738046][3416:3421] CHIP:DMG: [1656509471.738082][3416:3421] CHIP:DMG: SuppressResponse = true, [1656509471.738120][3416:3421] CHIP:DMG: InteractionModelRevision = 1 @@ -1267,7 +1267,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read targets-per-access-control-entry 1 0 - On TH(Chiptool), verify with value 3 or greater as Targets-per-access-control-entry ,value is stored as MAXTARGETS + On TH(Chiptool)1, verify with value 3 or greater as Targets-per-access-control-entry ,value is stored as MAXTARGETS [1656509737.166763][3434:3439] CHIP:DMG: [1656509737.166786][3434:3439] CHIP:DMG: ], [1656509737.166816][3434:3439] CHIP:DMG: @@ -1289,9 +1289,9 @@ tests: MAXTARGETS targets {Cluster: random} (stored as TARGETS)" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 40, "endpoint": null, "deviceType": null },{ "cluster": 28, "endpoint": null, "deviceType": null }]}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 40, "endpoint": null, "deviceType": null },{ "cluster": 28, "endpoint": null, "deviceType": null }]}]" 1 0 - On TH(Chiptool) , Verify Successfully acl attribute with value is list of AccessControlEntryStruct containing 2 elements , Subjects as null and and Target as null + On TH1(Chiptool) , Verify Successfully acl attribute with value is list of AccessControlEntryStruct containing 2 elements , Subjects as null and and Target as null [1657542520.140869][3499:3504] CHIP:DMG: { [1657542520.140922][3499:3504] CHIP:DMG: AttributeStatusIBs = @@ -1357,7 +1357,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully that acl attribute with value is list of AccessControlEntryStruct containing 2 elements , Subjects as null and and Target as TARGETS + On TH1(Chiptool) , Verify Successfully that acl attribute with value is list of AccessControlEntryStruct containing 2 elements , Subjects as null and and Target as TARGETS [1657542633.704684][3522:3527] CHIP:DMG: } [1657542633.705098][3522:3527] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3549245792 @@ -1395,7 +1395,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read access-control-entries-per-fabric 1 0 - On TH(Chiptool), verify with value 3 or greater as AccessControlEntriesPerFabric. + On TH1(Chiptool), verify with value 3 or greater as AccessControlEntriesPerFabric. [1656594850.964909][4043:4048] CHIP:DMG: AttributeReportIBs = [1656594850.964954][4043:4048] CHIP:DMG: [ @@ -1436,11 +1436,11 @@ tests: field: null subsequent elements same as second element" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": null, "targets": null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [], "targets":null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [], "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": null, "targets": null}, + { "privilege": 3, "authMode": 2, "subjects": [], "targets":null}, + { "privilege": 3, "authMode": 2, "subjects": [], "targets":null}]" 1 0 - On TH(Chiptool) , Verify Successfully that acl attribute value is list of AccessControlEntryStruct containing MAXENTRIES elements + On TH1(Chiptool) , Verify Successfully that acl attribute value is list of AccessControlEntryStruct containing MAXENTRIES elements [1657617362.022161][8840:8845] CHIP:DMG: WriteResponseMessage = [1657617362.022190][8840:8845] CHIP:DMG: { @@ -1524,7 +1524,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully that acl attribute with value is list of AccessControlEntryStruct containing MAXENTRIES elements + On TH1(Chiptool) , Verify Successfully that acl attribute with value is list of AccessControlEntryStruct containing MAXENTRIES elements [1657543165.385093][3592:3597] CHIP:DMG: } [1657543165.385508][3592:3597] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 3549245812 [1657543165.385586][3592:3597] CHIP:TOO: ACL: 3 entries @@ -1559,10 +1559,10 @@ tests: AuthMode field: PASE (1) Subjects field: null Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 1, "subjects": [], "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl "[{"privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 1, "subjects": [], "targets":null}]" 1 0 - On TH(Chiptool) , Verify Successfully acl attribute value is list of AccessControlEntryStruct containing 2 elements and Returns CONSTRAINT_ERROR (0x87) for second element path + On TH1(Chiptool) , Verify Successfully acl attribute value is list of AccessControlEntryStruct containing 2 elements and Returns CONSTRAINT_ERROR (0x87) for second element path [1658475475.310438][3113:3119] CHIP:DMG: { [1658475475.310466][3113:3119] CHIP:DMG: AttributeStatusIBs = [1658475475.310500][3113:3119] CHIP:DMG: [ @@ -1676,7 +1676,7 @@ tests: PICS: ACL.S.A0000 verification: | ./chip-tool accesscontrol read acl 1 0 - On TH(Chiptool) , Verify Successfully that acl attribute with value is list of AccessControlEntryStruct containing 1 element + On TH1(Chiptool) , Verify Successfully that acl attribute with value is list of AccessControlEntryStruct containing 1 element [1656914601.250655][3267:3272] CHIP:DMG: ], [1656914601.250709][3267:3272] CHIP:DMG: [1656914601.250746][3267:3272] CHIP:DMG: SuppressResponse = true, @@ -1704,10 +1704,10 @@ tests: (5) AuthMode field: Group (3) Subjects field: null Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 5, "authMode": 3, "subjects": [], "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 5, "authMode": 3, "subjects": [], "targets":null}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements as Subject null and Target null for second element path Returns CONSTRAINT_ERROR (0x87) + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements as Subject null and Target null for second element path Returns CONSTRAINT_ERROR (0x87) [1658475916.602576][3151:3156] CHIP:DMG: WriteResponseMessage = [1658475916.602649][3151:3156] CHIP:DMG: { [1658475916.602684][3151:3156] CHIP:DMG: AttributeStatusIBs = @@ -1780,12 +1780,12 @@ tests: field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 6, "authMode": 2, "subjects": null, "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 6, "authMode": 2, "subjects": null, "targets":null}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Privilege for second element path Returns CONSTRAINT_ERROR (0x87) [1658476127.774933][3171:3176] CHIP:EM: Removed CHIP MessageCounter:240294498 from RetransTable on exchange 6954i @@ -1861,8 +1861,8 @@ tests: field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 4, "subjects": [], "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 4, "subjects": [], "targets":null}]" 1 0 On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Authmode for second element path Returns CONSTRAINT_ERROR (0x87) @@ -1937,9 +1937,9 @@ tests: AuthMode field: CASE (2) Subjects field: [0] Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [0], "targets":null}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 2, "subjects": [0], "targets":null}]" 1 0 + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Subject Field for second element path Returns CONSTRAINT_ERROR (0x87) [1658476622.665126][3229:3234] CHIP:DMG: WriteClient moving to [ResponseRe] [1658476622.665195][3229:3234] CHIP:DMG: WriteResponseMessage = @@ -2012,11 +2012,11 @@ tests: field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [18446744073709551615], "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 2, "subjects": [18446744073709551615], "targets":null}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Subject Field for second element path Returns CONSTRAINT_ERROR (0x87) 1658476861.356730][3250:3255] CHIP:DMG: { [1658476861.356767][3250:3255] CHIP:DMG: AttributeStatusIBs = @@ -2088,8 +2088,8 @@ tests: Targets field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [18446744060824649728], "targets": null}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": [18446744060824649728], "targets": null}]" 1 0 + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Subject Field for second element path Returns CONSTRAINT_ERROR (0x87) 8477037.056167][3264:3269] CHIP:DMG: { [1658477037.056200][3264:3269] CHIP:DMG: AttributePathIB = @@ -2158,10 +2158,10 @@ tests: field: null" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, - {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [18446744073709486080], "targets":null}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, + { "privilege": 3, "authMode": 2, "subjects": [18446744073709486080], "targets":null}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Subject Field for second element path Returns CONSTRAINT_ERROR (0x87) 658477229.869987][3634:3640] CHIP:EM: Removed CHIP MessageCounter:189477251 from RetransTable on exchange 22058i [1658477229.870031][3634:3640] CHIP:DMG: WriteClient moving to [ResponseRe] @@ -2232,9 +2232,9 @@ tests: AuthMode field: CASE (2) Subjects field: null Targets field: [{}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": null, "deviceType": null }]}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": null, "deviceType": null }]}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Target Field for second element path Returns CONSTRAINT_ERROR (0x87) 1658477371.966712][3679:3684] CHIP:EM: Removed CHIP MessageCounter:138419251 from RetransTable on exchange 40076i [1658477371.966756][3679:3684] CHIP:DMG: WriteClient moving to [ResponseRe] @@ -2308,9 +2308,9 @@ tests: [{Cluster: 0xFFFFFFFF}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 4294967295, "endpoint": null, "deviceType": null }]}]" 1 0 + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 4294967295, "endpoint": null, "deviceType": null }]}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Target Field for second element path Returns CONSTRAINT_ERROR (0x87) [1657617852.177018][8933:8938] CHIP:DMG: WriteResponseMessage = [1657617852.177055][8933:8938] CHIP:DMG: { @@ -2383,8 +2383,8 @@ tests: null Targets field: [{Endpoint: 65535}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": 65535, "deviceType": null }]}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": 65535, "deviceType": null }]}]" 1 0 + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Target field for second element path Returns CONSTRAINT_ERROR (0x87) [1657617920.044059][8948:8953] CHIP:DMG: { [1657617920.044085][8948:8953] CHIP:DMG: AttributeStatusIBs = @@ -2456,8 +2456,8 @@ tests: [{DeviceType: 0xFFFFFFFF}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": null, "deviceType": 4294967295 }]}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": null, "deviceType": 4294967295 }]}]" 1 0 + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Target field for second element path Returns CONSTRAINT_ERROR (0x87) @@ -2532,8 +2532,8 @@ tests: [{Endpoint: 22, DeviceType: 33}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": 22, "deviceType": 33 }]}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": null, "endpoint": 22, "deviceType": 33 }]}]" 1 0 + On TH1(Chiptool) , Verify Successfully to AccessControlEntryStruct containing 2 elements using Invalid Target field for second element path Returns CONSTRAINT_ERROR (0x87) [1658477583.616961][3701:3706] CHIP:DMG: WriteClient moving to [ResponseRe] [1658477583.617072][3701:3706] CHIP:DMG: WriteResponseMessage = @@ -2608,8 +2608,8 @@ tests: [{Cluster: 11, Endpoint: 22, DeviceType: 33}]" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": 33 }]}]" 1 0 - On TH(Chiptool) , Verify Successfully AccessControlEntryStruct containing 2 elements using + ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects": null, "targets":[{ "cluster": 11, "endpoint": 22, "deviceType": 33 }]}]" 1 0 + On TH1(Chiptool) , Verify Successfully AccessControlEntryStruct containing 2 elements using Invalid Target field for second element path Returns CONSTRAINT_ERROR (0x87) [1658477662.415412][3710:3715] CHIP:EM: Removed CHIP MessageCounter:35384027 from RetransTable on exchange 6953i [1658477662.415452][3710:3715] CHIP:DMG: WriteClient moving to [ResponseRe] @@ -2682,47 +2682,35 @@ tests: is an empty list" PICS: ACL.S.A0000 verification: | - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [], "targets": null}]" 1 0 - On TH(Chiptool) , Verify Successfully to AccessControl cluster ACL attribute value is an empty list since all ACL entries removed. - [1657618011.091198][8968:8973] CHIP:DMG: { - [1657618011.091228][8968:8973] CHIP:DMG: AttributeStatusIBs = - [1657618011.091272][8968:8973] CHIP:DMG: [ - [1657618011.091306][8968:8973] CHIP:DMG: AttributeStatusIB = - [1657618011.091348][8968:8973] CHIP:DMG: { - [1657618011.091383][8968:8973] CHIP:DMG: AttributePathIB = - [1657618011.091424][8968:8973] CHIP:DMG: { - [1657618011.091473][8968:8973] CHIP:DMG: Endpoint = 0x0, - [1657618011.091519][8968:8973] CHIP:DMG: Cluster = 0x1f, - [1657618011.091567][8968:8973] CHIP:DMG: Attribute = 0x0000_0000, - [1657618011.091612][8968:8973] CHIP:DMG: } - [1657618011.091663][8968:8973] CHIP:DMG: - [1657618011.091705][8968:8973] CHIP:DMG: StatusIB = - [1657618011.091748][8968:8973] CHIP:DMG: { - [1657618011.091790][8968:8973] CHIP:DMG: status = 0x00 (SUCCESS), - [1657618011.091832][8968:8973] CHIP:DMG: }, - [1657618011.091878][8968:8973] CHIP:DMG: - [1657618011.091915][8968:8973] CHIP:DMG: }, - [1657618011.091961][8968:8973] CHIP:DMG: - [1657618011.091994][8968:8973] CHIP:DMG: AttributeStatusIB = - [1657618011.092029][8968:8973] CHIP:DMG: { - [1657618011.092063][8968:8973] CHIP:DMG: AttributePathIB = - [1657618011.092103][8968:8973] CHIP:DMG: { - [1657618011.092149][8968:8973] CHIP:DMG: Endpoint = 0x0, - [1657618011.092194][8968:8973] CHIP:DMG: Cluster = 0x1f, - [1657618011.092239][8968:8973] CHIP:DMG: Attribute = 0x0000_0000, - [1657618011.092282][8968:8973] CHIP:DMG: ListIndex = Null, - [1657618011.092328][8968:8973] CHIP:DMG: } - [1657618011.092372][8968:8973] CHIP:DMG: - [1657618011.092416][8968:8973] CHIP:DMG: StatusIB = - [1657618011.092460][8968:8973] CHIP:DMG: { - [1657618011.092503][8968:8973] CHIP:DMG: status = 0x00 (SUCCESS), - [1657618011.092547][8968:8973] CHIP:DMG: }, - [1657618011.092586][8968:8973] CHIP:DMG: - [1657618011.092623][8968:8973] CHIP:DMG: }, - [1657618011.092661][8968:8973] CHIP:DMG: - [1657618011.092693][8968:8973] CHIP:DMG: ], - [1657618011.092736][8968:8973] CHIP:DMG: - [1657618011.092768][8968:8973] CHIP:DMG: InteractionModelRevision = 1 - [1657618011.092798][8968:8973] CHIP:DMG: } - [1657618011.092928][8968:8973] CHIP:DMG: WriteClient moving to [AwaitingDe] + ./chip-tool accesscontrol write acl "[]" 1 0 + + On TH1(Chiptool) , Verify Successfully to AccessControl cluster ACL attribute value is an empty list since all ACL entries removed. + RetransTable on exchange 43997i + [1660632377.411062][3241:3246] CHIP:DMG: WriteClient moving to [ResponseRe] + [1660632377.411111][3241:3246] CHIP:DMG: WriteResponseMessage = + [1660632377.411137][3241:3246] CHIP:DMG: { + [1660632377.411159][3241:3246] CHIP:DMG: AttributeStatusIBs = + [1660632377.411190][3241:3246] CHIP:DMG: [ + [1660632377.411215][3241:3246] CHIP:DMG: AttributeStatusIB = + [1660632377.411248][3241:3246] CHIP:DMG: { + [1660632377.411277][3241:3246] CHIP:DMG: AttributePathIB = + [1660632377.411313][3241:3246] CHIP:DMG: { + [1660632377.411350][3241:3246] CHIP:DMG: Endpoint = 0x0, + [1660632377.411388][3241:3246] CHIP:DMG: Cluster = 0x1f, + [1660632377.411423][3241:3246] CHIP:DMG: Attribute = 0x0000_0000, + [1660632377.411456][3241:3246] CHIP:DMG: } + [1660632377.411496][3241:3246] CHIP:DMG: + [1660632377.411528][3241:3246] CHIP:DMG: StatusIB = + [1660632377.411563][3241:3246] CHIP:DMG: { + [1660632377.411596][3241:3246] CHIP:DMG: status = 0x00 (SUCCESS), + [1660632377.411628][3241:3246] CHIP:DMG: }, + [1660632377.411687][3241:3246] CHIP:DMG: + [1660632377.411717][3241:3246] CHIP:DMG: }, + [1660632377.411748][3241:3246] CHIP:DMG: + [1660632377.411775][3241:3246] CHIP:DMG: ], + [1660632377.411804][3241:3246] CHIP:DMG: + [1660632377.411828][3241:3246] CHIP:DMG: InteractionModelRevision = 1 + [1660632377.411851][3241:3246] CHIP:DMG: } + [1660632377.411922][3241:3246] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1660632377.411986][3241:3246] CHIP:EM: Sending Standalone Ack for MessageCounter:259751171 on exchange 43997i disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml index 988b4cc058b01f..a9958cd5eed5cb 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_2_2.yaml @@ -66,12 +66,14 @@ tests: - label: "Set up subscription to StateChange event" PICS: BOOL.M.ManuallyControlled && BOOL.S.E00 && BOOL.S.A0000 verification: | + Need an SDK implementation required + Run the below command to start interactive mode ./chip-tool interactive start Subscribe the event using below command in Interactive mode. Once the event occurs, TH(chip-tool) get the subscription message. - booleanstate subscribe-by-id 0x0 1 100 2 1 + booleanstate subscribe-event state-change 1 100 1 1 --is-urgent true disabled: true - label: "Bring the DUT into a state so StateValue is FALSE" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml index 69671749350344..04cfb077a19798 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml @@ -18,6 +18,7 @@ name: PICS: - CADMIN.C + - CADMIN.C.C00.Tx config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml index 3b8159c6a97805..f70e43457d47fa 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml @@ -18,6 +18,7 @@ name: PICS: - CADMIN.S + - CADMIN.S.F00 config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml index a87bb4d5f0986a..54083688e066b7 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml @@ -19,6 +19,7 @@ name: PICS: - CADMIN.S + - CADMIN.S.F00 config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml index bd41c7bcb0f53c..c08854525cad67 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml @@ -19,6 +19,8 @@ name: PICS: - CADMIN.C + - CADMIN.C.C00.Tx + - CADMIN.C.C01.Tx config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml index 4b151704ebc91d..22d1c1654cf2dd 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml @@ -19,6 +19,7 @@ name: PICS: - CADMIN.S + - CADMIN.S.F00 config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml index c2526b965e5dcd..7622ff87597173 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml @@ -19,6 +19,8 @@ name: PICS: - CADMIN.C + - CADMIN.C.C01.Tx + - CADMIN.C.C00.Tx config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml index 623466e4edeaa7..8d80ea0b08a370 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml @@ -19,6 +19,7 @@ name: PICS: - CADMIN.S + - CADMIN.S.F00 config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml index fd2367e6ef2057..6ca89bc6035b65 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml @@ -19,6 +19,7 @@ name: PICS: - CADMIN.C + - CADMIN.C.C00.Tx config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml index 12cfd95c8d60c4..cbc714bc930b67 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml @@ -19,6 +19,7 @@ name: PICS: - CADMIN.C + - CADMIN.C.C01.Tx config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml index ee32a4cbd10d91..cfa0869f225c01 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml @@ -18,6 +18,7 @@ name: PICS: - CADMIN.C + - CADMIN.C.C01.Tx config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml index ebe9ef8c3db72d..50e30a8e4ef88f 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml @@ -19,6 +19,7 @@ name: PICS: - CADMIN.S + - CADMIN.S.F00 config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml index 5097d626ef0cca..4119e0fbebea8b 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml @@ -19,6 +19,7 @@ name: PICS: - CADMIN.S + - CADMIN.S.F00 config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml index 7f521e503c5e82..5ba018a444cd38 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml @@ -19,6 +19,7 @@ name: PICS: - CADMIN.S + - CADMIN.S.F00 config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml index 4ee2d08ee9743e..2d5f38f4b1eca4 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml @@ -16,6 +16,7 @@ name: 24.1.4. [TC-CADMIN-1.4] Node Behavior using BCM [DUT - Commissionee] PICS: - CADMIN.S + - CADMIN.S.F00 config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml index 4015bf778f5759..3b2066c0c6d8a1 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml @@ -18,6 +18,7 @@ name: PICS: - CADMIN.S + - CADMIN.S.F00 config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml index d935c80b5bcaff..d1101134ad7f3c 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml @@ -19,6 +19,7 @@ name: PICS: - CADMIN.C + - CADMIN.C.C00.Tx config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml index 6ee77b6feeb50b..f82ed5c810d580 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml @@ -19,6 +19,7 @@ name: PICS: - CADMIN.C + - CADMIN.C.C01.Tx config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml index 7be4ab23fed5fc..5477760c2ef1bf 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml @@ -37,7 +37,7 @@ tests: type: int16u - label: "Read the global attribute: FeatureMap" - PICS: (CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03) + PICS: ( CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03 ) command: "readAttribute" attribute: "FeatureMap" response: diff --git a/src/app/tests/suites/certification/Test_TC_DGWIFI_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DGWIFI_1_1.yaml index 3f6060a6721936..b370a0337bbf94 100644 --- a/src/app/tests/suites/certification/Test_TC_DGWIFI_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGWIFI_1_1.yaml @@ -11,94 +11,124 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 3.1.1. [TC-DGWIFI-1.1] Global Attributes [DUT as Server] +name: 53.1.1. [TC-DGWIFI-1.1] Global Attributes [DUT as Server] PICS: - DGWIFI.S config: nodeId: 0x12344321 - cluster: "Basic" + cluster: "WiFi Network Diagnostics" endpoint: 0 tests: - - label: "Commission DUT to TH" - verification: | - ./chip-tool pairing ble-wifi NODEID SSID PASSWD 20202021 3840 (commissioner side) - disabled: true + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "TH reads the ClusterRevision from DUT" - verification: | - ./chip-tool wifinetworkdiagnostics read cluster-revision 1 0 - - Verify " ClusterRevision " on the TH(Chip-tool) Log: - - [1651834623.658618][3910:3916] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0036 Attribute 0x0000_FFFD DataVersion: 2858283115 - [1651834623.658776][3910:3916] CHIP:TOO: ClusterRevision: 1 - disabled: true + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: int16u - label: "TH reads the FeatureMap from DUT" - verification: | - ./chip-tool wifinetworkdiagnostics read feature-map 1 0 - - Verify " Featuremap " on the TH(Chip-tool) Log: - - [1651834671.432383][3919:3924] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0036 Attribute 0x0000_FFFC DataVersion: 2858283115 - [1651834671.432466][3919:3924] CHIP:TOO: FeatureMap: 3 - disabled: true - - - label: "TH reads AttribubteList from DUT" - verification: | - ./chip-tool wifinetworkdiagnostics read attribute-list 1 0 - - Verify " AttributeList " on the TH(Chip-tool) Log: - - [1651834734.844051][3928:3933] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0036 Attribute 0x0000_FFFB DataVersion: 2858283115 - [1651834734.844159][3928:3933] CHIP:TOO: AttributeList: 18 entries - [1651834734.844193][3928:3933] CHIP:TOO: [1]: 0 - [1651834734.844218][3928:3933] CHIP:TOO: [2]: 1 - [1651834734.844240][3928:3933] CHIP:TOO: [3]: 2 - [1651834734.844264][3928:3933] CHIP:TOO: [4]: 3 - [1651834734.844287][3928:3933] CHIP:TOO: [5]: 4 - [1651834734.844311][3928:3933] CHIP:TOO: [6]: 5 - [1651834734.844335][3928:3933] CHIP:TOO: [7]: 6 - [1651834734.844358][3928:3933] CHIP:TOO: [8]: 7 - [1651834734.844382][3928:3933] CHIP:TOO: [9]: 8 - [1651834734.844403][3928:3933] CHIP:TOO: [10]: 9 - [1651834734.844427][3928:3933] CHIP:TOO: [11]: 10 - [1651834734.844451][3928:3933] CHIP:TOO: [12]: 11 - [1651834734.844475][3928:3933] CHIP:TOO: [13]: 12 - [1651834734.844499][3928:3933] CHIP:TOO: [14]: 65528 - [1651834734.844523][3928:3933] CHIP:TOO: [15]: 65529 - [1651834734.844548][3928:3933] CHIP:TOO: [16]: 65531 - [1651834734.844571][3928:3933] CHIP:TOO: [17]: 65532 - [1651834734.844596][3928:3933] CHIP:TOO: [18]: 65533 - disabled: true + PICS: DGWIFI.S.F00 || DGWIFI.S.F01 + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + minValue: 0 + maxValue: 3 + + - label: "TH reads AttributeList from DUT" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 2, 3, 4, 65528, 65529, 65531, 65532, 65533] + + - label: + "TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList + from DUT" + PICS: DGWIFI.S.F00 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [6, 7, 8, 9, 10] + + - label: + "TH reads Feature dependent(DGWIFI.S.F01) attributes in attributeList + from DUT" + PICS: DGWIFI.S.F01 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [5, 12] + + - label: + "TH reads optional attribute (CurrentMaxRate) in AttributeList from + DUT" + PICS: DGWIFI.S.A000b + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [11] - label: "TH reads AcceptedCommandList from DUT" - verification: | - ./chip-tool wifinetworkdiagnostics read accepted-command-list 1 0 - - Verify " AcceptedCommandList " on the TH(Chip-tool) Log: - - [1651788161.332422][241228:241233] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0036 Attribute 0x0000_FFF9 DataVersion: 3097381936 - [1651788161.332475][241228:241233] CHIP:TOO: AcceptedCommandList: 1 entries - [1651788161.332500][241228:241233] CHIP:TOO: [1]: 0 - disabled: true + PICS: " !DGWIFI.S.F01 " + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list + + - label: + "TH reads Feature dependent(DGWIFI.S.F01) command in + AcceptedCommandList from DUT" + PICS: DGWIFI.S.F01 + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [0] - label: "TH reads GeneratedCommandList from DUT" - verification: | - ./chip-tool wifinetworkdiagnostics read generated-command-list 1 0 - - Verify " GeneratedCommandList " on the TH(Chip-tool) Log: - - [1651788208.608429][241239:241244] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0036 Attribute 0x0000_FFF8 DataVersion: 3097381936 - [1651788208.608490][241239:241244] CHIP:TOO: GeneratedCommandList: 0 entries - disabled: true - - - label: "TH reads EventList from DUT" - verification: | - (Out of scope for v1.0) - disabled: true + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_DLOG_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DLOG_1_1.yaml index 3b8eb6eb42cf96..76dbc6c3572ba7 100644 --- a/src/app/tests/suites/certification/Test_TC_DLOG_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DLOG_1_1.yaml @@ -11,7 +11,6 @@ # 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: 56.1.1. [TC-DLOG-1.1] Global Attributes [DUT-Server] @@ -20,82 +19,69 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic" + cluster: "Diagnostic Logs" endpoint: 0 tests: - - label: "Commission DUT to TH" - verification: | - - disabled: true + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "TH reads the ClusterRevision from DUT" - verification: | - sudo ./chip-tool diagnosticlogs read cluster-revision 1 0 - - Verify on the TH Log: - - [1653983972.206171][5186:5191] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0032 Attribute 0x0000_FFFD DataVersion: 2389393200 - [1653983972.206236][5186:5191] CHIP:TOO: ClusterRevision: 1 - disabled: true + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: int16u - label: "TH reads the FeatureMap from DUT" - verification: | - sudo ./chip-tool diagnosticlogs read feature-map 1 0 - - Verify on the TH Log: - - [1653983676.882544][5166:5171] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0032 Attribute 0x0000_FFFC DataVersion: 2389393200 - [1653983676.882637][5166:5171] CHIP:TOO: FeatureMap: 0 - disabled: true + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 - label: "TH reads AttributeList from DUT" - verification: | - sudo ./chip-tool diagnosticlogs read attribute-list 1 0 - - Verify on the TH Log: - - [1649670392.536999][3576:3581] CHIP:DMG: - [1649670392.537040][3576:3581] CHIP:DMG: SuppressResponse = true, - [1649670392.537081][3576:3581] CHIP:DMG: InteractionModelRevision = 1 - [1649670392.537119][3576:3581] CHIP:DMG: } - [1649670392.537695][3576:3581] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0032 Attribute 0x0000_FFFB DataVersion: 1216963889 - [1649670392.537917][3576:3581] CHIP:TOO: AttributeList: 3 entries - [1649670392.537985][3576:3581] CHIP:TOO: [1]: 65528 - [1649670392.538030][3576:3581] CHIP:TOO: [2]: 65529 - [1649670392.538071][3576:3581] CHIP:TOO: [3]: 65531 - disabled: true + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65531, 65532, 65533] - label: "TH reads AcceptedCommandList from DUT" - verification: | - sudo ./chip-tool diagnosticlogs read accepted-command-list 1 0 - - Verify on the TH Log: - - [1649670700.139000][3624:3629] CHIP:DMG: - [1649670700.139033][3624:3629] CHIP:DMG: SuppressResponse = true, - [1649670700.139066][3624:3629] CHIP:DMG: InteractionModelRevision = 1 - [1649670700.139097][3624:3629] CHIP:DMG: } - [1649670700.139387][3624:3629] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0032 Attribute 0x0000_FFF9 DataVersion: 1216963889 - [1649670700.139473][3624:3629] CHIP:TOO: AcceptedCommandList: 1 entries - [1649670700.139528][3624:3629] CHIP:TOO: [1]: 0 - disabled: true + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [0] + constraints: + type: list - label: "TH reads GeneratedCommandList from DUT" - verification: | - sudo ./chip-tool diagnosticlogs read generated-command-list 1 0 - - Verify on the TH Log: - - [1649670576.965898][3602:3607] CHIP:DMG: - [1649670576.965927][3602:3607] CHIP:DMG: SuppressResponse = true, - [1649670576.965955][3602:3607] CHIP:DMG: InteractionModelRevision = 1 - [1649670576.965987][3602:3607] CHIP:DMG: } - [1649670576.966225][3602:3607] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0032 Attribute 0x0000_FFF8 DataVersion: 1216963889 - [1649670576.966330][3602:3607] CHIP:TOO: GeneratedCommandList: 0 entries - disabled: true - - - label: "TH reads EventList from DUT" - verification: | - Event-list is not implemented - disabled: true + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [1] + constraints: + type: list + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_FLABEL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_FLABEL_1_1.yaml index 67c2cffc2bd61a..11a5dfb3d8af40 100644 --- a/src/app/tests/suites/certification/Test_TC_FLABEL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLABEL_1_1.yaml @@ -11,7 +11,6 @@ # 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: 98.1.1. [TC-FLABEL-1.1] Global Attributes [DUT-server] @@ -20,77 +19,69 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 + cluster: "Fixed Label" + endpoint: 1 tests: - - label: "Commission DUT to TH" - verification: | - verification step to be updated. - disabled: true + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "TH reads the ClusterRevision from DUT" - verification: | - ./chip-tool fixedlabel read cluster-revision 1 0 - - On TH(chip-tool), verify that the DUT responsds ClusterRevision attribute as the value 1 - - [1651124058.497301][2367:2372] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_FFFD DataVersion: 3688229931 - [1651124058.498753][2367:2372] CHIP:TOO: ClusterRevision: 1 - [1651124058.498906][2367:2372] CHIP:EM: Sending Standalone Ack for MessageCounter:8872582 on exchange 60871i - disabled: true + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: int16u - label: "TH reads the FeatureMap from DUT" - verification: | - ./chip-tool fixedlabel read feature-map 1 0 - - On TH(chip-tool), verify that DUT responds the Featuremap value as 0 - - [1653459204.749193][24610:24615] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_FFFC DataVersion: 4022759920 - [1653459204.749266][24610:24615] CHIP:TOO: FeatureMap: 0 - [1653459204.749410][24610:24615] CHIP:EM: Sending Standalone Ack for MessageCounter:7681110 on exchange 50174i - disabled: true + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 - label: "TH reads AttributeList from DUT" - verification: | - ./chip-tool fixedlabel read attribute-list 1 0 - - On TH(chip-tool), verify that DUT responds as list of supported attributes as 6 entries - - [1656929388.949001][6141:6146] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_FFFB DataVersion: 2146772891 - [1656929388.949100][6141:6146] CHIP:TOO: AttributeList: 6 entries - [1656929388.949135][6141:6146] CHIP:TOO: [1]: 0 - [1656929388.949165][6141:6146] CHIP:TOO: [2]: 65528 - [1656929388.949193][6141:6146] CHIP:TOO: [3]: 65529 - [1656929388.949221][6141:6146] CHIP:TOO: [4]: 65531 - [1656929388.949249][6141:6146] CHIP:TOO: [5]: 65532 - [1656929388.949277][6141:6146] CHIP:TOO: [6]: 65533 - [1656929388.949395][6141:6146] CHIP:EM: Sending Standalone Ack for MessageCounter:111128598 on exchange 9716i - disabled: true - - - label: "TH reads EventList from DUT" - verification: | - Out of scope for V1.0 - disabled: true + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 65528, 65529, 65531, 65532, 65533] - label: "TH reads AcceptedCommandList from DUT" - verification: | - ./chip-tool fixedlabel read accepted-command-list 1 0 - - On TH(chip-tool), verify that DUT responds as list of Accepted Commands as 0 entries - - [1651124239.450485][2392:2397] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_FFF9 DataVersion: 3688229931 - [1651124239.450576][2392:2397] CHIP:TOO: AcceptedCommandList: 0 entries - [1651124239.450713][2392:2397] CHIP:EM: Sending Standalone Ack for MessageCounter:5032784 on exchange 23524i - disabled: true + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list - label: "TH reads GeneratedCommandList from DUT" - verification: | - ./chip-tool fixedlabel read generated-command-list 1 0 - - On TH(chip-tool), verify that DUT responds as list of GeneratedCommands as 0 entries - - [1651124266.980698][2527:2532] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_FFF8 DataVersion: 3688229931 - [1651124266.980776][2527:2532] CHIP:TOO: GeneratedCommandList: 0 entries - [1651124266.980897][2527:2532] CHIP:EM: Sending Standalone Ack for MessageCounter:11345894 on exchange 5110i - disabled: true + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_FLABEL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_FLABEL_2_1.yaml index 8eba3aa38999a5..7f42572cfa428c 100644 --- a/src/app/tests/suites/certification/Test_TC_FLABEL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLABEL_2_1.yaml @@ -13,84 +13,45 @@ # 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.1. [TC-FLABEL-2.1] Fixed Label cluster [DUT-server] +name: 98.2.1. [TC-FLABEL-2.1] Fixed Label cluster [DUT-server] PICS: - FLABEL.S config: nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 + cluster: "Fixed Label" + endpoint: 1 tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + - label: "TH reads LabelList from the DUT" PICS: FLABEL.S.A0000 - verification: | - ./chip-tool fixedlabel read label-list 1 0 - - On TH(chip-tool), verify that DUT responds with labellist empty or has one or more entries, each entry should contain label and value field - - [1651124649.820293][2819:2824] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0040 Attribute 0x0000_0000 DataVersion: 3688229931 - [1651124649.820478][2819:2824] CHIP:TOO: label list: 4 entries - [1651124649.820534][2819:2824] CHIP:TOO: [1]: { - [1651124649.820570][2819:2824] CHIP:TOO: Label: room - [1651124649.820602][2819:2824] CHIP:TOO: Value: bedroom 2 - [1651124649.820636][2819:2824] CHIP:TOO: } - [1651124649.820676][2819:2824] CHIP:TOO: [2]: { - [1651124649.820709][2819:2824] CHIP:TOO: Label: orientation - [1651124649.820741][2819:2824] CHIP:TOO: Value: North - [1651124649.820773][2819:2824] CHIP:TOO: } - [1651124649.820812][2819:2824] CHIP:TOO: [3]: { - [1651124649.820845][2819:2824] CHIP:TOO: Label: floor - [1651124649.820875][2819:2824] CHIP:TOO: Value: 2 - [1651124649.820906][2819:2824] CHIP:TOO: } - [1651124649.820945][2819:2824] CHIP:TOO: [4]: { - [1651124649.820977][2819:2824] CHIP:TOO: Label: direction - [1651124649.821008][2819:2824] CHIP:TOO: Value: up - [1651124649.821039][2819:2824] CHIP:TOO: } - [1651124649.821193][2819:2824] CHIP:EM: Sending Standalone Ack for MessageCounter:2439070 on exchange 10798i - disabled: true + command: "readAttribute" + attribute: "label list" + response: + constraints: + type: list - label: "TH tries to write LabelList attribute of the DUT by setting Label = Test_Label, Value= Test_Value" PICS: FLABEL.S.A0000 - verification: | - ./chip-tool fixedlabel write-by-id 0x00 "["label","Testlabel", "value","testvalue"]" 1 0 - - On TH(chip-tool), Verify the status code as UNSUPPORTED_WRITE - - [1657629968.892879][2505:2510] CHIP:DMG: WriteResponseMessage = - [1657629968.892909][2505:2510] CHIP:DMG: { - [1657629968.892937][2505:2510] CHIP:DMG: AttributeStatusIBs = - [1657629968.892975][2505:2510] CHIP:DMG: [ - [1657629968.893005][2505:2510] CHIP:DMG: AttributeStatusIB = - [1657629968.893043][2505:2510] CHIP:DMG: { - [1657629968.893077][2505:2510] CHIP:DMG: AttributePathIB = - [1657629968.893119][2505:2510] CHIP:DMG: { - [1657629968.893160][2505:2510] CHIP:DMG: Endpoint = 0x0, - [1657629968.893205][2505:2510] CHIP:DMG: Cluster = 0x40, - [1657629968.893247][2505:2510] CHIP:DMG: Attribute = 0x0000_0000, - [1657629968.893286][2505:2510] CHIP:DMG: } - [1657629968.893329][2505:2510] CHIP:DMG: - [1657629968.893370][2505:2510] CHIP:DMG: StatusIB = - [1657629968.893412][2505:2510] CHIP:DMG: { - [1657629968.893454][2505:2510] CHIP:DMG: status = 0x88 (UNSUPPORTED_WRITE), - [1657629968.893554][2505:2510] CHIP:DMG: }, - [1657629968.893594][2505:2510] CHIP:DMG: - [1657629968.893626][2505:2510] CHIP:DMG: }, - [1657629968.893662][2505:2510] CHIP:DMG: - [1657629968.893692][2505:2510] CHIP:DMG: ], - [1657629968.893729][2505:2510] CHIP:DMG: - [1657629968.893758][2505:2510] CHIP:DMG: InteractionModelRevision = 1 - [1657629968.893787][2505:2510] CHIP:DMG: } - [1657629968.893871][2505:2510] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1657629968.893911][2505:2510] CHIP:TOO: Response Failure: IM Error 0x00000588: General error: 0x88 (UNSUPPORTED_WRITE) - disabled: true + command: "writeAttribute" + attribute: "label list" + arguments: + value: [{ label: "Test_Label", value: "Test_Value" }] + response: + error: UNSUPPORTED_WRITE - label: "TH reads LabelList from the DUT" - PICS: FLABEL.S.A0000 verification: | ./chip-tool fixedlabel read label-list 1 0 @@ -115,4 +76,12 @@ tests: [1651124649.821008][2819:2824] CHIP:TOO: Value: up [1651124649.821039][2819:2824] CHIP:TOO: } [1651124649.821193][2819:2824] CHIP:EM: Sending Standalone Ack for MessageCounter:2439070 on exchange 10798i - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && FLABEL.S.A0000 + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_G_1_1.yaml b/src/app/tests/suites/certification/Test_TC_G_1_1.yaml index 2e2c1d967e2aac..dc5149bf85842e 100644 --- a/src/app/tests/suites/certification/Test_TC_G_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_1_1.yaml @@ -11,7 +11,6 @@ # 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: 121.1.1. [TC-G-1.1] Global Attributes [DUT-Server] @@ -20,80 +19,79 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 + cluster: "Groups" + endpoint: 1 tests: - - label: "Commission DUT to TH" - verification: | - verification step to be updated. - disabled: true + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "TH reads the ClusterRevision from DUT" - verification: | - ./chip-tool groups read cluster-revision 1 1 - - Verify the "clusterrevision value" on the TH(Chip-tool) Log: - - [1651216621.203474][2391:2396] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_FFFD DataVersion: 745654550 - [1651216621.204919][2391:2396] CHIP:TOO: ClusterRevision: 4 - disabled: true + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 4 + constraints: + type: int16u - label: "TH reads the FeatureMap from DUT" - verification: | - ./chip-tool groups read feature-map 1 1 - - Verify the "featuremap value" on the TH(Chip-tool) Log: + PICS: " !G.S.F00 " + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 - [1653556224.547920][18764:18769] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_FFFC DataVersion: 3409054639 - [1653556224.548038][18764:18769] CHIP:TOO: FeatureMap: 1 - disabled: true + - label: "TH reads the FeatureMap from DUT" + PICS: G.S.F00 + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 1 + constraints: + type: bitmap32 - label: "TH reads AttributeList from DUT" - verification: | - ./chip-tool groups read attribute-list 1 1 - - Verify the "attibute list contains the mandatory attributes and global attributes" on the TH(Chip-tool) Log: - - [1653556295.417734][18773:18779] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_FFFB DataVersion: 3409054639 - [1653556295.417900][18773:18779] CHIP:TOO: AttributeList: 6 entries - [1653556295.417971][18773:18779] CHIP:TOO: [1]: 0 - [1653556295.418015][18773:18779] CHIP:TOO: [2]: 65528 - [1653556295.418057][18773:18779] CHIP:TOO: [3]: 65529 - [1653556295.418098][18773:18779] CHIP:TOO: [4]: 65531 - [1653556295.418138][18773:18779] CHIP:TOO: [5]: 65532 - [1653556295.418179][18773:18779] CHIP:TOO: [6]: 65533 - disabled: true - - - label: "TH reads EventList from DUT" - verification: | - Out of scope for V1.0 - disabled: true + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 65528, 65529, 65531, 65532, 65533] - label: "TH reads AcceptedCommandList from DUT" - verification: | - ./chip-tool groups read accepted-command-list 1 1 - - Verify the "AcceptedCommands" on the TH(Chip-tool) Log: - - [1651217107.034926][2435:2440] CHIP:TOO: AcceptedCommandList: 6 entries - [1651217107.034984][2435:2440] CHIP:TOO: [1]: 0 - [1651217107.035028][2435:2440] CHIP:TOO: [2]: 1 - [1651217107.035070][2435:2440] CHIP:TOO: [3]: 2 - [1651217107.035112][2435:2440] CHIP:TOO: [4]: 3 - [1651217107.035153][2435:2440] CHIP:TOO: [5]: 4 - [1651217107.035194][2435:2440] CHIP:TOO: [6]: 5 - disabled: true + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [0, 1, 2, 3, 4, 5] - label: "TH reads GeneratedCommandList from DUT" - verification: | - ./chip-tool groups read generated-command-list 1 1 - - Verify the "GeneratedCommands" on the TH(Chip-tool) Log: - - [1651217152.020233][2444:2449] CHIP:TOO: GeneratedCommandList: 4 entries - [1651217152.020276][2444:2449] CHIP:TOO: [1]: 0 - [1651217152.020312][2444:2449] CHIP:TOO: [2]: 1 - [1651217152.020346][2444:2449] CHIP:TOO: [3]: 2 - [1651217152.020380][2444:2449] CHIP:TOO: [4]: 3 - disabled: true + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + constraints: + type: list + contains: [0, 1, 2, 3] + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_G_2_1.yaml b/src/app/tests/suites/certification/Test_TC_G_2_1.yaml index d7ea24c455cbbe..555c3c9b6dfe26 100644 --- a/src/app/tests/suites/certification/Test_TC_G_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_2_1.yaml @@ -13,46 +13,62 @@ # 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: 125.2.1. [TC-G-2.1] Attributes [DUT-Server] +name: 120.2.1. [TC-G-2.1] Attributes [DUT-Server] PICS: - G.S config: nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 + cluster: "Groups" + endpoint: 1 tests: - - label: "TH reads NameSupport attribute from DUT" - PICS: G.S.A0000 - verification: | - ./chip-tool groups read name-support 1 1 + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - Verify the "name support value" on the TH(Chip-tool) Log: + - label: "TH reads NameSupport attribute from DUT" + PICS: G.S.A0000 && G.S.F00 + command: "readAttribute" + attribute: "name support" + response: + value: 128 + saveAs: NameSupportFeatureSupportedValue - [1651217306.461810][2457:2462] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_0000 DataVersion: 745654550 - [1651217306.461894][2457:2462] CHIP:TOO: name support: 128(binary:10000000) - disabled: true + - label: "TH reads NameSupport attribute from DUT" + PICS: G.S.A0000 && !G.S.F00 + command: "readAttribute" + attribute: "name support" + response: + value: 0 + saveAs: NameSupportValue - label: "TH writes NameSupport attribute as 0x80 EXOR the value as read in step 1" - verification: | - ./chip-tool groups write-by-id 0x0000 126 1 1 - - Verify the "response is UNSUPPORTED_WRITE" on the TH(Chip-tool) Log: - - [1651217949.041814][2514:2519] CHIP:DMG: } - [1651217949.041889][2514:2519] CHIP:TOO: Response Failure: IM Error 0x00000588: General error: 0x88 (UNSUPPORTED_WRITE) - disabled: true + PICS: G.S.A0000 + command: "writeAttribute" + attribute: "name support" + arguments: + value: 128 + response: + error: UNSUPPORTED_WRITE - label: "TH reads NameSupport attribute from DUT" - verification: | - ./chip-tool groups read name-support 1 1 + PICS: G.S.A0000 && G.S.F00 + command: "readAttribute" + attribute: "name support" + response: + value: NameSupportFeatureSupportedValue - Verify the "name support value" on the TH(Chip-tool) Log: - - [1651217306.461810][2457:2462] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0004 Attribute 0x0000_0000 DataVersion: 745654550 - [1651217306.461894][2457:2462] CHIP:TOO: name support: 128 - disabled: true + - label: "TH reads NameSupport attribute from DUT" + PICS: G.S.A0000 && !G.S.F00 + command: "readAttribute" + attribute: "name support" + response: + value: NameSupportValue diff --git a/src/app/tests/suites/certification/Test_TC_ILL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_ILL_2_2.yaml index 8b72b89848bade..ddabc3deaed63e 100644 --- a/src/app/tests/suites/certification/Test_TC_ILL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_ILL_2_2.yaml @@ -20,50 +20,92 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 + cluster: "Illuminance Measurement" + endpoint: 1 tests: - - label: - "Commission DUT to TH (can be skipped if done in a preceding test)." - verification: | - verification step to be updated. - disabled: true + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - - label: - "Test Harness Client reads MinMeasuredValue attribute and - MaxMeasuredValue attribute from DUT." - PICS: ILL.S.A0001 && ILL.S.A0002 - verification: | - ./chip-tool illuminancemeasurement read min-measured-value 1 1 - On TH(chip-tool), verify the MinMeasuredValue as 1 - [1650881571.375482][2777:2782] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0400 Attribute 0x0000_0001 DataVersion: 1034665079 - [1650881571.375596][2777:2782] CHIP:TOO: MinMeasuredValue: 1 + - label: "TH reads MinMeasuredValue attribute from DUT" + PICS: ILL.S.A0001 + command: "readAttribute" + attribute: "MinMeasuredValue" + response: + saveAs: MinMeasuredValue + constraints: + type: int16u - ./chip-tool illuminancemeasurement read max-measured-value 1 1 - On TH(chip-tool), verify the MaxMeasuredValue as 65534 - [1650881715.935533][2791:2797] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0400 Attribute 0x0000_0002 DataVersion: 1034665079 - [1650881715.935645][2791:2797] CHIP:TOO: MaxMeasuredValue: 65534 - disabled: true + - label: "TH reads MaxMeasuredValue attribute from DUT" + PICS: ILL.S.A0002 + command: "readAttribute" + attribute: "MaxMeasuredValue" + response: + saveAs: MaxMeasuredValue + constraints: + type: int16u - label: "Cover the sensor or darken the room" verification: | - currently we can"t do this test-step in chip-tool - disabled: true + Manual operation + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for Success" + - name: "expectedValue" + value: "y" + + - label: "Wait 1s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 1000 - label: "After a few seconds, TH reads MeasuredValue attribute from DUT." - PICS: ILL.S.A0000 - verification: | - ./chip-tool illuminancemeasurement read measured-value 1 1 - disabled: true + PICS: ILL.S.A0000 && PICS_SKIP_SAMPLE_APP + command: "readAttribute" + attribute: "MeasuredValue" + response: + constraints: + type: int16u + minValue: 0 - label: "Expose the sensor again to light" verification: | - currently we can"t do this test-step in chip-tool - disabled: true + Manual operation + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT + arguments: + values: + - name: "message" + value: "Please enter 'y' for Success" + - name: "expectedValue" + value: "y" + + - label: "Wait 1s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 1000 - label: "After a few seconds, TH reads MeasuredValue attribute from DUT." - PICS: ILL.S.A0000 - verification: | - ./chip-tool illuminancemeasurement read measured-value 1 1 - disabled: true + PICS: ILL.S.A0000 && PICS_SKIP_SAMPLE_APP + command: "readAttribute" + attribute: "MeasuredValue" + response: + constraints: + type: int16u + maxValue: 65534 diff --git a/src/app/tests/suites/certification/Test_TC_LCFG_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LCFG_1_1.yaml index d94ff98a8a8421..3322dbbe613ffe 100644 --- a/src/app/tests/suites/certification/Test_TC_LCFG_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LCFG_1_1.yaml @@ -11,92 +11,77 @@ # 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: 99.1.1. [TC-LCFG-1.1] Global Attributes [DUT-Server] +name: 101.1.1. [TC-LCFG-1.1] Global Attributes [DUT-Server] PICS: - LCFG.S config: nodeId: 0x12344321 - cluster: "Basic" + cluster: "Localization Configuration" endpoint: 0 tests: - - label: "Commission TH to DUT" - verification: | - verification step to be updated. - disabled: true - - - label: "{THread} (0xFFFD) ClusterRevision attribute" - verification: | - ./chip-tool localizationconfiguration read cluster-revision 1 0 - - On TH(chip-tool), verify that DUT sends ClusterRevision attribute value as 1 - - [1649330698.587235][4440:4445] CHIP:DMG: - [1649330698.587269][4440:4445] CHIP:DMG: SuppressResponse = true, - [1649330698.587315][4440:4445] CHIP:DMG: InteractionModelRevision = 1 - [1649330698.587347][4440:4445] CHIP:DMG: } - [1649330698.587556][4440:4445] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_FFFD DataVersion: 419421945 - [1649330698.587643][4440:4445] CHIP:TOO: ClusterRevision: 1 - disabled: true - - - label: "{THread} (0xFFFC) FeatureMap attribute" - verification: | - ./chip-tool localizationconfiguration read feature-map 1 0 - - On TH(chip-tool), verify that DUT sends FeatureMap attribute value as 0 - [1653462414.221894][29485:29490] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_FFFC DataVersion: 2352052086 - [1653462414.222033][29485:29490] CHIP:TOO: FeatureMap: 0 - [1653462414.222207][29485:29490] CHIP:EM: Sending Standalone Ack for MessageCounter:4940181 on exchange 7821i - disabled: true - - - label: "{THread} (0xFFFB) AttributeList attribute" - verification: | - ./chip-tool localizationconfiguration read attribute-list 1 0 - On TH(chip-tool), verify that DUT sends a list of supported attributes - - [1653462309.061114][29477:29482] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_FFFB DataVersion: 2352052086 - [1653462309.061199][29477:29482] CHIP:TOO: AttributeList: 7 entries - [1653462309.061233][29477:29482] CHIP:TOO: [1]: 0 - [1653462309.061258][29477:29482] CHIP:TOO: [2]: 1 - [1653462309.061284][29477:29482] CHIP:TOO: [3]: 65528 - [1653462309.061308][29477:29482] CHIP:TOO: [4]: 65529 - [1653462309.061332][29477:29482] CHIP:TOO: [5]: 65531 - [1653462309.061355][29477:29482] CHIP:TOO: [6]: 65532 - [1653462309.061379][29477:29482] CHIP:TOO: [7]: 65533 - [1653462309.061492][29477:29482] CHIP:EM: Sending Standalone Ack for MessageCounter:13553423 on exchange 61180i - disabled: true - - - label: "{THread} (0xFFFA) EventList attribute" - verification: | - out 0f scope for V1.0 - disabled: true - - - label: "{THread} (0xFFF9) AcceptedCommandList attribute" - verification: | - ./chip-tool localizationconfiguration read accepted-command-list 1 0 - On TH(chip-too), verify that DUT responsds as list of Accepted Command as 0 entries. - - [1649331020.031045][4520:4525] CHIP:DMG: - [1649331020.031081][4520:4525] CHIP:DMG: SuppressResponse = true, - [1649331020.031119][4520:4525] CHIP:DMG: InteractionModelRevision = 1 - [1649331020.031153][4520:4525] CHIP:DMG: } - [1649331020.031374][4520:4525] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_FFF9 DataVersion: 419421945 - [1649331020.031470][4520:4525] CHIP:TOO: AcceptedCommandList: 0 entries - disabled: true - - - label: "{THread} (0xFFF8) GeneratedCommandList attribute" - verification: | - ./chip-tool localizationconfiguration read generated-command-list 1 0 - On TH(chip-tool), verify that DUT responsds as list of GeneratedCommandList as 0 entries. - - [1649330937.798986][4508:4513] CHIP:DMG: - [1649330937.799022][4508:4513] CHIP:DMG: SuppressResponse = true, - [1649330937.799062][4508:4513] CHIP:DMG: InteractionModelRevision = 1 - [1649330937.799096][4508:4513] CHIP:DMG: } - [1649330937.799317][4508:4513] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002B Attribute 0x0000_FFF8 DataVersion: 419421945 - [1649330937.799413][4508:4513] CHIP:TOO: GeneratedCommandList: 0 entries - disabled: true + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH reads the ClusterRevision from DUT" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: int16u + + - label: "TH reads the FeatureMap from DUT" + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 + + - label: "TH reads AttributeList from DUT" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 65528, 65529, 65531, 65532, 65533] + + - label: "TH reads AcceptedCommandList from DUT" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list + + - label: "TH reads GeneratedCommandList from DUT" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml b/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml index 5a3b2864a8f080..8e994af41e62d5 100644 --- a/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml @@ -11,88 +11,105 @@ # 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: 4.1.2. [TC-LTIME-1.2] Global Attributes [DUT as Server] +name: 108.1.2. [TC-LTIME-1.2] Global Attributes [DUT as Server] PICS: - LTIME.S config: nodeId: 0x12344321 - cluster: "Basic" + cluster: "Time Format Localization" endpoint: 0 tests: - - label: "Commission TH to DUT" - verification: | - verification step to be updated. - disabled: true - - - label: "{THread} (0xFFFD) ClusterRevision attribute" + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH reads the ClusterRevision from DUT" PICS: LTIME.S.Afffd - verification: | - ./chip-tool timeformatlocalization read cluster-revision 1 0 - On TH(chip-tool), verify that DUT sends ClusterRevision attribute value as 1 - - [1651185991606] [10988:109915] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFD DataVersion: 3316530441 - [1651185991606] [10988:109915] CHIP: [TOO] ClusterRevision: 1 - disabled: true - - - label: "{THread} (0xFFFC) FeatureMap attribute" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: int16u + + - label: "TH reads the FeatureMap from DUT" PICS: LTIME.S.Afffc - verification: | - Out of scope for V1.0 - - https://github.com/project-chip/connectedhomeip/issues/18989 - disabled: true - - - label: "{THread} (0xFFFB) AttributeList attribute" + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + minValue: 0 + maxValue: 1 + + - label: "TH reads AttributeList from DUT" PICS: LTIME.S.Afffb - verification: | - ./chip-tool timeformatlocalization read attribute-list 1 0 - - - On TH(chip-tool), verify that DUT sends a list of supported attributes - - [1653999139.214139][7477:7482] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFFB DataVersion: 3201720795 - [1653999139.214208][7477:7482] CHIP:TOO: AttributeList: 8 entries - [1653999139.214241][7477:7482] CHIP:TOO: [1]: 0 - [1653999139.214267][7477:7482] CHIP:TOO: [2]: 1 - [1653999139.214293][7477:7482] CHIP:TOO: [3]: 2 - [1653999139.214320][7477:7482] CHIP:TOO: [4]: 65528 - [1653999139.214345][7477:7482] CHIP:TOO: [5]: 65529 - [1653999139.214371][7477:7482] CHIP:TOO: [6]: 65531 - [1653999139.214397][7477:7482] CHIP:TOO: [7]: 65532 - [1653999139.214422][7477:7482] CHIP:TOO: [8]: 65533 - [1653999139.214522][7477:7482] CHIP:EM: Sending Standalone Ack for MessageCounter:5643805 on exchange 4737i - disabled: true - - - label: "{THread} (0xFFFA) EventList attribute" - PICS: LTIME.S.Afffa - verification: | - Out of scope for V1.0 - disabled: true - - - label: "{THread} (0xFFF9) AcceptedCommandList attribute" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 65528, 65529, 65531, 65532, 65533] + + - label: + "TH reads optional attribute(ActiveCalendarType) in AttributeList from + DUT" + PICS: LTIME.S.Afffb && LTIME.S.A0001 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [1] + + - label: + "TH reads optional attribute(SupportedCalendarTypes) in AttributeList + from DUT" + PICS: LTIME.S.Afffb && LTIME.S.A0002 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [2] + + - label: "TH reads AcceptedCommandList from DUT" PICS: LTIME.S.Afff9 - verification: | - ./chip-tool timeformatlocalization read accepted-command-list 1 0 - - On TH(chip-tool), verify that DUT responsds as list of Accepted Command as 0 entries. - - [1651186189564] [11076:112595] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFF9 DataVersion: 3316530441 - [1651186189564] [11076:112595] CHIP: [TOO] AcceptedCommandList: 0 entries - disabled: true - - - label: "{THread} (0xFFF8) GeneratedCommandList attribute" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list + + - label: "TH reads GeneratedCommandList from DUT" PICS: LTIME.S.Afff8 - verification: | - ./chip-tool timeformatlocalization read generated-command-list 1 0 - - - On TH(chip-tool), verify that DUT responsds as list of GeneratedCommandList as 0 entries. - - [1651191789962] [13591:180646] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002C Attribute 0x0000_FFF8 DataVersion: 3316530441 - [1651191789963] [13591:180646] CHIP: [TOO] GeneratedCommandList: 0 entries - disabled: true + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_LUNIT_1_2.yaml b/src/app/tests/suites/certification/Test_TC_LUNIT_1_2.yaml index 1f883211ed1892..9a137a4febf8d0 100644 --- a/src/app/tests/suites/certification/Test_TC_LUNIT_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LUNIT_1_2.yaml @@ -11,78 +11,101 @@ # 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: 105.1.2. [TC-LUNIT-1.2] Global Attributes [DUT as Server] +name: 108.1.2. [TC-LTIME-1.2] Global Attributes [DUT as Server] PICS: - LUNIT.S config: nodeId: 0x12344321 - cluster: "Basic" + cluster: "Unit Localization" endpoint: 0 tests: - - label: "Commission TH to DUT" - verification: | - verification step to be updated. - disabled: true + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - - label: "{THread} (0xFFFD) ClusterRevision attribute" + - label: "TH reads the ClusterRevision from DUT" PICS: LUNIT.S.Afffd - verification: | - ./chip-tool unitlocalization read cluster-revision 1 0 - On TH, verify that DUT sends ClusterRevision attribute value as 1 - [1651186310867] [11123:114108] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_FFFD DataVersion: 486381485 - [1651186310867] [11123:114108] CHIP: [TOO] ClusterRevision: 1 - disabled: true + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: int16u - - label: "{THread} (0xFFFC) FeatureMap attribute" - PICS: LUNIT.S.Afffc - verification: | - ./chip-tool unitlocalization read feature-map 1 0 + - label: "TH reads the FeatureMap from DUT" + PICS: LUNIT.S.Afffc && !LUNIT.S.F00 + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0 + constraints: + type: bitmap32 - On TH, verify that DUT sends FeatureMap attribute value as 1 - [1651186357789] [11140:114768] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_FFFC DataVersion: 486381485 - [1651186357789] [11140:114768] CHIP: [TOO] FeatureMap: 1 - disabled: true + - label: "TH reads the FeatureMap from DUT" + PICS: LUNIT.S.Afffc && LUNIT.S.F00 + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 1 + constraints: + type: bitmap32 - - label: "{THread} (0xFFFB) AttributeList attribute" + - label: "TH reads AttributeList from DUT" PICS: LUNIT.S.Afffb - verification: | - ./chip-tool unitlocalization read attribute-list 1 0 - On TH, verify that DUT sends a list of supported attributes - [1652335691.917681][3124:3129] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_FFFB DataVersion: 3157629909 - [1652335691.917762][3124:3129] CHIP:TOO: AttributeList: 6 entries - [1652335691.917802][3124:3129] CHIP:TOO: [1]: 0 - [1652335691.917834][3124:3129] CHIP:TOO: [2]: 65528 - [1652335691.917865][3124:3129] CHIP:TOO: [3]: 65529 - [1652335691.917895][3124:3129] CHIP:TOO: [4]: 65531 - [1652335691.917924][3124:3129] CHIP:TOO: [5]: 65532 - [1652335691.917957][3124:3129] CHIP:TOO: [6]: 65533 - disabled: true + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65531, 65532, 65533] - - label: "{THread} (0xFFFA) EventList attribute" - PICS: LUNIT.S.Afffa - verification: | - out of scope for V1.0 - disabled: true + - label: + "TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList" + PICS: LUNIT.S.Afffb && LUNIT.S.F00 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0] - - label: "{THread} (0xFFF9) AcceptedCommandList attribute" + - label: "TH reads AcceptedCommandList from DUT" PICS: LUNIT.S.Afff9 - verification: | - ./chip-tool unitlocalization read accepted-command-list 1 0 - On TH, verify that DUT responsds as list of Accepted Command as 0 entries. - [1651186469211] [11184:116328] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_FFF9 DataVersion: 486381485 - [1651186469211] [11184:116328] CHIP: [TOO] AcceptedCommandList: 0 entries - disabled: true + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list - - label: "{THread} (0xFFF8) GeneratedCommandList attribute" + - label: "TH reads GeneratedCommandList from DUT" PICS: LUNIT.S.Afff8 - verification: | - ./chip-tool unitlocalization read generated-command-list 1 0 - On TH, verify that DUT responsds as list of GeneratedCommandList as 0 entries. - [1651191485645] [13481:177154] CHIP: [TOO] Endpoint: 0 Cluster: 0x0000_002D Attribute 0x0000_FFF8 DataVersion: 486381492 - [1651191485646] [13481:177154] CHIP: [TOO] GeneratedCommandList: 0 entries - disabled: true + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml index 6c2347b8c04b6d..5fc10aabb21232 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml @@ -58,7 +58,7 @@ tests: contains: [0, 15, 17] - label: - "Read the optonal attribute(StartUpCurrentLevel and RemainingTime) in + "Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList" PICS: LVL.S.F01 command: "readAttribute" @@ -69,7 +69,7 @@ tests: contains: [1, 16384] - label: - "Read the optonal attribute(CurrentFrequency, MinFrequency and + "Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in AttributeList" PICS: LVL.S.F02 command: "readAttribute" @@ -79,7 +79,7 @@ tests: type: list contains: [4, 5, 6] - - label: "Read the optonal attribute(MinLevel) in AttributeList" + - label: "Read the optional attribute(MinLevel) in AttributeList" PICS: LVL.S.A0002 command: "readAttribute" attribute: "AttributeList" @@ -88,7 +88,7 @@ tests: type: list contains: [2] - - label: "Read the optonal attribute(MaxLevel) in AttributeList" + - label: "Read the optional attribute(MaxLevel) in AttributeList" PICS: LVL.S.A0003 command: "readAttribute" attribute: "AttributeList" @@ -97,7 +97,7 @@ tests: type: list contains: [3] - - label: "Read the optonal attribute(OnOffTransitionTime) in AttributeList" + - label: "Read the optional attribute(OnOffTransitionTime) in AttributeList" PICS: LVL.S.A0010 command: "readAttribute" attribute: "AttributeList" @@ -106,7 +106,7 @@ tests: type: list contains: [16] - - label: "Read the optonal attribute(OnTransitionTime) in AttributeList" + - label: "Read the optional attribute(OnTransitionTime) in AttributeList" PICS: LVL.S.A0012 command: "readAttribute" attribute: "AttributeList" @@ -115,7 +115,7 @@ tests: type: list contains: [18] - - label: "Read the optonal attribute(OffTransitionTime) in AttributeList" + - label: "Read the optional attribute(OffTransitionTime) in AttributeList" PICS: LVL.S.A0013 command: "readAttribute" attribute: "AttributeList" @@ -124,7 +124,7 @@ tests: type: list contains: [19] - - label: "Read the optonal attribute(DefaultMoveRate) in AttributeList" + - label: "Read the optional attribute(DefaultMoveRate) in AttributeList" PICS: LVL.S.A0014 command: "readAttribute" attribute: "AttributeList" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml index dd270c9b8381da..2b87fb422a8f05 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml @@ -103,6 +103,16 @@ tests: - name: "ms" value: 5000 + - label: "Sends stop command to DUT" + PICS: LVL.S.C03.Rsp + command: "Stop" + arguments: + values: + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 + - label: "Physically verify that the device has stopped transitioning" cluster: "LogCommands" command: "UserPrompt" @@ -114,16 +124,6 @@ tests: - name: "expectedValue" value: "y" - - label: "Sends stop command to DUT" - PICS: LVL.S.C03.Rsp - command: "Stop" - arguments: - values: - - name: "OptionsMask" - value: 0 - - name: "OptionsOverride" - value: 0 - - label: "TH reads CurrentLevel attribute from DUT" PICS: LVL.S.C01.Rsp && LVL.S.C03.Rsp && LVL.S.A0000 command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml index 72ff07f9db86df..ed41fc63926f0d 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml @@ -59,7 +59,7 @@ tests: constraints: type: bitmap8 minValue: 1 - maxValue: 273 + maxValue: 7 - label: "Reads optional attribute: PIROccupiedToUnoccupiedDelay" PICS: OCC.S.A0010 diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_3.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_3.yaml index 83249b00b24c6b..1f806e9d3757a2 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_3.yaml @@ -22,34 +22,34 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 + cluster: "Occupancy Sensing" + endpoint: 1 tests: - - label: "Commission DUT to TH" - verification: | - verification step to be updated. - disabled: true - - - label: "TH reads OccupancySensorType attribute from DUT" + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Reads mandatory attribute constrains: OccupancySensorType" PICS: OCC.S.A0001 - verification: | - ./chip-tool occupancysensing read occupancy-sensor-type 1 1 - - Verify occupancy sensor type value on the TH(Chip-tool) Log: - - [1648461912.765825][9300:9306] CHIP:DMG: } - [1648461912.766013][9300:9306] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0406 Attribute 0x0000_0001 DataVersion: 3082917122 - [1648461912.766089][9300:9306] CHIP:TOO: occupancy sensor type: 0 - disabled: true - - - label: "TH reads OccupancySensorTypeBitmap attribute from DUT" + command: "readAttribute" + attribute: "occupancy sensor type" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 3 + + - label: "Reads mandatory attribute constrains: OccupancySensorTypeBitmap" PICS: OCC.S.A0002 - verification: | - ./chip-tool occupancysensing read occupancy-sensor-type-bitmap 1 1 - - Verify occupancy sensor type bitmap value on the TH(Chip-tool) Log: - - [1648461918.499009][9307:9312] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0406 Attribute 0x0000_0002 DataVersion: 3082917122 - [1648461918.499082][9307:9312] CHIP:TOO: occupancy sensor type bitmap: 1 - disabled: true + command: "readAttribute" + attribute: "occupancy sensor type bitmap" + response: + constraints: + type: bitmap8 + minValue: 1 + maxValue: 7 diff --git a/src/app/tests/suites/certification/Test_TC_OPCREDS_1_2.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_1_2.yaml index ae5f9b86efaeb9..56736aa83f6600 100644 --- a/src/app/tests/suites/certification/Test_TC_OPCREDS_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_1_2.yaml @@ -71,11 +71,6 @@ tests: 0x05, ] - - label: "TH reads EventList from DUT" - verification: | - out of scope for V1.0 - disabled: true - - label: "TH reads AcceptedCommandList from DUT" command: "readAttribute" attribute: "AcceptedCommandList" @@ -91,3 +86,18 @@ tests: constraints: type: list contains: [0x01, 0x03, 0x05, 0x08] + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_PRS_2_2.yaml b/src/app/tests/suites/certification/Test_TC_PRS_2_2.yaml index e592f5e55af813..9526002baa96fc 100644 --- a/src/app/tests/suites/certification/Test_TC_PRS_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_PRS_2_2.yaml @@ -13,48 +13,57 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 3.2.2. [TC-PRS-2.2] Primary functionality with server as DUT +name: 34.2.2. [TC-PRS-2.2] Primary Functionality with Server as DUT PICS: - PRS.S config: nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 + cluster: "Pressure Measurement" + endpoint: 1 tests: - - label: - "Commission DUT to TH (can be skipped if done in a preceding test)." - verification: | - verification step to be updated. - disabled: true + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "TH reads from the DUT the MeasuredValue attribute" PICS: PRS.S.A0000 - verification: | - ./chip-tool pressuremeasurement read measured-value 1 1 - - - verify MeasuredValue on TH(chip-tool) logs: - - CHIP:TOO: MeasuredValue: 0 - disabled: true + command: "readAttribute" + attribute: "MeasuredValue" + response: + saveAs: ValueBeforeChange - label: "Operate on device to change the pressure significantly" - PICS: PRS.M.PressureChange - verification: | - Operate at device - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && PRS.M.PressureChange + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "Wait 2s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 2000 - label: "After a few seconds, TH reads from the DUT the MeasuredValue attribute" - PICS: PRS.S.A0000 - verification: | - ./chip-tool pressuremeasurement read measured-value 1 1 - - verify MeasuredValue on TH(chip-tool) logs: - - CHIP:TOO: MeasuredValue: 1 - disabled: true + PICS: PRS.S.A0000 && PRS.M.PressureChange + command: "readAttribute" + attribute: "MeasuredValue" + response: + constraints: + notValue: ValueBeforeChange diff --git a/src/app/tests/suites/certification/Test_TC_PSCFG_2_1.yaml b/src/app/tests/suites/certification/Test_TC_PSCFG_2_1.yaml index 9d559f8e302bbc..e63f15fcefd7bc 100644 --- a/src/app/tests/suites/certification/Test_TC_PSCFG_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PSCFG_2_1.yaml @@ -20,27 +20,22 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic" + cluster: "Power Source Configuration" endpoint: 0 tests: - label: "Commission DUT to TH" - verification: | - verification step to be updated. - disabled: true + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: "TH reads the Sources attribute from the DUT" PICS: PSCFG.S.A0000 - verification: | - ./chip-tool powersourceconfiguration read sources 1 0 - - verify on TH(chip-tool) that source attribute provides a list, and each entry in the list has to be number of an endpoint having a Power Source cluster. - - The response should look like this: - - [1650273002.441884][8875:8880] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002E Attribute 0x0000_0000 DataVersion: 461632376 - [1653564197.717105][36217:36222] CHIP:TOO: Sources: 3 entries - [1653564197.717154][36217:36222] CHIP:TOO: [1]: 2 - [1653564197.717196][36217:36222] CHIP:TOO: [2]: 1 - [1653564197.717236][36217:36222] CHIP:TOO: [3]: 0 - disabled: true + command: "readAttribute" + attribute: "Sources" + response: + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml index c1e47b6ccf900a..33ab17b54a9b02 100644 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml @@ -31,78 +31,19 @@ tests: - name: "nodeId" value: nodeId - - label: "Read the global attribute: FeatureMap" + - label: + "Read FeatureMap attribute and Check values of flags in this + FeatureMap" + PICS: + (SWTCH.S.F00 || SWTCH.S.F01 || SWTCH.S.F02 || SWTCH.S.F03 || + SWTCH.S.F04) command: "readAttribute" attribute: "FeatureMap" response: - saveAs: FeatureMapValue - - #bitwise check is not implemented in yaml framework - - label: "Check values of flags in this FeatureMap" - verification: | - LS is set to 1; MS, MSR, MSL, - MSM are all set to 0 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && SWTCH.S.F00 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Check values of flags in this FeatureMap" - verification: | - LS is set to 0; MS is set to 1 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && SWTCH.S.F01 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Check values of flags in this FeatureMap" - verification: | - LS is set to 0; MS, MSR are set to 1 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && SWTCH.S.F02 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Check values of flags in this FeatureMap" - verification: | - LS is set to 0; MS, MSR, MSL are all set to 1 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && SWTCH.S.F03 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Check values of flags in this FeatureMap" - verification: | - LS is set to 0; MS, MSR, MSM are all set to 1 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && SWTCH.S.F04 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + constraints: + type: bitmap32 + minValue: 0 + maxValue: 31 - label: "read the global attribute: ClusterRevision" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_ULABEL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_ULABEL_2_1.yaml index 99753e62244e43..973c71075b54a2 100644 --- a/src/app/tests/suites/certification/Test_TC_ULABEL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ULABEL_2_1.yaml @@ -20,22 +20,22 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic" - endpoint: 0 + cluster: "User Label" + endpoint: 1 tests: - - label: "TH reads LabelList from the DUT" - PICS: ULABEL.S.A0000 - verification: | - ./chip-tool userlabel read label-list 1 0 - - On TH(chip-tool), Verify that the LabelList is empty or has one or more entries. Each tuple has following fields: Label field is of type string and have a length up to 16 bytes, Value field is of type string and have a length up to 16 bytes + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - OO: Endpoint: 0 Cluster: 0x0000_0041 Attribute 0x0000_0000 DataVersion: 3074415053 - [1657180589.654586][4697:4702] CHIP:TOO: label list: 1 entries - [1657180589.654652][4697:4702] CHIP:TOO: [1]: { - [1657180589.654696][4697:4702] CHIP:TOO: Label: roomName - [1657180589.654737][4697:4702] CHIP:TOO: Value: master bedroom 1 - [1657180589.654778][4697:4702] CHIP:TOO: } - [1657180589.654901][4697:4702] CHIP:EM: Sending Standalone Ack for MessageCounter:68497701 on exchange 45271i - disabled: true + - label: "TH reads LabelList attribute of the DUT" + PICS: ULABEL.S.A0000 + command: "readAttribute" + attribute: "label list" + response: + constraints: + type: list diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index d75838c3862f92..67322305f85885 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -602,6 +602,7 @@ LTIME.C.A0000.12HR=1 LTIME.C.A0000.24HR=1 #Unit Localization Cluster +LUNIT.S.F00=0 LUNIT.S.A0000=1 LUNIT.S.Afff8=1 LUNIT.S.Afff9=1 diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index 0e862676eb601b..b8864448e0902b 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -29,6 +29,7 @@ "Test_TC_CC_8_1" ], "DeviceManagement": [ + "Test_TC_OPCREDS_1_2", "Test_TC_BINFO_1_1", "Test_TC_BINFO_2_1", "Test_TC_CNET_1_3" @@ -39,7 +40,9 @@ "Test_TC_DGETH_2_1", "Test_TC_DGETH_2_2" ], + "DiagnosticsLogs": ["Test_TC_DLOG_1_1"], "FlowMeasurement": ["Test_TC_FLW_1_1", "Test_TC_FLW_2_1"], + "FixedLabel": ["Test_TC_FLABEL_1_1", "Test_TC_FLABEL_2_1"], "GeneralCommissioning": ["Test_TC_CGEN_1_1", "Test_TC_CGEN_2_1"], "GeneralDiagnostics": ["Test_TC_DGGEN_1_1", "Test_TC_DGGEN_2_1"], "Identify": [ @@ -48,7 +51,11 @@ "Test_TC_I_2_2", "Test_TC_I_2_3" ], - "IlluminanceMeasurement": ["Test_TC_ILL_1_1", "Test_TC_ILL_2_1"], + "IlluminanceMeasurement": [ + "Test_TC_ILL_1_1", + "Test_TC_ILL_2_1", + "Test_TC_ILL_2_2" + ], "OccupancySensing": ["Test_TC_OCC_1_1", "Test_TC_OCC_2_1"], "LevelControl": [ "Test_TC_LVL_1_1", @@ -59,8 +66,12 @@ "Test_TC_LVL_5_1", "Test_TC_LVL_6_1" ], + "LocalizationConfiguration": ["Test_TC_LCFG_1_1"], + "TimeFormatLocalization": ["Test_TC_LTIME_1_1"], + "UnitLocalization": ["Test_TC_LUNIT_1_1"], "UserLabel": [ "Test_TC_ULABEL_1_1", + "Test_TC_ULABEL_2_1", "Test_TC_ULABEL_2_2", "Test_TC_ULABEL_2_3", "Test_TC_ULABEL_2_4" @@ -114,7 +125,11 @@ "Test_TC_OO_2_4" ], "PowerSource": ["Test_TC_PS_1_1", "Test_TC_PS_2_1"], - "PressureMeasurement": ["Test_TC_PRS_1_1", "Test_TC_PRS_2_1"], + "PressureMeasurement": [ + "Test_TC_PRS_1_1", + "Test_TC_PRS_2_1", + "Test_TC_PRS_2_2" + ], "PumpConfigurationControl": [ "Test_TC_PCC_1_1", "Test_TC_PCC_2_1", @@ -122,7 +137,7 @@ "Test_TC_PCC_2_3", "Test_TC_PCC_2_4" ], - "PowerSourceConfiguration": ["Test_TC_PSCFG_1_1"], + "PowerSourceConfiguration": ["Test_TC_PSCFG_1_1", "Test_TC_PSCFG_2_1"], "RelativeHumidityMeasurement": ["Test_TC_RH_1_1", "Test_TC_RH_2_1"], "SecureChannel": ["Test_TC_SC_4_2"], "Switch": ["Test_TC_SWTCH_1_1", "Test_TC_SWTCH_2_1"], @@ -144,7 +159,11 @@ "Test_TC_DGTHREAD_2_3", "Test_TC_DGTHREAD_2_4" ], - "WiFiNetworkDiagnostics": ["Test_TC_DGWIFI_2_1", "Test_TC_DGWIFI_2_3"], + "WiFiNetworkDiagnostics": [ + "Test_TC_DGWIFI_1_1", + "Test_TC_DGWIFI_2_1", + "Test_TC_DGWIFI_2_3" + ], "WindowCovering": [ "Test_TC_WNCV_1_1", "Test_TC_WNCV_2_1", @@ -229,7 +248,9 @@ "Groups": [ "TestGroupMessaging", "TestGroupsCluster", - "TestGroupKeyManagementCluster" + "TestGroupKeyManagementCluster", + "Test_TC_G_1_1", + "Test_TC_G_2_1" ], "collection": [ "AccessControl", @@ -239,13 +260,18 @@ "ColorControl", "DeviceManagement", "Descriptor", + "DiagnosticsLogs", "EthernetNetworkDiagnostics", "FlowMeasurement", + "FixedLabel", "GeneralCommissioning", "GeneralDiagnostics", "Identify", "IlluminanceMeasurement", "LevelControl", + "LocalizationConfiguration", + "UnitLocalization", + "TimeFormatLocalization", "MediaControl", "ModeSelect", "MultipleFabrics", diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index 19f48bc4586852..bfa3a7e67cf84e 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -38,8 +38,6 @@ "Groups": [ "TestGroupDemoCommand", "TestGroupDemoConfig", - "Test_TC_G_1_1", - "Test_TC_G_2_1", "Test_TC_G_2_2", "Test_TC_G_2_3", "Test_TC_G_3_1", @@ -69,7 +67,6 @@ "Test_TC_DA_1_7" ], "DeviceManagement": [ - "Test_TC_OPCREDS_1_2", "Test_TC_BINFO_2_2", "Test_TC_BINFO_2_4", "Test_TC_OPCREDS_3_1", @@ -98,7 +95,6 @@ "Test_TC_CNET_4_22" ], "DiagnosticsLogs": [ - "Test_TC_DLOG_1_1", "Test_TC_DLOG_2_1", "Test_TC_DLOG_2_2", "Test_TC_DLOG_3_1" @@ -112,7 +108,7 @@ "Test_TC_DGGEN_3_1" ], "Identify": ["Test_TC_I_3_1", "Test_TC_I_3_2"], - "IlluminanceMeasurement": ["Test_TC_ILL_2_2", "Test_TC_ILL_3_1"], + "IlluminanceMeasurement": ["Test_TC_ILL_3_1"], "InteractionDataModel": [ "Test_TC_IDM_1_1", "Test_TC_IDM_1_2", @@ -212,11 +208,7 @@ "Test_TC_SU_4_1", "Test_TC_SU_4_2" ], - "PowerSourceConfiguration": [ - "Test_TC_PSCFG_2_1", - "Test_TC_PSCFG_2_2", - "Test_TC_PSCFG_3_1" - ], + "PowerSourceConfiguration": ["Test_TC_PSCFG_2_2", "Test_TC_PSCFG_3_1"], "SecureChannel": [ "Test_TC_SC_1_1", "Test_TC_SC_1_2", @@ -243,7 +235,6 @@ ], "SoftwareDiagnostics": ["Test_TC_DGSW_3_1", "Test_TC_DGSW_3_2"], "WiFiNetworkDiagnostics": [ - "Test_TC_DGWIFI_1_1", "Test_TC_DGWIFI_2_2", "Test_TC_DGWIFI_3_1", "Test_TC_DGWIFI_3_2" @@ -257,7 +248,7 @@ "Test_TC_OCC_3_1", "Test_TC_OCC_3_2" ], - "PressureMeasurement": ["Test_TC_PRS_2_2", "Test_TC_PRS_3_1"], + "PressureMeasurement": ["Test_TC_PRS_3_1"], "PowerSource": ["Test_TC_PS_2_2", "Test_TC_PS_3_1"], "BooleanState": ["Test_TC_BOOL_2_2", "Test_TC_BOOL_3_1"], "ColorControl": [ @@ -283,11 +274,7 @@ "Test_TC_DRLK_3_2", "Test_TC_DRLK_3_3" ], - "LocalizationConfiguration": [ - "Test_TC_LCFG_1_1", - "Test_TC_LCFG_2_1", - "Test_TC_LCFG_3_1" - ], + "LocalizationConfiguration": ["Test_TC_LCFG_2_1", "Test_TC_LCFG_3_1"], "LevelControl": ["Test_TC_LVL_2_3", "Test_TC_LVL_7_1", "Test_TC_LVL_8_1"], "OnOff": ["Test_TC_OO_2_3", "Test_TC_OO_3_1", "Test_TC_OO_3_2"], "RelativeHumidityMeasurement": ["Test_TC_RH_2_2", "Test_TC_RH_3_1"], @@ -310,22 +297,16 @@ "Test_TC_ACT_3_2" ], "TimeFormatLocalization": [ - "Test_TC_LTIME_1_1", "Test_TC_LTIME_1_2", "Test_TC_LTIME_2_1", "Test_TC_LTIME_3_1" ], "UnitLocalization": [ - "Test_TC_LUNIT_1_1", "Test_TC_LUNIT_1_2", "Test_TC_LUNIT_2_1", "Test_TC_LUNIT_3_1" ], - "FixedLabel": [ - "Test_TC_FLABEL_1_1", - "Test_TC_FLABEL_2_1", - "Test_TC_FLABEL_3_1" - ], + "FixedLabel": ["Test_TC_FLABEL_3_1"], "Binding": ["Test_TC_BIND_2_1", "Test_TC_BIND_2_2", "Test_TC_BIND_2_3"], "Scenes": [ "Test_TC_S_1_1", @@ -345,7 +326,7 @@ "Test_TC_ACL_2_9", "Test_TC_ACL_2_10" ], - "UserLabel": ["Test_TC_ULABEL_2_1", "Test_TC_ULABEL_3_1"], + "UserLabel": ["Test_TC_ULABEL_3_1"], "BridgedDeviceBasicInformation": [ "Test_TC_BRBINFO_1_1", "Test_TC_BRBINFO_2_1", diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 688f40adc364a3..bdd9b181fe77c9 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -60,15 +60,19 @@ class TestList : public Command printf("Test_TC_CC_7_3\n"); printf("Test_TC_CC_7_4\n"); printf("Test_TC_CC_8_1\n"); + printf("Test_TC_OPCREDS_1_2\n"); printf("Test_TC_BINFO_1_1\n"); printf("Test_TC_BINFO_2_1\n"); printf("Test_TC_CNET_1_3\n"); printf("Test_TC_DESC_1_1\n"); + printf("Test_TC_DLOG_1_1\n"); printf("Test_TC_DGETH_1_1\n"); printf("Test_TC_DGETH_2_1\n"); printf("Test_TC_DGETH_2_2\n"); printf("Test_TC_FLW_1_1\n"); printf("Test_TC_FLW_2_1\n"); + printf("Test_TC_FLABEL_1_1\n"); + printf("Test_TC_FLABEL_2_1\n"); printf("Test_TC_CGEN_1_1\n"); printf("Test_TC_CGEN_2_1\n"); printf("Test_TC_DGGEN_1_1\n"); @@ -79,6 +83,7 @@ class TestList : public Command printf("Test_TC_I_2_3\n"); printf("Test_TC_ILL_1_1\n"); printf("Test_TC_ILL_2_1\n"); + printf("Test_TC_ILL_2_2\n"); printf("Test_TC_LVL_1_1\n"); printf("Test_TC_LVL_2_1\n"); printf("Test_TC_LVL_2_2\n"); @@ -86,6 +91,9 @@ class TestList : public Command printf("Test_TC_LVL_4_1\n"); printf("Test_TC_LVL_5_1\n"); printf("Test_TC_LVL_6_1\n"); + printf("Test_TC_LCFG_1_1\n"); + printf("Test_TC_LUNIT_1_1\n"); + printf("Test_TC_LTIME_1_1\n"); printf("Test_TC_LOWPOWER_1_1\n"); printf("Test_TC_KEYPADINPUT_1_2\n"); printf("Test_TC_APPLAUNCHER_1_3\n"); @@ -135,12 +143,14 @@ class TestList : public Command printf("Test_TC_PS_2_1\n"); printf("Test_TC_PRS_1_1\n"); printf("Test_TC_PRS_2_1\n"); + printf("Test_TC_PRS_2_2\n"); printf("Test_TC_PCC_1_1\n"); printf("Test_TC_PCC_2_1\n"); printf("Test_TC_PCC_2_2\n"); printf("Test_TC_PCC_2_3\n"); printf("Test_TC_PCC_2_4\n"); printf("Test_TC_PSCFG_1_1\n"); + printf("Test_TC_PSCFG_2_1\n"); printf("Test_TC_RH_1_1\n"); printf("Test_TC_RH_2_1\n"); printf("Test_TC_SC_4_2\n"); @@ -160,9 +170,11 @@ class TestList : public Command printf("Test_TC_DGTHREAD_2_3\n"); printf("Test_TC_DGTHREAD_2_4\n"); printf("Test_TC_ULABEL_1_1\n"); + printf("Test_TC_ULABEL_2_1\n"); printf("Test_TC_ULABEL_2_2\n"); printf("Test_TC_ULABEL_2_3\n"); printf("Test_TC_ULABEL_2_4\n"); + printf("Test_TC_DGWIFI_1_1\n"); printf("Test_TC_DGWIFI_2_1\n"); printf("Test_TC_DGWIFI_2_3\n"); printf("Test_TC_WNCV_1_1\n"); @@ -239,6 +251,8 @@ class TestList : public Command printf("TestGroupMessaging\n"); printf("TestGroupsCluster\n"); printf("TestGroupKeyManagementCluster\n"); + printf("Test_TC_G_1_1\n"); + printf("Test_TC_G_2_1\n"); return CHIP_NO_ERROR; } @@ -286,8 +300,6 @@ class ManualTestList : public Command printf("Test_TC_DD_3_21\n"); printf("TestGroupDemoCommand\n"); printf("TestGroupDemoConfig\n"); - printf("Test_TC_G_1_1\n"); - printf("Test_TC_G_2_1\n"); printf("Test_TC_G_2_2\n"); printf("Test_TC_G_2_3\n"); printf("Test_TC_G_3_1\n"); @@ -314,7 +326,6 @@ class ManualTestList : public Command printf("Test_TC_DA_1_5\n"); printf("Test_TC_DA_1_6\n"); printf("Test_TC_DA_1_7\n"); - printf("Test_TC_OPCREDS_1_2\n"); printf("Test_TC_BINFO_2_2\n"); printf("Test_TC_BINFO_2_4\n"); printf("Test_TC_OPCREDS_3_1\n"); @@ -341,7 +352,6 @@ class ManualTestList : public Command printf("Test_TC_CNET_4_20\n"); printf("Test_TC_CNET_4_21\n"); printf("Test_TC_CNET_4_22\n"); - printf("Test_TC_DLOG_1_1\n"); printf("Test_TC_DLOG_2_1\n"); printf("Test_TC_DLOG_2_2\n"); printf("Test_TC_DLOG_3_1\n"); @@ -356,7 +366,6 @@ class ManualTestList : public Command printf("Test_TC_DGGEN_3_1\n"); printf("Test_TC_I_3_1\n"); printf("Test_TC_I_3_2\n"); - printf("Test_TC_ILL_2_2\n"); printf("Test_TC_ILL_3_1\n"); printf("Test_TC_IDM_1_1\n"); printf("Test_TC_IDM_1_2\n"); @@ -447,7 +456,6 @@ class ManualTestList : public Command printf("Test_TC_SU_3_4\n"); printf("Test_TC_SU_4_1\n"); printf("Test_TC_SU_4_2\n"); - printf("Test_TC_PSCFG_2_1\n"); printf("Test_TC_PSCFG_2_2\n"); printf("Test_TC_PSCFG_3_1\n"); printf("Test_TC_SC_1_1\n"); @@ -474,7 +482,6 @@ class ManualTestList : public Command printf("Test_TC_SC_4_10\n"); printf("Test_TC_DGSW_3_1\n"); printf("Test_TC_DGSW_3_2\n"); - printf("Test_TC_DGWIFI_1_1\n"); printf("Test_TC_DGWIFI_2_2\n"); printf("Test_TC_DGWIFI_3_1\n"); printf("Test_TC_DGWIFI_3_2\n"); @@ -487,7 +494,6 @@ class ManualTestList : public Command printf("Test_TC_OCC_2_4\n"); printf("Test_TC_OCC_3_1\n"); printf("Test_TC_OCC_3_2\n"); - printf("Test_TC_PRS_2_2\n"); printf("Test_TC_PRS_3_1\n"); printf("Test_TC_PS_2_2\n"); printf("Test_TC_PS_3_1\n"); @@ -512,7 +518,6 @@ class ManualTestList : public Command printf("Test_TC_DRLK_3_1\n"); printf("Test_TC_DRLK_3_2\n"); printf("Test_TC_DRLK_3_3\n"); - printf("Test_TC_LCFG_1_1\n"); printf("Test_TC_LCFG_2_1\n"); printf("Test_TC_LCFG_3_1\n"); printf("Test_TC_LVL_2_3\n"); @@ -541,16 +546,12 @@ class ManualTestList : public Command printf("Test_TC_ACT_2_2\n"); printf("Test_TC_ACT_3_1\n"); printf("Test_TC_ACT_3_2\n"); - printf("Test_TC_LTIME_1_1\n"); printf("Test_TC_LTIME_1_2\n"); printf("Test_TC_LTIME_2_1\n"); printf("Test_TC_LTIME_3_1\n"); - printf("Test_TC_LUNIT_1_1\n"); printf("Test_TC_LUNIT_1_2\n"); printf("Test_TC_LUNIT_2_1\n"); printf("Test_TC_LUNIT_3_1\n"); - printf("Test_TC_FLABEL_1_1\n"); - printf("Test_TC_FLABEL_2_1\n"); printf("Test_TC_FLABEL_3_1\n"); printf("Test_TC_BIND_2_1\n"); printf("Test_TC_BIND_2_2\n"); @@ -569,7 +570,6 @@ class ManualTestList : public Command printf("Test_TC_ACL_2_8\n"); printf("Test_TC_ACL_2_9\n"); printf("Test_TC_ACL_2_10\n"); - printf("Test_TC_ULABEL_2_1\n"); printf("Test_TC_ULABEL_3_1\n"); printf("Test_TC_BRBINFO_1_1\n"); printf("Test_TC_BRBINFO_2_1\n"); @@ -3227,7 +3227,7 @@ class Test_TC_CC_1_1Suite : public TestCommand } case 2: { LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("(CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03)"), + VerifyOrDo(!ShouldSkip("( CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03 )"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, chip::NullOptional); @@ -11683,6 +11683,164 @@ class Test_TC_CC_8_1Suite : public TestCommand } }; +class Test_TC_OPCREDS_1_2Suite : public TestCommand +{ +public: + Test_TC_OPCREDS_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_OPCREDS_1_2", 6, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_OPCREDS_1_2Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads the ClusterRevision from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::ClusterRevision::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads the FeatureMap from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::FeatureMap::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads AttributeList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads AcceptedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads GeneratedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_BINFO_1_1Suite : public TestCommand { public: @@ -13350,6 +13508,157 @@ class Test_TC_DESC_1_1Suite : public TestCommand } }; +class Test_TC_DLOG_1_1Suite : public TestCommand +{ +public: + Test_TC_DLOG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_1_1", 6, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DLOG_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("acceptedCommandList", iter_0, 0)); + VerifyOrReturn(CheckValue("acceptedCommandList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 1)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 0)); + VerifyOrReturn(CheckValue("generatedCommandList[0]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 1)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads the ClusterRevision from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), DiagnosticLogs::Id, + DiagnosticLogs::Attributes::ClusterRevision::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads the FeatureMap from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), DiagnosticLogs::Id, DiagnosticLogs::Attributes::FeatureMap::Id, + true, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads AttributeList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), DiagnosticLogs::Id, DiagnosticLogs::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads AcceptedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), DiagnosticLogs::Id, + DiagnosticLogs::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads GeneratedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), DiagnosticLogs::Id, + DiagnosticLogs::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_DGETH_1_1Suite : public TestCommand { public: @@ -14497,6 +14806,271 @@ class Test_TC_FLW_2_1Suite : public TestCommand } }; +class Test_TC_FLABEL_1_1Suite : public TestCommand +{ +public: + Test_TC_FLABEL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLABEL_1_1", 6, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_FLABEL_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads the ClusterRevision from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::ClusterRevision::Id, true, + chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads the FeatureMap from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads AttributeList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads AcceptedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::AcceptedCommandList::Id, + true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads GeneratedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::GeneratedCommandList::Id, + true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_FLABEL_2_1Suite : public TestCommand +{ +public: + Test_TC_FLABEL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLABEL_2_1", 4, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_FLABEL_2_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads LabelList from the DUT"); + VerifyOrDo(!ShouldSkip("FLABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::LabelList::Id, true, + chip::NullOptional); + } + case 2: { + LogStep(2, "TH tries to write LabelList attribute of the DUT by setting Label = Test_Label, Value= Test_Value"); + VerifyOrDo(!ShouldSkip("FLABEL.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].label = chip::Span("Test_Labelgarbage: not in length on purpose", 10); + listHolder_0->mList[0].value = chip::Span("Test_Valuegarbage: not in length on purpose", 10); + + value = + chip::app::DataModel::List(listHolder_0->mList, 1); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FixedLabel::Id, FixedLabel::Attributes::LabelList::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads LabelList from the DUT"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && FLABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_CGEN_1_1Suite : public TestCommand { public: @@ -16479,10 +17053,10 @@ class Test_TC_ILL_2_1Suite : public TestCommand } }; -class Test_TC_LVL_1_1Suite : public TestCommand +class Test_TC_ILL_2_2Suite : public TestCommand { public: - Test_TC_LVL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_1_1", 15, credsIssuerConfig) + Test_TC_ILL_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ILL_2_2", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -16490,7 +17064,7 @@ class Test_TC_LVL_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LVL_1_1Suite() {} + ~Test_TC_ILL_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -16503,6 +17077,9 @@ class Test_TC_LVL_1_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + chip::app::DataModel::Nullable MinMeasuredValue; + chip::app::DataModel::Nullable MaxMeasuredValue; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -16522,143 +17099,320 @@ class Test_TC_LVL_1_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + MinMeasuredValue = value; } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint32_t value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7UL)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + MaxMeasuredValue = value; } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); - } + shouldContinue = true; break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16384UL)); - } + shouldContinue = true; break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); } break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } + shouldContinue = true; break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } + shouldContinue = true; break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads MinMeasuredValue attribute from DUT"); + VerifyOrDo(!ShouldSkip("ILL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, + IlluminanceMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads MaxMeasuredValue attribute from DUT"); + VerifyOrDo(!ShouldSkip("ILL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, + IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "Cover the sensor or darken the room"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for Successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 4: { + LogStep(4, "Wait 1s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 5: { + LogStep(5, "After a few seconds, TH reads MeasuredValue attribute from DUT."); + VerifyOrDo(!ShouldSkip("ILL.S.A0000 && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, + IlluminanceMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "Expose the sensor again to light"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for Successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 7: { + LogStep(7, "Wait 1s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 8: { + LogStep(8, "After a few seconds, TH reads MeasuredValue attribute from DUT."); + VerifyOrDo(!ShouldSkip("ILL.S.A0000 && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, + IlluminanceMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LVL_1_1Suite : public TestCommand +{ +public: + Test_TC_LVL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_1_1", 15, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_LVL_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 7UL)); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16384UL)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 20UL)); + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + } + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); + } + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; default: @@ -16700,49 +17454,49 @@ class Test_TC_LVL_1_1Suite : public TestCommand true, chip::NullOptional); } case 4: { - LogStep(4, "Read the optonal attribute(StartUpCurrentLevel and RemainingTime) in AttributeList"); + LogStep(4, "Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Read the optonal attribute(CurrentFrequency, MinFrequency and MinFrequency) in AttributeList"); + LogStep(5, "Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Read the optonal attribute(MinLevel) in AttributeList"); + LogStep(6, "Read the optional attribute(MinLevel) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Read the optonal attribute(MaxLevel) in AttributeList"); + LogStep(7, "Read the optional attribute(MaxLevel) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Read the optonal attribute(OnOffTransitionTime) in AttributeList"); + LogStep(8, "Read the optional attribute(OnOffTransitionTime) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Read the optonal attribute(OnTransitionTime) in AttributeList"); + LogStep(9, "Read the optional attribute(OnTransitionTime) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Read the optonal attribute(OffTransitionTime) in AttributeList"); + LogStep(10, "Read the optional attribute(OffTransitionTime) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Read the optonal attribute(DefaultMoveRate) in AttributeList"); + LogStep(11, "Read the optional attribute(DefaultMoveRate) in AttributeList"); VerifyOrDo(!ShouldSkip("LVL.S.A0014"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::AttributeList::Id, true, chip::NullOptional); @@ -19133,10 +19887,10 @@ class Test_TC_LVL_6_1Suite : public TestCommand break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -19281,17 +20035,7 @@ class Test_TC_LVL_6_1Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 9: { - LogStep(9, "Physically verify that the device has stopped transitioning"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && LVL.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "Sends stop command to DUT"); + LogStep(9, "Sends stop command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Stop::Type value; @@ -19302,6 +20046,16 @@ class Test_TC_LVL_6_1Suite : public TestCommand ); } + case 10: { + LogStep(10, "Physically verify that the device has stopped transitioning"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && LVL.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } case 11: { LogStep(11, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.C03.Rsp && LVL.S.A0000"), @@ -19381,6 +20135,267 @@ class Test_TC_LVL_6_1Suite : public TestCommand } }; +class Test_TC_LCFG_1_1Suite : public TestCommand +{ +public: + Test_TC_LCFG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LCFG_1_1", 6, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_LCFG_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads the ClusterRevision from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, + LocalizationConfiguration::Attributes::ClusterRevision::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads the FeatureMap from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, + LocalizationConfiguration::Attributes::FeatureMap::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads AttributeList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, + LocalizationConfiguration::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads AcceptedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, + LocalizationConfiguration::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads GeneratedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), LocalizationConfiguration::Id, + LocalizationConfiguration::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LUNIT_1_1Suite : public TestCommand +{ +public: + Test_TC_LUNIT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_1_1", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_LUNIT_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LTIME_1_1Suite : public TestCommand +{ +public: + Test_TC_LTIME_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_1_1", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_LTIME_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_LOWPOWER_1_1Suite : public TestCommand { public: @@ -25893,7 +26908,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 273U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); } break; case 4: @@ -28445,6 +29460,128 @@ class Test_TC_PRS_2_1Suite : public TestCommand } }; +class Test_TC_PRS_2_2Suite : public TestCommand +{ +public: + Test_TC_PRS_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PRS_2_2", 5, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_PRS_2_2Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::app::DataModel::Nullable ValueBeforeChange; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + ValueBeforeChange = value; + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintNotValue("value", value, ValueBeforeChange)); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads from the DUT the MeasuredValue attribute"); + VerifyOrDo(!ShouldSkip("PRS.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, + PressureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Operate on device to change the pressure significantly"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && PRS.M.PressureChange"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 3: { + LogStep(3, "Wait 2s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 4: { + LogStep(4, "After a few seconds, TH reads from the DUT the MeasuredValue attribute"); + VerifyOrDo(!ShouldSkip("PRS.S.A0000 && PRS.M.PressureChange"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, + PressureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_PCC_1_1Suite : public TestCommand { public: @@ -30096,10 +31233,10 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand } }; -class Test_TC_RH_1_1Suite : public TestCommand +class Test_TC_PSCFG_2_1Suite : public TestCommand { public: - Test_TC_RH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RH_1_1", 7, credsIssuerConfig) + Test_TC_PSCFG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PSCFG_2_1", 2, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -30107,7 +31244,7 @@ class Test_TC_RH_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_RH_1_1Suite() {} + ~Test_TC_PSCFG_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -30139,67 +31276,8 @@ class Test_TC_RH_1_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; @@ -30219,52 +31297,27 @@ class Test_TC_RH_1_1Suite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); + LogStep(0, "Commission DUT to TH"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Read ClusterRevision attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read FeatureMap attribute from the DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Read the optional attribute(Tolerance) in AttributeList"); - VerifyOrDo(!ShouldSkip("RH.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + LogStep(1, "TH reads the Sources attribute from the DUT"); + VerifyOrDo(!ShouldSkip("PSCFG.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), PowerSourceConfiguration::Id, + PowerSourceConfiguration::Attributes::Sources::Id, true, chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_RH_2_1Suite : public TestCommand +class Test_TC_RH_1_1Suite : public TestCommand { public: - Test_TC_RH_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RH_2_1", 5, credsIssuerConfig) + Test_TC_RH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RH_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -30272,7 +31325,7 @@ class Test_TC_RH_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_RH_2_1Suite() {} + ~Test_TC_RH_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -30304,41 +31357,206 @@ class Test_TC_RH_2_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read ClusterRevision attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Read FeatureMap attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "Read the global attribute: AttributeList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "Read the optional attribute(Tolerance) in AttributeList"); + VerifyOrDo(!ShouldSkip("RH.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_RH_2_1Suite : public TestCommand +{ +public: + Test_TC_RH_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RH_2_1", 5, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_RH_2_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9999U)); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 10000U)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); } break; default: @@ -31244,7 +32462,7 @@ class Test_TC_SC_4_2Suite : public TestCommand class Test_TC_SWTCH_1_1Suite : public TestCommand { public: - Test_TC_SWTCH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_1_1", 12, credsIssuerConfig) + Test_TC_SWTCH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -31265,8 +32483,6 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - uint32_t FeatureMapValue; - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -31288,30 +32504,12 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - FeatureMapValue = value; + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 31UL)); } break; case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -31319,7 +32517,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); } break; - case 8: + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31335,7 +32533,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 9: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31350,7 +32548,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 10: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31358,7 +32556,7 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 11: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -31393,84 +32591,36 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Read the global attribute: FeatureMap"); + LogStep(1, "Read FeatureMap attribute and Check values of flags in this FeatureMap"); + VerifyOrDo(!ShouldSkip("(SWTCH.S.F00 || SWTCH.S.F01 || SWTCH.S.F02 || SWTCH.S.F03 || SWTCH.S.F04)"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Check values of flags in this FeatureMap"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Check values of flags in this FeatureMap"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "Check values of flags in this FeatureMap"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Check values of flags in this FeatureMap"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "Check values of flags in this FeatureMap"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "read the global attribute: ClusterRevision"); + LogStep(2, "read the global attribute: ClusterRevision"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::ClusterRevision::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Read the global attribute: AttributeList"); + case 3: { + LogStep(3, "Read the global attribute: AttributeList"); VerifyOrDo(!ShouldSkip("SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Read the global attribute: AttributeList"); + case 4: { + LogStep(4, "Read the global attribute: AttributeList"); VerifyOrDo(!ShouldSkip("!SWTCH.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AttributeList::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Read the global attribute: AcceptedCommandList"); + case 5: { + LogStep(5, "Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Read the global attribute: GeneratedCommandList"); + case 6: { + LogStep(6, "Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -36953,10 +38103,10 @@ class Test_TC_ULABEL_1_1Suite : public TestCommand } }; -class Test_TC_ULABEL_2_2Suite : public TestCommand +class Test_TC_ULABEL_2_1Suite : public TestCommand { public: - Test_TC_ULABEL_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_2_2", 3, credsIssuerConfig) + Test_TC_ULABEL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_2_1", 2, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -36964,7 +38114,7 @@ class Test_TC_ULABEL_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ULABEL_2_2Suite() {} + ~Test_TC_ULABEL_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -36994,35 +38144,11 @@ class Test_TC_ULABEL_2_2Suite : public TestCommand shouldContinue = true; break; case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 0)); - VerifyOrReturn( - CheckValueAsString("labelList[0].label", iter_0.GetValue().label, chip::CharSpan("roomName", 8))); - VerifyOrReturn( - CheckValueAsString("labelList[0].value", iter_0.GetValue().value, chip::CharSpan("master bedroom 1", 16))); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 1)); - VerifyOrReturn( - CheckValueAsString("labelList[1].label", iter_0.GetValue().label, chip::CharSpan("Orientation", 11))); - VerifyOrReturn(CheckValueAsString("labelList[1].value", iter_0.GetValue().value, chip::CharSpan("east", 4))); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 2)); - VerifyOrReturn(CheckValueAsString("labelList[2].label", iter_0.GetValue().label, chip::CharSpan("floor", 5))); - VerifyOrReturn(CheckValueAsString("labelList[2].value", iter_0.GetValue().value, chip::CharSpan("2", 1))); - VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 3)); - VerifyOrReturn( - CheckValueAsString("labelList[3].label", iter_0.GetValue().label, chip::CharSpan("roomType", 8))); - VerifyOrReturn(CheckValueAsString("labelList[3].value", iter_0.GetValue().value, chip::CharSpan("bedroom", 7))); - VerifyOrReturn(CheckNoMoreListItems("labelList", iter_0, 4)); - } VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintMinLength("value", value, 4)); } break; default: @@ -37048,35 +38174,7 @@ class Test_TC_ULABEL_2_2Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH writes LabelList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("ULABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(4); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].label = chip::Span("roomNamegarbage: not in length on purpose", 8); - listHolder_0->mList[0].value = chip::Span("master bedroom 1garbage: not in length on purpose", 16); - - listHolder_0->mList[1].label = chip::Span("Orientationgarbage: not in length on purpose", 11); - listHolder_0->mList[1].value = chip::Span("eastgarbage: not in length on purpose", 4); - - listHolder_0->mList[2].label = chip::Span("floorgarbage: not in length on purpose", 5); - listHolder_0->mList[2].value = chip::Span("2garbage: not in length on purpose", 1); - - listHolder_0->mList[3].label = chip::Span("roomTypegarbage: not in length on purpose", 8); - listHolder_0->mList[3].value = chip::Span("bedroomgarbage: not in length on purpose", 7); - - value = - chip::app::DataModel::List(listHolder_0->mList, 4); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads LabelList attribute from the DUT"); + LogStep(1, "TH reads LabelList attribute of the DUT"); VerifyOrDo(!ShouldSkip("ULABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, true, chip::NullOptional); @@ -37086,10 +38184,10 @@ class Test_TC_ULABEL_2_2Suite : public TestCommand } }; -class Test_TC_ULABEL_2_3Suite : public TestCommand +class Test_TC_ULABEL_2_2Suite : public TestCommand { public: - Test_TC_ULABEL_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_2_3", 3, credsIssuerConfig) + Test_TC_ULABEL_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_2_2", 3, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -37097,7 +38195,140 @@ class Test_TC_ULABEL_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ULABEL_2_3Suite() {} + ~Test_TC_ULABEL_2_2Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 0)); + VerifyOrReturn( + CheckValueAsString("labelList[0].label", iter_0.GetValue().label, chip::CharSpan("roomName", 8))); + VerifyOrReturn( + CheckValueAsString("labelList[0].value", iter_0.GetValue().value, chip::CharSpan("master bedroom 1", 16))); + VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 1)); + VerifyOrReturn( + CheckValueAsString("labelList[1].label", iter_0.GetValue().label, chip::CharSpan("Orientation", 11))); + VerifyOrReturn(CheckValueAsString("labelList[1].value", iter_0.GetValue().value, chip::CharSpan("east", 4))); + VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 2)); + VerifyOrReturn(CheckValueAsString("labelList[2].label", iter_0.GetValue().label, chip::CharSpan("floor", 5))); + VerifyOrReturn(CheckValueAsString("labelList[2].value", iter_0.GetValue().value, chip::CharSpan("2", 1))); + VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 3)); + VerifyOrReturn( + CheckValueAsString("labelList[3].label", iter_0.GetValue().label, chip::CharSpan("roomType", 8))); + VerifyOrReturn(CheckValueAsString("labelList[3].value", iter_0.GetValue().value, chip::CharSpan("bedroom", 7))); + VerifyOrReturn(CheckNoMoreListItems("labelList", iter_0, 4)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintMinLength("value", value, 4)); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH writes LabelList attribute from the DUT"); + VerifyOrDo(!ShouldSkip("ULABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = new ListHolder(4); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].label = chip::Span("roomNamegarbage: not in length on purpose", 8); + listHolder_0->mList[0].value = chip::Span("master bedroom 1garbage: not in length on purpose", 16); + + listHolder_0->mList[1].label = chip::Span("Orientationgarbage: not in length on purpose", 11); + listHolder_0->mList[1].value = chip::Span("eastgarbage: not in length on purpose", 4); + + listHolder_0->mList[2].label = chip::Span("floorgarbage: not in length on purpose", 5); + listHolder_0->mList[2].value = chip::Span("2garbage: not in length on purpose", 1); + + listHolder_0->mList[3].label = chip::Span("roomTypegarbage: not in length on purpose", 8); + listHolder_0->mList[3].value = chip::Span("bedroomgarbage: not in length on purpose", 7); + + value = + chip::app::DataModel::List(listHolder_0->mList, 4); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads LabelList attribute from the DUT"); + VerifyOrDo(!ShouldSkip("ULABEL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, true, + chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_ULABEL_2_3Suite : public TestCommand +{ +public: + Test_TC_ULABEL_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_2_3", 3, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_ULABEL_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -37358,6 +38589,226 @@ class Test_TC_ULABEL_2_4Suite : public TestCommand } }; +class Test_TC_DGWIFI_1_1Suite : public TestCommand +{ +public: + Test_TC_DGWIFI_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGWIFI_1_1", 10, 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_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3UL)); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads the ClusterRevision from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::ClusterRevision::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads the FeatureMap from DUT"); + VerifyOrDo(!ShouldSkip("DGWIFI.S.F00 || DGWIFI.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::FeatureMap::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads AttributeList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList from DUT"); + VerifyOrDo(!ShouldSkip("DGWIFI.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads Feature dependent(DGWIFI.S.F01) attributes in attributeList from DUT"); + VerifyOrDo(!ShouldSkip("DGWIFI.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "TH reads optional attribute (CurrentMaxRate) in AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("DGWIFI.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "TH reads AcceptedCommandList from DUT"); + VerifyOrDo(!ShouldSkip(" !DGWIFI.S.F01 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "TH reads Feature dependent(DGWIFI.S.F01) command in AcceptedCommandList from DUT"); + VerifyOrDo(!ShouldSkip("DGWIFI.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 9: { + LogStep(9, "TH reads GeneratedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_DGWIFI_2_1Suite : public TestCommand { public: @@ -71927,10 +73378,10 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } }; -class Test_TC_DD_1_5Suite : public TestCommand +class Test_TC_G_1_1Suite : public TestCommand { public: - Test_TC_DD_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_5", 0, credsIssuerConfig) + Test_TC_G_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71938,7 +73389,7 @@ class Test_TC_DD_1_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_1_5Suite() {} + ~Test_TC_G_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -71963,6 +73414,77 @@ class Test_TC_DD_1_5Suite : public TestCommand switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 4U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 1UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -71978,15 +73500,54 @@ class Test_TC_DD_1_5Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads the ClusterRevision from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::ClusterRevision::Id, true, + chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads the FeatureMap from DUT"); + VerifyOrDo(!ShouldSkip(" !G.S.F00 "), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads the FeatureMap from DUT"); + VerifyOrDo(!ShouldSkip("G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads AttributeList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads AcceptedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::AcceptedCommandList::Id, true, + chip::NullOptional); + } + case 6: { + LogStep(6, "TH reads GeneratedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::GeneratedCommandList::Id, true, + chip::NullOptional); + } } return CHIP_NO_ERROR; } }; -class Test_TC_DD_1_6Suite : public TestCommand +class Test_TC_G_2_1Suite : public TestCommand { public: - Test_TC_DD_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_6", 0, credsIssuerConfig) + Test_TC_G_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_2_1", 6, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -71994,7 +73555,7 @@ class Test_TC_DD_1_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_1_6Suite() {} + ~Test_TC_G_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72007,6 +73568,9 @@ class Test_TC_DD_1_6Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + uint8_t NameSupportFeatureSupportedValue; + uint8_t NameSupportValue; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -72019,6 +73583,47 @@ class Test_TC_DD_1_6Suite : public TestCommand switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("nameSupport", value, 128U)); + NameSupportFeatureSupportedValue = value; + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("nameSupport", value, 0U)); + NameSupportValue = value; + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("nameSupport", value, NameSupportFeatureSupportedValue)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("nameSupport", value, NameSupportValue)); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -72034,15 +73639,55 @@ class Test_TC_DD_1_6Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads NameSupport attribute from DUT"); + VerifyOrDo(!ShouldSkip("G.S.A0000 && G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, true, + chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads NameSupport attribute from DUT"); + VerifyOrDo(!ShouldSkip("G.S.A0000 && !G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "TH writes NameSupport attribute as 0x80 EXOR the value as read in step 1"); + VerifyOrDo(!ShouldSkip("G.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 128U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads NameSupport attribute from DUT"); + VerifyOrDo(!ShouldSkip("G.S.A0000 && G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, true, + chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads NameSupport attribute from DUT"); + VerifyOrDo(!ShouldSkip("G.S.A0000 && !G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id, true, + chip::NullOptional); + } } return CHIP_NO_ERROR; } }; -class Test_TC_DD_1_7Suite : public TestCommand +class Test_TC_DD_1_5Suite : public TestCommand { public: - Test_TC_DD_1_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_7", 0, credsIssuerConfig) + Test_TC_DD_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72050,7 +73695,7 @@ class Test_TC_DD_1_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_1_7Suite() {} + ~Test_TC_DD_1_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72095,10 +73740,10 @@ class Test_TC_DD_1_7Suite : public TestCommand } }; -class Test_TC_DD_1_8Suite : public TestCommand +class Test_TC_DD_1_6Suite : public TestCommand { public: - Test_TC_DD_1_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_8", 0, credsIssuerConfig) + Test_TC_DD_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72106,7 +73751,7 @@ class Test_TC_DD_1_8Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_1_8Suite() {} + ~Test_TC_DD_1_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72151,10 +73796,10 @@ class Test_TC_DD_1_8Suite : public TestCommand } }; -class Test_TC_DD_1_9Suite : public TestCommand +class Test_TC_DD_1_7Suite : public TestCommand { public: - Test_TC_DD_1_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_9", 0, credsIssuerConfig) + Test_TC_DD_1_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_7", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72162,7 +73807,7 @@ class Test_TC_DD_1_9Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_1_9Suite() {} + ~Test_TC_DD_1_7Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72207,10 +73852,10 @@ class Test_TC_DD_1_9Suite : public TestCommand } }; -class Test_TC_DD_1_10Suite : public TestCommand +class Test_TC_DD_1_8Suite : public TestCommand { public: - Test_TC_DD_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_10", 0, credsIssuerConfig) + Test_TC_DD_1_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_8", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72218,7 +73863,7 @@ class Test_TC_DD_1_10Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_1_10Suite() {} + ~Test_TC_DD_1_8Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72263,10 +73908,10 @@ class Test_TC_DD_1_10Suite : public TestCommand } }; -class Test_TC_DD_1_11Suite : public TestCommand +class Test_TC_DD_1_9Suite : public TestCommand { public: - Test_TC_DD_1_11Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_11", 0, credsIssuerConfig) + Test_TC_DD_1_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_9", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72274,7 +73919,7 @@ class Test_TC_DD_1_11Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_1_11Suite() {} + ~Test_TC_DD_1_9Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72319,10 +73964,10 @@ class Test_TC_DD_1_11Suite : public TestCommand } }; -class Test_TC_DD_1_12Suite : public TestCommand +class Test_TC_DD_1_10Suite : public TestCommand { public: - Test_TC_DD_1_12Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_12", 0, credsIssuerConfig) + Test_TC_DD_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_10", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72330,7 +73975,7 @@ class Test_TC_DD_1_12Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_1_12Suite() {} + ~Test_TC_DD_1_10Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72375,10 +74020,10 @@ class Test_TC_DD_1_12Suite : public TestCommand } }; -class Test_TC_DD_1_13Suite : public TestCommand +class Test_TC_DD_1_11Suite : public TestCommand { public: - Test_TC_DD_1_13Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_13", 0, credsIssuerConfig) + Test_TC_DD_1_11Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_11", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72386,7 +74031,7 @@ class Test_TC_DD_1_13Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_1_13Suite() {} + ~Test_TC_DD_1_11Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72431,10 +74076,10 @@ class Test_TC_DD_1_13Suite : public TestCommand } }; -class Test_TC_DD_1_14Suite : public TestCommand +class Test_TC_DD_1_12Suite : public TestCommand { public: - Test_TC_DD_1_14Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_14", 0, credsIssuerConfig) + Test_TC_DD_1_12Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_12", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72442,7 +74087,7 @@ class Test_TC_DD_1_14Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_1_14Suite() {} + ~Test_TC_DD_1_12Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72487,10 +74132,10 @@ class Test_TC_DD_1_14Suite : public TestCommand } }; -class Test_TC_DD_1_15Suite : public TestCommand +class Test_TC_DD_1_13Suite : public TestCommand { public: - Test_TC_DD_1_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_15", 0, credsIssuerConfig) + Test_TC_DD_1_13Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_13", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72498,7 +74143,7 @@ class Test_TC_DD_1_15Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_1_15Suite() {} + ~Test_TC_DD_1_13Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72543,10 +74188,10 @@ class Test_TC_DD_1_15Suite : public TestCommand } }; -class Test_TC_DD_2_1Suite : public TestCommand +class Test_TC_DD_1_14Suite : public TestCommand { public: - Test_TC_DD_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_2_1", 0, credsIssuerConfig) + Test_TC_DD_1_14Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_14", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72554,7 +74199,7 @@ class Test_TC_DD_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_2_1Suite() {} + ~Test_TC_DD_1_14Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72599,10 +74244,10 @@ class Test_TC_DD_2_1Suite : public TestCommand } }; -class Test_TC_DD_2_2Suite : public TestCommand +class Test_TC_DD_1_15Suite : public TestCommand { public: - Test_TC_DD_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_2_2", 0, credsIssuerConfig) + Test_TC_DD_1_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_1_15", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72610,7 +74255,7 @@ class Test_TC_DD_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_2_2Suite() {} + ~Test_TC_DD_1_15Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72655,10 +74300,10 @@ class Test_TC_DD_2_2Suite : public TestCommand } }; -class Test_TC_DD_3_1Suite : public TestCommand +class Test_TC_DD_2_1Suite : public TestCommand { public: - Test_TC_DD_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_1", 0, credsIssuerConfig) + Test_TC_DD_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72666,7 +74311,7 @@ class Test_TC_DD_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_3_1Suite() {} + ~Test_TC_DD_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72711,10 +74356,10 @@ class Test_TC_DD_3_1Suite : public TestCommand } }; -class Test_TC_DD_3_2Suite : public TestCommand +class Test_TC_DD_2_2Suite : public TestCommand { public: - Test_TC_DD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_2", 0, credsIssuerConfig) + Test_TC_DD_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72722,7 +74367,7 @@ class Test_TC_DD_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_3_2Suite() {} + ~Test_TC_DD_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72767,10 +74412,10 @@ class Test_TC_DD_3_2Suite : public TestCommand } }; -class Test_TC_DD_3_3Suite : public TestCommand +class Test_TC_DD_3_1Suite : public TestCommand { public: - Test_TC_DD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_3", 0, credsIssuerConfig) + Test_TC_DD_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72778,7 +74423,7 @@ class Test_TC_DD_3_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_3_3Suite() {} + ~Test_TC_DD_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -72823,10 +74468,10 @@ class Test_TC_DD_3_3Suite : public TestCommand } }; -class Test_TC_DD_3_4Suite : public TestCommand +class Test_TC_DD_3_2Suite : public TestCommand { public: - Test_TC_DD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_4", 0, credsIssuerConfig) + Test_TC_DD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -72834,7 +74479,119 @@ class Test_TC_DD_3_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DD_3_4Suite() {} + ~Test_TC_DD_3_2Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DD_3_3Suite : public TestCommand +{ +public: + Test_TC_DD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_3", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DD_3_3Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DD_3_4Suite : public TestCommand +{ +public: + Test_TC_DD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DD_3_4", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DD_3_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74136,413 +75893,28 @@ class TestGroupDemoConfigSuite : public TestCommand switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Add Group 1 - endpoint 1"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupId = 257U; - value.groupName = chip::Span("Group #1garbage: not in length on purpose", 8); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "KeySet Write 1"); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 417U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 1110000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 1110001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 1110002ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, "Map Group Key Set to group ID on a given fabric"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].groupId = 257U; - listHolder_0->mList[0].groupKeySetID = 417U; - listHolder_0->mList[0].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "Install ACLs for test"); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(2); - 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.SetNull(); - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].privilege = static_cast(3); - listHolder_0->mList[1].authMode = static_cast(3); - listHolder_0->mList[1].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = 257ULL; - listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_G_1_1Suite : public TestCommand -{ -public: - Test_TC_G_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_G_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_G_2_1Suite : public TestCommand -{ -public: - Test_TC_G_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_G_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_G_2_2Suite : public TestCommand -{ -public: - Test_TC_G_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_G_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_G_2_3Suite : public TestCommand -{ -public: - Test_TC_G_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_2_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_G_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_G_3_1Suite : public TestCommand -{ -public: - Test_TC_G_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_G_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0U)); + VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -74558,15 +75930,120 @@ class Test_TC_G_3_1Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Add Group 1 - endpoint 1"); + ListFreer listFreer; + chip::app::Clusters::Groups::Commands::AddGroup::Type value; + value.groupId = 257U; + value.groupName = chip::Span("Group #1garbage: not in length on purpose", 8); + return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional + + ); + } + case 2: { + LogStep(2, "KeySet Write 1"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 1110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 1110002ULL; + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 3: { + LogStep(3, "Map Group Key Set to group ID on a given fabric"); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].groupId = 257U; + listHolder_0->mList[0].groupKeySetID = 417U; + listHolder_0->mList[0].fabricIndex = 1U; + + value = chip::app::DataModel::List( + listHolder_0->mList, 1); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "Install ACLs for test"); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = new ListHolder(2); + 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.SetNull(); + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = 1U; + + listHolder_0->mList[1].privilege = static_cast(3); + listHolder_0->mList[1].authMode = static_cast(3); + listHolder_0->mList[1].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 257ULL; + listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = 1U; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } } return CHIP_NO_ERROR; } }; -class Test_TC_G_3_2Suite : public TestCommand +class Test_TC_G_2_2Suite : public TestCommand { public: - Test_TC_G_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_3_2", 0, credsIssuerConfig) + Test_TC_G_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74574,7 +76051,7 @@ class Test_TC_G_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_G_3_2Suite() {} + ~Test_TC_G_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74619,10 +76096,10 @@ class Test_TC_G_3_2Suite : public TestCommand } }; -class Test_TC_BDX_1_1Suite : public TestCommand +class Test_TC_G_2_3Suite : public TestCommand { public: - Test_TC_BDX_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_1", 0, credsIssuerConfig) + Test_TC_G_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74630,7 +76107,7 @@ class Test_TC_BDX_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_1_1Suite() {} + ~Test_TC_G_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74675,10 +76152,10 @@ class Test_TC_BDX_1_1Suite : public TestCommand } }; -class Test_TC_BDX_1_2Suite : public TestCommand +class Test_TC_G_3_1Suite : public TestCommand { public: - Test_TC_BDX_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_2", 0, credsIssuerConfig) + Test_TC_G_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74686,7 +76163,7 @@ class Test_TC_BDX_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_1_2Suite() {} + ~Test_TC_G_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74731,10 +76208,10 @@ class Test_TC_BDX_1_2Suite : public TestCommand } }; -class Test_TC_BDX_1_3Suite : public TestCommand +class Test_TC_G_3_2Suite : public TestCommand { public: - Test_TC_BDX_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_3", 0, credsIssuerConfig) + Test_TC_G_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_G_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74742,7 +76219,7 @@ class Test_TC_BDX_1_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_1_3Suite() {} + ~Test_TC_G_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74787,10 +76264,10 @@ class Test_TC_BDX_1_3Suite : public TestCommand } }; -class Test_TC_BDX_1_4Suite : public TestCommand +class Test_TC_BDX_1_1Suite : public TestCommand { public: - Test_TC_BDX_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_4", 0, credsIssuerConfig) + Test_TC_BDX_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74798,7 +76275,7 @@ class Test_TC_BDX_1_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_1_4Suite() {} + ~Test_TC_BDX_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74843,10 +76320,10 @@ class Test_TC_BDX_1_4Suite : public TestCommand } }; -class Test_TC_BDX_1_5Suite : public TestCommand +class Test_TC_BDX_1_2Suite : public TestCommand { public: - Test_TC_BDX_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_5", 0, credsIssuerConfig) + Test_TC_BDX_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74854,7 +76331,7 @@ class Test_TC_BDX_1_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_1_5Suite() {} + ~Test_TC_BDX_1_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74899,10 +76376,10 @@ class Test_TC_BDX_1_5Suite : public TestCommand } }; -class Test_TC_BDX_1_6Suite : public TestCommand +class Test_TC_BDX_1_3Suite : public TestCommand { public: - Test_TC_BDX_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_6", 0, credsIssuerConfig) + Test_TC_BDX_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74910,7 +76387,7 @@ class Test_TC_BDX_1_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_1_6Suite() {} + ~Test_TC_BDX_1_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -74955,10 +76432,10 @@ class Test_TC_BDX_1_6Suite : public TestCommand } }; -class Test_TC_BDX_2_1Suite : public TestCommand +class Test_TC_BDX_1_4Suite : public TestCommand { public: - Test_TC_BDX_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_1", 0, credsIssuerConfig) + Test_TC_BDX_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -74966,7 +76443,7 @@ class Test_TC_BDX_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_2_1Suite() {} + ~Test_TC_BDX_1_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75011,10 +76488,10 @@ class Test_TC_BDX_2_1Suite : public TestCommand } }; -class Test_TC_BDX_2_2Suite : public TestCommand +class Test_TC_BDX_1_5Suite : public TestCommand { public: - Test_TC_BDX_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_2", 0, credsIssuerConfig) + Test_TC_BDX_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75022,7 +76499,7 @@ class Test_TC_BDX_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_2_2Suite() {} + ~Test_TC_BDX_1_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75067,10 +76544,10 @@ class Test_TC_BDX_2_2Suite : public TestCommand } }; -class Test_TC_BDX_2_3Suite : public TestCommand +class Test_TC_BDX_1_6Suite : public TestCommand { public: - Test_TC_BDX_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_3", 0, credsIssuerConfig) + Test_TC_BDX_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75078,7 +76555,7 @@ class Test_TC_BDX_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_2_3Suite() {} + ~Test_TC_BDX_1_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75123,10 +76600,10 @@ class Test_TC_BDX_2_3Suite : public TestCommand } }; -class Test_TC_BDX_2_4Suite : public TestCommand +class Test_TC_BDX_2_1Suite : public TestCommand { public: - Test_TC_BDX_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_4", 0, credsIssuerConfig) + Test_TC_BDX_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75134,7 +76611,7 @@ class Test_TC_BDX_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_2_4Suite() {} + ~Test_TC_BDX_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75179,10 +76656,10 @@ class Test_TC_BDX_2_4Suite : public TestCommand } }; -class Test_TC_BDX_2_5Suite : public TestCommand +class Test_TC_BDX_2_2Suite : public TestCommand { public: - Test_TC_BDX_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_5", 0, credsIssuerConfig) + Test_TC_BDX_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75190,7 +76667,7 @@ class Test_TC_BDX_2_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_2_5Suite() {} + ~Test_TC_BDX_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75235,10 +76712,10 @@ class Test_TC_BDX_2_5Suite : public TestCommand } }; -class Test_TC_BR_1Suite : public TestCommand +class Test_TC_BDX_2_3Suite : public TestCommand { public: - Test_TC_BR_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_1", 0, credsIssuerConfig) + Test_TC_BDX_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75246,7 +76723,7 @@ class Test_TC_BR_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BR_1Suite() {} + ~Test_TC_BDX_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75291,10 +76768,10 @@ class Test_TC_BR_1Suite : public TestCommand } }; -class Test_TC_BR_2Suite : public TestCommand +class Test_TC_BDX_2_4Suite : public TestCommand { public: - Test_TC_BR_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_2", 0, credsIssuerConfig) + Test_TC_BDX_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75302,7 +76779,7 @@ class Test_TC_BR_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BR_2Suite() {} + ~Test_TC_BDX_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75347,10 +76824,10 @@ class Test_TC_BR_2Suite : public TestCommand } }; -class Test_TC_BR_3Suite : public TestCommand +class Test_TC_BDX_2_5Suite : public TestCommand { public: - Test_TC_BR_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_3", 0, credsIssuerConfig) + Test_TC_BDX_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75358,7 +76835,7 @@ class Test_TC_BR_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BR_3Suite() {} + ~Test_TC_BDX_2_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75403,10 +76880,10 @@ class Test_TC_BR_3Suite : public TestCommand } }; -class Test_TC_BR_4Suite : public TestCommand +class Test_TC_BR_1Suite : public TestCommand { public: - Test_TC_BR_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_4", 0, credsIssuerConfig) + Test_TC_BR_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75414,7 +76891,7 @@ class Test_TC_BR_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BR_4Suite() {} + ~Test_TC_BR_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75459,10 +76936,10 @@ class Test_TC_BR_4Suite : public TestCommand } }; -class Test_TC_DA_1_1Suite : public TestCommand +class Test_TC_BR_2Suite : public TestCommand { public: - Test_TC_DA_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_1", 0, credsIssuerConfig) + Test_TC_BR_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75470,7 +76947,7 @@ class Test_TC_DA_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_1Suite() {} + ~Test_TC_BR_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75515,10 +76992,10 @@ class Test_TC_DA_1_1Suite : public TestCommand } }; -class Test_TC_DA_1_2Suite : public TestCommand +class Test_TC_BR_3Suite : public TestCommand { public: - Test_TC_DA_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_2", 0, credsIssuerConfig) + Test_TC_BR_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75526,7 +77003,7 @@ class Test_TC_DA_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_2Suite() {} + ~Test_TC_BR_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75571,10 +77048,10 @@ class Test_TC_DA_1_2Suite : public TestCommand } }; -class Test_TC_DA_1_3Suite : public TestCommand +class Test_TC_BR_4Suite : public TestCommand { public: - Test_TC_DA_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_3", 0, credsIssuerConfig) + Test_TC_BR_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75582,7 +77059,7 @@ class Test_TC_DA_1_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_3Suite() {} + ~Test_TC_BR_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75627,10 +77104,10 @@ class Test_TC_DA_1_3Suite : public TestCommand } }; -class Test_TC_DA_1_4Suite : public TestCommand +class Test_TC_DA_1_1Suite : public TestCommand { public: - Test_TC_DA_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_4", 0, credsIssuerConfig) + Test_TC_DA_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75638,7 +77115,7 @@ class Test_TC_DA_1_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_4Suite() {} + ~Test_TC_DA_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75683,10 +77160,10 @@ class Test_TC_DA_1_4Suite : public TestCommand } }; -class Test_TC_DA_1_5Suite : public TestCommand +class Test_TC_DA_1_2Suite : public TestCommand { public: - Test_TC_DA_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_5", 0, credsIssuerConfig) + Test_TC_DA_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75694,7 +77171,7 @@ class Test_TC_DA_1_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_5Suite() {} + ~Test_TC_DA_1_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75739,10 +77216,10 @@ class Test_TC_DA_1_5Suite : public TestCommand } }; -class Test_TC_DA_1_6Suite : public TestCommand +class Test_TC_DA_1_3Suite : public TestCommand { public: - Test_TC_DA_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_6", 0, credsIssuerConfig) + Test_TC_DA_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75750,7 +77227,7 @@ class Test_TC_DA_1_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_6Suite() {} + ~Test_TC_DA_1_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75795,10 +77272,10 @@ class Test_TC_DA_1_6Suite : public TestCommand } }; -class Test_TC_DA_1_7Suite : public TestCommand +class Test_TC_DA_1_4Suite : public TestCommand { public: - Test_TC_DA_1_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_7", 0, credsIssuerConfig) + Test_TC_DA_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75806,7 +77283,7 @@ class Test_TC_DA_1_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_7Suite() {} + ~Test_TC_DA_1_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75851,11 +77328,10 @@ class Test_TC_DA_1_7Suite : public TestCommand } }; -class Test_TC_OPCREDS_1_2Suite : public TestCommand +class Test_TC_DA_1_5Suite : public TestCommand { public: - Test_TC_OPCREDS_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPCREDS_1_2", 6, credsIssuerConfig) + Test_TC_DA_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -75863,7 +77339,7 @@ class Test_TC_OPCREDS_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_OPCREDS_1_2Suite() {} + ~Test_TC_DA_1_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -75888,75 +77364,6 @@ class Test_TC_OPCREDS_1_2Suite : public TestCommand switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -75972,47 +77379,15 @@ class Test_TC_OPCREDS_1_2Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH reads the ClusterRevision from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::ClusterRevision::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads the FeatureMap from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::FeatureMap::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "TH reads AttributeList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads AcceptedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "TH reads GeneratedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } } return CHIP_NO_ERROR; } }; -class Test_TC_BINFO_2_2Suite : public TestCommand +class Test_TC_DA_1_6Suite : public TestCommand { public: - Test_TC_BINFO_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_2_2", 0, credsIssuerConfig) + Test_TC_DA_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76020,7 +77395,7 @@ class Test_TC_BINFO_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BINFO_2_2Suite() {} + ~Test_TC_DA_1_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76065,10 +77440,10 @@ class Test_TC_BINFO_2_2Suite : public TestCommand } }; -class Test_TC_BINFO_2_4Suite : public TestCommand +class Test_TC_DA_1_7Suite : public TestCommand { public: - Test_TC_BINFO_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_2_4", 0, credsIssuerConfig) + Test_TC_DA_1_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_7", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76076,7 +77451,7 @@ class Test_TC_BINFO_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BINFO_2_4Suite() {} + ~Test_TC_DA_1_7Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76121,11 +77496,10 @@ class Test_TC_BINFO_2_4Suite : public TestCommand } }; -class Test_TC_OPCREDS_3_1Suite : public TestCommand +class Test_TC_BINFO_2_2Suite : public TestCommand { public: - Test_TC_OPCREDS_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPCREDS_3_1", 0, credsIssuerConfig) + Test_TC_BINFO_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76133,7 +77507,7 @@ class Test_TC_OPCREDS_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_OPCREDS_3_1Suite() {} + ~Test_TC_BINFO_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76178,11 +77552,10 @@ class Test_TC_OPCREDS_3_1Suite : public TestCommand } }; -class Test_TC_OPCREDS_3_2Suite : public TestCommand +class Test_TC_BINFO_2_4Suite : public TestCommand { public: - Test_TC_OPCREDS_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPCREDS_3_2", 0, credsIssuerConfig) + Test_TC_BINFO_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_2_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76190,7 +77563,7 @@ class Test_TC_OPCREDS_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_OPCREDS_3_2Suite() {} + ~Test_TC_BINFO_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76235,11 +77608,11 @@ class Test_TC_OPCREDS_3_2Suite : public TestCommand } }; -class Test_TC_OPCREDS_3_3Suite : public TestCommand +class Test_TC_OPCREDS_3_1Suite : public TestCommand { public: - Test_TC_OPCREDS_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPCREDS_3_3", 0, credsIssuerConfig) + Test_TC_OPCREDS_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_OPCREDS_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76247,7 +77620,7 @@ class Test_TC_OPCREDS_3_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_OPCREDS_3_3Suite() {} + ~Test_TC_OPCREDS_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76292,11 +77665,11 @@ class Test_TC_OPCREDS_3_3Suite : public TestCommand } }; -class Test_TC_OPCREDS_3_4Suite : public TestCommand +class Test_TC_OPCREDS_3_2Suite : public TestCommand { public: - Test_TC_OPCREDS_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_OPCREDS_3_4", 0, credsIssuerConfig) + Test_TC_OPCREDS_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_OPCREDS_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76304,7 +77677,7 @@ class Test_TC_OPCREDS_3_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_OPCREDS_3_4Suite() {} + ~Test_TC_OPCREDS_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76349,10 +77722,11 @@ class Test_TC_OPCREDS_3_4Suite : public TestCommand } }; -class Test_TC_CNET_4_1Suite : public TestCommand +class Test_TC_OPCREDS_3_3Suite : public TestCommand { public: - Test_TC_CNET_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_1", 0, credsIssuerConfig) + Test_TC_OPCREDS_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_OPCREDS_3_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76360,7 +77734,7 @@ class Test_TC_CNET_4_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_1Suite() {} + ~Test_TC_OPCREDS_3_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76405,10 +77779,11 @@ class Test_TC_CNET_4_1Suite : public TestCommand } }; -class Test_TC_CNET_4_2Suite : public TestCommand +class Test_TC_OPCREDS_3_4Suite : public TestCommand { public: - Test_TC_CNET_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_2", 0, credsIssuerConfig) + Test_TC_OPCREDS_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_OPCREDS_3_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76416,7 +77791,7 @@ class Test_TC_CNET_4_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_2Suite() {} + ~Test_TC_OPCREDS_3_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76461,10 +77836,10 @@ class Test_TC_CNET_4_2Suite : public TestCommand } }; -class Test_TC_CNET_4_3Suite : public TestCommand +class Test_TC_CNET_4_1Suite : public TestCommand { public: - Test_TC_CNET_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_3", 0, credsIssuerConfig) + Test_TC_CNET_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76472,7 +77847,7 @@ class Test_TC_CNET_4_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_3Suite() {} + ~Test_TC_CNET_4_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76517,10 +77892,10 @@ class Test_TC_CNET_4_3Suite : public TestCommand } }; -class Test_TC_CNET_4_4Suite : public TestCommand +class Test_TC_CNET_4_2Suite : public TestCommand { public: - Test_TC_CNET_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_4", 0, credsIssuerConfig) + Test_TC_CNET_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76528,7 +77903,7 @@ class Test_TC_CNET_4_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_4Suite() {} + ~Test_TC_CNET_4_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76573,10 +77948,10 @@ class Test_TC_CNET_4_4Suite : public TestCommand } }; -class Test_TC_CNET_4_5Suite : public TestCommand +class Test_TC_CNET_4_3Suite : public TestCommand { public: - Test_TC_CNET_4_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_5", 0, credsIssuerConfig) + Test_TC_CNET_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76584,7 +77959,7 @@ class Test_TC_CNET_4_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_5Suite() {} + ~Test_TC_CNET_4_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76629,10 +78004,10 @@ class Test_TC_CNET_4_5Suite : public TestCommand } }; -class Test_TC_CNET_4_6Suite : public TestCommand +class Test_TC_CNET_4_4Suite : public TestCommand { public: - Test_TC_CNET_4_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_6", 0, credsIssuerConfig) + Test_TC_CNET_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76640,7 +78015,7 @@ class Test_TC_CNET_4_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_6Suite() {} + ~Test_TC_CNET_4_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76685,10 +78060,10 @@ class Test_TC_CNET_4_6Suite : public TestCommand } }; -class Test_TC_CNET_4_9Suite : public TestCommand +class Test_TC_CNET_4_5Suite : public TestCommand { public: - Test_TC_CNET_4_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_9", 0, credsIssuerConfig) + Test_TC_CNET_4_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76696,7 +78071,7 @@ class Test_TC_CNET_4_9Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_9Suite() {} + ~Test_TC_CNET_4_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76741,10 +78116,10 @@ class Test_TC_CNET_4_9Suite : public TestCommand } }; -class Test_TC_CNET_4_10Suite : public TestCommand +class Test_TC_CNET_4_6Suite : public TestCommand { public: - Test_TC_CNET_4_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_10", 0, credsIssuerConfig) + Test_TC_CNET_4_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76752,7 +78127,7 @@ class Test_TC_CNET_4_10Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_10Suite() {} + ~Test_TC_CNET_4_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76797,10 +78172,10 @@ class Test_TC_CNET_4_10Suite : public TestCommand } }; -class Test_TC_CNET_4_11Suite : public TestCommand +class Test_TC_CNET_4_9Suite : public TestCommand { public: - Test_TC_CNET_4_11Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_11", 0, credsIssuerConfig) + Test_TC_CNET_4_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_9", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76808,7 +78183,7 @@ class Test_TC_CNET_4_11Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_11Suite() {} + ~Test_TC_CNET_4_9Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76853,10 +78228,10 @@ class Test_TC_CNET_4_11Suite : public TestCommand } }; -class Test_TC_CNET_4_12Suite : public TestCommand +class Test_TC_CNET_4_10Suite : public TestCommand { public: - Test_TC_CNET_4_12Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_12", 0, credsIssuerConfig) + Test_TC_CNET_4_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_10", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76864,7 +78239,7 @@ class Test_TC_CNET_4_12Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_12Suite() {} + ~Test_TC_CNET_4_10Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76909,10 +78284,10 @@ class Test_TC_CNET_4_12Suite : public TestCommand } }; -class Test_TC_CNET_4_13Suite : public TestCommand +class Test_TC_CNET_4_11Suite : public TestCommand { public: - Test_TC_CNET_4_13Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_13", 0, credsIssuerConfig) + Test_TC_CNET_4_11Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_11", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76920,7 +78295,7 @@ class Test_TC_CNET_4_13Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_13Suite() {} + ~Test_TC_CNET_4_11Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -76965,10 +78340,10 @@ class Test_TC_CNET_4_13Suite : public TestCommand } }; -class Test_TC_CNET_4_14Suite : public TestCommand +class Test_TC_CNET_4_12Suite : public TestCommand { public: - Test_TC_CNET_4_14Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_14", 0, credsIssuerConfig) + Test_TC_CNET_4_12Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_12", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76976,7 +78351,7 @@ class Test_TC_CNET_4_14Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_14Suite() {} + ~Test_TC_CNET_4_12Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77021,10 +78396,10 @@ class Test_TC_CNET_4_14Suite : public TestCommand } }; -class Test_TC_CNET_4_15Suite : public TestCommand +class Test_TC_CNET_4_13Suite : public TestCommand { public: - Test_TC_CNET_4_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_15", 0, credsIssuerConfig) + Test_TC_CNET_4_13Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_13", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77032,7 +78407,7 @@ class Test_TC_CNET_4_15Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_15Suite() {} + ~Test_TC_CNET_4_13Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77077,10 +78452,10 @@ class Test_TC_CNET_4_15Suite : public TestCommand } }; -class Test_TC_CNET_4_16Suite : public TestCommand +class Test_TC_CNET_4_14Suite : public TestCommand { public: - Test_TC_CNET_4_16Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_16", 0, credsIssuerConfig) + Test_TC_CNET_4_14Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_14", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77088,7 +78463,7 @@ class Test_TC_CNET_4_16Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_16Suite() {} + ~Test_TC_CNET_4_14Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77133,10 +78508,10 @@ class Test_TC_CNET_4_16Suite : public TestCommand } }; -class Test_TC_CNET_4_17Suite : public TestCommand +class Test_TC_CNET_4_15Suite : public TestCommand { public: - Test_TC_CNET_4_17Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_17", 0, credsIssuerConfig) + Test_TC_CNET_4_15Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_15", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77144,7 +78519,7 @@ class Test_TC_CNET_4_17Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_17Suite() {} + ~Test_TC_CNET_4_15Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77189,10 +78564,10 @@ class Test_TC_CNET_4_17Suite : public TestCommand } }; -class Test_TC_CNET_4_18Suite : public TestCommand +class Test_TC_CNET_4_16Suite : public TestCommand { public: - Test_TC_CNET_4_18Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_18", 0, credsIssuerConfig) + Test_TC_CNET_4_16Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_16", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77200,7 +78575,7 @@ class Test_TC_CNET_4_18Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_18Suite() {} + ~Test_TC_CNET_4_16Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77245,10 +78620,10 @@ class Test_TC_CNET_4_18Suite : public TestCommand } }; -class Test_TC_CNET_4_19Suite : public TestCommand +class Test_TC_CNET_4_17Suite : public TestCommand { public: - Test_TC_CNET_4_19Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_19", 0, credsIssuerConfig) + Test_TC_CNET_4_17Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_17", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77256,7 +78631,7 @@ class Test_TC_CNET_4_19Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_19Suite() {} + ~Test_TC_CNET_4_17Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77301,10 +78676,10 @@ class Test_TC_CNET_4_19Suite : public TestCommand } }; -class Test_TC_CNET_4_20Suite : public TestCommand +class Test_TC_CNET_4_18Suite : public TestCommand { public: - Test_TC_CNET_4_20Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_20", 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); @@ -77312,7 +78687,7 @@ class Test_TC_CNET_4_20Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_20Suite() {} + ~Test_TC_CNET_4_18Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77357,10 +78732,10 @@ class Test_TC_CNET_4_20Suite : public TestCommand } }; -class Test_TC_CNET_4_21Suite : public TestCommand +class Test_TC_CNET_4_19Suite : public TestCommand { public: - Test_TC_CNET_4_21Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_21", 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); @@ -77368,7 +78743,7 @@ class Test_TC_CNET_4_21Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_21Suite() {} + ~Test_TC_CNET_4_19Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77413,10 +78788,10 @@ class Test_TC_CNET_4_21Suite : public TestCommand } }; -class Test_TC_CNET_4_22Suite : public TestCommand +class Test_TC_CNET_4_20Suite : public TestCommand { public: - Test_TC_CNET_4_22Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CNET_4_22", 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); @@ -77424,7 +78799,7 @@ class Test_TC_CNET_4_22Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CNET_4_22Suite() {} + ~Test_TC_CNET_4_20Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77469,10 +78844,10 @@ class Test_TC_CNET_4_22Suite : public TestCommand } }; -class Test_TC_DLOG_1_1Suite : public TestCommand +class Test_TC_CNET_4_21Suite : public TestCommand { public: - Test_TC_DLOG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_1_1", 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); @@ -77480,7 +78855,7 @@ class Test_TC_DLOG_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_1_1Suite() {} + ~Test_TC_CNET_4_21Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77525,10 +78900,10 @@ class Test_TC_DLOG_1_1Suite : public TestCommand } }; -class Test_TC_DLOG_2_1Suite : public TestCommand +class Test_TC_CNET_4_22Suite : public TestCommand { public: - Test_TC_DLOG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_1", 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); @@ -77536,7 +78911,7 @@ class Test_TC_DLOG_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_2_1Suite() {} + ~Test_TC_CNET_4_22Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77581,10 +78956,10 @@ class Test_TC_DLOG_2_1Suite : public TestCommand } }; -class Test_TC_DLOG_2_2Suite : public TestCommand +class Test_TC_DLOG_2_1Suite : public TestCommand { public: - Test_TC_DLOG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_2_2", 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); @@ -77592,7 +78967,7 @@ class Test_TC_DLOG_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_2_2Suite() {} + ~Test_TC_DLOG_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77637,10 +79012,10 @@ class Test_TC_DLOG_2_2Suite : public TestCommand } }; -class Test_TC_DLOG_3_1Suite : public TestCommand +class Test_TC_DLOG_2_2Suite : public TestCommand { public: - Test_TC_DLOG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_3_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); @@ -77648,7 +79023,7 @@ class Test_TC_DLOG_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DLOG_3_1Suite() {} + ~Test_TC_DLOG_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77693,10 +79068,10 @@ class Test_TC_DLOG_3_1Suite : public TestCommand } }; -class Test_TC_DESC_2_1Suite : public TestCommand +class Test_TC_DLOG_3_1Suite : public TestCommand { public: - Test_TC_DESC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_1", 0, credsIssuerConfig) + Test_TC_DLOG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DLOG_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77704,7 +79079,7 @@ class Test_TC_DESC_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DESC_2_1Suite() {} + ~Test_TC_DLOG_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77749,10 +79124,10 @@ class Test_TC_DESC_2_1Suite : public TestCommand } }; -class Test_TC_DESC_2_2Suite : public TestCommand +class Test_TC_DESC_2_1Suite : public TestCommand { public: - Test_TC_DESC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_2", 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); @@ -77760,7 +79135,7 @@ class Test_TC_DESC_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DESC_2_2Suite() {} + ~Test_TC_DESC_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77805,10 +79180,10 @@ class Test_TC_DESC_2_2Suite : public TestCommand } }; -class Test_TC_DGETH_3_1Suite : public TestCommand +class Test_TC_DESC_2_2Suite : public TestCommand { public: - Test_TC_DGETH_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_3_1", 0, credsIssuerConfig) + Test_TC_DESC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77816,7 +79191,7 @@ class Test_TC_DGETH_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGETH_3_1Suite() {} + ~Test_TC_DESC_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77861,10 +79236,10 @@ class Test_TC_DGETH_3_1Suite : public TestCommand } }; -class Test_TC_DGETH_3_2Suite : public TestCommand +class Test_TC_DGETH_3_1Suite : public TestCommand { public: - Test_TC_DGETH_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_3_2", 0, credsIssuerConfig) + Test_TC_DGETH_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGETH_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77872,7 +79247,7 @@ class Test_TC_DGETH_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGETH_3_2Suite() {} + ~Test_TC_DGETH_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77917,10 +79292,10 @@ class Test_TC_DGETH_3_2Suite : public TestCommand } }; -class Test_TC_CGEN_2_2Suite : public TestCommand +class Test_TC_DGETH_3_2Suite : public TestCommand { public: - Test_TC_CGEN_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_2", 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); @@ -77928,7 +79303,7 @@ class Test_TC_CGEN_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CGEN_2_2Suite() {} + ~Test_TC_DGETH_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -77973,10 +79348,10 @@ class Test_TC_CGEN_2_2Suite : public TestCommand } }; -class Test_TC_CGEN_2_4Suite : public TestCommand +class Test_TC_CGEN_2_2Suite : public TestCommand { public: - Test_TC_CGEN_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_4", 0, credsIssuerConfig) + Test_TC_CGEN_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -77984,7 +79359,7 @@ class Test_TC_CGEN_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CGEN_2_4Suite() {} + ~Test_TC_CGEN_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -78029,10 +79404,10 @@ class Test_TC_CGEN_2_4Suite : public TestCommand } }; -class Test_TC_DGGEN_2_2Suite : public TestCommand +class Test_TC_CGEN_2_4Suite : public TestCommand { public: - Test_TC_DGGEN_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_2_2", 0, credsIssuerConfig) + Test_TC_CGEN_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -78040,7 +79415,7 @@ class Test_TC_DGGEN_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGGEN_2_2Suite() {} + ~Test_TC_CGEN_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -78085,10 +79460,10 @@ class Test_TC_DGGEN_2_2Suite : public TestCommand } }; -class Test_TC_DGGEN_2_3Suite : public TestCommand +class Test_TC_DGGEN_2_2Suite : public TestCommand { public: - Test_TC_DGGEN_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_2_3", 0, credsIssuerConfig) + Test_TC_DGGEN_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -78096,7 +79471,7 @@ class Test_TC_DGGEN_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGGEN_2_3Suite() {} + ~Test_TC_DGGEN_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -78141,10 +79516,10 @@ class Test_TC_DGGEN_2_3Suite : public TestCommand } }; -class Test_TC_DGGEN_3_1Suite : public TestCommand +class Test_TC_DGGEN_2_3Suite : public TestCommand { public: - Test_TC_DGGEN_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_3_1", 0, credsIssuerConfig) + Test_TC_DGGEN_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -78152,7 +79527,7 @@ class Test_TC_DGGEN_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGGEN_3_1Suite() {} + ~Test_TC_DGGEN_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -78197,10 +79572,10 @@ class Test_TC_DGGEN_3_1Suite : public TestCommand } }; -class Test_TC_I_3_1Suite : public TestCommand +class Test_TC_DGGEN_3_1Suite : public TestCommand { public: - Test_TC_I_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_3_1", 0, credsIssuerConfig) + Test_TC_DGGEN_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGGEN_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -78208,7 +79583,7 @@ class Test_TC_I_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_I_3_1Suite() {} + ~Test_TC_DGGEN_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -78253,10 +79628,10 @@ class Test_TC_I_3_1Suite : public TestCommand } }; -class Test_TC_I_3_2Suite : public TestCommand +class Test_TC_I_3_1Suite : public TestCommand { public: - Test_TC_I_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_3_2", 0, credsIssuerConfig) + Test_TC_I_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -78264,7 +79639,7 @@ class Test_TC_I_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_I_3_2Suite() {} + ~Test_TC_I_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -78309,10 +79684,10 @@ class Test_TC_I_3_2Suite : public TestCommand } }; -class Test_TC_ILL_2_2Suite : public TestCommand +class Test_TC_I_3_2Suite : public TestCommand { public: - Test_TC_ILL_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ILL_2_2", 0, credsIssuerConfig) + Test_TC_I_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -78320,7 +79695,7 @@ class Test_TC_ILL_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ILL_2_2Suite() {} + ~Test_TC_I_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -86166,62 +87541,6 @@ class Test_TC_SU_4_2Suite : public TestCommand } }; -class Test_TC_PSCFG_2_1Suite : public TestCommand -{ -public: - Test_TC_PSCFG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PSCFG_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PSCFG_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_PSCFG_2_2Suite : public TestCommand { public: @@ -87678,62 +88997,6 @@ class Test_TC_DGSW_3_2Suite : public TestCommand } }; -class Test_TC_DGWIFI_1_1Suite : public TestCommand -{ -public: - Test_TC_DGWIFI_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGWIFI_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGWIFI_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_DGWIFI_2_2Suite : public TestCommand { public: @@ -88246,7 +89509,7 @@ class Test_TC_OCC_2_2Suite : public TestCommand class Test_TC_OCC_2_3Suite : public TestCommand { public: - Test_TC_OCC_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_2_3", 0, credsIssuerConfig) + Test_TC_OCC_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_2_3", 3, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -88279,6 +89542,30 @@ class Test_TC_OCC_2_3Suite : public TestCommand switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -88294,6 +89581,25 @@ class Test_TC_OCC_2_3Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Reads mandatory attribute constrains: OccupancySensorType"); + VerifyOrDo(!ShouldSkip("OCC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, + OccupancySensing::Attributes::OccupancySensorType::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Reads mandatory attribute constrains: OccupancySensorTypeBitmap"); + VerifyOrDo(!ShouldSkip("OCC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, + OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id, true, chip::NullOptional); + } } return CHIP_NO_ERROR; } @@ -88522,62 +89828,6 @@ class Test_TC_OCC_3_2Suite : public TestCommand } }; -class Test_TC_PRS_2_2Suite : public TestCommand -{ -public: - Test_TC_PRS_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PRS_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PRS_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_PRS_3_1Suite : public TestCommand { public: @@ -93411,62 +94661,6 @@ class Test_TC_DRLK_3_3Suite : public TestCommand } }; -class Test_TC_LCFG_1_1Suite : public TestCommand -{ -public: - Test_TC_LCFG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LCFG_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LCFG_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_LCFG_2_1Suite : public TestCommand { public: @@ -95892,178 +97086,10 @@ class Test_TC_RH_3_1Suite : public TestCommand } }; -class Test_TC_SWTCH_2_2Suite : public TestCommand -{ -public: - Test_TC_SWTCH_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SWTCH_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SWTCH_3_1Suite : public TestCommand -{ -public: - Test_TC_SWTCH_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SWTCH_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SWTCH_3_2Suite : public TestCommand -{ -public: - Test_TC_SWTCH_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_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_SWTCH_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TMP_2_2Suite : public TestCommand +class Test_TC_SWTCH_2_2Suite : public TestCommand { public: - Test_TC_TMP_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_2_2", 6, credsIssuerConfig) + Test_TC_SWTCH_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96071,7 +97097,7 @@ class Test_TC_TMP_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TMP_2_2Suite() {} + ~Test_TC_SWTCH_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96084,8 +97110,6 @@ class Test_TC_TMP_2_2Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - chip::app::DataModel::Nullable valueBeforeChange; - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -96098,56 +97122,6 @@ class Test_TC_TMP_2_2Suite : public TestCommand switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32766)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - valueBeforeChange = value; - } - 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)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - VerifyOrReturn(CheckConstraintNotValue("value", value, valueBeforeChange)); - } - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -96163,56 +97137,15 @@ class Test_TC_TMP_2_2Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the mandatory attribute: MinMeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read the mandatory attribute: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Reads MeasuredValue attribute from DUT"); - VerifyOrDo(!ShouldSkip("TMP.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Operate on device to change the temperature significantly"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Read the mandatory attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0000 && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } } return CHIP_NO_ERROR; } }; -class Test_TC_TMP_3_1Suite : public TestCommand +class Test_TC_SWTCH_3_1Suite : public TestCommand { public: - Test_TC_TMP_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_3_1", 0, credsIssuerConfig) + Test_TC_SWTCH_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96220,7 +97153,7 @@ class Test_TC_TMP_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TMP_3_1Suite() {} + ~Test_TC_SWTCH_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96265,10 +97198,10 @@ class Test_TC_TMP_3_1Suite : public TestCommand } }; -class Test_TC_TSTAT_3_1Suite : public TestCommand +class Test_TC_SWTCH_3_2Suite : public TestCommand { public: - Test_TC_TSTAT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_1", 0, credsIssuerConfig) + Test_TC_SWTCH_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96276,7 +97209,7 @@ class Test_TC_TSTAT_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TSTAT_3_1Suite() {} + ~Test_TC_SWTCH_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96321,10 +97254,10 @@ class Test_TC_TSTAT_3_1Suite : public TestCommand } }; -class Test_TC_TSTAT_3_2Suite : public TestCommand +class Test_TC_TMP_2_2Suite : public TestCommand { public: - Test_TC_TSTAT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_2", 0, credsIssuerConfig) + Test_TC_TMP_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_2_2", 6, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96332,7 +97265,7 @@ class Test_TC_TSTAT_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TSTAT_3_2Suite() {} + ~Test_TC_TMP_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96345,6 +97278,8 @@ class Test_TC_TSTAT_3_2Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + chip::app::DataModel::Nullable valueBeforeChange; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -96357,6 +97292,56 @@ class Test_TC_TSTAT_3_2Suite : public TestCommand switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32766)); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + valueBeforeChange = value; + } + 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)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + VerifyOrReturn(CheckConstraintNotValue("value", value, valueBeforeChange)); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -96372,15 +97357,56 @@ class Test_TC_TSTAT_3_2Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read the mandatory attribute: MinMeasuredValue"); + VerifyOrDo(!ShouldSkip("TMP.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Read the mandatory attribute: MaxMeasuredValue"); + VerifyOrDo(!ShouldSkip("TMP.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "Reads MeasuredValue attribute from DUT"); + VerifyOrDo(!ShouldSkip("TMP.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "Operate on device to change the temperature significantly"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 5: { + LogStep(5, "Read the mandatory attribute: MeasuredValue"); + VerifyOrDo(!ShouldSkip("TMP.S.A0000 && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + } } return CHIP_NO_ERROR; } }; -class Test_TC_TSUIC_3_1Suite : public TestCommand +class Test_TC_TMP_3_1Suite : public TestCommand { public: - Test_TC_TSUIC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_3_1", 0, credsIssuerConfig) + Test_TC_TMP_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96388,7 +97414,7 @@ class Test_TC_TSUIC_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TSUIC_3_1Suite() {} + ~Test_TC_TMP_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96433,11 +97459,10 @@ class Test_TC_TSUIC_3_1Suite : public TestCommand } }; -class Test_TC_DGTHREAD_2_5Suite : public TestCommand +class Test_TC_TSTAT_3_1Suite : public TestCommand { public: - Test_TC_DGTHREAD_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_2_5", 0, credsIssuerConfig) + Test_TC_TSTAT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96445,7 +97470,7 @@ class Test_TC_DGTHREAD_2_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_2_5Suite() {} + ~Test_TC_TSTAT_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96490,11 +97515,10 @@ class Test_TC_DGTHREAD_2_5Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_1Suite : public TestCommand +class Test_TC_TSTAT_3_2Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_1", 0, credsIssuerConfig) + Test_TC_TSTAT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96502,7 +97526,7 @@ class Test_TC_DGTHREAD_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_1Suite() {} + ~Test_TC_TSTAT_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96547,11 +97571,10 @@ class Test_TC_DGTHREAD_3_1Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_2Suite : public TestCommand +class Test_TC_TSUIC_3_1Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_2", 0, credsIssuerConfig) + Test_TC_TSUIC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96559,7 +97582,7 @@ class Test_TC_DGTHREAD_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_2Suite() {} + ~Test_TC_TSUIC_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96604,11 +97627,11 @@ class Test_TC_DGTHREAD_3_2Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_3Suite : public TestCommand +class Test_TC_DGTHREAD_2_5Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_3", 0, credsIssuerConfig) + Test_TC_DGTHREAD_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_2_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96616,7 +97639,7 @@ class Test_TC_DGTHREAD_3_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_3Suite() {} + ~Test_TC_DGTHREAD_2_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96661,11 +97684,11 @@ class Test_TC_DGTHREAD_3_3Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_4Suite : public TestCommand +class Test_TC_DGTHREAD_3_1Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_4", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96673,7 +97696,7 @@ class Test_TC_DGTHREAD_3_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_4Suite() {} + ~Test_TC_DGTHREAD_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96718,11 +97741,11 @@ class Test_TC_DGTHREAD_3_4Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_5Suite : public TestCommand +class Test_TC_DGTHREAD_3_2Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_5", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96730,7 +97753,7 @@ class Test_TC_DGTHREAD_3_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_5Suite() {} + ~Test_TC_DGTHREAD_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96775,10 +97798,11 @@ class Test_TC_DGTHREAD_3_5Suite : public TestCommand } }; -class Test_TC_ACT_2_1Suite : public TestCommand +class Test_TC_DGTHREAD_3_3Suite : public TestCommand { public: - Test_TC_ACT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_1", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96786,7 +97810,7 @@ class Test_TC_ACT_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_2_1Suite() {} + ~Test_TC_DGTHREAD_3_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96831,10 +97855,11 @@ class Test_TC_ACT_2_1Suite : public TestCommand } }; -class Test_TC_ACT_2_2Suite : public TestCommand +class Test_TC_DGTHREAD_3_4Suite : public TestCommand { public: - Test_TC_ACT_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_2", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96842,7 +97867,7 @@ class Test_TC_ACT_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_2_2Suite() {} + ~Test_TC_DGTHREAD_3_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96887,10 +97912,11 @@ class Test_TC_ACT_2_2Suite : public TestCommand } }; -class Test_TC_ACT_3_1Suite : public TestCommand +class Test_TC_DGTHREAD_3_5Suite : public TestCommand { public: - Test_TC_ACT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_3_1", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_5Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96898,7 +97924,7 @@ class Test_TC_ACT_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_3_1Suite() {} + ~Test_TC_DGTHREAD_3_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96943,10 +97969,10 @@ class Test_TC_ACT_3_1Suite : public TestCommand } }; -class Test_TC_ACT_3_2Suite : public TestCommand +class Test_TC_ACT_2_1Suite : public TestCommand { public: - Test_TC_ACT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_3_2", 0, credsIssuerConfig) + Test_TC_ACT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -96954,7 +97980,7 @@ class Test_TC_ACT_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_3_2Suite() {} + ~Test_TC_ACT_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -96999,10 +98025,10 @@ class Test_TC_ACT_3_2Suite : public TestCommand } }; -class Test_TC_LTIME_1_1Suite : public TestCommand +class Test_TC_ACT_2_2Suite : public TestCommand { public: - Test_TC_LTIME_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_1_1", 0, credsIssuerConfig) + Test_TC_ACT_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -97010,7 +98036,7 @@ class Test_TC_LTIME_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LTIME_1_1Suite() {} + ~Test_TC_ACT_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -97055,10 +98081,10 @@ class Test_TC_LTIME_1_1Suite : public TestCommand } }; -class Test_TC_LTIME_1_2Suite : public TestCommand +class Test_TC_ACT_3_1Suite : public TestCommand { public: - Test_TC_LTIME_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_1_2", 0, credsIssuerConfig) + Test_TC_ACT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -97066,7 +98092,7 @@ class Test_TC_LTIME_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LTIME_1_2Suite() {} + ~Test_TC_ACT_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -97111,10 +98137,10 @@ class Test_TC_LTIME_1_2Suite : public TestCommand } }; -class Test_TC_LTIME_2_1Suite : public TestCommand +class Test_TC_ACT_3_2Suite : public TestCommand { public: - Test_TC_LTIME_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_2_1", 0, credsIssuerConfig) + Test_TC_ACT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -97122,7 +98148,7 @@ class Test_TC_LTIME_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LTIME_2_1Suite() {} + ~Test_TC_ACT_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -97167,10 +98193,10 @@ class Test_TC_LTIME_2_1Suite : public TestCommand } }; -class Test_TC_LTIME_3_1Suite : public TestCommand +class Test_TC_LTIME_1_2Suite : public TestCommand { public: - Test_TC_LTIME_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_3_1", 0, credsIssuerConfig) + Test_TC_LTIME_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_1_2", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -97178,7 +98204,7 @@ class Test_TC_LTIME_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LTIME_3_1Suite() {} + ~Test_TC_LTIME_1_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -97203,6 +98229,85 @@ class Test_TC_LTIME_3_1Suite : public TestCommand switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 1UL)); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -97218,71 +98323,64 @@ class Test_TC_LTIME_3_1Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LUNIT_1_1Suite : public TestCommand -{ -public: - Test_TC_LUNIT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_1_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LUNIT_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + case 1: { + LogStep(1, "TH reads the ClusterRevision from DUT"); + VerifyOrDo(!ShouldSkip("LTIME.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::ClusterRevision::Id, true, chip::NullOptional); } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + case 2: { + LogStep(2, "TH reads the FeatureMap from DUT"); + VerifyOrDo(!ShouldSkip("LTIME.S.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::FeatureMap::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("LTIME.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads optional attribute(ActiveCalendarType) in AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("LTIME.S.Afffb && LTIME.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads optional attribute(SupportedCalendarTypes) in AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("LTIME.S.Afffb && LTIME.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "TH reads AcceptedCommandList from DUT"); + VerifyOrDo(!ShouldSkip("LTIME.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 7: { + LogStep(7, "TH reads GeneratedCommandList from DUT"); + VerifyOrDo(!ShouldSkip("LTIME.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { } return CHIP_NO_ERROR; } }; -class Test_TC_LUNIT_1_2Suite : public TestCommand +class Test_TC_LTIME_2_1Suite : public TestCommand { public: - Test_TC_LUNIT_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_1_2", 0, credsIssuerConfig) + Test_TC_LTIME_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -97290,7 +98388,7 @@ class Test_TC_LUNIT_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LUNIT_1_2Suite() {} + ~Test_TC_LTIME_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -97335,10 +98433,10 @@ class Test_TC_LUNIT_1_2Suite : public TestCommand } }; -class Test_TC_LUNIT_2_1Suite : public TestCommand +class Test_TC_LTIME_3_1Suite : public TestCommand { public: - Test_TC_LUNIT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_2_1", 0, credsIssuerConfig) + Test_TC_LTIME_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -97346,7 +98444,7 @@ class Test_TC_LUNIT_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LUNIT_2_1Suite() {} + ~Test_TC_LTIME_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -97391,10 +98489,10 @@ class Test_TC_LUNIT_2_1Suite : public TestCommand } }; -class Test_TC_LUNIT_3_1Suite : public TestCommand +class Test_TC_LUNIT_1_2Suite : public TestCommand { public: - Test_TC_LUNIT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_3_1", 9, credsIssuerConfig) + Test_TC_LUNIT_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_1_2", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -97402,7 +98500,7 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LUNIT_3_1Suite() {} + ~Test_TC_LUNIT_1_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -97434,47 +98532,76 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::UnitLocalization::TempUnit value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::UnitLocalization::TempUnit value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("temperatureUnit", value, 0U)); + VerifyOrReturn(CheckValue("featureMap", value, 1UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::UnitLocalization::TempUnit value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("temperatureUnit", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::UnitLocalization::TempUnit value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("temperatureUnit", value, 2U)); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -97498,74 +98625,56 @@ class Test_TC_LUNIT_3_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH reads TemperatureUnit attribute from DUT"); - VerifyOrDo(!ShouldSkip("LUNIT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(1, "TH reads the ClusterRevision from DUT"); + VerifyOrDo(!ShouldSkip("LUNIT.S.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); + UnitLocalization::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "TH writes 0 (Fahrenheit) to TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000.Fahrenheit"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::UnitLocalization::TempUnit value; - value = static_cast(0); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); + LogStep(2, "TH reads the FeatureMap from DUT"); + VerifyOrDo(!ShouldSkip("LUNIT.S.Afffc && !LUNIT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, UnitLocalization::Attributes::FeatureMap::Id, + true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); + LogStep(3, "TH reads the FeatureMap from DUT"); + VerifyOrDo(!ShouldSkip("LUNIT.S.Afffc && LUNIT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, UnitLocalization::Attributes::FeatureMap::Id, + true, chip::NullOptional); } case 4: { - LogStep(4, "TH writes 1 (Celsius) to TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000.Celsius"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::UnitLocalization::TempUnit value; - value = static_cast(1); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); + LogStep(4, "TH reads AttributeList from DUT"); + VerifyOrDo(!ShouldSkip("LUNIT.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "TH reads TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "TH reads Feature dependent(LUNIT.S.F00) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("LUNIT.S.Afffb && LUNIT.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); + UnitLocalization::Attributes::AttributeList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "TH writes 2 (Kelvin) to TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000.Kelvin"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::UnitLocalization::TempUnit value; - value = static_cast(2); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); + LogStep(6, "TH reads AcceptedCommandList from DUT"); + VerifyOrDo(!ShouldSkip("LUNIT.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "TH reads TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "TH reads GeneratedCommandList from DUT"); + VerifyOrDo(!ShouldSkip("LUNIT.S.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "TH writes 5 to TemperatureUnit attribute"); - VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::UnitLocalization::TempUnit value; - value = static_cast(5); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, - UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); + UnitLocalization::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_FLABEL_1_1Suite : public TestCommand +class Test_TC_LUNIT_2_1Suite : public TestCommand { public: - Test_TC_FLABEL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLABEL_1_1", 0, credsIssuerConfig) + Test_TC_LUNIT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -97573,7 +98682,7 @@ class Test_TC_FLABEL_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_FLABEL_1_1Suite() {} + ~Test_TC_LUNIT_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -97618,10 +98727,10 @@ class Test_TC_FLABEL_1_1Suite : public TestCommand } }; -class Test_TC_FLABEL_2_1Suite : public TestCommand +class Test_TC_LUNIT_3_1Suite : public TestCommand { public: - Test_TC_FLABEL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLABEL_2_1", 0, credsIssuerConfig) + Test_TC_LUNIT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LUNIT_3_1", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -97629,7 +98738,7 @@ class Test_TC_FLABEL_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_FLABEL_2_1Suite() {} + ~Test_TC_LUNIT_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -97654,6 +98763,54 @@ class Test_TC_FLABEL_2_1Suite : public TestCommand switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::UnitLocalization::TempUnit value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::UnitLocalization::TempUnit value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("temperatureUnit", value, 0U)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::UnitLocalization::TempUnit value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("temperatureUnit", value, 1U)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::UnitLocalization::TempUnit value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("temperatureUnit", value, 2U)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -97669,6 +98826,73 @@ class Test_TC_FLABEL_2_1Suite : public TestCommand using namespace chip::app::Clusters; switch (testIndex) { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads TemperatureUnit attribute from DUT"); + VerifyOrDo(!ShouldSkip("LUNIT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "TH writes 0 (Fahrenheit) to TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000.Fahrenheit"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::UnitLocalization::TempUnit value; + value = static_cast(0); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH writes 1 (Celsius) to TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000.Celsius"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::UnitLocalization::TempUnit value; + value = static_cast(1); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "TH writes 2 (Kelvin) to TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000.Kelvin"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::UnitLocalization::TempUnit value; + value = static_cast(2); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); + } + case 7: { + LogStep(7, "TH reads TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "TH writes 5 to TemperatureUnit attribute"); + VerifyOrDo(!ShouldSkip("LUNIT.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::UnitLocalization::TempUnit value; + value = static_cast(5); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), UnitLocalization::Id, + UnitLocalization::Attributes::TemperatureUnit::Id, value, chip::NullOptional, chip::NullOptional); + } } return CHIP_NO_ERROR; } @@ -98682,62 +99906,6 @@ class Test_TC_ACL_2_10Suite : public TestCommand } }; -class Test_TC_ULABEL_2_1Suite : public TestCommand -{ -public: - Test_TC_ULABEL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ULABEL_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_ULABEL_3_1Suite : public TestCommand { public: @@ -99058,15 +100226,19 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -99077,6 +100249,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), @@ -99084,6 +100257,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), @@ -99133,12 +100309,14 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -99158,9 +100336,11 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -99237,6 +100417,8 @@ 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), @@ -99273,8 +100455,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -99301,7 +100481,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), @@ -99328,7 +100507,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), @@ -99343,7 +100521,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), @@ -99434,7 +100611,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), @@ -99461,7 +100637,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), @@ -99474,7 +100649,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), @@ -99499,7 +100673,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), @@ -99528,16 +100701,12 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -99556,7 +100725,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/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index bae5330c2f3812..f53567df8ac080 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -55,14 +55,17 @@ class TestList : public Command { printf("Test_TC_CC_6_1\n"); printf("Test_TC_CC_7_3\n"); printf("Test_TC_CC_7_4\n"); + printf("Test_TC_OPCREDS_1_2\n"); printf("Test_TC_BINFO_1_1\n"); printf("Test_TC_CNET_1_3\n"); printf("Test_TC_DESC_1_1\n"); + printf("Test_TC_DLOG_1_1\n"); printf("Test_TC_DGETH_1_1\n"); printf("Test_TC_DGETH_2_1\n"); printf("Test_TC_DGETH_2_2\n"); printf("Test_TC_FLW_1_1\n"); printf("Test_TC_FLW_2_1\n"); + printf("Test_TC_FLABEL_1_1\n"); printf("Test_TC_CGEN_1_1\n"); printf("Test_TC_CGEN_2_1\n"); printf("Test_TC_DGGEN_1_1\n"); @@ -73,6 +76,7 @@ class TestList : public Command { printf("Test_TC_I_2_3\n"); printf("Test_TC_ILL_1_1\n"); printf("Test_TC_ILL_2_1\n"); + printf("Test_TC_ILL_2_2\n"); printf("Test_TC_LVL_1_1\n"); printf("Test_TC_LVL_2_1\n"); printf("Test_TC_LVL_2_2\n"); @@ -80,6 +84,9 @@ class TestList : public Command { printf("Test_TC_LVL_4_1\n"); printf("Test_TC_LVL_5_1\n"); printf("Test_TC_LVL_6_1\n"); + printf("Test_TC_LCFG_1_1\n"); + printf("Test_TC_LUNIT_1_1\n"); + printf("Test_TC_LTIME_1_1\n"); printf("Test_TC_LOWPOWER_1_1\n"); printf("Test_TC_KEYPADINPUT_1_2\n"); printf("Test_TC_APPLAUNCHER_1_3\n"); @@ -126,12 +133,14 @@ class TestList : public Command { printf("Test_TC_PS_2_1\n"); printf("Test_TC_PRS_1_1\n"); printf("Test_TC_PRS_2_1\n"); + printf("Test_TC_PRS_2_2\n"); printf("Test_TC_PCC_1_1\n"); printf("Test_TC_PCC_2_1\n"); printf("Test_TC_PCC_2_2\n"); printf("Test_TC_PCC_2_3\n"); printf("Test_TC_PCC_2_4\n"); printf("Test_TC_PSCFG_1_1\n"); + printf("Test_TC_PSCFG_2_1\n"); printf("Test_TC_RH_1_1\n"); printf("Test_TC_RH_2_1\n"); printf("Test_TC_SWTCH_1_1\n"); @@ -145,9 +154,11 @@ class TestList : public Command { printf("Test_TC_TSUIC_2_2\n"); printf("Test_TC_DGTHREAD_1_1\n"); printf("Test_TC_ULABEL_1_1\n"); + printf("Test_TC_ULABEL_2_1\n"); printf("Test_TC_ULABEL_2_2\n"); printf("Test_TC_ULABEL_2_3\n"); printf("Test_TC_ULABEL_2_4\n"); + printf("Test_TC_DGWIFI_1_1\n"); printf("Test_TC_DGWIFI_2_1\n"); printf("Test_TC_DGWIFI_2_3\n"); printf("Test_TC_WNCV_1_1\n"); @@ -220,6 +231,7 @@ class TestList : public Command { printf("Test_TC_DRLK_2_9\n"); printf("TestGroupsCluster\n"); printf("TestGroupKeyManagementCluster\n"); + printf("Test_TC_G_1_1\n"); return CHIP_NO_ERROR; } @@ -3583,7 +3595,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("(CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03)")) { + if (ShouldSkip("( CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03 )")) { NextTest(); return; } @@ -16873,6 +16885,256 @@ class Test_TC_CC_7_4 : public TestCommandBridge { } }; +class Test_TC_OPCREDS_1_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_OPCREDS_1_2() + : TestCommandBridge("Test_TC_OPCREDS_1_2") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_OPCREDS_1_2() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OPCREDS_1_2\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OPCREDS_1_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); + err = TestThReadsTheClusterRevisionFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + err = TestThReadsTheFeatureMapFromDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); + err = TestThReadsAttributeListFromDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads AcceptedCommandList from DUT\n"); + err = TestThReadsAcceptedCommandListFromDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads GeneratedCommandList from DUT\n"); + err = TestThReadsGeneratedCommandListFromDut_5(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 6; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsAttributeListFromDut_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 10UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 11UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsGeneratedCommandListFromDut_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterOperationalCredentials * cluster = + [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 8UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + class Test_TC_BINFO_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -17687,11 +17949,11 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { } }; -class Test_TC_DGETH_1_1 : public TestCommandBridge { +class Test_TC_DLOG_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DGETH_1_1() - : TestCommandBridge("Test_TC_DGETH_1_1") + Test_TC_DLOG_1_1() + : TestCommandBridge("Test_TC_DLOG_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -17701,7 +17963,7 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DGETH_1_1() {} + ~Test_TC_DLOG_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -17709,11 +17971,11 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGETH_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DLOG_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGETH_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DLOG_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -17743,23 +18005,270 @@ class Test_TC_DGETH_1_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads AcceptedCommandList from DUT\n"); - if (ShouldSkip("DGETH.S.F00 || DGETH.S.F01")) { - NextTest(); - return; - } err = TestThReadsAcceptedCommandListFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads AcceptedCommandList from DUT\n"); - if (ShouldSkip(" !DGETH.S.F00 && !DGETH.S.F01 ")) { - NextTest(); - return; - } - err = TestThReadsAcceptedCommandListFromDut_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads GeneratedCommandList from DUT\n"); - err = TestThReadsGeneratedCommandListFromDut_6(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads GeneratedCommandList from DUT\n"); + err = TestThReadsGeneratedCommandListFromDut_5(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 6; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsAttributeListFromDut_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsGeneratedCommandListFromDut_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDiagnosticLogs * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 1UL)); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DGETH_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_DGETH_1_1() + : TestCommandBridge("Test_TC_DGETH_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_DGETH_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGETH_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGETH_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); + err = TestThReadsTheClusterRevisionFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + err = TestThReadsTheFeatureMapFromDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); + err = TestThReadsAttributeListFromDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads AcceptedCommandList from DUT\n"); + if (ShouldSkip("DGETH.S.F00 || DGETH.S.F01")) { + NextTest(); + return; + } + err = TestThReadsAcceptedCommandListFromDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads AcceptedCommandList from DUT\n"); + if (ShouldSkip(" !DGETH.S.F00 && !DGETH.S.F01 ")) { + NextTest(); + return; + } + err = TestThReadsAcceptedCommandListFromDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads GeneratedCommandList from DUT\n"); + err = TestThReadsGeneratedCommandListFromDut_6(); break; } @@ -19795,11 +20304,11 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { } }; -class Test_TC_CGEN_1_1 : public TestCommandBridge { +class Test_TC_FLABEL_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CGEN_1_1() - : TestCommandBridge("Test_TC_CGEN_1_1") + Test_TC_FLABEL_1_1() + : TestCommandBridge("Test_TC_FLABEL_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -19809,7 +20318,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CGEN_1_1() {} + ~Test_TC_FLABEL_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -19817,11 +20326,11 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CGEN_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_FLABEL_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CGEN_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FLABEL_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -19838,24 +20347,270 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); + err = TestThReadsTheClusterRevisionFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - err = TestReadTheGlobalAttributeFeatureMap_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + err = TestThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); + err = TestThReadsAttributeListFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads AcceptedCommandList from DUT\n"); + err = TestThReadsAcceptedCommandListFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads GeneratedCommandList from DUT\n"); + err = TestThReadsGeneratedCommandListFromDut_5(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 6; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsAttributeListFromDut_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsGeneratedCommandListFromDut_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFixedLabel * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_CGEN_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_CGEN_1_1() + : TestCommandBridge("Test_TC_CGEN_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_CGEN_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CGEN_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CGEN_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + err = TestReadTheGlobalAttributeFeatureMap_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; } @@ -23171,11 +23926,11 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { } }; -class Test_TC_LVL_1_1 : public TestCommandBridge { +class Test_TC_ILL_2_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_1_1() - : TestCommandBridge("Test_TC_LVL_1_1") + Test_TC_ILL_2_2() + : TestCommandBridge("Test_TC_ILL_2_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -23185,7 +23940,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_1_1() {} + ~Test_TC_ILL_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -23193,11 +23948,11 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ILL_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ILL_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -23214,104 +23969,402 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads MinMeasuredValue attribute from DUT\n"); + if (ShouldSkip("ILL.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsMinMeasuredValueAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("LVL.S.F00 || LVL.S.F01 || LVL.S.F02")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads MaxMeasuredValue attribute from DUT\n"); + if (ShouldSkip("ILL.S.A0002")) { NextTest(); return; } - err = TestReadTheGlobalAttributeFeatureMap_2(); + err = TestThReadsMaxMeasuredValueAttributeFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); - break; - case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : Read the optonal attribute(StartUpCurrentLevel and RemainingTime) in AttributeList\n"); - if (ShouldSkip("LVL.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Cover the sensor or darken the room\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadTheOptonalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_4(); + err = TestCoverTheSensorOrDarkenTheRoom_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 1s\n"); + err = TestWait1s_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Read the optonal attribute(CurrentFrequency, MinFrequency and MinFrequency) in " - "AttributeList\n"); - if (ShouldSkip("LVL.S.F02")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : After a few seconds, TH reads MeasuredValue attribute from DUT.\n"); + if (ShouldSkip("ILL.S.A0000 && PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheOptonalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_5(); + err = TestAfterAFewSecondsThReadsMeasuredValueAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optonal attribute(MinLevel) in AttributeList\n"); - if (ShouldSkip("LVL.S.A0002")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Expose the sensor again to light\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadTheOptonalAttributeMinLevelInAttributeList_6(); + err = TestExposeTheSensorAgainToLight_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optonal attribute(MaxLevel) in AttributeList\n"); - if (ShouldSkip("LVL.S.A0003")) { - NextTest(); - return; - } - err = TestReadTheOptonalAttributeMaxLevelInAttributeList_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1s\n"); + err = TestWait1s_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optonal attribute(OnOffTransitionTime) in AttributeList\n"); - if (ShouldSkip("LVL.S.A0010")) { - NextTest(); - return; - } - err = TestReadTheOptonalAttributeOnOffTransitionTimeInAttributeList_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optonal attribute(OnTransitionTime) in AttributeList\n"); - if (ShouldSkip("LVL.S.A0012")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : After a few seconds, TH reads MeasuredValue attribute from DUT.\n"); + if (ShouldSkip("ILL.S.A0000 && PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheOptonalAttributeOnTransitionTimeInAttributeList_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read the optonal attribute(OffTransitionTime) in AttributeList\n"); - if (ShouldSkip("LVL.S.A0013")) { - NextTest(); - return; - } - err = TestReadTheOptonalAttributeOffTransitionTimeInAttributeList_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read the optonal attribute(DefaultMoveRate) in AttributeList\n"); - if (ShouldSkip("LVL.S.A0014")) { - NextTest(); - return; - } - err = TestReadTheOptonalAttributeDefaultMoveRateInAttributeList_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_12(); - break; - case 13: - ChipLogProgress( - chipTool, " ***** Test Step 13 : Read the Feature-dependent(LVL.S.F02) attribute in AcceptedCommandList\n"); - if (ShouldSkip("LVL.S.F02")) { - NextTest(); - return; - } - err = TestReadTheFeatureDependentLVLSF02AttributeInAcceptedCommandList_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_14(); + err = TestAfterAFewSecondsThReadsMeasuredValueAttributeFromDut_8(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 9; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + NSNumber * _Nullable MinMeasuredValue; + + CHIP_ERROR TestThReadsMinMeasuredValueAttributeFromDut_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MinMeasuredValue attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16u", "int16u")); + } + { + MinMeasuredValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nullable MaxMeasuredValue; + + CHIP_ERROR TestThReadsMaxMeasuredValueAttributeFromDut_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MaxMeasuredValue attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16u", "int16u")); + } + { + MaxMeasuredValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCoverTheSensorOrDarkenTheRoom_3() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for Successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestWait1s_4() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestAfterAFewSecondsThReadsMeasuredValueAttributeFromDut_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"After a few seconds, TH reads MeasuredValue attribute from DUT. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("measuredValue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestExposeTheSensorAgainToLight_6() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for Successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestWait1s_7() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestAfterAFewSecondsThReadsMeasuredValueAttributeFromDut_8() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterIlluminanceMeasurement * cluster = + [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"After a few seconds, TH reads MeasuredValue attribute from DUT. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("measuredValue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 65534U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LVL_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_LVL_1_1() + : TestCommandBridge("Test_TC_LVL_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_LVL_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip("LVL.S.F00 || LVL.S.F01 || LVL.S.F02")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeFeatureMap_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); + break; + case 4: + ChipLogProgress(chipTool, + " ***** Test Step 4 : Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList\n"); + if (ShouldSkip("LVL.S.F01")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_4(); + break; + case 5: + ChipLogProgress(chipTool, + " ***** Test Step 5 : Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in " + "AttributeList\n"); + if (ShouldSkip("LVL.S.F02")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(MinLevel) in AttributeList\n"); + if (ShouldSkip("LVL.S.A0002")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeMinLevelInAttributeList_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional attribute(MaxLevel) in AttributeList\n"); + if (ShouldSkip("LVL.S.A0003")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeMaxLevelInAttributeList_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional attribute(OnOffTransitionTime) in AttributeList\n"); + if (ShouldSkip("LVL.S.A0010")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeOnOffTransitionTimeInAttributeList_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional attribute(OnTransitionTime) in AttributeList\n"); + if (ShouldSkip("LVL.S.A0012")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeOnTransitionTimeInAttributeList_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Read the optional attribute(OffTransitionTime) in AttributeList\n"); + if (ShouldSkip("LVL.S.A0013")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeOffTransitionTimeInAttributeList_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Read the optional attribute(DefaultMoveRate) in AttributeList\n"); + if (ShouldSkip("LVL.S.A0014")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeDefaultMoveRateInAttributeList_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_12(); + break; + case 13: + ChipLogProgress( + chipTool, " ***** Test Step 13 : Read the Feature-dependent(LVL.S.F02) attribute in AcceptedCommandList\n"); + if (ShouldSkip("LVL.S.F02")) { + NextTest(); + return; + } + err = TestReadTheFeatureDependentLVLSF02AttributeInAcceptedCommandList_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_14(); break; } @@ -23468,7 +24521,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptonalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_4() + CHIP_ERROR TestReadTheOptionalAttributeStartUpCurrentLevelAndRemainingTimeInAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23477,7 +24530,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optonal attribute(StartUpCurrentLevel and RemainingTime) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(StartUpCurrentLevel and RemainingTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23491,7 +24544,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptonalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_5() + CHIP_ERROR TestReadTheOptionalAttributeCurrentFrequencyMinFrequencyAndMinFrequencyInAttributeList_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23500,7 +24553,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optonal attribute(CurrentFrequency, MinFrequency and MinFrequency) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(CurrentFrequency, MinFrequency and MinFrequency) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23515,7 +24568,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptonalAttributeMinLevelInAttributeList_6() + CHIP_ERROR TestReadTheOptionalAttributeMinLevelInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23524,7 +24577,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optonal attribute(MinLevel) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(MinLevel) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23537,7 +24590,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptonalAttributeMaxLevelInAttributeList_7() + CHIP_ERROR TestReadTheOptionalAttributeMaxLevelInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23546,7 +24599,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optonal attribute(MaxLevel) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(MaxLevel) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23559,7 +24612,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptonalAttributeOnOffTransitionTimeInAttributeList_8() + CHIP_ERROR TestReadTheOptionalAttributeOnOffTransitionTimeInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23568,7 +24621,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optonal attribute(OnOffTransitionTime) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(OnOffTransitionTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23581,7 +24634,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptonalAttributeOnTransitionTimeInAttributeList_9() + CHIP_ERROR TestReadTheOptionalAttributeOnTransitionTimeInAttributeList_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23590,7 +24643,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optonal attribute(OnTransitionTime) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(OnTransitionTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23603,7 +24656,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptonalAttributeOffTransitionTimeInAttributeList_10() + CHIP_ERROR TestReadTheOptionalAttributeOffTransitionTimeInAttributeList_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23612,7 +24665,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optonal attribute(OffTransitionTime) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(OffTransitionTime) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -23625,7 +24678,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptonalAttributeDefaultMoveRateInAttributeList_11() + CHIP_ERROR TestReadTheOptionalAttributeDefaultMoveRateInAttributeList_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -23634,7 +24687,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the optonal attribute(DefaultMoveRate) in AttributeList Error: %@", err); + NSLog(@"Read the optional attribute(DefaultMoveRate) in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -28595,20 +29648,20 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { err = TestWait5000ms_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Physically verify that the device has stopped transitioning\n"); - if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C03.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Sends stop command to DUT\n"); + if (ShouldSkip("LVL.S.C03.Rsp")) { NextTest(); return; } - err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_9(); + err = TestSendsStopCommandToDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Sends stop command to DUT\n"); - if (ShouldSkip("LVL.S.C03.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : Physically verify that the device has stopped transitioning\n"); + if (ShouldSkip("PICS_USER_PROMPT && LVL.S.C03.Rsp")) { NextTest(); return; } - err = TestSendsStopCommandToDut_10(); + err = TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_10(); break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentLevel attribute from DUT\n"); @@ -28930,16 +29983,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_9() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestSendsStopCommandToDut_10() + CHIP_ERROR TestSendsStopCommandToDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterLevelControl * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device @@ -28962,6 +30006,15 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + CHIP_ERROR TestPhysicallyVerifyThatTheDeviceHasStoppedTransitioning_10() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -29118,11 +30171,11 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { } }; -class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { +class Test_TC_LCFG_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LOWPOWER_1_1() - : TestCommandBridge("Test_TC_LOWPOWER_1_1") + Test_TC_LCFG_1_1() + : TestCommandBridge("Test_TC_LCFG_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -29132,7 +30185,7 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LOWPOWER_1_1() {} + ~Test_TC_LCFG_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -29140,11 +30193,11 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LOWPOWER_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LCFG_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LOWPOWER_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LCFG_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -29161,24 +30214,24 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); + err = TestThReadsTheClusterRevisionFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - err = TestReadTheGlobalAttributeFeatureMap_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + err = TestThReadsTheFeatureMapFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); + err = TestThReadsAttributeListFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads AcceptedCommandList from DUT\n"); + err = TestThReadsAcceptedCommandListFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads GeneratedCommandList from DUT\n"); + err = TestThReadsGeneratedCommandListFromDut_5(); break; } @@ -29236,14 +30289,15 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29259,14 +30313,15 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29282,49 +30337,48 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestThReadsAttributeListFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + NSLog(@"TH reads AttributeList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(5))); - VerifyOrReturn(CheckValue("", actualValue[0], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65533UL)); - } - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); @@ -29334,14 +30388,15 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + CHIP_ERROR TestThReadsGeneratedCommandListFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterLocalizationConfiguration * cluster = + [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29358,11 +30413,11 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { } }; -class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { +class Test_TC_LUNIT_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_KEYPADINPUT_1_2() - : TestCommandBridge("Test_TC_KEYPADINPUT_1_2") + Test_TC_LUNIT_1_1() + : TestCommandBridge("Test_TC_LUNIT_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -29372,7 +30427,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_KEYPADINPUT_1_2() {} + ~Test_TC_LUNIT_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -29380,11 +30435,151 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_KEYPADINPUT_1_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LUNIT_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_KEYPADINPUT_1_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LUNIT_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; +}; + +class Test_TC_LTIME_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_LTIME_1_1() + : TestCommandBridge("Test_TC_LTIME_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_LTIME_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LTIME_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LTIME_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; +}; + +class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_LOWPOWER_1_1() + : TestCommandBridge("Test_TC_LOWPOWER_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_LOWPOWER_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LOWPOWER_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LOWPOWER_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -29401,15 +30596,11 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("KEYPADINPUT.S.NV || KEYPADINPUT.S.LK || KEYPADINPUT.S.NK")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: @@ -29483,13 +30674,11 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -29508,9 +30697,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -29518,10 +30705,12 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 7UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -29531,9 +30720,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -29541,13 +30728,17 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(5))); + VerifyOrReturn(CheckValue("", actualValue[0], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65533UL)); + } + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); NextTest(); }]; @@ -29557,9 +30748,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -29567,9 +30756,13 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); NextTest(); }]; @@ -29579,9 +30772,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterLowPower * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -29589,9 +30780,12 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); NextTest(); }]; @@ -29599,11 +30793,11 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { } }; -class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { +class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_APPLAUNCHER_1_3() - : TestCommandBridge("Test_TC_APPLAUNCHER_1_3") + Test_TC_KEYPADINPUT_1_2() + : TestCommandBridge("Test_TC_KEYPADINPUT_1_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -29613,7 +30807,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_APPLAUNCHER_1_3() {} + ~Test_TC_KEYPADINPUT_1_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -29621,11 +30815,252 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_APPLAUNCHER_1_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_KEYPADINPUT_1_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_APPLAUNCHER_1_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_KEYPADINPUT_1_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + if (ShouldSkip("KEYPADINPUT.S.NV || KEYPADINPUT.S.LK || KEYPADINPUT.S.NK")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeFeatureMap_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 6; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 7UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterKeypadInput * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_APPLAUNCHER_1_3() + : TestCommandBridge("Test_TC_APPLAUNCHER_1_3") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_APPLAUNCHER_1_3() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_APPLAUNCHER_1_3\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_APPLAUNCHER_1_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -39681,7 +41116,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("occupancySensorTypeBitmap", "bitmap8", "bitmap8")); VerifyOrReturn(CheckConstraintMinValue("occupancySensorTypeBitmap", [value unsignedCharValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue("occupancySensorTypeBitmap", [value unsignedCharValue], 273U)); + VerifyOrReturn(CheckConstraintMaxValue("occupancySensorTypeBitmap", [value unsignedCharValue], 7U)); NextTest(); }]; @@ -44407,11 +45842,11 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { } }; -class Test_TC_PCC_1_1 : public TestCommandBridge { +class Test_TC_PRS_2_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_PCC_1_1() - : TestCommandBridge("Test_TC_PCC_1_1") + Test_TC_PRS_2_2() + : TestCommandBridge("Test_TC_PRS_2_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -44421,7 +45856,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_PCC_1_1() {} + ~Test_TC_PRS_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -44429,11 +45864,11 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PRS_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PRS_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -44450,170 +45885,358 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision attribute from the DUT\n"); - err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap attribute from the DUT\n"); - err = TestThReadsTheFeatureMapAttributeFromTheDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the AttributeList attribute from the DUT\n"); - err = TestThReadsTheAttributeListAttributeFromTheDut_3(); - break; - case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : TH reads optional attribute(MinConstPressure) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0003")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeMinConstPressureAttributeInAttributeListFromTheDut_4(); - break; - case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : TH reads optional attribute(MaxConstPressure) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0004")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeMaxConstPressureAttributeInAttributeListFromTheDut_5(); - break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : TH reads optional attribute(MinCompPressure) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0005")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeMinCompPressureAttributeInAttributeListFromTheDut_6(); - break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : TH reads optional attribute(MaxCompPressure) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0006")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeMaxCompPressureAttributeInAttributeListFromTheDut_7(); - break; - case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : TH reads optional attribute(MinConstSpeed) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0007")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeMinConstSpeedAttributeInAttributeListFromTheDut_8(); - break; - case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : TH reads optional attribute(MaxConstSpeed) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0008")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeMaxConstSpeedAttributeInAttributeListFromTheDut_9(); - break; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : TH reads optional attribute(MinConstFlow) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0009")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeMinConstFlowAttributeInAttributeListFromTheDut_10(); - break; - case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : TH reads optional attribute(MaxConstFlow) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A000a")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeMaxConstFlowAttributeInAttributeListFromTheDut_11(); - break; - case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : TH reads optional attribute(MinConstTemp) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A000b")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeMinConstTempAttributeInAttributeListFromTheDut_12(); - break; - case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : TH reads optional attribute(MaxConstTemp) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A000c")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeMaxConstTempAttributeInAttributeListFromTheDut_13(); - break; - case 14: - ChipLogProgress(chipTool, - " ***** Test Step 14 : TH reads optional attribute(PumpStatus) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0010")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads from the DUT the MeasuredValue attribute\n"); + if (ShouldSkip("PRS.S.A0000")) { NextTest(); return; } - err = TestThReadsOptionalAttributePumpStatusAttributeInAttributeListFromTheDut_14(); + err = TestThReadsFromTheDutTheMeasuredValueAttribute_1(); break; - case 15: - ChipLogProgress( - chipTool, " ***** Test Step 15 : TH reads optional attribute(Speed) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0014")) { + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Operate on device to change the pressure significantly\n"); + if (ShouldSkip("PICS_USER_PROMPT && PRS.M.PressureChange")) { NextTest(); return; } - err = TestThReadsOptionalAttributeSpeedAttributeInAttributeListFromTheDut_15(); + err = TestOperateOnDeviceToChangeThePressureSignificantly_2(); break; - case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : TH reads optional attribute(LifetimeRunningHours) attribute in AttributeList from the " - "DUT\n"); - if (ShouldSkip("PCC.S.A0015")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeLifetimeRunningHoursAttributeInAttributeListFromTheDut_16(); + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 2s\n"); + err = TestWait2s_3(); break; - case 17: + case 4: ChipLogProgress( - chipTool, " ***** Test Step 17 : TH reads optional attribute(Power) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0016")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributePowerAttributeInAttributeListFromTheDut_17(); - break; - case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : TH reads optional attribute(LifetimeEnergyConsumed) attribute in AttributeList from the " - "DUT\n"); - if (ShouldSkip("PCC.S.A0017")) { + chipTool, " ***** Test Step 4 : After a few seconds, TH reads from the DUT the MeasuredValue attribute\n"); + if (ShouldSkip("PRS.S.A0000 && PRS.M.PressureChange")) { NextTest(); return; } - err = TestThReadsOptionalAttributeLifetimeEnergyConsumedAttributeInAttributeListFromTheDut_18(); - break; - case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : TH reads optional attribute(ControlMode) attribute in AttributeList from the DUT\n"); - if (ShouldSkip("PCC.S.A0021")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeControlModeAttributeInAttributeListFromTheDut_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads the AcceptedCommandList attribute from the DUT\n"); - err = TestThReadsTheAcceptedCommandListAttributeFromTheDut_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads the GeneratedCommandList attribute from the DUT\n"); - err = TestThReadsTheGeneratedCommandListAttributeFromTheDut_21(); + err = TestAfterAFewSecondsThReadsFromTheDutTheMeasuredValueAttribute_4(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 5; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + NSNumber * _Nullable ValueBeforeChange; + + CHIP_ERROR TestThReadsFromTheDutTheMeasuredValueAttribute_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the MeasuredValue attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + ValueBeforeChange = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestOperateOnDeviceToChangeThePressureSignificantly_2() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestWait2s_3() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestAfterAFewSecondsThReadsFromTheDutTheMeasuredValueAttribute_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPressureMeasurement * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"After a few seconds, TH reads from the DUT the MeasuredValue attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + } + VerifyOrReturn(CheckConstraintNotValue("measuredValue", value, ValueBeforeChange)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_PCC_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_PCC_1_1() + : TestCommandBridge("Test_TC_PCC_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_PCC_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PCC_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PCC_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision attribute from the DUT\n"); + err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap attribute from the DUT\n"); + err = TestThReadsTheFeatureMapAttributeFromTheDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the AttributeList attribute from the DUT\n"); + err = TestThReadsTheAttributeListAttributeFromTheDut_3(); + break; + case 4: + ChipLogProgress(chipTool, + " ***** Test Step 4 : TH reads optional attribute(MinConstPressure) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0003")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinConstPressureAttributeInAttributeListFromTheDut_4(); + break; + case 5: + ChipLogProgress(chipTool, + " ***** Test Step 5 : TH reads optional attribute(MaxConstPressure) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0004")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxConstPressureAttributeInAttributeListFromTheDut_5(); + break; + case 6: + ChipLogProgress(chipTool, + " ***** Test Step 6 : TH reads optional attribute(MinCompPressure) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0005")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinCompPressureAttributeInAttributeListFromTheDut_6(); + break; + case 7: + ChipLogProgress(chipTool, + " ***** Test Step 7 : TH reads optional attribute(MaxCompPressure) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0006")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxCompPressureAttributeInAttributeListFromTheDut_7(); + break; + case 8: + ChipLogProgress(chipTool, + " ***** Test Step 8 : TH reads optional attribute(MinConstSpeed) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0007")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinConstSpeedAttributeInAttributeListFromTheDut_8(); + break; + case 9: + ChipLogProgress(chipTool, + " ***** Test Step 9 : TH reads optional attribute(MaxConstSpeed) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0008")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxConstSpeedAttributeInAttributeListFromTheDut_9(); + break; + case 10: + ChipLogProgress(chipTool, + " ***** Test Step 10 : TH reads optional attribute(MinConstFlow) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0009")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinConstFlowAttributeInAttributeListFromTheDut_10(); + break; + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : TH reads optional attribute(MaxConstFlow) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A000a")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxConstFlowAttributeInAttributeListFromTheDut_11(); + break; + case 12: + ChipLogProgress(chipTool, + " ***** Test Step 12 : TH reads optional attribute(MinConstTemp) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A000b")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMinConstTempAttributeInAttributeListFromTheDut_12(); + break; + case 13: + ChipLogProgress(chipTool, + " ***** Test Step 13 : TH reads optional attribute(MaxConstTemp) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A000c")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeMaxConstTempAttributeInAttributeListFromTheDut_13(); + break; + case 14: + ChipLogProgress(chipTool, + " ***** Test Step 14 : TH reads optional attribute(PumpStatus) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0010")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributePumpStatusAttributeInAttributeListFromTheDut_14(); + break; + case 15: + ChipLogProgress( + chipTool, " ***** Test Step 15 : TH reads optional attribute(Speed) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0014")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeSpeedAttributeInAttributeListFromTheDut_15(); + break; + case 16: + ChipLogProgress(chipTool, + " ***** Test Step 16 : TH reads optional attribute(LifetimeRunningHours) attribute in AttributeList from the " + "DUT\n"); + if (ShouldSkip("PCC.S.A0015")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeLifetimeRunningHoursAttributeInAttributeListFromTheDut_16(); + break; + case 17: + ChipLogProgress( + chipTool, " ***** Test Step 17 : TH reads optional attribute(Power) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0016")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributePowerAttributeInAttributeListFromTheDut_17(); + break; + case 18: + ChipLogProgress(chipTool, + " ***** Test Step 18 : TH reads optional attribute(LifetimeEnergyConsumed) attribute in AttributeList from the " + "DUT\n"); + if (ShouldSkip("PCC.S.A0017")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeLifetimeEnergyConsumedAttributeInAttributeListFromTheDut_18(); + break; + case 19: + ChipLogProgress(chipTool, + " ***** Test Step 19 : TH reads optional attribute(ControlMode) attribute in AttributeList from the DUT\n"); + if (ShouldSkip("PCC.S.A0021")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeControlModeAttributeInAttributeListFromTheDut_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads the AcceptedCommandList attribute from the DUT\n"); + err = TestThReadsTheAcceptedCommandListAttributeFromTheDut_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads the GeneratedCommandList attribute from the DUT\n"); + err = TestThReadsTheGeneratedCommandListAttributeFromTheDut_21(); break; } @@ -47705,6 +49328,120 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { } }; +class Test_TC_PSCFG_2_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_PSCFG_2_1() + : TestCommandBridge("Test_TC_PSCFG_2_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_PSCFG_2_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PSCFG_2_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PSCFG_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Commission DUT to TH\n"); + err = TestCommissionDutToTh_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the Sources attribute from the DUT\n"); + if (ShouldSkip("PSCFG.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsTheSourcesAttributeFromTheDut_1(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 2; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestCommissionDutToTh_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsTheSourcesAttributeFromTheDut_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterPowerSourceConfiguration * cluster = + [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeSourcesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the Sources attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("sources", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + class Test_TC_RH_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -48248,76 +49985,41 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: FeatureMap\n"); - err = TestReadTheGlobalAttributeFeatureMap_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check values of flags in this FeatureMap\n"); - if (ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 1 : Read FeatureMap attribute and Check values of flags in this FeatureMap\n"); + if (ShouldSkip("(SWTCH.S.F00 || SWTCH.S.F01 || SWTCH.S.F02 || SWTCH.S.F03 || SWTCH.S.F04)")) { NextTest(); return; } - err = TestCheckValuesOfFlagsInThisFeatureMap_2(); + err = TestReadFeatureMapAttributeAndCheckValuesOfFlagsInThisFeatureMap_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Check values of flags in this FeatureMap\n"); - if (ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("SWTCH.S.F04")) { NextTest(); return; } - err = TestCheckValuesOfFlagsInThisFeatureMap_3(); + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Check values of flags in this FeatureMap\n"); - if (ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F02")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("!SWTCH.S.F04")) { NextTest(); return; } - err = TestCheckValuesOfFlagsInThisFeatureMap_4(); + err = TestReadTheGlobalAttributeAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Check values of flags in this FeatureMap\n"); - if (ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F03")) { - NextTest(); - return; - } - err = TestCheckValuesOfFlagsInThisFeatureMap_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Check values of flags in this FeatureMap\n"); - if (ShouldSkip("PICS_USER_PROMPT && SWTCH.S.F04")) { - NextTest(); - return; - } - err = TestCheckValuesOfFlagsInThisFeatureMap_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("SWTCH.S.F04")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAttributeList_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("!SWTCH.S.F04")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAttributeList_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_11(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; } @@ -48351,21 +50053,6 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -48379,7 +50066,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -48392,22 +50079,21 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSNumber * _Nonnull FeatureMapValue; - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_1() + CHIP_ERROR TestReadFeatureMapAttributeAndCheckValuesOfFlagsInThisFeatureMap_1() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); + NSLog(@"Read FeatureMap attribute and Check values of flags in this FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - FeatureMapValue = value; - } + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 31UL)); NextTest(); }]; @@ -48415,52 +50101,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckValuesOfFlagsInThisFeatureMap_2() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestCheckValuesOfFlagsInThisFeatureMap_3() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestCheckValuesOfFlagsInThisFeatureMap_4() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestCheckValuesOfFlagsInThisFeatureMap_5() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestCheckValuesOfFlagsInThisFeatureMap_6() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_7() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_2() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48482,7 +50123,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_8() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48509,7 +50150,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_9() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48535,7 +50176,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_10() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48553,7 +50194,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_11() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterSwitch * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -57345,11 +58986,11 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { } }; -class Test_TC_ULABEL_2_2 : public TestCommandBridge { +class Test_TC_ULABEL_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ULABEL_2_2() - : TestCommandBridge("Test_TC_ULABEL_2_2") + Test_TC_ULABEL_2_1() + : TestCommandBridge("Test_TC_ULABEL_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -57359,7 +59000,7 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_ULABEL_2_2() {} + ~Test_TC_ULABEL_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -57367,11 +59008,11 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -57388,20 +59029,12 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH writes LabelList attribute from the DUT\n"); - if (ShouldSkip("ULABEL.S.A0000")) { - NextTest(); - return; - } - err = TestThWritesLabelListAttributeFromTheDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads LabelList attribute from the DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads LabelList attribute of the DUT\n"); if (ShouldSkip("ULABEL.S.A0000")) { NextTest(); return; } - err = TestThReadsLabelListAttributeFromTheDut_2(); + err = TestThReadsLabelListAttributeOfTheDut_1(); break; } @@ -57420,9 +59053,6 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -57436,7 +59066,7 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 2; chip::Optional mNodeId; chip::Optional mCluster; @@ -57450,73 +59080,18 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThWritesLabelListAttributeFromTheDut_1() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id labelListArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[0]).label = @"roomName"; - ((MTRUserLabelClusterLabelStruct *) temp_0[0]).value = @"master bedroom 1"; - - temp_0[1] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[1]).label = @"Orientation"; - ((MTRUserLabelClusterLabelStruct *) temp_0[1]).value = @"east"; - - temp_0[2] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[2]).label = @"floor"; - ((MTRUserLabelClusterLabelStruct *) temp_0[2]).value = @"2"; - - temp_0[3] = [[MTRUserLabelClusterLabelStruct alloc] init]; - ((MTRUserLabelClusterLabelStruct *) temp_0[3]).label = @"roomType"; - ((MTRUserLabelClusterLabelStruct *) temp_0[3]).value = @"bedroom"; - - labelListArgument = temp_0; - } - [cluster writeAttributeLabelListWithValue:labelListArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes LabelList attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsLabelListAttributeFromTheDut_2() + CHIP_ERROR TestThReadsLabelListAttributeOfTheDut_1() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads LabelList attribute from the DUT Error: %@", err); + NSLog(@"TH reads LabelList attribute of the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("label list", [actualValue count], static_cast(4))); - VerifyOrReturn(CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).label, @"roomName")); - VerifyOrReturn( - CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).value, @"master bedroom 1")); - VerifyOrReturn( - CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[1]).label, @"Orientation")); - VerifyOrReturn(CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[1]).value, @"east")); - VerifyOrReturn(CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[2]).label, @"floor")); - VerifyOrReturn(CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[2]).value, @"2")); - VerifyOrReturn(CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[3]).label, @"roomType")); - VerifyOrReturn(CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[3]).value, @"bedroom")); - } - VerifyOrReturn(CheckConstraintType("labelList", "list", "list")); - VerifyOrReturn(CheckConstraintMinLength("labelList", value, 4)); NextTest(); }]; @@ -57524,11 +59099,11 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { } }; -class Test_TC_ULABEL_2_3 : public TestCommandBridge { +class Test_TC_ULABEL_2_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ULABEL_2_3() - : TestCommandBridge("Test_TC_ULABEL_2_3") + Test_TC_ULABEL_2_2() + : TestCommandBridge("Test_TC_ULABEL_2_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -57538,7 +59113,7 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_ULABEL_2_3() {} + ~Test_TC_ULABEL_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -57546,11 +59121,11 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -57567,20 +59142,20 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH writes LabelList attribute of the DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH writes LabelList attribute from the DUT\n"); if (ShouldSkip("ULABEL.S.A0000")) { NextTest(); return; } - err = TestThWritesLabelListAttributeOfTheDut_1(); + err = TestThWritesLabelListAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH writes LabelList attribute of the DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads LabelList attribute from the DUT\n"); if (ShouldSkip("ULABEL.S.A0000")) { NextTest(); return; } - err = TestThWritesLabelListAttributeOfTheDut_2(); + err = TestThReadsLabelListAttributeFromTheDut_2(); break; } @@ -57597,10 +59172,189 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 3; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThWritesLabelListAttributeFromTheDut_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id labelListArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).label = @"roomName"; + ((MTRUserLabelClusterLabelStruct *) temp_0[0]).value = @"master bedroom 1"; + + temp_0[1] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[1]).label = @"Orientation"; + ((MTRUserLabelClusterLabelStruct *) temp_0[1]).value = @"east"; + + temp_0[2] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[2]).label = @"floor"; + ((MTRUserLabelClusterLabelStruct *) temp_0[2]).value = @"2"; + + temp_0[3] = [[MTRUserLabelClusterLabelStruct alloc] init]; + ((MTRUserLabelClusterLabelStruct *) temp_0[3]).label = @"roomType"; + ((MTRUserLabelClusterLabelStruct *) temp_0[3]).value = @"bedroom"; + + labelListArgument = temp_0; + } + [cluster writeAttributeLabelListWithValue:labelListArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes LabelList attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsLabelListAttributeFromTheDut_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterUserLabel * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads LabelList attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("label list", [actualValue count], static_cast(4))); + VerifyOrReturn(CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).label, @"roomName")); + VerifyOrReturn( + CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[0]).value, @"master bedroom 1")); + VerifyOrReturn( + CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[1]).label, @"Orientation")); + VerifyOrReturn(CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[1]).value, @"east")); + VerifyOrReturn(CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[2]).label, @"floor")); + VerifyOrReturn(CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[2]).value, @"2")); + VerifyOrReturn(CheckValueAsString("label", ((MTRUserLabelClusterLabelStruct *) actualValue[3]).label, @"roomType")); + VerifyOrReturn(CheckValueAsString("value", ((MTRUserLabelClusterLabelStruct *) actualValue[3]).value, @"bedroom")); + } + + VerifyOrReturn(CheckConstraintType("labelList", "list", "list")); + VerifyOrReturn(CheckConstraintMinLength("labelList", value, 4)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_ULABEL_2_3 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_ULABEL_2_3() + : TestCommandBridge("Test_TC_ULABEL_2_3") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_ULABEL_2_3() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_3\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH writes LabelList attribute of the DUT\n"); + if (ShouldSkip("ULABEL.S.A0000")) { + NextTest(); + return; + } + err = TestThWritesLabelListAttributeOfTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH writes LabelList attribute of the DUT\n"); + if (ShouldSkip("ULABEL.S.A0000")) { + NextTest(); + return; + } + err = TestThWritesLabelListAttributeOfTheDut_2(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; } @@ -57928,6 +59682,394 @@ class Test_TC_ULABEL_2_4 : public TestCommandBridge { } }; +class Test_TC_DGWIFI_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_DGWIFI_1_1() + : TestCommandBridge("Test_TC_DGWIFI_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_DGWIFI_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGWIFI_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGWIFI_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); + err = TestThReadsTheClusterRevisionFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + if (ShouldSkip("DGWIFI.S.F00 || DGWIFI.S.F01")) { + NextTest(); + return; + } + err = TestThReadsTheFeatureMapFromDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); + err = TestThReadsAttributeListFromDut_3(); + break; + case 4: + ChipLogProgress( + chipTool, " ***** Test Step 4 : TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList from DUT\n"); + if (ShouldSkip("DGWIFI.S.F00")) { + NextTest(); + return; + } + err = TestThReadsFeatureDependentDGWIFISF00AttributesInAttributeListFromDut_4(); + break; + case 5: + ChipLogProgress( + chipTool, " ***** Test Step 5 : TH reads Feature dependent(DGWIFI.S.F01) attributes in attributeList from DUT\n"); + if (ShouldSkip("DGWIFI.S.F01")) { + NextTest(); + return; + } + err = TestThReadsFeatureDependentDGWIFISF01AttributesInAttributeListFromDut_5(); + break; + case 6: + ChipLogProgress( + chipTool, " ***** Test Step 6 : TH reads optional attribute (CurrentMaxRate) in AttributeList from DUT\n"); + if (ShouldSkip("DGWIFI.S.A000b")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeCurrentMaxRateInAttributeListFromDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads AcceptedCommandList from DUT\n"); + if (ShouldSkip(" !DGWIFI.S.F01 ")) { + NextTest(); + return; + } + err = TestThReadsAcceptedCommandListFromDut_7(); + break; + case 8: + ChipLogProgress(chipTool, + " ***** Test Step 8 : TH reads Feature dependent(DGWIFI.S.F01) command in AcceptedCommandList from DUT\n"); + if (ShouldSkip("DGWIFI.S.F01")) { + NextTest(); + return; + } + err = TestThReadsFeatureDependentDGWIFISF01CommandInAcceptedCommandListFromDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads GeneratedCommandList from DUT\n"); + err = TestThReadsGeneratedCommandListFromDut_9(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 10; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintMinValue("featureMap", [value unsignedIntValue], 0UL)); + VerifyOrReturn(CheckConstraintMaxValue("featureMap", [value unsignedIntValue], 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsAttributeListFromDut_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFeatureDependentDGWIFISF00AttributesInAttributeListFromDut_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads Feature dependent(DGWIFI.S.F00) attributes in attributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFeatureDependentDGWIFISF01AttributesInAttributeListFromDut_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads Feature dependent(DGWIFI.S.F01) attributes in attributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 12UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsOptionalAttributeCurrentMaxRateInAttributeListFromDut_6() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (CurrentMaxRate) in AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_7() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFeatureDependentDGWIFISF01CommandInAcceptedCommandListFromDut_8() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads Feature dependent(DGWIFI.S.F01) command in AcceptedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsGeneratedCommandListFromDut_9() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterWiFiNetworkDiagnostics * cluster = + [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + class Test_TC_DGWIFI_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -122195,6 +124337,282 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { } }; +class Test_TC_G_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_G_1_1() + : TestCommandBridge("Test_TC_G_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_G_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_G_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_G_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); + err = TestThReadsTheClusterRevisionFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); + if (ShouldSkip(" !G.S.F00 ")) { + NextTest(); + return; + } + err = TestThReadsTheFeatureMapFromDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the FeatureMap from DUT\n"); + if (ShouldSkip("G.S.F00")) { + NextTest(); + return; + } + err = TestThReadsTheFeatureMapFromDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads AttributeList from DUT\n"); + err = TestThReadsAttributeListFromDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads AcceptedCommandList from DUT\n"); + err = TestThReadsAcceptedCommandListFromDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads GeneratedCommandList from DUT\n"); + err = TestThReadsGeneratedCommandListFromDut_6(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 7; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsTheFeatureMapFromDut_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsAttributeListFromDut_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AttributeList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsAcceptedCommandListFromDut_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads AcceptedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsGeneratedCommandListFromDut_6() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterGroups * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads GeneratedCommandList from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + #endif // CONFIG_ENABLE_YAML_TESTS void registerCommandsTests(Commands & commands) @@ -122227,14 +124645,17 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -122245,6 +124666,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -122252,6 +124674,9 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), + make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -122298,12 +124723,14 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -122317,9 +124744,11 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -122392,6 +124821,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), #endif // CONFIG_ENABLE_YAML_TESTS };