From 108391622787cbed6774cb91f2bcab7ec6e269e9 Mon Sep 17 00:00:00 2001 From: manjunath-grl <102359958+manjunath-grl@users.noreply.github.com> Date: Sat, 15 Jul 2023 06:51:24 +0530 Subject: [PATCH] Modifed test july 14 (#27960) * Semi-Automated ---> Automated TC-ACL-2.2 TC-APPLAUNCHER-3.8 TC-APPLAUNCHER-3.9 TC-SC-5.1 TC-SC-5.2 Semi-Automated test TC-BINFO-2.2 * Auto generated files * Modified endpoint variable to readable format --- .../templates/tests/ciTests.json | 4 +- .../suites/certification/Test_TC_ACL_2_2.yaml | 85 +- .../Test_TC_APPLAUNCHER_3_8.yaml | 35 +- .../Test_TC_APPLAUNCHER_3_9.yaml | 35 +- .../certification/Test_TC_BINFO_2_2.yaml | 183 +- .../suites/certification/Test_TC_SC_5_1.yaml | 616 +---- .../suites/certification/Test_TC_SC_5_2.yaml | 330 +-- src/app/tests/suites/ciTests.json | 5 +- src/app/tests/suites/manualTests.json | 1 - .../chip-tool/zap-generated/test/Commands.h | 2131 +++-------------- .../zap-generated/test/Commands.h | 1247 ---------- 11 files changed, 539 insertions(+), 4133 deletions(-) diff --git a/examples/darwin-framework-tool/templates/tests/ciTests.json b/examples/darwin-framework-tool/templates/tests/ciTests.json index 7260c76ca3a53d..f20fb1683d75ea 100644 --- a/examples/darwin-framework-tool/templates/tests/ciTests.json +++ b/examples/darwin-framework-tool/templates/tests/ciTests.json @@ -114,6 +114,8 @@ "Test_TC_ACFREMON_2_1", "Disabled due to HEPAFilterMonitoring not being enabled in Matter.framework for now:", "Test_TC_HEPAFREMON_1_1", - "Test_TC_HEPAFREMON_2_1" + "Test_TC_HEPAFREMON_2_1", + "Disabled due to Events verification not supported", + "Test_TC_BINFO_2_2" ] } diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_2.yaml index 87fd561287839e..24e18d9207082c 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_2.yaml @@ -22,9 +22,11 @@ config: nodeId: 0x12344321 cluster: "Access Control" endpoint: 0 + #Configurable endpoint except 0 + Endpoint_Except_Zero: 1 tests: - - label: "Wait for the commissioned device to be retrieved" + - label: "Step 1: Wait for the commissioned device to be retrieved" cluster: "DelayCommands" command: "WaitForCommissionee" arguments: @@ -33,79 +35,24 @@ tests: value: nodeId - label: - "TH1 reads DUT Descriptor cluster ServerList attribute from Endpoint 0" - command: "readAttribute" + "Step 2: TH reads DUT Descriptor cluster ServerList attribute from + Endpoint 0" cluster: "Descriptor" + command: "readAttribute" attribute: "ServerList" response: constraints: type: list contains: [31] - #Endpoint configuration is not supported in YAML - label: - "TH1 reads DUT Descriptor cluster ServerList attribute from every - Endpoint except 0" - verification: | - ./chip-tool descriptor read server-list 1 1 - - - On TH1(Chiptool) ,Verify the serverList attribute of Descriptor Cluster without an element of 31( 0x001F) - - [1676442452.204523][8902:8904] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 1718800852 - [1676442452.204637][8902:8904] CHIP:TOO: ServerList: 45 entries - [1676442452.204655][8902:8904] CHIP:TOO: [1]: 3 - [1676442452.204670][8902:8904] CHIP:TOO: [2]: 4 - [1676442452.204685][8902:8904] CHIP:TOO: [3]: 5 - [1676442452.204700][8902:8904] CHIP:TOO: [4]: 6 - [1676442452.204715][8902:8904] CHIP:TOO: [5]: 7 - [1676442452.204729][8902:8904] CHIP:TOO: [6]: 8 - [1676442452.204744][8902:8904] CHIP:TOO: [7]: 15 - [1676442452.204759][8902:8904] CHIP:TOO: [8]: 29 - [1676442452.204774][8902:8904] CHIP:TOO: [9]: 30 - [1676442452.204789][8902:8904] CHIP:TOO: [10]: 37 - [1676442452.204804][8902:8904] CHIP:TOO: [11]: 47 - [1676442452.204820][8902:8904] CHIP:TOO: [12]: 59 - [1676442452.204835][8902:8904] CHIP:TOO: [13]: 64 - [1676442452.204849][8902:8904] CHIP:TOO: [14]: 65 - [1676442452.204864][8902:8904] CHIP:TOO: [15]: 69 - [1676442452.204879][8902:8904] CHIP:TOO: [16]: 80 - [1676442452.204894][8902:8904] CHIP:TOO: [17]: 257 - [1676442452.204909][8902:8904] CHIP:TOO: [18]: 258 - [1676442452.204923][8902:8904] CHIP:TOO: [19]: 259 - [1676442452.204938][8902:8904] CHIP:TOO: [20]: 512 - [1676442452.204953][8902:8904] CHIP:TOO: [21]: 513 - [1676442452.204968][8902:8904] CHIP:TOO: [22]: 514 - [1676442452.204983][8902:8904] CHIP:TOO: [23]: 516 - [1676442452.204998][8902:8904] CHIP:TOO: [24]: 768 - [1676442452.205013][8902:8904] CHIP:TOO: [25]: 769 - [1676442452.205028][8902:8904] CHIP:TOO: [26]: 1024 - [1676442452.205043][8902:8904] CHIP:TOO: [27]: 1026 - [1676442452.205058][8902:8904] CHIP:TOO: [28]: 1027 - [1676442452.205072][8902:8904] CHIP:TOO: [29]: 1028 - [1676442452.205088][8902:8904] CHIP:TOO: [30]: 1029 - [1676442452.205103][8902:8904] CHIP:TOO: [31]: 1030 - [1676442452.205117][8902:8904] CHIP:TOO: [32]: 1283 - [1676442452.205133][8902:8904] CHIP:TOO: [33]: 1284 - [1676442452.205148][8902:8904] CHIP:TOO: [34]: 1285 - [1676442452.205168][8902:8904] CHIP:TOO: [35]: 1286 - [1676442452.205185][8902:8904] CHIP:TOO: [36]: 1287 - [1676442452.205199][8902:8904] CHIP:TOO: [37]: 1288 - [1676442452.205215][8902:8904] CHIP:TOO: [38]: 1289 - [1676442452.205230][8902:8904] CHIP:TOO: [39]: 1290 - [1676442452.205245][8902:8904] CHIP:TOO: [40]: 1291 - [1676442452.205260][8902:8904] CHIP:TOO: [41]: 1292 - [1676442452.205275][8902:8904] CHIP:TOO: [42]: 1293 - [1676442452.205290][8902:8904] CHIP:TOO: [43]: 1294 - [1676442452.205319][8902:8904] CHIP:TOO: [44]: 2820 - [1676442452.205331][8902:8904] CHIP:TOO: [45]: 4294048773 - [1676442452.205454][8902:8904] CHIP:EM: <<< [E:56665i M:248848283 (Ack:9298405)] (S) Msg TX to 1:00000000 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Factory Reset the DUT and enter 'y' after success" - - name: "expectedValue" - value: "y" + "Step 3: TH reads DUT Descriptor cluster ServerList attribute from + every Endpoint except 0" + endpoint: Endpoint_Except_Zero + cluster: "Descriptor" + command: "readAttribute" + attribute: "ServerList" + response: + constraints: + type: list + excludes: [31] diff --git a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8.yaml b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8.yaml index d1633f30f81291..94a5bcc223f015 100644 --- a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_8.yaml @@ -27,9 +27,11 @@ config: applicationId: type: char_string defaultValue: "exampleid" + #ApplicationBasic cluster endpoint + ApplicationBasic.Endpoint: 3 tests: - - label: "Wait for the commissioned device to be retrieved" + - label: "Step 0: Wait for the commissioned device to be retrieved" cluster: "DelayCommands" command: "WaitForCommissionee" arguments: @@ -37,7 +39,7 @@ tests: - name: "nodeId" value: nodeId - - label: "Stop an app with the provided application ID" + - label: "Step 1: Stop an app with the provided application ID" PICS: APPLAUNCHER.S.C01.Rsp command: "StopApp" arguments: @@ -53,25 +55,10 @@ tests: - name: "Status" value: 0 - #Endpoint configuration is not supported in YAML - - label: "Reads the Status attribute" - PICS: PICS_USER_PROMPT - verification: | - The TH commands for this test step can be invoked using chip-tool (when DUT is a commissionee) or tv-casting-app (when DUT is a commissioner): - ./chip-tool applicationbasic read status 1 3 - ./chip-tv-casting-app applicationbasic read status 1 3 - - On TH verify that the Status attribute value as 0 - [1658208937.049446][2428:2433] CHIP:DMG: InteractionModelRevision = 1 - [1658208937.049483][2428:2433] CHIP:DMG: } - [1658208937.049690][2428:2433] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_050D Attribute 0x0000_0005 DataVersion: 3850684771 - [1658208937.049809][2428:2433] CHIP:TOO: Status: 0 - [1658208937.049922][2428:2433] CHIP:EM: Sending Standalone Ack for MessageCounter:75774840 on exchange 3041i - cluster: "LogCommands" - command: "UserPrompt" - arguments: - values: - - name: "message" - value: "Please enter 'y' after success" - - name: "expectedValue" - value: "y" + - label: "Step 2: Reads the Status attribute" + endpoint: ApplicationBasic.Endpoint + cluster: "Application Basic" + command: "readAttribute" + attribute: "Status" + response: + value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9.yaml b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9.yaml index 8f7b49346d779c..a61053a4f1f667 100644 --- a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_9.yaml @@ -27,9 +27,11 @@ config: applicationId: type: char_string defaultValue: "exampleid" + #ApplicationBasic cluster endpoint + ApplicationBasic.Endpoint: 3 tests: - - label: "Wait for the commissioned device to be retrieved" + - label: "Step 0: Wait for the commissioned device to be retrieved" cluster: "DelayCommands" command: "WaitForCommissionee" arguments: @@ -37,7 +39,7 @@ tests: - name: "nodeId" value: nodeId - - label: "TH sends HideApp command to DUT" + - label: "Step 1: TH sends HideApp command to DUT" PICS: APPLAUNCHER.S.C02.Rsp command: "HideApp" arguments: @@ -49,24 +51,11 @@ tests: ApplicationID: applicationId, } - #Expected status attribute response ACTIVE_HIDDEN or STOPPED 'OR' condition is not supported in YAML - - label: "Reads the Status attribute" - verification: | - The TH commands for this test step can be invoked using chip-tool (when DUT is a commissionee) or tv-casting-app (when DUT is a commissioner): - ./chip-tool applicationbasic read status 1 3 - ./chip-tool applicationbasic read status 1 3 - - On TH verify that the Status attribute value as 0 - [1658209002.942766][2442:2447] CHIP:DMG: } - [1658209002.942976][2442:2447] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_050D Attribute 0x0000_0005 DataVersion: 3850684771 - [1658209002.943067][2442:2447] CHIP:TOO: Status: 0 - [1658209002.943177][2442:2447] CHIP:EM: Sending Standalone Ack for MessageCounter:54939405 on exchange 63408i" - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + - label: "Step 2: Reads the Status attribute" + endpoint: ApplicationBasic.Endpoint + cluster: "Application Basic" + command: "readAttribute" + attribute: "Status" + response: + constraints: + anyOf: [0, 2] diff --git a/src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml b/src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml index 5037d2015f244d..f4098448d523cf 100644 --- a/src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_BINFO_2_2.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Project CHIP Authors +# Copyright (c) 2023 Project CHIP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -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: 12.2.2. [TC-BINFO-2.2] Events [DUT-Server] @@ -24,64 +23,128 @@ config: endpoint: 0 tests: - - label: "Precondition" - verification: | - 1. DUT and TH can interact with each other. DUT is commissioned. - - 2. BINFO.S.A0009(SoftwareVersion) - TH reads SoftwareVersion attribute from DUT and saves for future use - - 3. BINFO.S.A0011(Reachable) - TH reads Reachable attribute from DUT and saves for future use(should be true) - - 4. BINFO.S.E00(StartUp) | BINFO.S.E01(ShutDown) || BINFO.S.E02(Leave) - TH subscribes to StartUp, ShutDown, Leave and ReachableChanged events on the Basic Information cluster of the DUT - - 5. TH saves the FabricIndex during commissioning - disabled: true - - - label: "Reboot the DUT TH reads the StartUp event from DUT" + - label: "Step 0: Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + - label: + "TH reads SoftwareVersion attribute from DUT and saves for future use" + PICS: BINFO.S.A0009 + command: "readAttribute" + attribute: "SoftwareVersion" + response: + saveAs: SoftwareVersionValue + + - label: + "Precondition: TH reads Reachable attribute from DUT and saves for + future use" + PICS: BINFO.S.A0011 + command: "readAttribute" + attribute: "Reachable" + response: + value: true + saveAs: ReachableValue + + - label: "Precondition: TH saves the FabricIndex during commissioning" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: CurrentFabricIndexValue + + - label: + "Precondition: TH subscribes to StartUp event on the Basic Information + cluster of the DUT" PICS: BINFO.S.E00 - verification: | - To verify StartUp event follow the below commands , Pls use equivalent command on the respective DUT - - - ./chip-tool basicinformation read-event start-up 1 0 - - Verify that StartUp event priority is set is to CRITICAL and software verision is 1 on TH(chip-tool) - - [1657193007.841105][5422:5427] CHIP:DMG: ], - [1657193007.841137][5422:5427] CHIP:DMG: - [1657193007.841162][5422:5427] CHIP:DMG: SuppressResponse = true, - [1657193007.841186][5422:5427] CHIP:DMG: InteractionModelRevision = 1 - [1657193007.841209][5422:5427] CHIP:DMG: } - [1657193007.841358][5422:5427] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Event 0x0000_0000 - [1657193007.841387][5422:5427] CHIP:TOO: Event number: 0 - [1657193007.841409][5422:5427] CHIP:TOO: Priority: Critical - [1657193007.841431][5422:5427] CHIP:TOO: Timestamp: 132146 - [1657193007.841531][5422:5427] CHIP:TOO: StartUp: { - [1657193007.841570][5422:5427] CHIP:TOO: SoftwareVersion: 1 - [1657193007.841594][5422:5427] CHIP:TOO: } - [1657193007.841691][5422:5427] CHIP:EM: Sending Standalone Ack for MessageCounter:91740387 on exchange 60385i - disabled: true - - - label: "TH subscribes to the ShutDown event on the DUT. Shutdown DUT." + command: "subscribeEvent" + event: "StartUp" + minInterval: 30 + maxInterval: 100 + response: + constraints: + type: StartUp + + - label: + "Precondition: TH subscribes to ShutDown event on the Basic + Information cluster of the DUT" PICS: BINFO.S.E01 + command: "subscribeEvent" + event: "ShutDown" + minInterval: 30 + maxInterval: 100 + + - label: + "Precondition: TH subscribes to Leave event on the Basic Information + cluster of the DUT" + PICS: BINFO.S.E02 + command: "subscribeEvent" + event: "Leave" + minInterval: 30 + maxInterval: 100 + + ### DUT TurnOff + - label: "Step 1: Reboot the DUT" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "Reboot" + + - label: "Step 1: Reboot target device(DUT)" verification: | - To verify ShutDown event follow the below commands , Pls use equivalent command on the respective DUT - - - 1. Launch chip-tool into interactive mode with the command - - ./chip-tool interactive start - - 2. run below command in interactive mode shell and Turn down the DUT - basicinformation subscribe-event shut-down 20 100 1 0 - - verify that ShutDown event as priority set has CRITICAL on TH(Chip-tool) - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Event 0x0000_0001 - [1653050528.900202][119367:119372] CHIP:TOO: Event number: 5 - [1653050528.900295][119367:119372] CHIP:TOO: Priority: Critical - [1653050528.900386][119367:119372] CHIP:TOO: Timestamp: 289436805 - [1653050528.900630][119367:119372] CHIP:TOO: ShutDown: { - [1653050528.900732][119367:119372] CHIP:TOO: } - [1653050528.900892][119367:119372] CHIP:DMG: Refresh LivenessCheckTime for 28000 milliseconds with SubscriptionId = 0x27408c83 Peer = 01:0000000000000001 - disabled: true + Did the DUT successfully reboot? + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Please reboot the DUT and enter 'y' after DUT starts" + - name: "expectedValue" + value: "y" + + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Step 2: TH reads the StartUp event from DUT" + PICS: BINFO.S.E00 + command: "readEvent" + event: "StartUp" + response: + value: { SoftwareVersion: SoftwareVersionValue } + + - label: "Verify that StartUp event has priority set as CRITICAL" + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && BINFO.S.E00 + arguments: + values: + - name: "message" + value: "If priority set as CRITICAL enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "Step 3: TH subscribes to the ShutDown event on the DUT. Shutdown DUT." + PICS: BINFO.S.E01 + command: "subscribeEvent" + event: "ShutDown" + minInterval: 30 + maxInterval: 100 + + - label: "Verify that ShutDown event has priority set as CRITICAL" + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && BINFO.S.E01 + arguments: + values: + - name: "message" + value: "If priority set as CRITICAL enter 'y' for success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_SC_5_1.yaml b/src/app/tests/suites/certification/Test_TC_SC_5_1.yaml index 69b942fd24fd52..812dd4732ba046 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_5_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_5_1.yaml @@ -13,7 +13,9 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 19.1.1. [TC-SC-5.1] Adding member to a group +name: + 26.1.1. [TC-SC-5.1] Adding member to a group - TH as Admin and DUT as Group + Member PICS: - MCORE.ROLE.COMMISSIONEE @@ -21,11 +23,13 @@ PICS: config: nodeId: 0x12344321 cluster: "Groups" + endpoint: 0 + # Users should set endpoint value on the command line to PIXIT.G.ENDPOINT - endpoint: 1 + Groups.Endpoint: 1 tests: - - label: "Wait for the commissioned device to be retrieved" + - label: "Step 0: Wait for the commissioned device to be retrieved" cluster: "DelayCommands" command: "WaitForCommissionee" arguments: @@ -41,10 +45,8 @@ tests: - name: "nodeId" saveAs: commissionerNodeId - - label: "TH adds ACL Operate privileges for Group 0x0103" - PICS: PICS_SDK_CI_ONLY + - label: "Step 1: TH adds ACL Operate privileges for Group 0x0103" cluster: "Access Control" - endpoint: 0 command: "writeAttribute" attribute: "ACL" arguments: @@ -66,84 +68,8 @@ tests: }, ] - - label: "TH adds ACL Operate privileges for Group 0x0103" - verification: | - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": ["0x0103"], "targets": null }]' 1 0 - - Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: - - [1674109884.293472][29548:29550] CHIP:DMG: WriteResponseMessage = - [1674109884.293477][29548:29550] CHIP:DMG: { - [1674109884.293479][29548:29550] CHIP:DMG: AttributeStatusIBs = - [1674109884.293486][29548:29550] CHIP:DMG: [ - [1674109884.293489][29548:29550] CHIP:DMG: AttributeStatusIB = - [1674109884.293494][29548:29550] CHIP:DMG: { - [1674109884.293497][29548:29550] CHIP:DMG: AttributePathIB = - [1674109884.293502][29548:29550] CHIP:DMG: { - [1674109884.293506][29548:29550] CHIP:DMG: Endpoint = 0x0, - [1674109884.293510][29548:29550] CHIP:DMG: Cluster = 0x1f, - [1674109884.293514][29548:29550] CHIP:DMG: Attribute = 0x0000_0000, - [1674109884.293518][29548:29550] CHIP:DMG: } - [1674109884.293523][29548:29550] CHIP:DMG: - [1674109884.293527][29548:29550] CHIP:DMG: StatusIB = - [1674109884.293531][29548:29550] CHIP:DMG: { - [1674109884.293536][29548:29550] CHIP:DMG: status = 0x00 (SUCCESS), - [1674109884.293539][29548:29550] CHIP:DMG: }, - [1674109884.293543][29548:29550] CHIP:DMG: - [1674109884.293547][29548:29550] CHIP:DMG: }, - [1674109884.293572][29548:29550] CHIP:DMG: - [1674109884.293575][29548:29550] CHIP:DMG: AttributeStatusIB = - [1674109884.293579][29548:29550] CHIP:DMG: { - [1674109884.293582][29548:29550] CHIP:DMG: AttributePathIB = - [1674109884.293586][29548:29550] CHIP:DMG: { - [1674109884.293590][29548:29550] CHIP:DMG: Endpoint = 0x0, - [1674109884.293594][29548:29550] CHIP:DMG: Cluster = 0x1f, - [1674109884.293598][29548:29550] CHIP:DMG: Attribute = 0x0000_0000, - [1674109884.293602][29548:29550] CHIP:DMG: ListIndex = Null, - [1674109884.293605][29548:29550] CHIP:DMG: } - [1674109884.293611][29548:29550] CHIP:DMG: - [1674109884.293614][29548:29550] CHIP:DMG: StatusIB = - [1674109884.293618][29548:29550] CHIP:DMG: { - [1674109884.293621][29548:29550] CHIP:DMG: status = 0x00 (SUCCESS), - [1674109884.293625][29548:29550] CHIP:DMG: }, - [1674109884.293629][29548:29550] CHIP:DMG: - [1674109884.293632][29548:29550] CHIP:DMG: }, - [1674109884.293640][29548:29550] CHIP:DMG: - [1674109884.293643][29548:29550] CHIP:DMG: AttributeStatusIB = - [1674109884.293647][29548:29550] CHIP:DMG: { - [1674109884.293650][29548:29550] CHIP:DMG: AttributePathIB = - [1674109884.293654][29548:29550] CHIP:DMG: { - [1674109884.293657][29548:29550] CHIP:DMG: Endpoint = 0x0, - [1674109884.293661][29548:29550] CHIP:DMG: Cluster = 0x1f, - [1674109884.293665][29548:29550] CHIP:DMG: Attribute = 0x0000_0000, - [1674109884.293669][29548:29550] CHIP:DMG: ListIndex = Null, - [1674109884.293672][29548:29550] CHIP:DMG: } - [1674109884.293678][29548:29550] CHIP:DMG: - [1674109884.293681][29548:29550] CHIP:DMG: StatusIB = - [1674109884.293685][29548:29550] CHIP:DMG: { - [1674109884.293689][29548:29550] CHIP:DMG: status = 0x00 (SUCCESS), - [1674109884.293692][29548:29550] CHIP:DMG: }, - [1674109884.293696][29548:29550] CHIP:DMG: - [1674109884.293699][29548:29550] CHIP:DMG: }, - [1674109884.293704][29548:29550] CHIP:DMG: - [1674109884.293707][29548:29550] CHIP:DMG: ], - [1674109884.293717][29548:29550] CHIP:DMG: - [1674109884.293721][29548:29550] CHIP:DMG: InteractionModelRevision = 1 - [1674109884.293724][29548:29550] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH sends KeySetWrite command with incorrect key" - PICS: PICS_SDK_CI_ONLY + - label: "Step 2a: TH sends KeySetWrite command with incorrect key" cluster: "Group Key Management" - endpoint: 0 command: "KeySetWrite" arguments: values: @@ -160,55 +86,8 @@ tests: EpochStartTime2: 333, } - - label: "TH sends KeySetWrite command with incorrect key" - verification: | - ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": "0x01a3","groupKeySecurityPolicy": 0, "epochKey0":"00000000000000000000000000000001", "epochStartTime0": 111,"epochKey1":"00000000000000000000000000000002", "epochStartTime1": 222,"epochKey2":"00000000000000000000000000000003", "epochStartTime2": 333 }' 1 0 - - Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: - - [1674109957.007856][29570:29572] CHIP:DMG: InvokeResponseMessage = - [1674109957.007859][29570:29572] CHIP:DMG: { - [1674109957.007862][29570:29572] CHIP:DMG: suppressResponse = false, - [1674109957.007865][29570:29572] CHIP:DMG: InvokeResponseIBs = - [1674109957.007872][29570:29572] CHIP:DMG: [ - [1674109957.007875][29570:29572] CHIP:DMG: InvokeResponseIB = - [1674109957.007880][29570:29572] CHIP:DMG: { - [1674109957.007883][29570:29572] CHIP:DMG: CommandStatusIB = - [1674109957.007887][29570:29572] CHIP:DMG: { - [1674109957.007890][29570:29572] CHIP:DMG: CommandPathIB = - [1674109957.007894][29570:29572] CHIP:DMG: { - [1674109957.007898][29570:29572] CHIP:DMG: EndpointId = 0x0, - [1674109957.007901][29570:29572] CHIP:DMG: ClusterId = 0x3f, - [1674109957.007905][29570:29572] CHIP:DMG: CommandId = 0x0, - [1674109957.007909][29570:29572] CHIP:DMG: }, - [1674109957.007913][29570:29572] CHIP:DMG: - [1674109957.007917][29570:29572] CHIP:DMG: StatusIB = - [1674109957.007921][29570:29572] CHIP:DMG: { - [1674109957.007924][29570:29572] CHIP:DMG: status = 0x00 (SUCCESS), - [1674109957.007927][29570:29572] CHIP:DMG: }, - [1674109957.007931][29570:29572] CHIP:DMG: - [1674109957.007933][29570:29572] CHIP:DMG: }, - [1674109957.007938][29570:29572] CHIP:DMG: - [1674109957.007941][29570:29572] CHIP:DMG: }, - [1674109957.007946][29570:29572] CHIP:DMG: - [1674109957.007948][29570:29572] CHIP:DMG: ], - [1674109957.007953][29570:29572] CHIP:DMG: - [1674109957.007956][29570:29572] CHIP:DMG: InteractionModelRevision = 1 - [1674109957.007958][29570:29572] CHIP:DMG: }, - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH sends KeySetWrite command with TH key" - PICS: PICS_SDK_CI_ONLY + - label: "Step 2b: TH sends KeySetWrite command with TH key" cluster: "Group Key Management" - endpoint: 0 command: "KeySetWrite" arguments: values: @@ -225,121 +104,21 @@ tests: EpochStartTime2: 2220002, } - - label: "TH sends KeySetWrite command with TH key" - verification: | - ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": "0x01a3","groupKeySecurityPolicy": 0, "epochKey0":"d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1":"d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2":"d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 - - Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: - - [1674110035.037849][29578:29580] CHIP:DMG: InvokeResponseMessage = - [1674110035.037852][29578:29580] CHIP:DMG: { - [1674110035.037856][29578:29580] CHIP:DMG: suppressResponse = false, - [1674110035.037859][29578:29580] CHIP:DMG: InvokeResponseIBs = - [1674110035.037864][29578:29580] CHIP:DMG: [ - [1674110035.037867][29578:29580] CHIP:DMG: InvokeResponseIB = - [1674110035.037872][29578:29580] CHIP:DMG: { - [1674110035.037875][29578:29580] CHIP:DMG: CommandStatusIB = - [1674110035.037879][29578:29580] CHIP:DMG: { - [1674110035.037882][29578:29580] CHIP:DMG: CommandPathIB = - [1674110035.037886][29578:29580] CHIP:DMG: { - [1674110035.037890][29578:29580] CHIP:DMG: EndpointId = 0x0, - [1674110035.037893][29578:29580] CHIP:DMG: ClusterId = 0x3f, - [1674110035.037897][29578:29580] CHIP:DMG: CommandId = 0x0, - [1674110035.037900][29578:29580] CHIP:DMG: }, - [1674110035.037905][29578:29580] CHIP:DMG: - [1674110035.037908][29578:29580] CHIP:DMG: StatusIB = - [1674110035.037912][29578:29580] CHIP:DMG: { - [1674110035.037916][29578:29580] CHIP:DMG: status = 0x00 (SUCCESS), - [1674110035.037920][29578:29580] CHIP:DMG: }, - [1674110035.037925][29578:29580] CHIP:DMG: - [1674110035.037929][29578:29580] CHIP:DMG: }, - [1674110035.037934][29578:29580] CHIP:DMG: - [1674110035.037938][29578:29580] CHIP:DMG: }, - [1674110035.037944][29578:29580] CHIP:DMG: - [1674110035.037948][29578:29580] CHIP:DMG: ], - [1674110035.037954][29578:29580] CHIP:DMG: - [1674110035.037957][29578:29580] CHIP:DMG: InteractionModelRevision = 1 - [1674110035.037960][29578:29580] CHIP:DMG: }, - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH binds GroupId to GroupKeySet" - PICS: PICS_SDK_CI_ONLY + - label: "Step 3: TH binds GroupId to GroupKeySet" cluster: "Group Key Management" - endpoint: 0 command: "writeAttribute" attribute: "GroupKeyMap" arguments: value: [{ FabricIndex: 1, GroupId: 0x0103, GroupKeySetID: 0x01a3 }] - - label: "TH binds GroupId to GroupKeySet" - verification: | - ./chip-tool groupkeymanagement write group-key-map '[{"groupId": "0x0103", "groupKeySetID": "0x01a3", "fabricIndex": 1}]' 1 0 - - Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: - - [1674110101.932149][29586:29588] CHIP:DMG: WriteResponseMessage = - [1674110101.932152][29586:29588] CHIP:DMG: { - [1674110101.932155][29586:29588] CHIP:DMG: AttributeStatusIBs = - [1674110101.932161][29586:29588] CHIP:DMG: [ - [1674110101.932164][29586:29588] CHIP:DMG: AttributeStatusIB = - [1674110101.932169][29586:29588] CHIP:DMG: { - [1674110101.932173][29586:29588] CHIP:DMG: AttributePathIB = - [1674110101.932177][29586:29588] CHIP:DMG: { - [1674110101.932181][29586:29588] CHIP:DMG: Endpoint = 0x0, - [1674110101.932185][29586:29588] CHIP:DMG: Cluster = 0x3f, - [1674110101.932189][29586:29588] CHIP:DMG: Attribute = 0x0000_0000, - [1674110101.932193][29586:29588] CHIP:DMG: } - [1674110101.932198][29586:29588] CHIP:DMG: - [1674110101.932201][29586:29588] CHIP:DMG: StatusIB = - [1674110101.932206][29586:29588] CHIP:DMG: { - [1674110101.932210][29586:29588] CHIP:DMG: status = 0x00 (SUCCESS), - [1674110101.932213][29586:29588] CHIP:DMG: }, - [1674110101.932217][29586:29588] CHIP:DMG: - [1674110101.932220][29586:29588] CHIP:DMG: }, - [1674110101.932227][29586:29588] CHIP:DMG: - [1674110101.932230][29586:29588] CHIP:DMG: AttributeStatusIB = - [1674110101.932234][29586:29588] CHIP:DMG: { - [1674110101.932237][29586:29588] CHIP:DMG: AttributePathIB = - [1674110101.932240][29586:29588] CHIP:DMG: { - [1674110101.932244][29586:29588] CHIP:DMG: Endpoint = 0x0, - [1674110101.932248][29586:29588] CHIP:DMG: Cluster = 0x3f, - [1674110101.932252][29586:29588] CHIP:DMG: Attribute = 0x0000_0000, - [1674110101.932256][29586:29588] CHIP:DMG: ListIndex = Null, - [1674110101.932259][29586:29588] CHIP:DMG: } - [1674110101.932264][29586:29588] CHIP:DMG: - [1674110101.932267][29586:29588] CHIP:DMG: StatusIB = - [1674110101.932270][29586:29588] CHIP:DMG: { - [1674110101.932273][29586:29588] CHIP:DMG: status = 0x00 (SUCCESS), - [1674110101.932276][29586:29588] CHIP:DMG: }, - [1674110101.932280][29586:29588] CHIP:DMG: - [1674110101.932283][29586:29588] CHIP:DMG: }, - [1674110101.932288][29586:29588] CHIP:DMG: - [1674110101.932291][29586:29588] CHIP:DMG: ], - [1674110101.932298][29586:29588] CHIP:DMG: - [1674110101.932301][29586:29588] CHIP:DMG: InteractionModelRevision = 1 - [1674110101.932305][29586:29588] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH sends RemoveAllGroups command" + - label: + "Step 4: TH sends RemoveAllGroups command to the DUT on + PIXIT.G.ENDPOINT " + endpoint: Groups.Endpoint command: "RemoveAllGroups" - - label: "TH sends AddGroup command" + - label: "Step 5: TH sends AddGroup command to DUT on PIXIT.G.ENDPOINT" + endpoint: Groups.Endpoint command: "AddGroup" arguments: values: @@ -348,8 +127,9 @@ tests: - name: GroupName value: "Test Group" - - label: "TH sends ViewGroup command" + - label: "Step 6a: TH sends ViewGroup command to DUT on PIXIT.G.ENDPOINT" PICS: G.S.F00 + endpoint: Groups.Endpoint command: "ViewGroup" arguments: values: @@ -364,8 +144,9 @@ tests: - name: GroupName value: "Test Group" - - label: "TH sends ViewGroup command" + - label: "Step 6b: TH sends ViewGroup command to DUT on PIXIT.G.ENDPOINT" PICS: "!(G.S.F00)" + endpoint: Groups.Endpoint command: "ViewGroup" arguments: values: @@ -380,10 +161,8 @@ tests: - name: GroupName value: "" - - label: "TH sends KeySetRead" - PICS: PICS_SDK_CI_ONLY + - label: "Step 7: TH sends KeySetRead" cluster: "Group Key Management" - endpoint: 0 command: "KeySetRead" arguments: values: @@ -404,82 +183,18 @@ tests: EpochStartTime2: 2220002, } - - label: "TH sends KeySetRead" - verification: | - ./chip-tool groupkeymanagement key-set-read "0x01a3" 1 0 - - Verify DUT sends a KeySetReadResponse with the GroupKeySet having the following fields: - GroupKeySetID: 0x01a3(Decimal value 419) - GroupKeySecurityPolicy: TrustFirst (0) - EpochKey0: null - EpochStartTime0: 2220000 - EpochKey1: null - EpochStartTime1: 2220001 - EpochKey2: null - EpochStartTime0: 2220002 on TH(chip-tool) Logs: - - [1674110375.913702][29626:29628] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003F Command=0x0000_0002 - [1674110375.913742][29626:29628] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Command 0x0000_0002 - [1674110375.914256][29626:29628] CHIP:TOO: KeySetReadResponse: { - [1674110375.914277][29626:29628] CHIP:TOO: groupKeySet: { - [1674110375.914293][29626:29628] CHIP:TOO: GroupKeySetID: 419 - [1674110375.914306][29626:29628] CHIP:TOO: GroupKeySecurityPolicy: 0 - [1674110375.914317][29626:29628] CHIP:TOO: EpochKey0: null - [1674110375.914329][29626:29628] CHIP:TOO: EpochStartTime0: 2220000 - [1674110375.914339][29626:29628] CHIP:TOO: EpochKey1: null - [1674110375.914350][29626:29628] CHIP:TOO: EpochStartTime1: 2220001 - [1674110375.914359][29626:29628] CHIP:TOO: EpochKey2: null - [1674110375.914369][29626:29628] CHIP:TOO: EpochStartTime2: 2220002 - [1674110375.914379][29626:29628] CHIP:TOO: } - [1674110375.914390][29626:29628] CHIP:TOO: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - label: - "TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster" + "Step 8: TH reads GroupKeyMap Attribute from the GroupKeyManagement + cluster" cluster: "Group Key Management" - PICS: PICS_SDK_CI_ONLY - endpoint: 0 command: "readAttribute" attribute: "GroupKeyMap" response: value: [{ FabricIndex: 1, GroupId: 0x0103, GroupKeySetID: 0x01a3 }] - - label: - "TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster" - verification: | - ./chip-tool groupkeymanagement read group-key-map 1 0 - - Verify GroupKeyMap attribute list containing GroupId: 0x0103(Decimal value 259) and GroupKeySetId: 0x01a3(Decimal value 419 ) on TH(chip-tool) Logs: - - [1674110435.952959][29634:29636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0000 DataVersion: 624171954 - [1674110435.953367][29634:29636] CHIP:TOO: GroupKeyMap: 1 entries - [1674110435.953401][29634:29636] CHIP:TOO: [1]: { - [1674110435.953407][29634:29636] CHIP:TOO: GroupId: 259 - [1674110435.953411][29634:29636] CHIP:TOO: GroupKeySetID: 419 - [1674110435.953414][29634:29636] CHIP:TOO: FabricIndex: 1 - [1674110435.953417][29634:29636] CHIP:TOO: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH reads GroupTable attribute" + - label: "Step 9a: TH reads GroupTable attribute" cluster: "Group Key Management" - endpoint: 0 - PICS: G.S.F00 && PICS_SDK_CI_ONLY + PICS: G.S.F00 command: "readAttribute" attribute: "GroupTable" response: @@ -487,244 +202,52 @@ tests: [ { GroupId: 0x0103, - Endpoints: [endpoint], + Endpoints: [Groups.Endpoint], GroupName: "Test Group", }, ] - - label: "TH reads GroupTable attribute" - verification: | - ./chip-tool groupkeymanagement read group-table 1 0 - - Verify GroupTable attribute list containing GroupId: 0x0103(Decimal value 259), Endpoint:0 and GroupKeySetId: 0x01a3(Decimal value 419 ) on TH(chip-tool) Logs: - - [1674110549.621751][29686:29688] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 624171954 - [1674110549.621779][29686:29688] CHIP:TOO: GroupTable: 1 entries - [1674110549.621810][29686:29688] CHIP:TOO: [1]: { - [1674110549.621819][29686:29688] CHIP:TOO: GroupId: 259 - [1674110549.621826][29686:29688] CHIP:TOO: Endpoints: 1 entries - [1674110549.621833][29686:29688] CHIP:TOO: [1]: 0 - [1674110549.621839][29686:29688] CHIP:TOO: GroupName: Test Group - [1674110549.621845][29686:29688] CHIP:TOO: FabricIndex: 1 - [1674110549.621849][29686:29688] CHIP:TOO: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP && G.S.F00 - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH reads GroupTable attribute" + - label: "Step 9b: TH reads GroupTable attribute" cluster: "Group Key Management" - endpoint: 0 - PICS: PICS_SDK_CI_ONLY && !G.S.F00 + PICS: " !G.S.F00 " command: "readAttribute" attribute: "GroupTable" response: - value: [{ GroupId: 0x0103, Endpoints: [endpoint], GroupName: "" }] - - - label: "TH reads GroupTable attribute" - verification: | - If F00(GN) feature is not supporting for GroupTable attribute - - ./chip-tool groupkeymanagement read group-table 1 0 - - Verify GroupTable attribute list containing GroupId: 0x0103(Decimal value 259), Endpoint:0 and GroupKeySetId: 0x01a3(Decimal value 419 ) on TH(chip-tool) Logs: - - [1674110549.621751][29686:29688] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 624171954 - [1674110549.621779][29686:29688] CHIP:TOO: GroupTable: 1 entries - [1674110549.621810][29686:29688] CHIP:TOO: [1]: { - [1674110549.621819][29686:29688] CHIP:TOO: GroupId: 259 - [1674110549.621826][29686:29688] CHIP:TOO: Endpoints: 1 entries - [1674110549.621833][29686:29688] CHIP:TOO: [1]: 0 - [1674110549.621839][29686:29688] CHIP:TOO: GroupName: Test Group - [1674110549.621845][29686:29688] CHIP:TOO: FabricIndex: 1 - [1674110549.621849][29686:29688] CHIP:TOO: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP && !G.S.F00 - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + value: + [{ GroupId: 0x0103, Endpoints: [Groups.Endpoint], GroupName: "" }] - - label: "TH removes the GroupKeySet" - PICS: PICS_SDK_CI_ONLY + - label: "Step 10: TH removes the GroupKeySet" cluster: "Group Key Management" - endpoint: 0 command: "KeySetRemove" arguments: values: - name: GroupKeySetID value: 0x01a3 - - label: "TH removes the GroupKeySet" - verification: | - ./chip-tool groupkeymanagement key-set-remove "0x01a3" 1 0 - - Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: - - [1674110684.044225][29696:29698] CHIP:DMG: InvokeResponseMessage = - [1674110684.044235][29696:29698] CHIP:DMG: { - [1674110684.044246][29696:29698] CHIP:DMG: suppressResponse = false, - [1674110684.044256][29696:29698] CHIP:DMG: InvokeResponseIBs = - [1674110684.044277][29696:29698] CHIP:DMG: [ - [1674110684.044288][29696:29698] CHIP:DMG: InvokeResponseIB = - [1674110684.044310][29696:29698] CHIP:DMG: { - [1674110684.044320][29696:29698] CHIP:DMG: CommandStatusIB = - [1674110684.044334][29696:29698] CHIP:DMG: { - [1674110684.044345][29696:29698] CHIP:DMG: CommandPathIB = - [1674110684.044358][29696:29698] CHIP:DMG: { - [1674110684.044372][29696:29698] CHIP:DMG: EndpointId = 0x0, - [1674110684.044385][29696:29698] CHIP:DMG: ClusterId = 0x3f, - [1674110684.044397][29696:29698] CHIP:DMG: CommandId = 0x3, - [1674110684.044408][29696:29698] CHIP:DMG: }, - [1674110684.044426][29696:29698] CHIP:DMG: - [1674110684.044438][29696:29698] CHIP:DMG: StatusIB = - [1674110684.044452][29696:29698] CHIP:DMG: { - [1674110684.044465][29696:29698] CHIP:DMG: status = 0x00 (SUCCESS), - [1674110684.044476][29696:29698] CHIP:DMG: }, - [1674110684.044490][29696:29698] CHIP:DMG: - [1674110684.044499][29696:29698] CHIP:DMG: }, - [1674110684.044517][29696:29698] CHIP:DMG: - [1674110684.044527][29696:29698] CHIP:DMG: }, - [1674110684.044543][29696:29698] CHIP:DMG: - [1674110684.044553][29696:29698] CHIP:DMG: ], - [1674110684.044572][29696:29698] CHIP:DMG: - [1674110684.044583][29696:29698] CHIP:DMG: InteractionModelRevision = 1 - [1674110684.044592][29696:29698] CHIP:DMG: }, - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH verifies the corresponding GroupKeyMap entry has been removed" - PICS: PICS_SDK_CI_ONLY + - label: + "Step 11: TH verifies the corresponding GroupKeyMap entry has been + removed" cluster: "Group Key Management" - endpoint: 0 command: "readAttribute" attribute: "GroupKeyMap" response: value: [] - - label: "TH verifies the corresponding GroupKeyMap entry has been removed" - verification: | - ./chip-tool groupkeymanagement read group-key-map 1 0 - - Verify GroupKeyMap containing empty list on TH(chip-tool) Logs: - - [1674110744.294550][29707:29709] CHIP:DMG: ReportDataMessage = - [1674110744.294570][29707:29709] CHIP:DMG: { - [1674110744.294583][29707:29709] CHIP:DMG: AttributeReportIBs = - [1674110744.294611][29707:29709] CHIP:DMG: [ - [1674110744.294626][29707:29709] CHIP:DMG: AttributeReportIB = - [1674110744.294654][29707:29709] CHIP:DMG: { - [1674110744.294667][29707:29709] CHIP:DMG: AttributeDataIB = - [1674110744.294686][29707:29709] CHIP:DMG: { - [1674110744.294703][29707:29709] CHIP:DMG: DataVersion = 0x25341bb2, - [1674110744.294719][29707:29709] CHIP:DMG: AttributePathIB = - [1674110744.294739][29707:29709] CHIP:DMG: { - [1674110744.294756][29707:29709] CHIP:DMG: Endpoint = 0x0, - [1674110744.294773][29707:29709] CHIP:DMG: Cluster = 0x3f, - [1674110744.294847][29707:29709] CHIP:DMG: Attribute = 0x0000_0000, - [1674110744.294864][29707:29709] CHIP:DMG: } - [1674110744.294885][29707:29709] CHIP:DMG: - [1674110744.294900][29707:29709] CHIP:DMG: Data = [ - [1674110744.294917][29707:29709] CHIP:DMG: - [1674110744.294935][29707:29709] CHIP:DMG: ], - [1674110744.294950][29707:29709] CHIP:DMG: }, - [1674110744.294974][29707:29709] CHIP:DMG: - [1674110744.294986][29707:29709] CHIP:DMG: }, - [1674110744.295012][29707:29709] CHIP:DMG: - [1674110744.295023][29707:29709] CHIP:DMG: ], - [1674110744.295050][29707:29709] CHIP:DMG: - [1674110744.295063][29707:29709] CHIP:DMG: SuppressResponse = true, - [1674110744.295079][29707:29709] CHIP:DMG: InteractionModelRevision = 1 - [1674110744.295093][29707:29709] CHIP:DMG: } - [1674110744.295288][29707:29709] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0000 DataVersion: 624171954 - [1674110744.295368][29707:29709] CHIP:TOO: GroupKeyMap: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH cleans up groups using RemoveAllGroups command" + - label: + "Step 12: TH cleans up groups using RemoveAllGroups command to the DUT + on PIXIT.G.ENDPOINT" + endpoint: Groups.Endpoint command: "RemoveAllGroups" - - label: "TH verifies the group has been removed in the GroupTable" - PICS: PICS_SDK_CI_ONLY + - label: "Step 13: TH verifies the group has been removed in the GroupTable" cluster: "Group Key Management" - endpoint: 0 command: "readAttribute" attribute: "GroupTable" response: value: [] - - label: "TH verifies the group has been removed in the GroupTable" - verification: | - ./chip-tool groupkeymanagement read group-table 1 0 - - Verify GroupTable containing empty list on TH(chip-tool) Logs: - - [1674110892.787761][29730:29732] CHIP:DMG: ReportDataMessage = - [1674110892.787768][29730:29732] CHIP:DMG: { - [1674110892.787772][29730:29732] CHIP:DMG: AttributeReportIBs = - [1674110892.787780][29730:29732] CHIP:DMG: [ - [1674110892.787783][29730:29732] CHIP:DMG: AttributeReportIB = - [1674110892.787789][29730:29732] CHIP:DMG: { - [1674110892.787792][29730:29732] CHIP:DMG: AttributeDataIB = - [1674110892.787797][29730:29732] CHIP:DMG: { - [1674110892.787803][29730:29732] CHIP:DMG: DataVersion = 0x25341bb2, - [1674110892.787806][29730:29732] CHIP:DMG: AttributePathIB = - [1674110892.787811][29730:29732] CHIP:DMG: { - [1674110892.787815][29730:29732] CHIP:DMG: Endpoint = 0x0, - [1674110892.787819][29730:29732] CHIP:DMG: Cluster = 0x3f, - [1674110892.787825][29730:29732] CHIP:DMG: Attribute = 0x0000_0001, - [1674110892.787828][29730:29732] CHIP:DMG: } - [1674110892.787834][29730:29732] CHIP:DMG: - [1674110892.787840][29730:29732] CHIP:DMG: Data = [ - [1674110892.787843][29730:29732] CHIP:DMG: - [1674110892.787847][29730:29732] CHIP:DMG: ], - [1674110892.787850][29730:29732] CHIP:DMG: }, - [1674110892.787855][29730:29732] CHIP:DMG: - [1674110892.787858][29730:29732] CHIP:DMG: }, - [1674110892.787863][29730:29732] CHIP:DMG: - [1674110892.787865][29730:29732] CHIP:DMG: ], - [1674110892.787871][29730:29732] CHIP:DMG: - [1674110892.787875][29730:29732] CHIP:DMG: SuppressResponse = true, - [1674110892.787878][29730:29732] CHIP:DMG: InteractionModelRevision = 1 - [1674110892.787881][29730:29732] CHIP:DMG: } - [1674110892.787953][29730:29732] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 624171954 - [1674110892.787973][29730:29732] CHIP:TOO: GroupTable: 0 entries - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH removes ACL Operate privileges for Group 0x0103" - PICS: PICS_SDK_CI_ONLY + - label: "Step 14: TH removes ACL Operate privileges for Group 0x0103" cluster: "Access Control" - endpoint: 0 command: "writeAttribute" attribute: "ACL" arguments: @@ -738,60 +261,3 @@ tests: Targets: null, }, ] - - - label: "TH removes ACL Operate privileges for Group 0x0103" - verification: | - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null }]' 1 0 - - Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: - - [1674209548.549754][6888:6890] CHIP:DMG: WriteResponseMessage = - [1674209548.549758][6888:6890] CHIP:DMG: { - [1674209548.549760][6888:6890] CHIP:DMG: AttributeStatusIBs = - [1674209548.549765][6888:6890] CHIP:DMG: [ - [1674209548.549768][6888:6890] CHIP:DMG: AttributeStatusIB = - [1674209548.549772][6888:6890] CHIP:DMG: { - [1674209548.549775][6888:6890] CHIP:DMG: AttributePathIB = - [1674209548.549779][6888:6890] CHIP:DMG: { - [1674209548.549782][6888:6890] CHIP:DMG: Endpoint = 0x0, - [1674209548.549786][6888:6890] CHIP:DMG: Cluster = 0x1f, - [1674209548.549789][6888:6890] CHIP:DMG: Attribute = 0x0000_0000, - [1674209548.549792][6888:6890] CHIP:DMG: } - [1674209548.549797][6888:6890] CHIP:DMG: - [1674209548.549800][6888:6890] CHIP:DMG: StatusIB = - [1674209548.549804][6888:6890] CHIP:DMG: { - [1674209548.549807][6888:6890] CHIP:DMG: status = 0x00 (SUCCESS), - [1674209548.549810][6888:6890] CHIP:DMG: }, - [1674209548.549813][6888:6890] CHIP:DMG: - [1674209548.549816][6888:6890] CHIP:DMG: }, - [1674209548.549823][6888:6890] CHIP:DMG: - [1674209548.549825][6888:6890] CHIP:DMG: AttributeStatusIB = - [1674209548.549828][6888:6890] CHIP:DMG: { - [1674209548.549831][6888:6890] CHIP:DMG: AttributePathIB = - [1674209548.549836][6888:6890] CHIP:DMG: { - [1674209548.549839][6888:6890] CHIP:DMG: Endpoint = 0x0, - [1674209548.549842][6888:6890] CHIP:DMG: Cluster = 0x1f, - [1674209548.549845][6888:6890] CHIP:DMG: Attribute = 0x0000_0000, - [1674209548.549849][6888:6890] CHIP:DMG: ListIndex = Null, - [1674209548.549852][6888:6890] CHIP:DMG: } - [1674209548.549856][6888:6890] CHIP:DMG: - [1674209548.549859][6888:6890] CHIP:DMG: StatusIB = - [1674209548.549862][6888:6890] CHIP:DMG: { - [1674209548.549865][6888:6890] CHIP:DMG: status = 0x00 (SUCCESS), - [1674209548.549868][6888:6890] CHIP:DMG: }, - [1674209548.549871][6888:6890] CHIP:DMG: - [1674209548.549873][6888:6890] CHIP:DMG: }, - [1674209548.549878][6888:6890] CHIP:DMG: - [1674209548.549881][6888:6890] CHIP:DMG: ], - [1674209548.549887][6888:6890] CHIP:DMG: - [1674209548.549890][6888:6890] CHIP:DMG: InteractionModelRevision = 1 - [1674209548.549892][6888:6890] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_SC_5_2.yaml b/src/app/tests/suites/certification/Test_TC_SC_5_2.yaml index 1eed00b2831f54..d6fa8b817564f0 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_5_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_5_2.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 19.1.2. [TC-SC-5.2] Receiving a group message - TH to DUT +name: 26.1.2. [TC-SC-5.2] Receiving a group message - TH to DUT PICS: - MCORE.ROLE.COMMISSIONEE @@ -21,11 +21,13 @@ PICS: config: nodeId: 0x12344321 cluster: "Groups" + endpoint: 0 + # Users should set endpoint value on the command line to PIXIT.G.ENDPOINT - endpoint: 1 + Groups.Endpoint: 1 tests: - - label: "Wait for the commissioned device to be retrieved" + - label: "Step 0: Wait for the commissioned device to be retrieved" cluster: "DelayCommands" command: "WaitForCommissionee" arguments: @@ -41,10 +43,8 @@ tests: - name: "nodeId" saveAs: commissionerNodeId - - label: "TH adds ACL Operate privileges for Group 0x0103" - PICS: PICS_SDK_CI_ONLY + - label: "Step 1: TH adds ACL Operate privileges for Group 0x0103" cluster: "Access Control" - endpoint: 0 command: "writeAttribute" attribute: "ACL" arguments: @@ -66,84 +66,8 @@ tests: }, ] - - label: "TH adds ACL Operate privileges for Group 0x0103" - verification: | - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 4, "authMode": 3, "subjects": ["0x0103"], "targets": null }]' 1 0 - - Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: - - [1674197827.380263][1821:1823] CHIP:DMG: WriteResponseMessage = - [1674197827.380335][1821:1823] CHIP:DMG: { - [1674197827.380364][1821:1823] CHIP:DMG: AttributeStatusIBs = - [1674197827.380405][1821:1823] CHIP:DMG: [ - [1674197827.380449][1821:1823] CHIP:DMG: AttributeStatusIB = - [1674197827.380486][1821:1823] CHIP:DMG: { - [1674197827.380541][1821:1823] CHIP:DMG: AttributePathIB = - [1674197827.380582][1821:1823] CHIP:DMG: { - [1674197827.380635][1821:1823] CHIP:DMG: Endpoint = 0x0, - [1674197827.380677][1821:1823] CHIP:DMG: Cluster = 0x1f, - [1674197827.380732][1821:1823] CHIP:DMG: Attribute = 0x0000_0000, - [1674197827.380784][1821:1823] CHIP:DMG: } - [1674197827.380829][1821:1823] CHIP:DMG: - [1674197827.380878][1821:1823] CHIP:DMG: StatusIB = - [1674197827.380918][1821:1823] CHIP:DMG: { - [1674197827.380968][1821:1823] CHIP:DMG: status = 0x00 (SUCCESS), - [1674197827.381010][1821:1823] CHIP:DMG: }, - [1674197827.381061][1821:1823] CHIP:DMG: - [1674197827.381094][1821:1823] CHIP:DMG: }, - [1674197827.381152][1821:1823] CHIP:DMG: - [1674197827.381184][1821:1823] CHIP:DMG: AttributeStatusIB = - [1674197827.381230][1821:1823] CHIP:DMG: { - [1674197827.381263][1821:1823] CHIP:DMG: AttributePathIB = - [1674197827.381301][1821:1823] CHIP:DMG: { - [1674197827.381352][1821:1823] CHIP:DMG: Endpoint = 0x0, - [1674197827.381406][1821:1823] CHIP:DMG: Cluster = 0x1f, - [1674197827.381449][1821:1823] CHIP:DMG: Attribute = 0x0000_0000, - [1674197827.381502][1821:1823] CHIP:DMG: ListIndex = Null, - [1674197827.381543][1821:1823] CHIP:DMG: } - [1674197827.381597][1821:1823] CHIP:DMG: - [1674197827.381635][1821:1823] CHIP:DMG: StatusIB = - [1674197827.381673][1821:1823] CHIP:DMG: { - [1674197827.381725][1821:1823] CHIP:DMG: status = 0x00 (SUCCESS), - [1674197827.381763][1821:1823] CHIP:DMG: }, - [1674197827.381814][1821:1823] CHIP:DMG: - [1674197827.381846][1821:1823] CHIP:DMG: }, - [1674197827.381910][1821:1823] CHIP:DMG: - [1674197827.381942][1821:1823] CHIP:DMG: AttributeStatusIB = - [1674197827.381988][1821:1823] CHIP:DMG: { - [1674197827.382021][1821:1823] CHIP:DMG: AttributePathIB = - [1674197827.382070][1821:1823] CHIP:DMG: { - [1674197827.382109][1821:1823] CHIP:DMG: Endpoint = 0x0, - [1674197827.382161][1821:1823] CHIP:DMG: Cluster = 0x1f, - [1674197827.382204][1821:1823] CHIP:DMG: Attribute = 0x0000_0000, - [1674197827.382255][1821:1823] CHIP:DMG: ListIndex = Null, - [1674197827.382295][1821:1823] CHIP:DMG: } - [1674197827.382349][1821:1823] CHIP:DMG: - [1674197827.382387][1821:1823] CHIP:DMG: StatusIB = - [1674197827.382436][1821:1823] CHIP:DMG: { - [1674197827.382476][1821:1823] CHIP:DMG: status = 0x00 (SUCCESS), - [1674197827.382527][1821:1823] CHIP:DMG: }, - [1674197827.382566][1821:1823] CHIP:DMG: - [1674197827.382599][1821:1823] CHIP:DMG: }, - [1674197827.382650][1821:1823] CHIP:DMG: - [1674197827.382681][1821:1823] CHIP:DMG: ], - [1674197827.382729][1821:1823] CHIP:DMG: - [1674197827.382759][1821:1823] CHIP:DMG: InteractionModelRevision = 1 - [1674197827.382789][1821:1823] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH sends KeySetWrite command with TH key" - PICS: PICS_SDK_CI_ONLY + - label: "Step 2: TH sends KeySetWrite command with TH key" cluster: "Group Key Management" - endpoint: 0 command: "KeySetWrite" arguments: values: @@ -160,125 +84,25 @@ tests: EpochStartTime2: 2220002, } - - label: "TH sends KeySetWrite command with TH key" - verification: | - ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": "0x01a3","groupKeySecurityPolicy": 0, "epochKey0":"d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1":"d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2":"d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 - - Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: - - [1674198053.466794][1826:1829] CHIP:DMG: InvokeResponseMessage = - [1674198053.466849][1826:1829] CHIP:DMG: { - [1674198053.466903][1826:1829] CHIP:DMG: suppressResponse = false, - [1674198053.466962][1826:1829] CHIP:DMG: InvokeResponseIBs = - [1674198053.467036][1826:1829] CHIP:DMG: [ - [1674198053.467093][1826:1829] CHIP:DMG: InvokeResponseIB = - [1674198053.467170][1826:1829] CHIP:DMG: { - [1674198053.467231][1826:1829] CHIP:DMG: CommandStatusIB = - [1674198053.467304][1826:1829] CHIP:DMG: { - [1674198053.467371][1826:1829] CHIP:DMG: CommandPathIB = - [1674198053.467449][1826:1829] CHIP:DMG: { - [1674198053.467525][1826:1829] CHIP:DMG: EndpointId = 0x0, - [1674198053.467606][1826:1829] CHIP:DMG: ClusterId = 0x3f, - [1674198053.467691][1826:1829] CHIP:DMG: CommandId = 0x0, - [1674198053.467769][1826:1829] CHIP:DMG: }, - [1674198053.467854][1826:1829] CHIP:DMG: - [1674198053.467922][1826:1829] CHIP:DMG: StatusIB = - [1674198053.467999][1826:1829] CHIP:DMG: { - [1674198053.468076][1826:1829] CHIP:DMG: status = 0x00 (SUCCESS), - [1674198053.468154][1826:1829] CHIP:DMG: }, - [1674198053.468231][1826:1829] CHIP:DMG: - [1674198053.468338][1826:1829] CHIP:DMG: }, - [1674198053.468419][1826:1829] CHIP:DMG: - [1674198053.468479][1826:1829] CHIP:DMG: }, - [1674198053.468550][1826:1829] CHIP:DMG: - [1674198053.468606][1826:1829] CHIP:DMG: ], - [1674198053.468676][1826:1829] CHIP:DMG: - [1674198053.468731][1826:1829] CHIP:DMG: InteractionModelRevision = 1 - [1674198053.468788][1826:1829] CHIP:DMG: }, - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH binds GroupId to GroupKeySet" - PICS: PICS_SDK_CI_ONLY + - label: "Step 3: TH binds GroupId to GroupKeySet" cluster: "Group Key Management" - endpoint: 0 command: "writeAttribute" attribute: "GroupKeyMap" arguments: value: [ - { FabricIndex: 1, GroupId: 0x0101, GroupKeySetID: 0x01a3 }, { FabricIndex: 1, GroupId: 0x0103, GroupKeySetID: 0x01a3 }, + { FabricIndex: 1, GroupId: 0x0101, GroupKeySetID: 0x01a3 }, ] - - label: "TH binds GroupId to GroupKeySet" - verification: | - ./chip-tool groupkeymanagement write group-key-map '[{"groupId": "0x0103", "groupKeySetID": "0x01a3", "fabricIndex": 1},{"groupId": "0x0101", "groupKeySetID": "0x01a3", "fabricIndex": 1}]' 1 0 - - Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: - - [1674198154.629775][1837:1839] CHIP:DMG: WriteResponseMessage = - [1674198154.629832][1837:1839] CHIP:DMG: { - [1674198154.629908][1837:1839] CHIP:DMG: AttributeStatusIBs = - [1674198154.629983][1837:1839] CHIP:DMG: [ - [1674198154.630064][1837:1839] CHIP:DMG: AttributeStatusIB = - [1674198154.630105][1837:1839] CHIP:DMG: { - [1674198154.630142][1837:1839] CHIP:DMG: AttributePathIB = - [1674198154.630178][1837:1839] CHIP:DMG: { - [1674198154.630290][1837:1839] CHIP:DMG: Endpoint = 0x0, - [1674198154.630325][1837:1839] CHIP:DMG: Cluster = 0x3f, - [1674198154.630358][1837:1839] CHIP:DMG: Attribute = 0x0000_0000, - [1674198154.630400][1837:1839] CHIP:DMG: } - [1674198154.630437][1837:1839] CHIP:DMG: - [1674198154.630476][1837:1839] CHIP:DMG: StatusIB = - [1674198154.630508][1837:1839] CHIP:DMG: { - [1674198154.630549][1837:1839] CHIP:DMG: status = 0x00 (SUCCESS), - [1674198154.630581][1837:1839] CHIP:DMG: }, - [1674198154.630621][1837:1839] CHIP:DMG: - [1674198154.630648][1837:1839] CHIP:DMG: }, - [1674198154.630695][1837:1839] CHIP:DMG: - [1674198154.630721][1837:1839] CHIP:DMG: AttributeStatusIB = - [1674198154.630748][1837:1839] CHIP:DMG: { - [1674198154.630784][1837:1839] CHIP:DMG: AttributePathIB = - [1674198154.630814][1837:1839] CHIP:DMG: { - [1674198154.630854][1837:1839] CHIP:DMG: Endpoint = 0x0, - [1674198154.630887][1837:1839] CHIP:DMG: Cluster = 0x3f, - [1674198154.630929][1837:1839] CHIP:DMG: Attribute = 0x0000_0000, - [1674198154.630964][1837:1839] CHIP:DMG: ListIndex = Null, - [1674198154.631004][1837:1839] CHIP:DMG: } - [1674198154.631039][1837:1839] CHIP:DMG: - [1674198154.631077][1837:1839] CHIP:DMG: StatusIB = - [1674198154.631108][1837:1839] CHIP:DMG: { - [1674198154.631148][1837:1839] CHIP:DMG: status = 0x00 (SUCCESS), - [1674198154.631179][1837:1839] CHIP:DMG: }, - [1674198154.631208][1837:1839] CHIP:DMG: - [1674198154.631244][1837:1839] CHIP:DMG: }, - [1674198154.631275][1837:1839] CHIP:DMG: - [1674198154.631310][1837:1839] CHIP:DMG: ], - [1674198154.631345][1837:1839] CHIP:DMG: - [1674198154.631378][1837:1839] CHIP:DMG: InteractionModelRevision = 1 - [1674198154.631403][1837:1839] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH sends RemoveAllGroups command" + - label: + "Step 4: TH sends RemoveAllGroups command to the DUT on + PIXIT.G.ENDPOINT" + endpoint: Groups.Endpoint command: "RemoveAllGroups" - - label: "TH sends AddGroup command" + - label: "Step 5: TH sends AddGroup command to the DUT on PIXIT.G.ENDPOINT" + endpoint: Groups.Endpoint command: "AddGroup" arguments: values: @@ -294,7 +118,8 @@ tests: value: 0x0103 - label: - "TH sends AddGroup command again but using group messaging (0x0103)" + "Step 6: TH sends AddGroup command again but using group messaging + (0x0103)" groupId: 0x0103 command: "AddGroup" arguments: @@ -325,8 +150,9 @@ tests: - name: "expectedValue" value: "y" - - label: "TH sends ViewGroup command" + - label: "Step 7: TH sends ViewGroup command on Endpoint PIXIT.G.ENDPOINT " PICS: G.S.F00 + endpoint: Groups.Endpoint command: "ViewGroup" arguments: values: @@ -341,8 +167,9 @@ tests: - name: GroupName value: "Test Group 0101" - - label: "TH sends ViewGroup command" + - label: "Step 8: TH sends ViewGroup command on Endpoint PIXIT.G.ENDPOINT " PICS: "!(G.S.F00)" + endpoint: Groups.Endpoint command: "ViewGroup" arguments: values: @@ -357,68 +184,22 @@ tests: - name: GroupName value: "" - - label: "TH removes the GroupKeySet" + - label: "Step 9: TH removes the GroupKeySet" cluster: "Group Key Management" - PICS: PICS_SDK_CI_ONLY - endpoint: 0 command: "KeySetRemove" arguments: values: - name: GroupKeySetID value: 0x01a3 - - label: "TH removes the GroupKeySet" - verification: | - ./chip-tool groupkeymanagement key-set-remove "0x01a3" 1 0 - - Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: - - [1674199244.259870][1870:1872] CHIP:DMG: InvokeResponseMessage = - [1674199244.259895][1870:1872] CHIP:DMG: { - [1674199244.259918][1870:1872] CHIP:DMG: suppressResponse = false, - [1674199244.259943][1870:1872] CHIP:DMG: InvokeResponseIBs = - [1674199244.259975][1870:1872] CHIP:DMG: [ - [1674199244.259999][1870:1872] CHIP:DMG: InvokeResponseIB = - [1674199244.260035][1870:1872] CHIP:DMG: { - [1674199244.260061][1870:1872] CHIP:DMG: CommandStatusIB = - [1674199244.260093][1870:1872] CHIP:DMG: { - [1674199244.260120][1870:1872] CHIP:DMG: CommandPathIB = - [1674199244.260154][1870:1872] CHIP:DMG: { - [1674199244.260187][1870:1872] CHIP:DMG: EndpointId = 0x0, - [1674199244.260222][1870:1872] CHIP:DMG: ClusterId = 0x3f, - [1674199244.260257][1870:1872] CHIP:DMG: CommandId = 0x3, - [1674199244.260305][1870:1872] CHIP:DMG: }, - [1674199244.260344][1870:1872] CHIP:DMG: - [1674199244.260373][1870:1872] CHIP:DMG: StatusIB = - [1674199244.260406][1870:1872] CHIP:DMG: { - [1674199244.260443][1870:1872] CHIP:DMG: status = 0x00 (SUCCESS), - [1674199244.260476][1870:1872] CHIP:DMG: }, - [1674199244.260507][1870:1872] CHIP:DMG: - [1674199244.260536][1870:1872] CHIP:DMG: }, - [1674199244.260569][1870:1872] CHIP:DMG: - [1674199244.260595][1870:1872] CHIP:DMG: }, - [1674199244.260625][1870:1872] CHIP:DMG: - [1674199244.260650][1870:1872] CHIP:DMG: ], - [1674199244.260680][1870:1872] CHIP:DMG: - [1674199244.260704][1870:1872] CHIP:DMG: InteractionModelRevision = 1 - [1674199244.260728][1870:1872] CHIP:DMG: }, - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH cleans up groups using RemoveAllGroups command" + - label: + "Step 10: TH cleans up groups using RemoveAllGroups command to the DUT + on PIXIT.G.ENDPOINT" + endpoint: Groups.Endpoint command: "RemoveAllGroups" - - label: "TH removes ACL Operate privileges for Group 0x0103" - PICS: PICS_SDK_CI_ONLY + - label: "Step 11: TH removes ACL Operate privileges for Group 0x0103" cluster: "Access Control" - endpoint: 0 command: "writeAttribute" attribute: "ACL" arguments: @@ -432,60 +213,3 @@ tests: Targets: null, }, ] - - - label: "TH removes ACL Operate privileges for Group 0x0103" - verification: | - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null }]' 1 0 - - Verify DUT sends SUCCESS(0x00) response on TH(chip-tool) Logs: - - [1674209548.549754][6888:6890] CHIP:DMG: WriteResponseMessage = - [1674209548.549758][6888:6890] CHIP:DMG: { - [1674209548.549760][6888:6890] CHIP:DMG: AttributeStatusIBs = - [1674209548.549765][6888:6890] CHIP:DMG: [ - [1674209548.549768][6888:6890] CHIP:DMG: AttributeStatusIB = - [1674209548.549772][6888:6890] CHIP:DMG: { - [1674209548.549775][6888:6890] CHIP:DMG: AttributePathIB = - [1674209548.549779][6888:6890] CHIP:DMG: { - [1674209548.549782][6888:6890] CHIP:DMG: Endpoint = 0x0, - [1674209548.549786][6888:6890] CHIP:DMG: Cluster = 0x1f, - [1674209548.549789][6888:6890] CHIP:DMG: Attribute = 0x0000_0000, - [1674209548.549792][6888:6890] CHIP:DMG: } - [1674209548.549797][6888:6890] CHIP:DMG: - [1674209548.549800][6888:6890] CHIP:DMG: StatusIB = - [1674209548.549804][6888:6890] CHIP:DMG: { - [1674209548.549807][6888:6890] CHIP:DMG: status = 0x00 (SUCCESS), - [1674209548.549810][6888:6890] CHIP:DMG: }, - [1674209548.549813][6888:6890] CHIP:DMG: - [1674209548.549816][6888:6890] CHIP:DMG: }, - [1674209548.549823][6888:6890] CHIP:DMG: - [1674209548.549825][6888:6890] CHIP:DMG: AttributeStatusIB = - [1674209548.549828][6888:6890] CHIP:DMG: { - [1674209548.549831][6888:6890] CHIP:DMG: AttributePathIB = - [1674209548.549836][6888:6890] CHIP:DMG: { - [1674209548.549839][6888:6890] CHIP:DMG: Endpoint = 0x0, - [1674209548.549842][6888:6890] CHIP:DMG: Cluster = 0x1f, - [1674209548.549845][6888:6890] CHIP:DMG: Attribute = 0x0000_0000, - [1674209548.549849][6888:6890] CHIP:DMG: ListIndex = Null, - [1674209548.549852][6888:6890] CHIP:DMG: } - [1674209548.549856][6888:6890] CHIP:DMG: - [1674209548.549859][6888:6890] CHIP:DMG: StatusIB = - [1674209548.549862][6888:6890] CHIP:DMG: { - [1674209548.549865][6888:6890] CHIP:DMG: status = 0x00 (SUCCESS), - [1674209548.549868][6888:6890] CHIP:DMG: }, - [1674209548.549871][6888:6890] CHIP:DMG: - [1674209548.549873][6888:6890] CHIP:DMG: }, - [1674209548.549878][6888:6890] CHIP:DMG: - [1674209548.549881][6888:6890] CHIP:DMG: ], - [1674209548.549887][6888:6890] CHIP:DMG: - [1674209548.549890][6888:6890] CHIP:DMG: InteractionModelRevision = 1 - [1674209548.549892][6888:6890] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index 71a6406bfa2c2b..33909c2de33cd8 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -3,7 +3,6 @@ "TestAccessControlCluster", "Test_TC_ACL_1_1", "Test_TC_ACL_2_1", - "Test_TC_ACL_2_2", "Test_TC_ACL_2_3", "Test_TC_ACL_2_4", "Test_TC_ACL_2_7", @@ -127,8 +126,6 @@ "Test_TC_APPLAUNCHER_3_5", "Test_TC_APPLAUNCHER_3_6", "Test_TC_APPLAUNCHER_3_7", - "Test_TC_APPLAUNCHER_3_8", - "Test_TC_APPLAUNCHER_3_9", "Test_TC_MEDIAINPUT_3_10", "Test_TC_MEDIAINPUT_3_11", "Test_TC_MEDIAINPUT_3_12", @@ -175,7 +172,7 @@ ], "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_5_1", "Test_TC_SC_5_2"], + "SecureChannel": [], "Switch": ["Test_TC_SWTCH_1_1", "Test_TC_SWTCH_2_1"], "TemperatureMeasurement": ["Test_TC_TMP_1_1", "Test_TC_TMP_2_1"], "Thermostat": ["Test_TC_TSTAT_1_1", "Test_TC_TSTAT_2_1"], diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index 5fd2b511e5caa1..1d420ee1fc830c 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -65,7 +65,6 @@ "Test_TC_DA_1_6" ], "DeviceManagement": [ - "Test_TC_BINFO_2_2", "Test_TC_BINFO_2_4", "Test_TC_OPCREDS_3_1", "Test_TC_OPCREDS_3_2", diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index feda117830052c..1c16f25acd0fc8 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -38,7 +38,6 @@ class TestList : public Command printf("TestAccessControlCluster\n"); printf("Test_TC_ACL_1_1\n"); printf("Test_TC_ACL_2_1\n"); - printf("Test_TC_ACL_2_2\n"); printf("Test_TC_ACL_2_3\n"); printf("Test_TC_ACL_2_4\n"); printf("Test_TC_ACL_2_7\n"); @@ -162,8 +161,6 @@ class TestList : public Command printf("Test_TC_APPLAUNCHER_3_5\n"); printf("Test_TC_APPLAUNCHER_3_6\n"); printf("Test_TC_APPLAUNCHER_3_7\n"); - printf("Test_TC_APPLAUNCHER_3_8\n"); - printf("Test_TC_APPLAUNCHER_3_9\n"); printf("Test_TC_MEDIAINPUT_3_10\n"); printf("Test_TC_MEDIAINPUT_3_11\n"); printf("Test_TC_MEDIAINPUT_3_12\n"); @@ -208,8 +205,6 @@ class TestList : public Command 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_5_1\n"); - printf("Test_TC_SC_5_2\n"); printf("Test_TC_SWTCH_1_1\n"); printf("Test_TC_SWTCH_2_1\n"); printf("Test_TC_TMP_1_1\n"); @@ -408,7 +403,6 @@ class ManualTestList : public Command printf("Test_TC_DA_1_4\n"); printf("Test_TC_DA_1_5\n"); printf("Test_TC_DA_1_6\n"); - printf("Test_TC_BINFO_2_2\n"); printf("Test_TC_BINFO_2_4\n"); printf("Test_TC_OPCREDS_3_1\n"); printf("Test_TC_OPCREDS_3_2\n"); @@ -2514,102 +2508,6 @@ class Test_TC_ACL_2_1Suite : public TestCommand } }; -class Test_TC_ACL_2_2Suite : public TestCommand -{ -public: - Test_TC_ACL_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_2", 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_ACL_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)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 31UL)); - } - break; - case 2: - 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, "TH1 reads DUT Descriptor cluster ServerList attribute from Endpoint 0"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::ServerList::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "TH1 reads DUT Descriptor cluster ServerList attribute from every Endpoint except 0"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); - 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_ACL_2_3Suite : public TestCommand { public: @@ -47522,21 +47420,19 @@ class Test_TC_APPLAUNCHER_3_7Suite : public TestCommand } }; -class Test_TC_APPLAUNCHER_3_8Suite : public TestCommand +class Test_TC_MEDIAINPUT_3_10Suite : public TestCommand { public: - Test_TC_APPLAUNCHER_3_8Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_APPLAUNCHER_3_8", 3, credsIssuerConfig) + Test_TC_MEDIAINPUT_3_10Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MEDIAINPUT_3_10", 2, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("catalogVendorId", 0, UINT16_MAX, &mCatalogVendorId); - AddArgument("applicationId", &mApplicationId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_APPLAUNCHER_3_8Suite() {} + ~Test_TC_MEDIAINPUT_3_10Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -47547,8 +47443,6 @@ class Test_TC_APPLAUNCHER_3_8Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mCatalogVendorId; - chip::Optional mApplicationId; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -47570,15 +47464,10 @@ class Test_TC_APPLAUNCHER_3_8Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); } break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -47602,51 +47491,33 @@ class Test_TC_APPLAUNCHER_3_8Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Stop an app with the provided application ID"); - VerifyOrDo(!ShouldSkip("APPLAUNCHER.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ApplicationLauncher::Commands::StopApp::Type value; - value.application.Emplace(); - - value.application.Value().catalogVendorID = mCatalogVendorId.HasValue() ? mCatalogVendorId.Value() : 123U; - value.application.Value().applicationID = - mApplicationId.HasValue() ? mApplicationId.Value() : chip::Span("exampleid", 9); - - return SendCommand(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, ApplicationLauncher::Commands::StopApp::Id, - value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Reads the Status attribute"); - 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' after successgarbage: not in length on purpose", 30); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(1, + "TH reads the InputList attribute from the DUT to show list of Inputs available and Verify list of available " + "inputs supported by the device is provided, where each entry in the list contains an index(type:uint 8), " + "InputType (InputType Enums), Name (type: Strings), and Description(Type:String)"); + VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::InputList::Id, true, + chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_APPLAUNCHER_3_9Suite : public TestCommand +class Test_TC_MEDIAINPUT_3_11Suite : public TestCommand { public: - Test_TC_APPLAUNCHER_3_9Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_APPLAUNCHER_3_9", 3, credsIssuerConfig) + Test_TC_MEDIAINPUT_3_11Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MEDIAINPUT_3_11", 4, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("catalogVendorId", 0, UINT16_MAX, &mCatalogVendorId); - AddArgument("applicationId", &mApplicationId); + AddArgument("Index", 0, UINT8_MAX, &mIndex); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_APPLAUNCHER_3_9Suite() {} + ~Test_TC_MEDIAINPUT_3_11Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -47657,8 +47528,7 @@ class Test_TC_APPLAUNCHER_3_9Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mCatalogVendorId; - chip::Optional mApplicationId; + chip::Optional mIndex; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -47680,113 +47550,19 @@ class Test_TC_APPLAUNCHER_3_9Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); } break; case 2: 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 sends HideApp command to DUT"); - VerifyOrDo(!ShouldSkip("APPLAUNCHER.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ApplicationLauncher::Commands::HideApp::Type value; - value.application.Emplace(); - - value.application.Value().catalogVendorID = mCatalogVendorId.HasValue() ? mCatalogVendorId.Value() : 123U; - value.application.Value().applicationID = - mApplicationId.HasValue() ? mApplicationId.Value() : chip::Span("exampleid", 9); - - return SendCommand(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, ApplicationLauncher::Commands::HideApp::Id, - value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Reads the Status attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), 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_MEDIAINPUT_3_10Suite : public TestCommand -{ -public: - Test_TC_MEDIAINPUT_3_10Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAINPUT_3_10", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MEDIAINPUT_3_10Suite() {} - - 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: + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentInput", value, mIndex.HasValue() ? mIndex.Value() : 1U)); } break; default: @@ -47820,138 +47596,41 @@ class Test_TC_MEDIAINPUT_3_10Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::InputList::Id, true, chip::NullOptional); } + case 2: { + LogStep(2, "TH sends SelectInput command to DUT to select an input by passing the index of the preferred input."); + VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::MediaInput::Commands::SelectInput::Type value; + value.index = mIndex.HasValue() ? mIndex.Value() : 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Commands::SelectInput::Id, value, + chip::NullOptional + + ); + } + case 3: { + LogStep(3, "TH reads _CurrentInput attribute from the DUT to show the current input selected."); + VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.A0001 && MEDIAINPUT.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::CurrentInput::Id, true, + chip::NullOptional); + } } return CHIP_NO_ERROR; } }; -class Test_TC_MEDIAINPUT_3_11Suite : public TestCommand +class Test_TC_MEDIAINPUT_3_12Suite : public TestCommand { public: - Test_TC_MEDIAINPUT_3_11Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAINPUT_3_11", 4, credsIssuerConfig) + Test_TC_MEDIAINPUT_3_12Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MEDIAINPUT_3_12", 4, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("Index", 0, UINT8_MAX, &mIndex); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MEDIAINPUT_3_11Suite() {} - - 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 mIndex; - 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))); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentInput", value, mIndex.HasValue() ? mIndex.Value() : 1U)); - } - 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 InputList attribute from the DUT to show list of Inputs available and Verify list of available " - "inputs supported by the device is provided, where each entry in the list contains an index(type:uint 8), " - "InputType (InputType Enums), Name (type: Strings), and Description(Type:String)"); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::InputList::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "TH sends SelectInput command to DUT to select an input by passing the index of the preferred input."); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::MediaInput::Commands::SelectInput::Type value; - value.index = mIndex.HasValue() ? mIndex.Value() : 1U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Commands::SelectInput::Id, value, - chip::NullOptional - - ); - } - case 3: { - LogStep(3, "TH reads _CurrentInput attribute from the DUT to show the current input selected."); - VerifyOrDo(!ShouldSkip("MEDIAINPUT.S.A0001 && MEDIAINPUT.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::CurrentInput::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MEDIAINPUT_3_12Suite : public TestCommand -{ -public: - Test_TC_MEDIAINPUT_3_12Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAINPUT_3_12", 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_MEDIAINPUT_3_12Suite() {} + ~Test_TC_MEDIAINPUT_3_12Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -58136,1145 +57815,6 @@ class Test_TC_RH_2_1Suite : public TestCommand } }; -class Test_TC_SC_5_1Suite : public TestCommand -{ -public: - Test_TC_SC_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_5_1", 31, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_5_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::NodeId commissionerNodeId; - - 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::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - commissionerNodeId = value.nodeId; - } - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - 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)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - 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)); - break; - case 11: - 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))); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 259U)); - VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("Test Group", 10))); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 259U)); - VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("", 0))); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("groupKeySet.groupKeySetID", value.groupKeySet.groupKeySetID, 419U)); - VerifyOrReturn(CheckValue("groupKeySet.groupKeySecurityPolicy", value.groupKeySet.groupKeySecurityPolicy, 0U)); - VerifyOrReturn(CheckValueNull("groupKeySet.epochKey0", value.groupKeySet.epochKey0)); - VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime0", value.groupKeySet.epochStartTime0)); - VerifyOrReturn( - CheckValue("groupKeySet.epochStartTime0.Value()", value.groupKeySet.epochStartTime0.Value(), 2220000ULL)); - VerifyOrReturn(CheckValueNull("groupKeySet.epochKey1", value.groupKeySet.epochKey1)); - VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime1", value.groupKeySet.epochStartTime1)); - VerifyOrReturn( - CheckValue("groupKeySet.epochStartTime1.Value()", value.groupKeySet.epochStartTime1.Value(), 2220001ULL)); - VerifyOrReturn(CheckValueNull("groupKeySet.epochKey2", value.groupKeySet.epochKey2)); - VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime2", value.groupKeySet.epochStartTime2)); - VerifyOrReturn( - CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 2220002ULL)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupKeyMapStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 0)); - VerifyOrReturn(CheckValue("groupKeyMap[0].groupId", iter_0.GetValue().groupId, 259U)); - VerifyOrReturn(CheckValue("groupKeyMap[0].groupKeySetID", iter_0.GetValue().groupKeySetID, 419U)); - VerifyOrReturn(CheckValue("groupKeyMap[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNoMoreListItems("groupKeyMap", iter_0, 1)); - } - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 0)); - VerifyOrReturn(CheckValue("groupTable[0].groupId", iter_0.GetValue().groupId, 259U)); - { - auto iter_2 = iter_0.GetValue().endpoints.begin(); - VerifyOrReturn( - CheckNextListItemDecodes("groupTable[0].endpoints", iter_2, 0)); - VerifyOrReturn(CheckValue("groupTable[0].endpoints[0]", iter_2.GetValue(), - mEndpoint.HasValue() ? mEndpoint.Value() : 1U)); - VerifyOrReturn( - CheckNoMoreListItems("groupTable[0].endpoints", iter_2, 1)); - } - VerifyOrReturn(CheckValuePresent("groupTable[0].groupName", iter_0.GetValue().groupName)); - VerifyOrReturn(CheckValueAsString("groupTable[0].groupName.Value()", iter_0.GetValue().groupName.Value(), - chip::CharSpan("Test Group", 10))); - VerifyOrReturn(CheckNoMoreListItems("groupTable", iter_0, 1)); - } - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 0)); - VerifyOrReturn(CheckValue("groupTable[0].groupId", iter_0.GetValue().groupId, 259U)); - { - auto iter_2 = iter_0.GetValue().endpoints.begin(); - VerifyOrReturn( - CheckNextListItemDecodes("groupTable[0].endpoints", iter_2, 0)); - VerifyOrReturn(CheckValue("groupTable[0].endpoints[0]", iter_2.GetValue(), - mEndpoint.HasValue() ? mEndpoint.Value() : 1U)); - VerifyOrReturn( - CheckNoMoreListItems("groupTable[0].endpoints", iter_2, 1)); - } - VerifyOrReturn(CheckValuePresent("groupTable[0].groupName", iter_0.GetValue().groupName)); - VerifyOrReturn(CheckValueAsString("groupTable[0].groupName.Value()", iter_0.GetValue().groupName.Value(), - chip::CharSpan("", 0))); - VerifyOrReturn(CheckNoMoreListItems("groupTable", iter_0, 1)); - } - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupKeyMapStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("groupKeyMap", iter_0, 0)); - } - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("groupTable", iter_0, 0)); - } - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - 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, "Read the commissioner node ID"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "TH adds ACL Operate privileges for Group 0x0103"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - 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.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = commissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - 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] = 259ULL; - 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); - } - case 3: { - LogStep(3, "TH adds ACL Operate privileges for Group 0x0103"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "TH sends KeySetWrite command with incorrect key"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 419U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 111ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 222ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03garbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 333ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 5: { - LogStep(5, "TH sends KeySetWrite command with incorrect key"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "TH sends KeySetWrite command with TH key"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 419U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdfgarbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 2220000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdfgarbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 2220001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdfgarbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 2220002ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 7: { - LogStep(7, "TH sends KeySetWrite command with TH key"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "TH binds GroupId to GroupKeySet"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), 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].groupId = 259U; - listHolder_0->mList[0].groupKeySetID = 419U; - 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 9: { - LogStep(9, "TH binds GroupId to GroupKeySet"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "TH sends RemoveAllGroups command"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, - chip::NullOptional - - ); - } - case 11: { - LogStep(11, "TH sends AddGroup command"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 259U; - value.groupName = chip::Span("Test Groupgarbage: not in length on purpose", 10); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 12: { - LogStep(12, "TH sends ViewGroup command"); - VerifyOrDo(!ShouldSkip("G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupID = 259U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, - chip::NullOptional - - ); - } - case 13: { - LogStep(13, "TH sends ViewGroup command"); - VerifyOrDo(!ShouldSkip("!(G.S.F00)"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupID = 259U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, - chip::NullOptional - - ); - } - case 14: { - LogStep(14, "TH sends KeySetRead"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; - value.groupKeySetID = 419U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Commands::KeySetRead::Id, - value, chip::NullOptional - - ); - } - case 15: { - LogStep(15, "TH sends KeySetRead"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 16: { - LogStep(16, "TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "TH reads GroupTable attribute"); - VerifyOrDo(!ShouldSkip("G.S.F00 && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, "TH reads GroupTable attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "TH reads GroupTable attribute"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY && !G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, "TH reads GroupTable attribute"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && !G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 22: { - LogStep(22, "TH removes the GroupKeySet"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; - value.groupKeySetID = 419U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetRemove::Id, value, chip::NullOptional - - ); - } - case 23: { - LogStep(23, "TH removes the GroupKeySet"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 24: { - LogStep(24, "TH verifies the corresponding GroupKeyMap entry has been removed"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); - } - case 25: { - LogStep(25, "TH verifies the corresponding GroupKeyMap entry has been removed"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 26: { - LogStep(26, "TH cleans up groups using RemoveAllGroups command"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, - chip::NullOptional - - ); - } - case 27: { - LogStep(27, "TH verifies the group has been removed in the GroupTable"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); - } - case 28: { - LogStep(28, "TH verifies the group has been removed in the GroupTable"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 29: { - LogStep(29, "TH removes ACL Operate privileges for Group 0x0103"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = commissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 30: { - LogStep(30, "TH removes ACL Operate privileges for Group 0x0103"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_SC_5_2Suite : public TestCommand -{ -public: - Test_TC_SC_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_5_2", 20, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SC_5_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::NodeId commissionerNodeId; - - 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::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - commissionerNodeId = value.nodeId; - } - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - 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)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - 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, 259U)); - } - break; - case 10: - 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))); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); - VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("Test Group 0101", 15))); - } - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0U)); - VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); - VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("", 0))); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - 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, "Read the commissioner node ID"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "TH adds ACL Operate privileges for Group 0x0103"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - 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.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = commissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].privilege = - static_cast(4); - 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] = 259ULL; - 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); - } - case 3: { - LogStep(3, "TH adds ACL Operate privileges for Group 0x0103"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "TH sends KeySetWrite command with TH key"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; - - value.groupKeySet.groupKeySetID = 419U; - value.groupKeySet.groupKeySecurityPolicy = - static_cast(0); - value.groupKeySet.epochKey0.SetNonNull(); - value.groupKeySet.epochKey0.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdfgarbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime0.SetNonNull(); - value.groupKeySet.epochStartTime0.Value() = 2220000ULL; - value.groupKeySet.epochKey1.SetNonNull(); - value.groupKeySet.epochKey1.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdfgarbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime1.SetNonNull(); - value.groupKeySet.epochStartTime1.Value() = 2220001ULL; - value.groupKeySet.epochKey2.SetNonNull(); - value.groupKeySet.epochKey2.Value() = chip::ByteSpan( - chip::Uint8::from_const_char( - "\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdfgarbage: not in length on purpose"), - 16); - value.groupKeySet.epochStartTime2.SetNonNull(); - value.groupKeySet.epochStartTime2.Value() = 2220002ULL; - - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional - - ); - } - case 5: { - LogStep(5, "TH sends KeySetWrite command with TH key"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "TH binds GroupId to GroupKeySet"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = new ListHolder(2); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].groupId = 257U; - listHolder_0->mList[0].groupKeySetID = 419U; - listHolder_0->mList[0].fabricIndex = 1U; - - listHolder_0->mList[1].groupId = 259U; - listHolder_0->mList[1].groupKeySetID = 419U; - listHolder_0->mList[1].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 2); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); - } - case 7: { - LogStep(7, "TH binds GroupId to GroupKeySet"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 8: { - LogStep(8, "TH sends RemoveAllGroups command"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, - chip::NullOptional - - ); - } - case 9: { - LogStep(9, "TH sends AddGroup command"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 259U; - value.groupName = chip::Span("Test Group 0103garbage: not in length on purpose", 15); - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional - - ); - } - case 10: { - LogStep(10, "TH sends AddGroup command again but using group messaging (0x0103)"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::AddGroup::Type value; - value.groupID = 257U; - value.groupName = chip::Span("Test Group 0101garbage: not in length on purpose", 15); - return SendGroupCommand(kIdentityAlpha, 259, Groups::Id, Groups::Commands::AddGroup::Id, value); - } - case 11: { - LogStep(11, "Wait for AddGroup"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 12: { - LogStep(12, "Verify there is no response from DUT"); - VerifyOrDo(!ShouldSkip("!PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = - chip::Span("Verify that there is no response from DUTgarbage: not in length on purpose", 41); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 13: { - LogStep(13, "TH sends ViewGroup command"); - VerifyOrDo(!ShouldSkip("G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupID = 257U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, - chip::NullOptional - - ); - } - case 14: { - LogStep(14, "TH sends ViewGroup command"); - VerifyOrDo(!ShouldSkip("!(G.S.F00)"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::ViewGroup::Type value; - value.groupID = 257U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, - chip::NullOptional - - ); - } - case 15: { - LogStep(15, "TH removes the GroupKeySet"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; - value.groupKeySetID = 419U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, - GroupKeyManagement::Commands::KeySetRemove::Id, value, chip::NullOptional - - ); - } - case 16: { - LogStep(16, "TH removes the GroupKeySet"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "TH cleans up groups using RemoveAllGroups command"); - ListFreer listFreer; - chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, - chip::NullOptional - - ); - } - case 18: { - LogStep(18, "TH removes ACL Operate privileges for Group 0x0103"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::DataModel::List value; - - { - auto * listHolder_0 = - new ListHolder(1); - listFreer.add(listHolder_0); - - listHolder_0->mList[0].privilege = - static_cast(5); - listHolder_0->mList[0].authMode = - static_cast(2); - listHolder_0->mList[0].subjects.SetNonNull(); - - { - auto * listHolder_3 = new ListHolder(1); - listFreer.add(listHolder_3); - listHolder_3->mList[0] = commissionerNodeId; - listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); - } - listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1U; - - value = chip::app::DataModel::List( - listHolder_0->mList, 1); - } - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 19: { - LogStep(19, "TH removes ACL Operate privileges for Group 0x0103"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_SWTCH_1_1Suite : public TestCommand { public: @@ -115162,285 +113702,10 @@ class Test_TC_BDX_1_3Suite : public TestCommand } }; -class Test_TC_BDX_1_4Suite : public TestCommand -{ -public: - Test_TC_BDX_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_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_BDX_1_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BDX_1_5Suite : public TestCommand -{ -public: - Test_TC_BDX_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_5", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BDX_1_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BDX_1_6Suite : public TestCommand -{ -public: - Test_TC_BDX_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_1_6", 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_BDX_1_6Suite() {} - - 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_BDX_2_1Suite : public TestCommand -{ -public: - Test_TC_BDX_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_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_BDX_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_BDX_2_2Suite : public TestCommand -{ -public: - Test_TC_BDX_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_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_BDX_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_BDX_2_3Suite : public TestCommand +class Test_TC_BDX_1_4Suite : public TestCommand { public: - Test_TC_BDX_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_3", 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); @@ -115448,7 +113713,7 @@ class Test_TC_BDX_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_2_3Suite() {} + ~Test_TC_BDX_1_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -115492,10 +113757,10 @@ class Test_TC_BDX_2_3Suite : public TestCommand } }; -class Test_TC_BDX_2_4Suite : public TestCommand +class Test_TC_BDX_1_5Suite : public TestCommand { public: - Test_TC_BDX_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_4", 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); @@ -115503,7 +113768,7 @@ class Test_TC_BDX_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_2_4Suite() {} + ~Test_TC_BDX_1_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -115547,10 +113812,10 @@ class Test_TC_BDX_2_4Suite : public TestCommand } }; -class Test_TC_BDX_2_5Suite : public TestCommand +class Test_TC_BDX_1_6Suite : public TestCommand { public: - Test_TC_BDX_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BDX_2_5", 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); @@ -115558,7 +113823,7 @@ class Test_TC_BDX_2_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BDX_2_5Suite() {} + ~Test_TC_BDX_1_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -115602,10 +113867,10 @@ class Test_TC_BDX_2_5Suite : public TestCommand } }; -class Test_TC_BR_1Suite : public TestCommand +class Test_TC_BDX_2_1Suite : public TestCommand { public: - Test_TC_BR_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_1", 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); @@ -115613,7 +113878,7 @@ class Test_TC_BR_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BR_1Suite() {} + ~Test_TC_BDX_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -115657,10 +113922,10 @@ class Test_TC_BR_1Suite : public TestCommand } }; -class Test_TC_BR_2Suite : public TestCommand +class Test_TC_BDX_2_2Suite : public TestCommand { public: - Test_TC_BR_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_2", 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); @@ -115668,7 +113933,7 @@ class Test_TC_BR_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BR_2Suite() {} + ~Test_TC_BDX_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -115712,10 +113977,10 @@ class Test_TC_BR_2Suite : public TestCommand } }; -class Test_TC_BR_3Suite : public TestCommand +class Test_TC_BDX_2_3Suite : public TestCommand { public: - Test_TC_BR_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_3", 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); @@ -115723,7 +113988,7 @@ class Test_TC_BR_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BR_3Suite() {} + ~Test_TC_BDX_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -115767,10 +114032,10 @@ class Test_TC_BR_3Suite : public TestCommand } }; -class Test_TC_BR_4Suite : public TestCommand +class Test_TC_BDX_2_4Suite : public TestCommand { public: - Test_TC_BR_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_4", 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); @@ -115778,7 +114043,7 @@ class Test_TC_BR_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BR_4Suite() {} + ~Test_TC_BDX_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -115822,10 +114087,10 @@ class Test_TC_BR_4Suite : public TestCommand } }; -class Test_TC_DA_1_1Suite : public TestCommand +class Test_TC_BDX_2_5Suite : public TestCommand { public: - Test_TC_DA_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_1", 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); @@ -115833,7 +114098,7 @@ class Test_TC_DA_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_1Suite() {} + ~Test_TC_BDX_2_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -115877,10 +114142,10 @@ class Test_TC_DA_1_1Suite : public TestCommand } }; -class Test_TC_DA_1_2Suite : public TestCommand +class Test_TC_BR_1Suite : public TestCommand { public: - Test_TC_DA_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_2", 0, credsIssuerConfig) + Test_TC_BR_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -115888,7 +114153,7 @@ class Test_TC_DA_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_2Suite() {} + ~Test_TC_BR_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -115932,10 +114197,10 @@ class Test_TC_DA_1_2Suite : public TestCommand } }; -class Test_TC_DA_1_3Suite : public TestCommand +class Test_TC_BR_2Suite : public TestCommand { public: - Test_TC_DA_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_3", 0, credsIssuerConfig) + Test_TC_BR_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -115943,7 +114208,7 @@ class Test_TC_DA_1_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_3Suite() {} + ~Test_TC_BR_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -115987,10 +114252,10 @@ class Test_TC_DA_1_3Suite : public TestCommand } }; -class Test_TC_DA_1_4Suite : public TestCommand +class Test_TC_BR_3Suite : public TestCommand { public: - Test_TC_DA_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_4", 0, credsIssuerConfig) + Test_TC_BR_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -115998,7 +114263,7 @@ class Test_TC_DA_1_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_4Suite() {} + ~Test_TC_BR_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116042,10 +114307,10 @@ class Test_TC_DA_1_4Suite : public TestCommand } }; -class Test_TC_DA_1_5Suite : public TestCommand +class Test_TC_BR_4Suite : public TestCommand { public: - Test_TC_DA_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_5", 0, credsIssuerConfig) + Test_TC_BR_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BR_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116053,7 +114318,7 @@ class Test_TC_DA_1_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_5Suite() {} + ~Test_TC_BR_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116097,10 +114362,10 @@ class Test_TC_DA_1_5Suite : public TestCommand } }; -class Test_TC_DA_1_6Suite : public TestCommand +class Test_TC_DA_1_1Suite : public TestCommand { public: - Test_TC_DA_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_6", 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); @@ -116108,7 +114373,7 @@ class Test_TC_DA_1_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DA_1_6Suite() {} + ~Test_TC_DA_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116152,10 +114417,10 @@ class Test_TC_DA_1_6Suite : public TestCommand } }; -class Test_TC_BINFO_2_2Suite : public TestCommand +class Test_TC_DA_1_2Suite : public TestCommand { public: - Test_TC_BINFO_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BINFO_2_2", 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); @@ -116163,7 +114428,227 @@ class Test_TC_BINFO_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BINFO_2_2Suite() {} + ~Test_TC_DA_1_2Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DA_1_3Suite : public TestCommand +{ +public: + Test_TC_DA_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_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_DA_1_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_DA_1_4Suite : public TestCommand +{ +public: + Test_TC_DA_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_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_DA_1_4Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DA_1_5Suite : public TestCommand +{ +public: + Test_TC_DA_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_5", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DA_1_5Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_DA_1_6Suite : public TestCommand +{ +public: + Test_TC_DA_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DA_1_6", 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_DA_1_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -138894,7 +137379,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), @@ -139018,8 +137502,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), @@ -139064,8 +137546,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), @@ -139253,7 +137733,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 7e47aa29ac6c57..8cbd89fe9f47cf 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -39,7 +39,6 @@ class TestList : public Command { printf("TestAccessControlCluster\n"); printf("Test_TC_ACL_1_1\n"); printf("Test_TC_ACL_2_1\n"); - printf("Test_TC_ACL_2_2\n"); printf("Test_TC_ACL_2_3\n"); printf("Test_TC_ACE_1_1\n"); printf("Test_TC_ACE_1_5\n"); @@ -168,7 +167,6 @@ class TestList : public Command { 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_5_1\n"); printf("Test_TC_SWTCH_1_1\n"); printf("Test_TC_TMP_1_1\n"); printf("Test_TC_TMP_2_1\n"); @@ -2964,143 +2962,6 @@ class Test_TC_ACL_2_1 : public TestCommandBridge { } }; -class Test_TC_ACL_2_2 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ACL_2_2() - : TestCommandBridge("Test_TC_ACL_2_2") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_ACL_2_2() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ACL_2_2\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ACL_2_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress( - chipTool, " ***** Test Step 1 : TH1 reads DUT Descriptor cluster ServerList attribute from Endpoint 0\n"); - err = TestTh1ReadsDutDescriptorClusterServerListAttributeFromEndpoint0_1(); - break; - case 2: - ChipLogProgress(chipTool, - " ***** Test Step 2 : TH1 reads DUT Descriptor cluster ServerList attribute from every Endpoint except 0\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestTh1ReadsDutDescriptorClusterServerListAttributeFromEveryEndpointExcept0_2(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestTh1ReadsDutDescriptorClusterServerListAttributeFromEndpoint0_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeServerListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads DUT Descriptor cluster ServerList attribute from Endpoint 0 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("serverList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("serverList", value, 31UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestTh1ReadsDutDescriptorClusterServerListAttributeFromEveryEndpointExcept0_2() - { - - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } -}; - class Test_TC_ACL_2_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -69984,1112 +69845,6 @@ class Test_TC_RH_2_1 : public TestCommandBridge { } }; -class Test_TC_SC_5_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_SC_5_1() - : TestCommandBridge("Test_TC_SC_5_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_SC_5_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SC_5_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SC_5_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 commissioner node ID\n"); - err = TestReadTheCommissionerNodeId_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH adds ACL Operate privileges for Group 0x0103\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThAddsAclOperatePrivilegesForGroup0x0103_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH adds ACL Operate privileges for Group 0x0103\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThAddsAclOperatePrivilegesForGroup0x0103_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends KeySetWrite command with incorrect key\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThSendsKeySetWriteCommandWithIncorrectKey_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends KeySetWrite command with incorrect key\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsKeySetWriteCommandWithIncorrectKey_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends KeySetWrite command with TH key\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThSendsKeySetWriteCommandWithThKey_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends KeySetWrite command with TH key\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsKeySetWriteCommandWithThKey_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH binds GroupId to GroupKeySet\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThBindsGroupIdToGroupKeySet_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH binds GroupId to GroupKeySet\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThBindsGroupIdToGroupKeySet_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends RemoveAllGroups command\n"); - err = TestThSendsRemoveAllGroupsCommand_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends AddGroup command\n"); - err = TestThSendsAddGroupCommand_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends ViewGroup command\n"); - if (ShouldSkip("G.S.F00")) { - NextTest(); - return; - } - err = TestThSendsViewGroupCommand_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends ViewGroup command\n"); - if (ShouldSkip("!(G.S.F00)")) { - NextTest(); - return; - } - err = TestThSendsViewGroupCommand_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends KeySetRead\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThSendsKeySetRead_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends KeySetRead\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsKeySetRead_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThReadsGroupKeyMapAttributeFromTheGroupKeyManagementCluster_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThReadsGroupKeyMapAttributeFromTheGroupKeyManagementCluster_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads GroupTable attribute\n"); - if (ShouldSkip("G.S.F00 && PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThReadsGroupTableAttribute_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads GroupTable attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && G.S.F00")) { - NextTest(); - return; - } - err = TestThReadsGroupTableAttribute_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads GroupTable attribute\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY && !G.S.F00")) { - NextTest(); - return; - } - err = TestThReadsGroupTableAttribute_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads GroupTable attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP && !G.S.F00")) { - NextTest(); - return; - } - err = TestThReadsGroupTableAttribute_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH removes the GroupKeySet\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThRemovesTheGroupKeySet_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH removes the GroupKeySet\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThRemovesTheGroupKeySet_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : TH verifies the corresponding GroupKeyMap entry has been removed\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThVerifiesTheCorrespondingGroupKeyMapEntryHasBeenRemoved_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : TH verifies the corresponding GroupKeyMap entry has been removed\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThVerifiesTheCorrespondingGroupKeyMapEntryHasBeenRemoved_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : TH cleans up groups using RemoveAllGroups command\n"); - err = TestThCleansUpGroupsUsingRemoveAllGroupsCommand_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : TH verifies the group has been removed in the GroupTable\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThVerifiesTheGroupHasBeenRemovedInTheGroupTable_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : TH verifies the group has been removed in the GroupTable\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThVerifiesTheGroupHasBeenRemovedInTheGroupTable_28(); - break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : TH removes ACL Operate privileges for Group 0x0103\n"); - if (ShouldSkip("PICS_SDK_CI_ONLY")) { - NextTest(); - return; - } - err = TestThRemovesAclOperatePrivilegesForGroup0x0103_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : TH removes ACL Operate privileges for Group 0x0103\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThRemovesAclOperatePrivilegesForGroup0x0103_30(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - 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 = 31; - - 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 * _Nonnull commissionerNodeId; - - CHIP_ERROR TestReadTheCommissionerNodeId_1() - { - - chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; - return GetCommissionerNodeId("alpha", value, ^(const chip::GetCommissionerNodeIdResponse & values) { - { - commissionerNodeId = [[NSNumber alloc] initWithUnsignedLongLong:values.nodeId]; - } - NextTest(); - }); - } - - CHIP_ERROR TestThAddsAclOperatePrivilegesForGroup0x0103_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id aclArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [commissionerNodeId copy]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:3U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [NSNumber numberWithUnsignedLongLong:259ULL]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = nil; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - aclArgument = temp_0; - } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH adds ACL Operate privileges for Group 0x0103 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThAddsAclOperatePrivilegesForGroup0x0103_3() - { - - 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("alpha", value); - } - - CHIP_ERROR TestThSendsKeySetWriteCommandWithIncorrectKey_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:419U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:111ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:222ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:333ULL]; - - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends KeySetWrite command with incorrect key Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsKeySetWriteCommandWithIncorrectKey_5() - { - - 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("alpha", value); - } - - CHIP_ERROR TestThSendsKeySetWriteCommandWithThKey_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = - [NSNumber numberWithUnsignedShort:419U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0U]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = - [[NSData alloc] initWithBytes:"\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = - [NSNumber numberWithUnsignedLongLong:2220000ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = - [[NSData alloc] initWithBytes:"\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = - [NSNumber numberWithUnsignedLongLong:2220001ULL]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = - [[NSData alloc] initWithBytes:"\xd2\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" length:16]; - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = - [NSNumber numberWithUnsignedLongLong:2220002ULL]; - - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends KeySetWrite command with TH key Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsKeySetWriteCommandWithThKey_7() - { - - 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("alpha", value); - } - - CHIP_ERROR TestThBindsGroupIdToGroupKeySet_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id groupKeyMapArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:259U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - groupKeyMapArgument = temp_0; - } - [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH binds GroupId to GroupKeySet Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThBindsGroupIdToGroupKeySet_9() - { - - 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("alpha", value); - } - - CHIP_ERROR TestThSendsRemoveAllGroupsCommand_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster removeAllGroupsWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH sends RemoveAllGroups command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsAddGroupCommand_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; - params.groupID = [NSNumber numberWithUnsignedShort:259U]; - params.groupName = @"Test Group"; - [cluster addGroupWithParams:params - completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends AddGroup command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsViewGroupCommand_12() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; - params.groupID = [NSNumber numberWithUnsignedShort:259U]; - [cluster viewGroupWithParams:params - completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends ViewGroup command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.groupID; - VerifyOrReturn(CheckValue("GroupID", actualValue, 259U)); - } - - { - id actualValue = values.groupName; - VerifyOrReturn(CheckValueAsString("GroupName", actualValue, @"Test Group")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsViewGroupCommand_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; - params.groupID = [NSNumber numberWithUnsignedShort:259U]; - [cluster viewGroupWithParams:params - completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends ViewGroup command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } - - { - id actualValue = values.groupID; - VerifyOrReturn(CheckValue("GroupID", actualValue, 259U)); - } - - { - id actualValue = values.groupName; - VerifyOrReturn(CheckValueAsString("GroupName", actualValue, @"")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsKeySetRead_14() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; - [cluster - keySetReadWithParams:params - completion:^( - MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends KeySetRead Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.groupKeySet; - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 419U)); - VerifyOrReturn(CheckValue("GroupKeySecurityPolicy", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 0U)); - VerifyOrReturn(CheckValueNull( - "EpochKey0", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey0)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime0", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0)); - VerifyOrReturn(CheckValue("EpochStartTime0", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0, 2220000ULL)); - VerifyOrReturn(CheckValueNull( - "EpochKey1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey1)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime1", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1)); - VerifyOrReturn(CheckValue("EpochStartTime1", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1, 2220001ULL)); - VerifyOrReturn(CheckValueNull( - "EpochKey2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey2)); - VerifyOrReturn(CheckValueNonNull("EpochStartTime2", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2)); - VerifyOrReturn(CheckValue("EpochStartTime2", - ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2, 2220002ULL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsKeySetRead_15() - { - - 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("alpha", value); - } - - CHIP_ERROR TestThReadsGroupKeyMapAttributeFromTheGroupKeyManagementCluster_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupKeyMapWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn( - CheckValue("GroupKeyMap", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupId, 259U)); - VerifyOrReturn(CheckValue("GroupKeySetID", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupKeySetID, - 419U)); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).fabricIndex, - 1U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsGroupKeyMapAttributeFromTheGroupKeyManagementCluster_17() - { - - 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("alpha", value); - } - - CHIP_ERROR TestThReadsGroupTableAttribute_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads GroupTable attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 259U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[0]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], - mEndpoint.HasValue() ? mEndpoint.Value() : 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, - @"Test Group")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsGroupTableAttribute_19() - { - - 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("alpha", value); - } - - CHIP_ERROR TestThReadsGroupTableAttribute_20() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads GroupTable attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("GroupId", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 259U)); - VerifyOrReturn(CheckValue("Endpoints", - [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) - actualValue[0]).endpoints count], - static_cast(1))); - VerifyOrReturn(CheckValue("", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], - mEndpoint.HasValue() ? mEndpoint.Value() : 1U)); - VerifyOrReturn(CheckValueAsString("GroupName", - ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, @"")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsGroupTableAttribute_21() - { - - 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("alpha", value); - } - - CHIP_ERROR TestThRemovesTheGroupKeySet_22() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; - [cluster keySetRemoveWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH removes the GroupKeySet Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThRemovesTheGroupKeySet_23() - { - - 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("alpha", value); - } - - CHIP_ERROR TestThVerifiesTheCorrespondingGroupKeyMapEntryHasBeenRemoved_24() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupKeyMapWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH verifies the corresponding GroupKeyMap entry has been removed Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn( - CheckValue("GroupKeyMap", [actualValue count], static_cast(0))); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThVerifiesTheCorrespondingGroupKeyMapEntryHasBeenRemoved_25() - { - - 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("alpha", value); - } - - CHIP_ERROR TestThCleansUpGroupsUsingRemoveAllGroupsCommand_26() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster removeAllGroupsWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH cleans up groups using RemoveAllGroups command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThVerifiesTheGroupHasBeenRemovedInTheGroupTable_27() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(0) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRReadParams alloc] init]; - params.filterByFabric = true; - [cluster - readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH verifies the group has been removed in the GroupTable Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(0))); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThVerifiesTheGroupHasBeenRemovedInTheGroupTable_28() - { - - 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("alpha", value); - } - - CHIP_ERROR TestThRemovesAclOperatePrivilegesForGroup0x0103_29() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id aclArgument; - { - NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [commissionerNodeId copy]; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; - } - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; - ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - - aclArgument = temp_0; - } - [cluster writeAttributeACLWithValue:aclArgument - completion:^(NSError * _Nullable err) { - NSLog(@"TH removes ACL Operate privileges for Group 0x0103 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThRemovesAclOperatePrivilegesForGroup0x0103_30() - { - - 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("alpha", value); - } -}; - class Test_TC_SWTCH_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -149785,7 +148540,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(), @@ -149914,7 +148668,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(),